[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e71f1db7fecefa1f8eccd29d5a6cad3c126a1753.camel@perches.com>
Date: Mon, 11 Oct 2021 01:58:34 -0700
From: Joe Perches <joe@...ches.com>
To: Vijendar Mukunda <Vijendar.Mukunda@....com>, broonie@...nel.org,
alsa-devel@...a-project.org
Cc: Alexander.Deucher@....com, Basavaraj.Hiregoudar@....com,
Sunil-kumar.Dommati@....com, Mario.Limonciello@....com,
Richard.Gong@....com, Liam Girdwood <lgirdwood@...il.com>,
Jaroslav Kysela <perex@...ex.cz>,
Takashi Iwai <tiwai@...e.com>,
open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 06/13] ASoC: amd: add acp6x irq handler
On Mon, 2021-10-11 at 11:26 +0530, Vijendar Mukunda wrote:
> Add ACP6x irq handler for handling irq events for ACP IP.
> Add pdm irq events handling.
> Whenever audio data equal to the PDM watermark level are consumed,
> interrupt is generated. Acknowledge the interrupt.
> diff --git a/sound/soc/amd/yc/pci-acp6x.c b/sound/soc/amd/yc/pci-acp6x.c
[]
> @@ -116,6 +118,33 @@ static int acp6x_deinit(void __iomem *acp_base)
> return 0;
> }
>
> +static irqreturn_t acp6x_irq_handler(int irq, void *dev_id)
> +{
> + struct acp6x_dev_data *adata;
> + struct pdm_dev_data *yc_pdm_data;
> + u16 irq_flag;
irq_flag seems unnecessary.
> + u32 val;
> +
> + adata = dev_id;
> + if (!adata)
> + return IRQ_NONE;
> +
> + irq_flag = 0;
> + val = acp6x_readl(adata->acp6x_base + ACP_EXTERNAL_INTR_STAT);
> + if (val & BIT(PDM_DMA_STAT)) {
> + yc_pdm_data = dev_get_drvdata(&adata->pdev[0]->dev);
> + acp6x_writel(BIT(PDM_DMA_STAT), adata->acp6x_base + ACP_EXTERNAL_INTR_STAT);
> + if (yc_pdm_data->capture_stream)
> + snd_pcm_period_elapsed(yc_pdm_data->capture_stream);
> + irq_flag = 1;
Could be:
return IRQ_HANDLED;
> + }
> +
> + if (irq_flag)
> + return IRQ_HANDLED;
> + else
> + return IRQ_NONE;
and
return IRQ_NONE;
> +}
Powered by blists - more mailing lists