[pulseaudio-discuss] [RFC] Pulseaudio jack sense

Colin Guthrie gmane at colin.guthr.ie
Thu Apr 7 15:12:10 PDT 2011


Hiya Maggie,

'Twas brillig, and Margarita Olaya at 11/03/11 16:50 did gyre and gimble:
>> > The second thing is to figure out what we should really do once we have
>> > detected jack insertion or removal. Adding a hook event and let other
>> > modules act on that, seems reasonable to me. But we should also add a
>> > property to the property list (or something similar?) telling the current
>> > state of the jack - and btw, can this be figured out by reading from
>> > /dev/input/eventX at startup?
>> >
> atm the target is to used it along with the UCM module, so once we
> have detected jack insertion or removal the UCM will configure the
> sound card for it, so  we need a (new?) hook to notify the other
> modules.


Sorry for lack of replies from me of late... been a bit swamped at
$DAYJOB :p

Am I right in saying that you basically have to set appropriate "verbs"
via UCM when the jack is inserted?


In my mind, jack detection should basically change the sink/source ports
only. Then the UCM module would hook into the fact that the port had
changed to do it's magic (there are existing hooks for this already in
place).

That way jack detection is technically separated from UCM via the
"abstraction" of sink/source ports in PA.

We discussed a similar logic for setting verbs on IRC.
http://colin.guthr.ie/meetings/pulseaudio-meeting/2011/pulseaudio-meeting.2011-02-24-21.02.log.html#l-146

This may not be entirely possible depending on what you actually need to
do with UCM... but perhaps it will fit in nicely.


I've not looked specifically at the code, but I'd have expected that
jack detection would somehow be built into module-alsa-card or
module-alsa-source/sink rather than shipped as a separate module (tho'
I'm maybe not appreciating some intricacy here)... I'll try and review
the code soon (although others may have beaten me to it anyway :D)

Cheers

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