diff options
author | Takashi Iwai <tiwai@suse.de> | 2023-03-03 16:20:56 +0300 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2023-03-03 16:20:56 +0300 |
commit | 26ed1d29fc44f3f2f0c396c1392abefac5f0454e (patch) | |
tree | ffba9ebddf759f04cbeca8adace5cc8093c58c2d /sound/soc/mediatek/common/mtk-dsp-sof-common.c | |
parent | e97fc9cffbb9f372b53b42c36cd7b20aab44a554 (diff) | |
parent | 7933b90b42896f5b6596e6a829bb31c5121fc2a9 (diff) | |
download | linux-26ed1d29fc44f3f2f0c396c1392abefac5f0454e.tar.xz |
Merge branch 'for-next' into for-linus
Diffstat (limited to 'sound/soc/mediatek/common/mtk-dsp-sof-common.c')
-rw-r--r-- | sound/soc/mediatek/common/mtk-dsp-sof-common.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/sound/soc/mediatek/common/mtk-dsp-sof-common.c b/sound/soc/mediatek/common/mtk-dsp-sof-common.c index 8b1b623207be..6fef16306f74 100644 --- a/sound/soc/mediatek/common/mtk-dsp-sof-common.c +++ b/sound/soc/mediatek/common/mtk-dsp-sof-common.c @@ -32,7 +32,7 @@ int mtk_sof_dai_link_fixup(struct snd_soc_pcm_runtime *rtd, continue; for_each_rtd_cpu_dais(runtime, j, cpu_dai) { - if (cpu_dai->stream_active[conn->stream_dir] > 0) { + if (snd_soc_dai_stream_active(cpu_dai, conn->stream_dir) > 0) { sof_dai_link = runtime->dai_link; break; } @@ -111,21 +111,17 @@ int mtk_sof_card_late_probe(struct snd_soc_card *card) for_each_rtd_cpu_dais(sof_rtd, j, cpu_dai) { struct snd_soc_dapm_route route; struct snd_soc_dapm_path *p = NULL; - struct snd_soc_dapm_widget *play_widget = - cpu_dai->playback_widget; - struct snd_soc_dapm_widget *cap_widget = - cpu_dai->capture_widget; + struct snd_soc_dapm_widget *widget = snd_soc_dai_get_widget(cpu_dai, conn->stream_dir); + memset(&route, 0, sizeof(route)); - if (conn->stream_dir == SNDRV_PCM_STREAM_CAPTURE && - cap_widget) { - snd_soc_dapm_widget_for_each_sink_path(cap_widget, p) { + if (conn->stream_dir == SNDRV_PCM_STREAM_CAPTURE && widget) { + snd_soc_dapm_widget_for_each_sink_path(widget, p) { route.source = conn->sof_dma; route.sink = p->sink->name; snd_soc_dapm_add_routes(&card->dapm, &route, 1); } - } else if (conn->stream_dir == SNDRV_PCM_STREAM_PLAYBACK && - play_widget) { - snd_soc_dapm_widget_for_each_source_path(play_widget, p) { + } else if (conn->stream_dir == SNDRV_PCM_STREAM_PLAYBACK && widget) { + snd_soc_dapm_widget_for_each_source_path(widget, p) { route.source = p->source->name; route.sink = conn->sof_dma; snd_soc_dapm_add_routes(&card->dapm, &route, 1); |