Re: [PATCH v2 3/5] ASoC: mt6797: add mt6797 platform driver

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

 



On Wed, 2018-04-18 at 17:46 +0100, Mark Brown wrote:
Wants to clarify on few comments, others will be updated in next patch.

> > +		/* turn of mute function */
> > +		dl_src2_con0 |= (0x03 << 11);
> 
> Is there any reason for not implementing this as a mute_stream()
> callback?  That'll keep the DAI muted during startup and before teardown
> which will do the most to avoid any noise making it into the output.

We used to avoid the pop sound from user space by closing hw path from outside to inside.
The control here is just to avoid the state is leaved in muted state.
I'll take a look at the mute_stream() though.

> > +static irqreturn_t mt6797_afe_irq_handler(int irq_id, void *dev)
> > +{
> > +	struct mtk_base_afe *afe = dev;
> > +	struct mtk_base_afe_irq *irq;
> > +	unsigned int status;
> > +	unsigned int mcu_en;
> > +	int ret;
> > +	int i;
> > +
> > +	/* get irq that is sent to MCU */
> > +	regmap_read(afe->regmap, AFE_IRQ_MCU_EN, &mcu_en);
> 
> ...
> 
> > +	/* clear irq */
> > +	regmap_write(afe->regmap,
> > +		     AFE_IRQ_MCU_CLR,
> > +		     status & AFE_IRQ_STATUS_BITS);
> > +
> > +	return IRQ_HANDLED;
> > +}
> 
> This unconditionally returns IRQ_HANDLED even if we didn't get an
> interrupt - it's better to return IRQ_NONE unless we actually handled
> something since that is more robust if something goes wrong, it lets the
> IRQ core shut up interrupts that get latched on and works with shared
> interrupts if any future designs do that.

this IRQ num is not shared with other module, it's only for audio.
We error handle by clearing the all the irq status again, when
interrupts is sent but status not matched. we consider this handled?

I'm concerned if returing IRQ_NONE, will i no longer be able
to receive irq from this irq line?
Thanks

_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel



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

  Powered by Linux