how to have /dev/audio on ubuntu?

Russell Reiter rreiter91-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org
Sat Sep 29 17:07:38 UTC 2012


Try siggen output with  [siggen whatever CLI sound gen options]  |
aplay -D plughw

I don't think the Ubuntu team did anything but install pulseaudio as a
wrapper around the sound system device nodes.

I had a look at
http://www.comp.leeds.ac.uk/jj/linux/siggen.html
and found this

"soundinfo A program to display some of the programming capabilities
of the sound system support for the mixer device /dev/mixer and the
DSP device /dev/dsp. Can easily be changed if the mixer and dsp
devices are called something else. Also shows some of the ioctl calls
in action :-).\   Further info on your kernel's sound card
configuration is given by 'cat /dev/sndstat'."

I had a look through the tarball from this website and in configh.h
file, under user configurable stuff  it looks like you can turn off
DAC and output raw data to be captured in a file in WAV or other
format.

Further on in the configuration you can define your own sound system locations

/* DAC_FILE is name of sound output device
 */
#define DAC_FILE "/dev/dsp"
/* MIXER_FILE is name of mixer device
 */
#define MIXER_FILE "/dev/mixer"

If you can't pipe the output through the system to the speakers using
-D plughw, try making siggen from source with some changes.

Assuming you sound device is found at /dev/snd and the binary mixer
wrapper is somewhere like /dev/pulseaudio

Making those changes specific to your systems default locations might
get siggen working on Ubuntu for you.

It looks to me like siggen was originally designed to use OSS.

Where I am now on a debian install using ALSA  ls -la /dev/snd
shows as an example the character device

crw-rw----+ 1 root audio 116, 13 Sep 29 05:56 controlC0

cannot access OSS as indicated by the + sign  I believe this indicates
a non trivial access control list is in effect for this audio service,
ie. no oss available.

Russell

On Thu, Sep 27, 2012 at 12:25 PM, Zbigniew Koziol <softquake-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org> wrote:
> There is a simple solution to this particular problem, on Ubuntu.
>
> One can install siggen package and.. thats it (this is the one I actually
> wanted to use). It will create /dev/audio and such as well. When siggen is
> compiled from source and installed, it will not do that, hence it must have
> been modified by Ubuntu team for that purpose.
>
> zb.
>
>
>
> On 09/25/2012 09:43 PM, Russell Reiter wrote:
>>
>> Sound has traditionally been one of the more confusing issues in
>> setting up linux. I would have sent this earlier but I don't use
>> pulseaudio at home. Here's how it is set up on the computer I'm at
>> today. Newer hardware and running Fedora 17 3.3.4-5.fc17.i686.
>>
>> # which pulseaudio
>> /bin/pulseaudio
>>
>> In the following "by-id" and "by-path" are directories which contain
>> symlink connections to the hardware links in their parent /dev/snd
>> directory;
>>
>> # ls -la /dev/snd
>> total 0
>> drwxr-xr-x   4 root root      480 Sep 23 16:17 .
>> drwxr-xr-x  24 root root     4060 Sep 24 11:23 ..
>> drwxr-xr-x   2 root root       60 Sep 23 16:17 by-id
>> drwxr-xr-x   2 root root      100 Sep 23 16:17 by-path
>> crw-rw----+  1 root audio 116,  8 Sep 23 16:17 controlC0
>> crw-rw----+  1 root audio 116, 17 Sep 23 16:17 controlC1
>> crw-rw----+  1 root audio 116, 19 Sep 23 16:17 controlC2
>> crw-rw----+  1 root audio 116,  7 Sep 23 16:17 hwC0D2
>> crw-rw----+  1 root audio 116, 16 Sep 23 16:17 hwC1D0
>> crw-rw----+  1 root audio 116, 15 Sep 23 16:17 hwC1D1
>> crw-rw----+  1 root audio 116, 14 Sep 23 16:17 hwC1D2
>> crw-rw----+  1 root audio 116, 13 Sep 23 16:17 hwC1D3
>> crw-rw----+  1 root audio 116,  6 Sep 25 10:20 pcmC0D0c
>> crw-rw----+  1 root audio 116,  5 Sep 25 10:15 pcmC0D0p
>> crw-rw----+  1 root audio 116,  4 Sep 25 08:43 pcmC0D1c
>> crw-rw----+  1 root audio 116,  3 Sep 25 08:43 pcmC0D1p
>> crw-rw----+  1 root audio 116,  2 Sep 23 16:17 pcmC0D2c
>> crw-rw----+  1 root audio 116, 12 Sep 25 08:43 pcmC1D3p
>> crw-rw----+  1 root audio 116, 11 Sep 23 16:17 pcmC1D7p
>> crw-rw----+  1 root audio 116, 10 Sep 23 16:17 pcmC1D8p
>> crw-rw----+  1 root audio 116,  9 Sep 23 16:17 pcmC1D9p
>> crw-rw----+  1 root audio 116, 18 Sep 25 10:20 pcmC2D0c
>> crw-rw----   1 root audio 116,  1 Sep 23 16:17 seq
>> crw-rw----+  1 root audio 116, 33 Sep 23 16:17 timer
>>
>> controlC0, C1 and C2 are the three cards detected by the os.
>> In this case cat  /proc/asound/cards - shows C0 is the onboard sound
>> card, C1 is the Tv tuner and C2 is the mic on the USB camera.
>>
>> # cat /proc/asound/cards
>>   0 [Intel          ]: HDA-Intel - HDA Intel
>>                        HDA Intel at 0xfbff4000 irq 42
>>   1 [NVidia         ]: HDA-Intel - HDA NVidia
>>                        HDA NVidia at 0xfaffc000 irq 17
>>   2 [USB20Camera    ]: USB-Audio - USB2.0_Camera
>>                        PixArt Imaging Inc. USB2.0_Camera at usb-0000:00:1a
>>
>> The other detected bits of hardware in /dev/snd are: the several
>> hwCoD* which link the four HDMI sound output channels of the Tv tuner
>> card and the primary sound card's third subsystem device (pcmC0D2c)
>> for HDMI input. The pcmC0D0* are standard computer audio capture and
>> playback devices. (mic, line in, line out, etc) The ones ending with
>> "c" are capture and the ones ending in "p" are playback. C0 = three
>> input and two output channels C1 = four output channels C2 = one
>> output channel. Historically the joy and the sorrow of setting up a
>> sound system under linux has been linking a sound source to an output
>> sink.
>>
>> It is sometimes desirable to access the sound hardware directly from a
>> command line. This following would use ALSA (arecord) to capture the
>> audio from an analogue tv-card by piping that signal to the first
>> subsystem of the second audio card (hw: 1,0), at an appropriate
>> playback, quality in Hertz (-r 32000) and in stereo over two channels
>> (-c 2), further this command defines the signal is appropriate for a
>> Sound Blaster type card (-f S16_LE).
>>
>> tvtime | arecord -D hw:1,0 -r 32000 -c 2 -f S16_LE | aplay
>>
>> This machine using arecord with the above string would try to link the
>> first subsystem on the second card to a default output
>> sink [controlC0:pcmC0D0p], and not work because on the other machine
>> another sound device was enumerated before the primary sound card.
>> (udev burp) This machine would use hw:0,0 if it had to be done this
>> way.
>>
>> This shell snippet was for one of those tv cards which had an external
>> 1/8in pin connector to connect the sound output from the tv card to
>> the line in of the sound card, so sound would work for Windows. I
>> could never get that hardware configuration to work in linux. So we
>> grabbed the signal from the bus in a more traditional way.
>>
>> Your solution may be as simple as configuring siggen to use the
>> directory /dev/snd instead of /dev/audio. (assuming Ubuntu puts stuff
>> in /dev/snd) If your system is set up with OSS, these symlinks might
>> be placed in /dev/pcm.
>>
>> If you find the directory holding these hardware links you could try
>> symlinking that directory to /dev/audio
>>
>> As root #ln -s <path-to-your-sound-directory> /dev/audio
>> - might work and siggen will figure out which sink is where.
>>
>> I know this probably isn't any clearer than anything else you've read
>> on setting up sound but don't be afraid of breaking software, fixing
>> it again is half the fun :-)
>>
>> Russell
>>
>> On Fri, Sep 21, 2012 at 11:20 AM, Zbigniew Koziol <softquake-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org>
>> wrote:
>>>
>>> I remain confused. But I want to thank for responses, Russell and Mel.
>>>
>>> It seems that if I do not want to risk damaging the existing sound system
>>> I
>>> should not play too deep with what is there already.
>>>
>>> Fortunately, I have another box with Centos, and /dev/audio is still
>>> there.
>>>
>>> zb.
>>>
>>> On 09/21/2012 12:59 AM, Russell Reiter wrote:
>>>>
>>>> Ubuntu did not do a very good job of integrating pulseaudio. It's got
>>>> a lot of features but demands complete control over the sound hardware
>>>> and it looks like the Ubuntu folks rolled it out too quickly.
>>>>
>>>> If your hardware is older it might be better to go back to ALSA/OSS. I
>>>> haven't seen many problems with pulseaudio in newer equipment with
>>>> newer installs.
>>>>
>>>> I think ALSA still present in Ubuntu
>>>>
>>>> On the command line
>>>> $speaker-test (plays white noise)
>>>> $aplay - l (lists playback devices)
>>>> $arecord -l (lists record devices)
>>>>
>>>> $alsamixer (make sure PCM volume is not muted.)
>>>>
>>>> or $pavucontrol (under pulse for the same reason.)
>>>>
>>>> This site may be helpful.
>>>>
>>>>
>>>> http://www.hecticgeek.com/2012/01/how-to-remove-pulseaudio-use-alsa-ubuntu-linux/
>>>>
>>>> Hope this helps
>>>> Russell
>>>>
>>>>
>>>>
>>>> On Thu, Sep 20, 2012 at 2:39 PM, Zbigniew Koziol<softquake-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org>
>>>> wrote:
>>>>>
>>>>> I am so much confused by reading web, and I swear I never understood
>>>>> how
>>>>> sound works (except of the times of DOS).
>>>>>
>>>>> My program reports:
>>>>>
>>>>> [siggen] No such file or directory : /dev/audio
>>>>>
>>>>> "siggen" is the name of the program I want to use, but the error
>>>>> message,
>>>>> I
>>>>> guess, is not related to the program itself.
>>>>>
>>>>> So, how can I make siggen not reporting that silly error message but
>>>>> just
>>>>> working right away?
>>>>>
>>>>> My Ubuntu version is one of the latest ones.
>>>>>
>>>>> zb.
>>>>> http://nanolab.gu-unpk.ru/
>>>>>
>>>>> --
>>>>> The Toronto Linux Users Group.      Meetings: http://gtalug.org/
>>>>> TLUG requests: Linux topics, No HTML, wrap text below 80 columns
>>>>> How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists
>>>>
>>>> --
>>>> The Toronto Linux Users Group.      Meetings: http://gtalug.org/
>>>> TLUG requests: Linux topics, No HTML, wrap text below 80 columns
>>>> How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists
>>>
>>>
>>> --
>>> The Toronto Linux Users Group.      Meetings: http://gtalug.org/
>>> TLUG requests: Linux topics, No HTML, wrap text below 80 columns
>>> How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists
>>
>> --
>> The Toronto Linux Users Group.      Meetings: http://gtalug.org/
>> TLUG requests: Linux topics, No HTML, wrap text below 80 columns
>> How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists
>
>
> --
> The Toronto Linux Users Group.      Meetings: http://gtalug.org/
> TLUG requests: Linux topics, No HTML, wrap text below 80 columns
> How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list