Re: [PATCH 07/11] ASoC: codecs: rt274: Enable irq only when needed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jun 10, 2022 at 11:33:34AM +0200, Amadeusz Sławiński wrote:
> On 6/9/2022 4:18 PM, Mark Brown wrote:
> > On Thu, Jun 09, 2022 at 03:35:37PM +0200, Amadeusz Sławiński wrote:
> > > Interrupt is only needed when jack detection is enabled, so enable it
> > > then, similarly disable it when jack detection is being disabled.

> > >   	if (jack == NULL) {
> > >   		/* Disable jack detection */
> > > +		disable_irq(rt274->i2c->irq);

> > There is absolutely no need to do this, it'll interfere with any sharing
> > of the interrupt and if the interrupt isn't firing then there is no cost
> > to having the interrupt registered.

> > The driver could use some cleanup of the interrupt handler, it currently
> > unconditionally clears anything that fires and reports IRQ_HANDLED but
> > should only report IRQ_HANDLED if there was anything from the device.
> > Practically speaking it shouldn't make much difference unless there's
> > spurious interrupts or the interrupt gets shared.

> I will recheck this again, but if I remember correctly we may have had
> problems that codec kept firing interrupts when we unloaded machine board
> and codec driver kept spamming dmesg due to _dbg message present in irq
> handler.

If there's issues there they should be fixed in the interrupt handler -
the driver should be able to handle the interrupt sensibly either way.

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux