[alsa-devel] [lennart at poettering.net: Status of ALSA "simple" mixer interface]

Takashi Iwai tiwai at suse.de
Wed Nov 21 12:11:19 CET 2007


At Tue, 20 Nov 2007 01:51:51 +0100,
Lennart Poettering wrote:
> 
> A second question: 
> 
> aplay -L suggest to use "surround71:" (and *only* that) as plugin for my
> usb webcam that only has a single mono channel.  What's going wrong?
> Any idea where I should be looking?

Since it's a USB device, maybe Clemens has a better clue...

> To: Takashi Iwai <tiwai at suse.de>
> Subject: Re: Status of ALSA "simple" mixer interface
> From: Lennart Poettering <lennart at poettering.net>
> Date: Tue, 13 Nov 2007 17:56:46 +0100
> Message-ID: <20071113165646.GA735 at tango.0pointer.de>
> MIME-Version: 1.0
> Content-Disposition: inline
> In-Reply-To: <s5habpiv0z2.wl%tiwai at suse.de>
> Organization: Red Hat, Inc.
> User-Agent: Leviathan/19.8.0 zh (Cray 3; I; Solaris 4.711; Console)
> 
> On Tue, 13.11.07 12:28, Takashi Iwai (tiwai at suse.de) wrote:
> 
> Hi!
> 
> > > aplay -L suggest to use "surround71:" (and *only* that) as plugin for my
> > > usb webcam that only has a single mono channel.  What's going wrong?
> > > Any idea where I should be looking?
> > 
> > I guess it's C-Media one?  Its controller accepts only 8-channel
> > interleaved output even if the hardware supports only less channels.
> > Perhaps to save a few cent for the controller chip.
> 
> It's a cheap Philips webcam which really has only a single channel. If
> I try to open the device with "arecord", i get:
> 
> <snip>
> $ arecord -D surround71:CARD=U0x4710x311,DEV=0  -r 44100 -c 8 -f s16_le
> Recording WAVE 'stdin' : Signed 16 bit Little Endian, Rate 44100 Hz, Channels 8
> arecord: set_params:879: Broken configuration for this PCM: no configurations available
> </snip>
> 
> i.e. the device string that arecord -L lists for the device is not
> working at all. Actually, speaking of it, on my machine with 5 sound
> devices "aplay/arecord -L" generate almost exclusively total
> rubbish -- only for one device the list makes sense. Here's the 
> full list:
> 
> <snip>
> $ aplay -L | grep -v "^ "
> front:CARD=AudioPCI,DEV=0
> surround40:CARD=AudioPCI,DEV=0
> iec958:CARD=AudioPCI,DEV=0
> null
> front:CARD=V8237,DEV=0
> surround40:CARD=V8237,DEV=0
> surround41:CARD=V8237,DEV=0
> surround50:CARD=V8237,DEV=0
> surround51:CARD=V8237,DEV=0
> iec958:CARD=V8237,DEV=0
> surround41:CARD=U0x4710x311,DEV=0
> surround50:CARD=U0x4710x311,DEV=0
> surround51:CARD=U0x4710x311,DEV=0
> surround71:CARD=U0x4710x311,DEV=0
> surround41:CARD=Audio,DEV=0
> surround50:CARD=Audio,DEV=0
> surround51:CARD=Audio,DEV=0
> surround71:CARD=Audio,DEV=0
> </snip>
> 
> And this is the output of "arecord -L":
> 
> <snip>
> $ arecord -L | grep -v "^ "
> front:CARD=AudioPCI,DEV=0
> rear:CARD=AudioPCI,DEV=0
> surround40:CARD=AudioPCI,DEV=0
> iec958:CARD=AudioPCI,DEV=0
> null
> front:CARD=V8237,DEV=0
> surround40:CARD=V8237,DEV=0
> surround41:CARD=V8237,DEV=0
> surround50:CARD=V8237,DEV=0
> surround51:CARD=V8237,DEV=0
> iec958:CARD=V8237,DEV=0
> surround41:CARD=Audio,DEV=0
> surround50:CARD=Audio,DEV=0
> surround51:CARD=Audio,DEV=0
> surround71:CARD=Audio,DEV=0
> </snip>
> 
> For comparison, here's what /proc/asound/pcm contains:
> 
> <snip>
> 00-01: ES1371/2 : ES1371 DAC1 : playback 1
> 00-00: ES1371/1 : ES1371 DAC2/ADC : playback 1 : capture 1
> 01-01: VIA 8237 : VIA 8237 : playback 1 : capture 1
> 01-00: VIA 8237 : VIA 8237 : playback 4 : capture 1
> 02-01: Bt87x Analog : Bt87x Analog : capture 1
> 02-00: Bt87x Digital : Bt87x Digital : capture 1
> 03-00: USB Audio : USB Audio : capture 1
> 04-00: USB Audio : USB Audio : playback 1 : capture 1
> </snip>
> 
> First of all, the -L lists miss one device: my Bt878 tv card. It's
> hwoever shown properly in /proc/asound/pcm, and works fine if
> accessed.
> 
> Then, as mentioned above, it lists the mono-only webcam (U0x4710x311)
> with the four surround suggestions -- which doesn't make any sense at
> all. And only on "aplay -L" -- although it is a record only
> channel. If I try to open the audio device with any of the four
> suggestions I just get the "configuration error" back that is shown
> above. The way to open it is "hw:CARD=U0x4710x311,DEV=0" -- and
> of course only with arecord.
> 
> Then, it doesn't list either "front:" nor "iec958" for my USB surround
> sound card (The one listed as "Audio") -- both of which happen to work
> fine. However, it does list "surround71:", which is quite surprising,
> since the sound card doesn't have that many output ports -- but I
> guess that is one of the cases where the hardware just doesn't have
> soldered all outputs the device theoretically supports. Opening the
> device as surround71: works fine, BTW.
> 
> Then, for the "AudioPCI" card, it lists a "surround40:" device, which
> when opened just yields:
> 
> <snip>
> $ aplay -D surround40:CARD=AudioPCI,DEV=0
> ALSA lib setup.c:555:(add_elem) Cannot obtain info for CTL elem (MIXER,'AC97 2ch->4ch Copy Switch',0,0,0): No such file or directory
> aplay: main:546: audio open error: No such file or directory
> </snip>
> 
> And it also lists a "iec958" device for the same "AudioPCI", which
> just yields this:
> 
> <snip>
> $ aplay -D iec958:CARD=AudioPCI,DEV=0
> ALSA lib setup.c:555:(add_elem) Cannot obtain info for CTL elem (PCM,'IEC958 Playback PCM Stream',0,0,0): No such file or directory
> aplay: main:546: audio open error: No such file or directory
> </snip>
> 
> The hardware has no SPDIF and is stereo only.
> 
> And then, surprisingly it lists a "rear:" device -- but only for
> recording (!). Not surprisingly, this one doesn't work either.
> 
> The devices listed for the V8237 are the only ones which fully work
> and are complete.
> 
> So, in summary. For the five audio cards I have connected to my
> machine, "aplay -L" and "arecord -L" show 11 device hints that don't
> work at all. And it misses 6 device hints that are important.
> 
> I am not sure what to make of this, besides that the name hinting
> system is just badly broken. 
> 
> This is alsa-lib 1.0.15 on kernel 2.6.22, btw.


Takashi


More information about the Alsa-devel mailing list