[RFC] Pulseaudio jack sense

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Colin,

On Thu, Apr 7, 2011 at 5:12 PM, Colin Guthrie <gmane at colin.guthr.ie> wrote:
> 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
>
no problem :)

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

more than a verb its a device, we are under the assumption that jack
insertion corresponds to a headset then we will use the UCM to set the
headset device that means the associated asound controls will be
enabled.

>
> 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)
>

Well the UCM code corresponding on what to do when jack is plug or
unplug  its part of module-alsa-card but we had to add first the logic
in PA to detect the jack insertation/removel  that it is basically a
listener of /dev/input/eventX, that is used by the kernel to report
the event. All the logic for jack detection has been added in a new
module.

I'll wait your feedback/questions related to UCM integration :)

Thanks,
Margarita

> 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/]
>
> _______________________________________________
> pulseaudio-discuss mailing list
> pulseaudio-discuss at mail.0pointer.de
> https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss
>



[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux