[alsa-devel] [PATCH] ASoC: wm8903: disable mic detect irqs until jack registered

Stephen Warren swarren at wwwdotorg.org
Sat Jun 9 06:31:43 CEST 2012


On 06/08/2012 07:31 PM, Mark Brown wrote:
> On Fri, Jun 08, 2012 at 11:37:54AM -0600, Stephen Warren wrote:
> 
>> This problem can be triggered by fully initializing an audio
>> card, then removing and re-inserting the machine driver module.
>> This would leave mic detection enabled in HW, and mic_jack set to
>> a stale value.
> 
> This isn't a good fix for this issue, - the fact that it works is
> more a sign that nobody got round to moving the interrupt
> registration to the I2C probe() function than anything else.
...
> In terms of the mic detection itself it's really the responsibility
> of the machine driver to say that the jack doesn't exist any more
> when it's being removed - it should be calling wm8903_mic_detect()
> again during unregistration to disable the interrupt. ...

OK, that makes sense. I guess I can do that in the card's .remove()
function. I'd shied away from doing that before since the jacks are
created in the DAI link's init() function, and there wasn't a
symmetrical DAI link remove() function to match that, but the card
remove() should be fine.


More information about the Alsa-devel mailing list