Hi David,

On Fri, Mar 11, 2011 at 1:12 AM, David Henningsson
<david.hennings...@canonical.com> wrote:
> On 2011-03-10 22:47, Margarita Olaya wrote:
>>
>> Hi,
>>
>> I have some initial code for jack sense implementation, the approach
>> is to listen /dev/input/eventX and pass that data as argument to a new
>> module called module-jack-detect where a thread wakes when the jack
>> has been inserted.
>>
>> Using the current code I'm able to catch jack insertion and removal,
>> next step is to signal PA core when the jack has been inserted so this
>> calls a hook in the PA UCM module to load the ucm configuration for
>> jack.
>
> Jack sense is something that we all want, so it's great that someone is
> working on it.
>
> The first tricky thing is to match /dev/input/eventX against the proper card
> - that is, if you have three cards, all with headphone outputs, you must
> know which card your event belongs to. Is this solved in your git tree? I
> had a quick look but couldn't find code for doing that. (You also seem to
> add threads for all eventX, even those not audio related at all, could this
> be improved?)
>
The card name is passed as argument to the jack module, it checks each
event device to see if it belongs to a sound card otherwise the event
is ignored. The jack module is loaded one time per card so we collect
the data for each card.

>> So, I need to send a message to any other interested module but I'm
>> sure how implement it, Can a hook be used to signal PA core?
>
> 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.

Regards,
Margarita
> --
> David Henningsson, Canonical Ltd.
> http://launchpad.net/~diwic
> _______________________________________________
> pulseaudio-discuss mailing list
> pulseaudio-discuss@mail.0pointer.de
> https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss
>
_______________________________________________
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss

Reply via email to