[alsa-devel] [PATCH] ASoC: ts3a227e: do not report jack status when there is i2c read err

Fang, Yang A yang.a.fang at intel.com
Wed Jul 1 20:24:53 CEST 2015



> -----Original Message-----
> From: Mark Brown [mailto:broonie at kernel.org]
> Sent: Wednesday, July 01, 2015 11:05 AM
> To: Fang, Yang A
> Cc: Dylan Reid; Liam Girdwood; alsa-devel at alsa-project.org; Sripathi, Srinivas;
> Jain, Praveen K; Iriawan, Denny; Nujella, Sathyanarayana;
> kevin.strasser at linux.intel.com; mika.westerberg at linux.intel.com
> Subject: Re: [alsa-devel] [PATCH] ASoC: ts3a227e: do not report jack status
> when there is i2c read err
> 
> On Wed, Jul 01, 2015 at 10:34:09AM -0700, Yang Fang wrote:
> > On Wed, Jul 01, 2015 at 10:12:37AM -0700, Dylan Reid wrote:
> 
> > > Thanks, I think the error checking is good to have anyway, but
> > > should the interrupt also be disabled across suspend/resume?  I'd
> > > hope this device's resume callback wouldn't happen until after the
> > > parent i2c bus is ready.
> 
> > I am looping Mika. I was expecting that interrupt would come after i2c
> > bus is ready. but with current pinctrl-cherryview driver the interrupt
> > comes in random order after resume.
> 
> I wouldn't rely on this, it's not going to be true in general - the interrupt could
> flag at any time after the interrupt controller is resumed so unless the I2C
> controller takes steps to ensure it is resumed before interrupts (which has its
> own complications) you could get an interrupt delivered prior to the I2C
> controller being ready.  Look at how arizona handles this for one example of
> dealing with this problem, though it's not ideal.

Thanks. i did a quick look at Arizona-core.c it disabled irq on suspend and enable irq
on resume.  I will give a try if this is what you referred to. 

In addition, current patch can address the issue even if the interrupt came prior to 
I2c bus is reumed . can I keep the err checking ?


More information about the Alsa-devel mailing list