Re: [Ekiga-list] Alsa device enumeration



Hi,

On Thu, 12 Mar 2009, Damien Sandras wrote:

I'm not sure. How can we know surround is non sense? How can we know
other similar non sense entries... To my eyes, Alsa is really purely
broken :-/

Very broken.
Alsa stands for advanced linux sound architecture - which is misleading.

Alsa rhymes with, and sounds very much like, the word "ulcer".

=================================================

Sound cards - my colleagues and I did a count of the typical number.
On a PC prior to 2000, (or so) the motherboard had a deficient onboard sound system, and you had to install a proper sound card.

On the more recent PCs, (and laptops) the onboard sound is fine.

However, the user will plugin in USB headsets (which are represented by alsa) as a sound card.

Thus, we have to consider a PC as containing 2 sound cards:
  1 that is always there
  1 that comes and goes while the application is running.

=========================================================

The labelling is deficient.

I have a machine here that has two sound cards.
 1 on the motherboard, 3x3.5mm sockets, mic, speaker, line in
    (yes, 3 sockets.. only one is output)


 1 ES1371 (ensoniq)  4x3.5mm sockets, mic, speker, linein, lineout

Ok, now remember this description of 7x3.5mm sockets.

How does alsa report this as ?
output of aplay -l

**** List of PLAYBACK Hardware Devices ****
card 0: AudioPCI [Ensoniq AudioPCI], device 0: ES1371/1 [ES1371 DAC2/ADC]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: AudioPCI [Ensoniq AudioPCI], device 1: ES1371/2 [ES1371 DAC1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: AudioPCI_1 [Ensoniq AudioPCI], device 0: ES1371/1 [ES1371 DAC2/ADC]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: AudioPCI_1 [Ensoniq AudioPCI], device 1: ES1371/2 [ES1371 DAC1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0



output of aplay -L

front:CARD=AudioPCI,DEV=0
    Ensoniq AudioPCI, ES1371 DAC2/ADC
    Front speakers
surround40:CARD=AudioPCI,DEV=0
    Ensoniq AudioPCI, ES1371 DAC2/ADC
    4.0 Surround output to Front and Rear speakers
iec958:CARD=AudioPCI,DEV=0
    Ensoniq AudioPCI, ES1371 DAC2/ADC
    IEC958 (S/PDIF) Digital Audio Output
null
    Discard all samples (playback) or generate zero samples (capture)
front:CARD=AudioPCI_1,DEV=0
    Ensoniq AudioPCI, ES1371 DAC2/ADC
    Front speakers
surround40:CARD=AudioPCI_1,DEV=0
    Ensoniq AudioPCI, ES1371 DAC2/ADC
    4.0 Surround output to Front and Rear speakers
iec958:CARD=AudioPCI_1,DEV=0
    Ensoniq AudioPCI, ES1371 DAC2/ADC
    IEC958 (S/PDIF) Digital Audio Output

=========================
Here is the problem:
we need to turn the above two lists into something meaningful for the user.

both cards on this machine are reported as having two play subdevices. Yet only one is available.

Which card is which?
  Which card is the motherboard, and which card is in the PCI socket?

One of the tasks of the alsa code has to be to work out what the physical location of each card is, and report it accordingly.

Now, this is just one example of the brokenness of alsa.
Every application that uses alsa has to enumerate sound cards, work out their physical location, work out when new cards (usb headsets etc) are plugged in... Isn't that what libraries are for - so that common code goes in the library, and applications share the output of the common code???


Derek.
--
Derek Smithies Ph.D.
IndraNet Technologies Ltd.
Email: derek indranet co nz
ph +64 3 365 6485
Web: http://www.indranet-technologies.com/


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]