HAL, sound cards and laptops

Lennart Poettering mzuny at 0pointer.de
Tue Aug 8 04:47:16 PDT 2006


On Tue, 08.08.06 13:27, Danny Kukawka (danny.kukawka at web.de) wrote:

> 
> On Monday 07 August 2006 22:19, Lennart Poettering wrote:
> > The current HAL OSS code uses strncmp() on the device name a lot. It's
> > trivial to modify the current code to ignore /dev/adsp entirely.
> 
> Why would you ignore now also /dev/adsp* ? This IIRC the second PCM device 
> (hw:0,1) you can't remove this device. As I already said: if you are
> not 

Oh, I am sorry. I meant to ignore /dev/audio, not /dev/adsp. /dev/adsp
makes sense and is indeed different than /dev/dsp. 

> interested in this device information: filter out the device and ignore it 
> (this is also what other applications do if they are not interested in 
> particular devices), but this is not a reason to remove the deviceinformation 
> from HAL.

As I said, there is no clean way to filter /dev/audio out in HAL
right now. Because it has all the same properties as /dev/dsp. The
only way to filter it out would be by doing strncmp() on the device
file. Which is ugly and definitely not portable.

The OSS spec sas that /dev/audio is a compatibility kludge (and a bad
one) so it shouldn't show up in modern things like HAL.

If you really want to keep that file you should at least correct a
labeling: it is a bad emulation of a Solaris API. Hence it should be
in the "solaris-sound" category and not in the "oss" category.

BTW: I prepared a patch for removing this thing:

https://bugs.freedesktop.org/show_bug.cgi?id=7803

> > > I guess keying of the DMI data (specifically smbios.system.product) is
> > > fine, it's just a lot of work maintaining that list. Maybe it's
> > > something to consider doing in the kernel drivers too?
> 
> from my other mail:
> ... In future, most machines will be replaced with either HD-audio or others 
> that are capable to tell more details of the hardware. Then such a thing will 
> become easier. ...

I thought HAL was about today's computers, wasn'it?

Hmm, I guess it would make sense to ask the ALSA people to export the
audio class attribute as returned by snd_pcm_info_get_class() in a
sysfs atribute, This would allow querying this value without opening
the device.

Lennart

-- 
Lennart Poettering; lennart [at] poettering [dot] net
ICQ# 11060553; GPG 0x1A015CC4; http://0pointer.net/lennart/


More information about the hal mailing list