[PATCH] ASoC: soc-compress.c: fixup private_data on snd_soc_new_compress()
Kuninori Morimoto
kuninori.morimoto.gx at renesas.com
Tue Jan 24 00:17:20 CET 2023
From: Kuninori Morimoto <kuninori.morimoto.gx at renesas.com>
commit d3268a40d4b19f ("ASoC: soc-compress.c: fix NULL dereference")
enables DPCM capture, but it should independent from playback.
This patch fixup it.
Fixes: d3268a40d4b1 ("ASoC: soc-compress.c: fix NULL dereference")
Acked-by: Charles Keepax <ckeepax at opensource.cirrus.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart at linux.intel.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx at renesas.com>
---
> Need Intel's Tested-by ?
sound/soc/soc-compress.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/soc-compress.c b/sound/soc/soc-compress.c
index b2a6bbb4e807..ed9e910659ab 100644
--- a/sound/soc/soc-compress.c
+++ b/sound/soc/soc-compress.c
@@ -616,7 +616,7 @@ int snd_soc_new_compress(struct snd_soc_pcm_runtime *rtd, int num)
rtd->fe_compr = 1;
if (rtd->dai_link->dpcm_playback)
be_pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream->private_data = rtd;
- else if (rtd->dai_link->dpcm_capture)
+ if (rtd->dai_link->dpcm_capture)
be_pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream->private_data = rtd;
memcpy(compr->ops, &soc_compr_dyn_ops, sizeof(soc_compr_dyn_ops));
} else {
--
2.25.1
More information about the Alsa-devel
mailing list