Skip to contentSkip to conversation

Usage of jack_status_check in ASoC GPIO

DISCUSSION Omair Mohammed Abdullah 2 participants 2 messages Feb 17, 2012

lore
Share & tools
lore
#0 lore raw

If I need to call a codec driver function whenever Headset status changes (to set various registers, turn off micbias etc.). In such a case, can the jack_status_check callback in snd_soc_jack_gpio structure be used? If I use it, I would need to modify the callback to pass certain parameters (codec pointer, status). Is this the intended use of the callback?

#1 lore raw
Quoted 6 lines · Omair Mohammed Abdullah

If I need to call a codec driver function whenever Headset status changes (to set various registers, turn off micbias etc.). In such a case, can the jack_status_check callback in snd_soc_jack_gpio structure be used? If I use it, I would need to modify the callback to pass certain parameters (codec pointer, status). Is this the intended use of the callback?

I rather suspect you shouldn't be doing that and should be doing something else instead (probably using the notifiers) but without seeing what you're trying to accomplish it's hard to comment in detail.