greybus: audio: Report jack events conditionally
authorVaibhav Agarwal <vaibhav.agarwal@linaro.org>
Thu, 1 Sep 2016 06:08:41 +0000 (11:38 +0530)
committerGreg Kroah-Hartman <gregkh@google.com>
Fri, 2 Sep 2016 12:13:39 +0000 (14:13 +0200)
commitcec89df44692fa8cff2a52542b11878ee49b0d69
tree40965715772c88f738faeff0de53a0a77c82e3f1
parent847175e8e660045f9366e7efd091969e8f32cc0c
greybus: audio: Report jack events conditionally

Now jack & jack-buttons are registered to snd_jack framework based on
the capability shared by module's topology data. Thus, jack events
should be reported to above snd framework only in case corresponding
jack type is registered. This patch adds additional checks to avoid
reporting fake jack events.

Signed-off-by: Vaibhav Agarwal <vaibhav.agarwal@linaro.org>
Reviewed-by: Mark Greer <mgreer@animalcreek.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/audio_module.c