summaryrefslogtreecommitdiff
path: root/sound/soc/mediatek/mt6797/mt6797-dai-pcm.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2023-03-03 16:20:56 +0300
committerTakashi Iwai <tiwai@suse.de>2023-03-03 16:20:56 +0300
commit26ed1d29fc44f3f2f0c396c1392abefac5f0454e (patch)
treeffba9ebddf759f04cbeca8adace5cc8093c58c2d /sound/soc/mediatek/mt6797/mt6797-dai-pcm.c
parente97fc9cffbb9f372b53b42c36cd7b20aab44a554 (diff)
parent7933b90b42896f5b6596e6a829bb31c5121fc2a9 (diff)
downloadlinux-26ed1d29fc44f3f2f0c396c1392abefac5f0454e.tar.xz
Merge branch 'for-next' into for-linus
Diffstat (limited to 'sound/soc/mediatek/mt6797/mt6797-dai-pcm.c')
-rw-r--r--sound/soc/mediatek/mt6797/mt6797-dai-pcm.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sound/soc/mediatek/mt6797/mt6797-dai-pcm.c b/sound/soc/mediatek/mt6797/mt6797-dai-pcm.c
index 51f736f319e4..8a309b0734f7 100644
--- a/sound/soc/mediatek/mt6797/mt6797-dai-pcm.c
+++ b/sound/soc/mediatek/mt6797/mt6797-dai-pcm.c
@@ -183,6 +183,8 @@ static int mtk_dai_pcm_hw_params(struct snd_pcm_substream *substream,
struct snd_soc_dai *dai)
{
struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(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);
unsigned int rate = params_rate(params);
unsigned int rate_reg = mt6797_rate_transform(afe->dev, rate, dai->id);
unsigned int pcm_con = 0;
@@ -193,10 +195,10 @@ static int mtk_dai_pcm_hw_params(struct snd_pcm_substream *substream,
substream->stream,
rate,
rate_reg,
- 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;
switch (dai->id) {