aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/sound/soc/mediatek/mt8183/mt8183-dai-pcm.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/mediatek/mt8183/mt8183-dai-pcm.c')
-rw-r--r--sound/soc/mediatek/mt8183/mt8183-dai-pcm.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/sound/soc/mediatek/mt8183/mt8183-dai-pcm.c b/sound/soc/mediatek/mt8183/mt8183-dai-pcm.c
index bc3ba3228f08..4e25287fc0e4 100644
--- a/sound/soc/mediatek/mt8183/mt8183-dai-pcm.c
+++ b/sound/soc/mediatek/mt8183/mt8183-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 = mt8183_rate_transform(afe->dev, rate, dai->id);
unsigned int pcm_con = 0;
@@ -193,10 +195,9 @@ 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) {
@@ -270,8 +271,8 @@ static struct snd_soc_dai_driver mtk_dai_pcm_driver[] = {
.formats = MTK_PCM_FORMATS,
},
.ops = &mtk_dai_pcm_ops,
- .symmetric_rates = 1,
- .symmetric_samplebits = 1,
+ .symmetric_rate = 1,
+ .symmetric_sample_bits = 1,
},
{
.name = "PCM 2",
@@ -291,8 +292,8 @@ static struct snd_soc_dai_driver mtk_dai_pcm_driver[] = {
.formats = MTK_PCM_FORMATS,
},
.ops = &mtk_dai_pcm_ops,
- .symmetric_rates = 1,
- .symmetric_samplebits = 1,
+ .symmetric_rate = 1,
+ .symmetric_sample_bits = 1,
},
};