[alsa-devel] [PATCH 11/19] ASoC: upd9976: add jack detection function

Lu Guanqun guanqun.lu at intel.com
Thu May 5 02:37:39 CEST 2011


On Thu, May 05, 2011 at 12:32:31AM +0800, Mark Brown wrote:
> On Wed, May 04, 2011 at 09:45:50PM +0800, Lu Guanqun wrote:
> 
> > +void upd9976_jack_detection(struct snd_soc_jack *jack, u8 interrupt_status)
> > +{
> > +	int status = 0;
> > +	unsigned int value = 0;
> > +	struct snd_soc_codec *codec = jack->codec;
> > +	int mask = SND_JACK_BTN_0 | SND_JACK_BTN_1 | SND_JACK_HEADSET;
> > +
> > +	if (interrupt_status & 0x3)
> > +		value = snd_soc_read(codec, UPD9976_SAUXINT);
> 
> > +EXPORT_SYMBOL_GPL(upd9976_jack_detection);
> > +
> 
> I'd expect that the driver would also manage the work to do with
> handling the interrupt as well.

Yes, I see some wm* codec driver handles the interrupt directly in
CODEC. I'm not sure whether it's better handled in codec driver or
machine driver. Now it's confirmed by you, I'll change it
correspondingly.

-- 
guanqun


More information about the Alsa-devel mailing list