[PATCH] add soundcard device and fix device_file handling

David Zeuthen david at fubar.dk
Tue Mar 20 12:32:56 PDT 2007


On Tue, 2007-03-20 at 11:01 +0100, Danny Kukawka wrote:
> > Should probably stil check for device_file != NULL before looking at the
> > first character...
> 
> IMO this is not needed because the coldplug code already do this:
> 
> no_node:
>         if (hotplug_event->sysfs.device_file[0] == '\0')
>                 HAL_INFO (("new event (no dev node) '%s'", sysfs_path));
> 
> But I can add this really paranoid check.

Yeah, it's always good to check things since otherwise things might stop
working when/if we change the event dispatcher..

> Is there no /sys/devices/pci*/*/card0 device on your machine? What print
> 'ls -lha /sys/class/sound/' on your machine? IMO this should be part of the
> kernel with the new sysfs structure. IIRC it was not part of 2.6.18 but in
> 2.6.20 on my machines. At least it break nothing on older kernel versions.
> 
> The (finally, if we depend on 2.6.20) goal is to add all card related information 
> to the soundcard itself and not again and again to each single sound device 
> (as e.g. alsa/oss.card and alsa/oss.card_id). Btw this would also reflect the 
> real sysfs structure in the future.

Why is this an advantage? It might be, I'm not opposed to change things
unless it starts breaking PulseAudio (did you test?) or other apps etc.
I just like to see some justification. Perhaps it should be called
alsa_soundcard as well since this is for ALSA only, yes?

> IMO we should think about moving the alsa and oss namespace to the (new) sound 
> namespace as a subspace/class by changing all alsa.*/oss.* properties to 
> sound.alsa.*/sound.oss.* , but for the we need to depend on >= 2.6.20

Probably it's better to wait for HAL 0.5.10 and we'll bump the
requirements to Linux 2.6.20. It's still fishy that it will only with
with !CONFIG_SYSFS_DEPRECATED especially if apps start depending on this
and then it only works on kernels configured in such a way....

      David




More information about the hal mailing list