[PATCH 1/2] alsa: add jack detection support

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

 



Sorry for late reply...

On Fri, 2011-05-20 at 09:14 -0500, Jorge Eduardo Candelaria wrote:
> >> +    if (event->value)
> >> +        pa_hook_fire(&u->core->hooks[PA_CORE_HOOK_JACK_INSERT], &jack);
> >> +    else
> >> +        pa_hook_fire(&u->core->hooks[PA_CORE_HOOK_JACK_REMOVE], &jack);
> > 
> > Firing core hooks directly from modules looks a bit dirty to me.
> 
> I'm actually not very familiar with hooks, however do we need to signal the jack 
> insertion/removal events from jack_report().
> 
> What would be a more clean solution?

Adding just a couple of trivial functions to the core would probably
suffice:

void pa_jack_inserted(pa_core *c, pa_jack_event *e);
void pa_jack_removed(pa_core *c, pa_jack_event *e);

Those functions would do nothing but call pa_hook_fire(), so this is a
purely cosmetic thing...

-- 
Tanu




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

  Powered by Linux