[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20211013143050.244444-10-pierre-louis.bossart@linux.intel.com>
Date: Wed, 13 Oct 2021 09:30:46 -0500
From: Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>
To: alsa-devel@...a-project.org
Cc: tiwai@...e.de, broonie@...nel.org, vkoul@...nel.org,
Sameer Pujar <spujar@...dia.com>,
Gyeongtaek Lee <gt82.lee@...sung.com>,
Peter Ujfalusi <peter.ujfalusi@...ux.intel.com>,
Kuninori Morimoto <kuninori.morimoto.gx@...esas.com>,
Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>,
Liam Girdwood <lgirdwood@...il.com>,
Jaroslav Kysela <perex@...ex.cz>,
Takashi Iwai <tiwai@...e.com>, Joe Perches <joe@...ches.com>,
Mikhail Durnev <mikhail_durnev@...tor.com>,
linux-kernel@...r.kernel.org (open list)
Subject: [RFC PATCH v3 09/13] ASoC: sh: rcar: protect for_each_dpcm_be() loops
Follow the locking model used within soc-pcm.c
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>
---
sound/soc/sh/rcar/core.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c
index 978bd0406729..ccd5c2d1cdc6 100644
--- a/sound/soc/sh/rcar/core.c
+++ b/sound/soc/sh/rcar/core.c
@@ -1511,6 +1511,7 @@ static int rsnd_hw_params(struct snd_soc_component *component,
struct snd_soc_dpcm *dpcm;
int stream = substream->stream;
+ snd_soc_dpcm_fe_lock_irq(fe, stream);
for_each_dpcm_be(fe, stream, dpcm) {
struct snd_pcm_hw_params *be_params = &dpcm->hw_params;
@@ -1519,6 +1520,7 @@ static int rsnd_hw_params(struct snd_soc_component *component,
if (params_rate(hw_params) != params_rate(be_params))
io->converted_rate = params_rate(be_params);
}
+ snd_soc_dpcm_fe_unlock_irq(fe, stream);
if (io->converted_chan)
dev_dbg(dev, "convert channels = %d\n", io->converted_chan);
if (io->converted_rate) {
--
2.25.1
Powered by blists - more mailing lists