[pulseaudio-discuss] Order-based or priority-based default device?

Colin Guthrie gmane at colin.guthr.ie
Wed Sep 7 07:27:34 PDT 2011


'Twas brillig, and David Henningsson at 07/09/11 14:37 did gyre and gimble:
> The idea of "start to use what you plug in" is nice. If you plug
> something in, you likely want to use it. Or do you? Anyway, that
> approach seems to me to have an unsolvable problem: We don't know that
> it actually was plugged in.
> 
> I've tried to talk to a few people, and from what I can tell, there is
> no point in time when the system can be considered to be fully "up and
> running". This means e g, if a new bluetooth device shows up say 30
> seconds after PulseAudio starts, we don't know if this was because
> someone actually connected the bluetooth headset at that point, or if it
> was connected from start but took 30 seconds to respond and negotiate
> with the bluez stack. Same goes for USB, and in theory other devices as
> well, but I've never seen it happen in practice to anything internal/PCI.
> 
> Also, this applies not only at boot, but also at resume from suspend or
> hibernate.
> 
> Given that lack of information from the kernel/hardware, I can only
> assume that order-based handling is bound to fail. And so is
> module-switch-on-connect, that implements this. (And so is Ubuntu's
> suspend/resume script, btw.)

Yay, I never did like that script :p

> This leaves us rule/priority-based policy decisions, which I believe is
> what Colin thinks as well. Comments?

Yup, but you outlined it nicely :)

That said, there is likely still scope for changing where in the
priority list new devices are injected (top or bottom being the only two
valid choices), although that will still be subject to the problems you
outline above. Hopefully the general use case is more "hotplug" related
than "first boot", so I'm not sure there will be overly many practical
problems, but you're absolutely right to consider them.

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 pulseaudio-discuss mailing list