summaryrefslogtreecommitdiff
path: root/sound/soc/mediatek/mt8195/mt8195-dai-pcm.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/mediatek/mt8195/mt8195-dai-pcm.c')
-rw-r--r--sound/soc/mediatek/mt8195/mt8195-dai-pcm.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sound/soc/mediatek/mt8195/mt8195-dai-pcm.c b/sound/soc/mediatek/mt8195/mt8195-dai-pcm.c
index caceb0deb467..051433689ff5 100644
--- a/sound/soc/mediatek/mt8195/mt8195-dai-pcm.c
+++ b/sound/soc/mediatek/mt8195/mt8195-dai-pcm.c
@@ -213,11 +213,14 @@ static int mtk_dai_pcm_configure(struct snd_pcm_substream *substream,
static int mtk_dai_pcm_prepare(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai)
{
+ struct snd_soc_dapm_widget *p = snd_soc_dai_get_widget_playback(dai);
+ struct snd_soc_dapm_widget *c = snd_soc_dai_get_widget_capture(dai);
+
dev_dbg(dai->dev, "%s(), id %d, stream %d, widget active p %d, c %d\n",
__func__, dai->id, substream->stream,
- dai->playback_widget->active, dai->capture_widget->active);
+ p->active, c->active);
- if (dai->playback_widget->active || dai->capture_widget->active)
+ if (p->active || c->active)
return 0;
return mtk_dai_pcm_configure(substream, dai);