HAL, sound cards and laptops

Matthew Garrett mjg59 at srcf.ucam.org
Tue Aug 8 05:17:07 PDT 2006


On Tue, Aug 08, 2006 at 02:04:32PM +0200, Danny Kukawka wrote:

> No, IMO not. This is as I already wrote only possible for AC97 and not 
> HD-audio and other devices. And if this only work for AC97, this info is IMO 
> useless. But you can also check this in your code if you really need this 
> info. The only correct way is via ALSA.

Mm? Surely the entire point of hal is to provide this information 
without needing to know the specific APIs? It would be massively helpful 
if hal would tell me whether a device node corresponds to a real sound 
card or a modem. AFAIK, there's no trivial way to get that information 
via OSS, which is still a supported kernel API.

> > 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. 

Making assumptions based on device node names is going to break in 
certain (pathological) cases nowadays. The entire point of code like hal 
is to let us make decisions based on the capabilities of the device 
itself, rather than on potentially faulty assumptions about stable 
device node names.

On the other hand, I don't agree with just dropping the audio devices. 
Perhaps include an audio namespace and define audio.defaults to specify 
what you get if you just open the device and dump data into it?

-- 
Matthew Garrett | mjg59 at srcf.ucam.org


More information about the hal mailing list