HAL, sound cards and laptops

Lennart Poettering mzuny at 0pointer.de
Sun Aug 6 14:53:45 PDT 2006


Hi!

We're currently working on adding HAL support to PulseAudio. While
working on it I noticed a few things:

- My laptop has a softmodem which is available as ALSA device on
  Linux. Currently there is no way to tell the difference between a
  real sound card and such a modem in HAL. Therefore I would like to
  suggest adding a new property to HAL for alsa, perhaps called
  "alsa.class" or something which can take the value "modem" or
  "audio". Because the ALSA API doesn't offer a way to query if
  something is a modem or not this property should probably be set by
  an .fdi file. Because the PCI device class is "7" for a modem and
  "5" for a real sound card that .fdi file should be very easy to
  write.

  Would you accept such a patch?

  (The same issue appears with the OSS stuff, hence I'd like to see
  the same for "oss.class")

  I a not sure, however, if instead of adding new properties this
  could be folded into info.capabilities.

- Currently all OSS devices appear twice in HAL. Once for /dev/audio
  and once for /dev/dsp. Apart from this property "oss.device_file"
  they both have all the same properties. AFAIK the two OSS device files are 
  practically identical, except they have a different set of defaults. In
  PulseAudio we want only one of the two devices. Which one is not
  important for us. But we do not want them listed both. Right now we
  cannot tell them apart besides doing some awful
  strncmp(oss.device_file, "/dev/dsp", 8) == 0.

  Therefore I'd like to suggest removing the /dev/audio
  devices from HAL's device tree. Nobody uses them anyway and they are
  fully redundant. If there is a good reason to keep them, then I
  would at least suggest adding some kind of property to tell them
  apart cleanly.

- My laptop has a sound card which does 5.1 audio. At least that's
  what ALSA says. In reality however, there are only stereo speakers
  in the machine and the only audio jack is stereo, too. I would like
  to see this information exposed in HAL. Something like
  "alsa.physical_audio_channels" which would be set according to some
  DMI data. I don't know HAL that well, but I am sure that this can be
  done in .fdi files.

Something unrelated to sound:

- Has anybody been looking into exposing information about those "RF
  Kill" buttons in HAL? The HAL spec has a namespace "button" and
  currently defines only "lid", "power" and "sleep" as possible
  types. Maybe it would make sense to add "bluetooth-kill" and
  "wlan-kill" to this list?

- My laptop generates fake keyboard events when the screen brightness
  is changed. These keyboard events can easily be trapped using
  /dev/input/event. Right now the HAL spec doesn't define a DBUS
  signal that is emitted when the brightness is changed. Would you
  accept a patch for adding one for this?

I am interested in your comments!

Lennart

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


More information about the hal mailing list