From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: alsa-devel@alsa-project.org
Cc: Shengjiu Wang <shengjiu.wang@gmail.com>,
"open list:FREESCALE SOC SOUND DRIVERS"
<linuxppc-dev@lists.ozlabs.org>,
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>,
Xiubo Li <Xiubo.Lee@gmail.com>,
tiwai@suse.de, Fabio Estevam <festevam@gmail.com>,
Sameer Pujar <spujar@nvidia.com>, Takashi Iwai <tiwai@suse.com>,
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
Liam Girdwood <lgirdwood@gmail.com>,
Nicolin Chen <nicoleotsuka@gmail.com>,
vkoul@kernel.org, broonie@kernel.org,
Gyeongtaek Lee <gt82.lee@samsung.com>,
Jaroslav Kysela <perex@perex.cz>,
Peter Ujfalusi <peter.ujfalusi@linux.intel.com>,
open list <linux-kernel@vger.kernel.org>
Subject: [RFC PATCH v3 10/13] ASoC: fsl: asrc_dma: protect for_each_dpcm_be() loops
Date: Wed, 13 Oct 2021 09:30:47 -0500 [thread overview]
Message-ID: <20211013143050.244444-11-pierre-louis.bossart@linux.intel.com> (raw)
In-Reply-To: <20211013143050.244444-1-pierre-louis.bossart@linux.intel.com>
Follow the locking model used within soc-pcm.c
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
---
sound/soc/fsl/fsl_asrc_dma.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/sound/soc/fsl/fsl_asrc_dma.c b/sound/soc/fsl/fsl_asrc_dma.c
index cd9b36ec0ecb..b67097503836 100644
--- a/sound/soc/fsl/fsl_asrc_dma.c
+++ b/sound/soc/fsl/fsl_asrc_dma.c
@@ -151,6 +151,7 @@ static int fsl_asrc_dma_hw_params(struct snd_soc_component *component,
int ret, width;
/* Fetch the Back-End dma_data from DPCM */
+ snd_soc_dpcm_fe_lock_irq(rtd, stream);
for_each_dpcm_be(rtd, stream, dpcm) {
struct snd_soc_pcm_runtime *be = dpcm->be;
struct snd_pcm_substream *substream_be;
@@ -164,6 +165,7 @@ static int fsl_asrc_dma_hw_params(struct snd_soc_component *component,
dev_be = dai->dev;
break;
}
+ snd_soc_dpcm_fe_unlock_irq(rtd, stream);
if (!dma_params_be) {
dev_err(dev, "failed to get the substream of Back-End\n");
--
2.25.1
parent reply other threads:[~2021-10-13 14:33 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20211013143050.244444-1-pierre-louis.bossart@linux.intel.com>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211013143050.244444-11-pierre-louis.bossart@linux.intel.com \
--to=pierre-louis.bossart@linux.intel.com \
--cc=Xiubo.Lee@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=festevam@gmail.com \
--cc=gt82.lee@samsung.com \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=nicoleotsuka@gmail.com \
--cc=perex@perex.cz \
--cc=peter.ujfalusi@linux.intel.com \
--cc=shengjiu.wang@gmail.com \
--cc=spujar@nvidia.com \
--cc=tiwai@suse.com \
--cc=tiwai@suse.de \
--cc=vkoul@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox