HAL, sound cards and laptops

Lennart Poettering mzuny at 0pointer.de
Fri Aug 11 05:55:29 PDT 2006


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

> > I read it like this: /dev/audio is a compatibility kludge for some
> > legacy applications. And things like that should not show up in HAL,
> > should they?
> 
> Why not? Only because this is a historical device? We use e.g. exactly this 
> device via HAL to set and guarantee the correct device permissions via resmgr 
> (hal-resmgr) for the user on SUSE. Because of this we need this device in 
> HAL.

Hmm? I think this is very broken by SUSE. 

But anyway. Would you at least merge a patch which would change the
"oss.type" to "pcm-solaris-legacy" or something like that?

> > What kind of filter would you suggest? If you read my original mail
> > closely you'll see that besides doing some strncmp() on
> > oss.device_file there is no way to tell these devices apart. And this
> > is really ugly.
> 
> This is not really ugly. I don't see why a strncmp should be a problem. This 
> is what many other applications also do if they get a list of devices and 
> would only use some of them. If the strncmp() is the reason to
> remove the 

Look, this specific device file might reside in different locations on
different operating systems. Just think of devfs device paths. Or
think of someone having a UDEV rule which renames his sound devices
for him, so that "/dev/audio" becomes "/dev/intel-hda-audio" and so
on. Or think of MacOSX where the file systems layout is completely
different from the FHS.

Please learn that in Linux 2.6 times the device file name should *not*
be used to deduce the type of the device. 

> device: what happen if the next come and don't want to 
> display /dev/dsp ? ... ;-)

Oh, come on! Stay reasonable, please!

> > Legacy apps which want to use /dev/audio are welcome to do so even if
> > that specific device doesn't show up in HAL.
> 
> What kind of argument is this?

I am just arguing that modern programs which use HAL should not use
/dev/audio. And legacy applications that do use /dev/audio do not use
HAL.

Seems very logic to me, doesn't it to you?

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


More information about the hal mailing list