[systemd-devel] udev/systemd/pulseaudio/lirc please improve hotplugging

Colin Guthrie gmane at colin.guthr.ie
Wed Jul 24 00:57:17 PDT 2013


'Twas brillig, and Damian Ivanov at 23/07/13 13:01 did gyre and gimble:
> Hey guys,
> 
> udev/systemd/pulseaudio/lirc should provide a maximum amount of
> hotplugging, there are dozens of questions and bug reports on the net
> about
> the creative X-fi USB sound card on Linux. The sound itself works,
> also 5.1 channels work though standard is set to stereo. The sound
> card has a remote control with it, which is very
> difficult to set up, a lot of people don't manage it. Wouldn't it be
> much smoother if
> a) pulseaudio sets the best available channel configuration for the
> card and also the default channels and sample rate - sound rattling (
> http://community.linuxmint.com/hardware/view/7476  )

PulseAudio already reads udev properties on the devices
(PULSE_PROFILE_SET) to see if the a specific (i.e. non-probed) profile
set is needed for that h/w.

It would be relatively trivial to improve that to read e.g.
PULSE_PREFERRED_PROFILE_NAME or similar such that a default profile was
picked (assuming no other override), but that said all profiles have a
built in "priority" calculated in PA, the highest of which is used in
the even of no other configuration.

So really this is something you can pretty much create with a custom
profile-set for the X-fi and add it to the udev rules. (all of this is
in PulseAudio and thus should really be directed to that mailing list).

As a side note, the udev rules in PA should probably be converted to the
hwdb format now I guess (although they are not tooooo large, it's still
the new shiny way to do things :D)


> b) if udev registers the card set up/recommend/message the user accordingly:
>        lircd - --device=hw:Pro --driver=alsa_usb

How would udev "message the user"?

At present there are a few horrible hacky mechanisms in place to do
similar udev->userspace stuff (including installing missing packages on
plug) such as the system-config-printer stuff. I guess it would be nice
to create a slightly more generic udev->userspace communicator
protocol/applet for handling things like this for desktop scenarios. Has
anyone given this any thought?

Col

-- 

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited http://www.tribalogic.net/
Open Source:
  Mageia Contributor http://www.mageia.org/
  PulseAudio Hacker http://www.pulseaudio.org/
  Trac Hacker http://trac.edgewall.org/


More information about the systemd-devel mailing list