diff options
author | Jerome Brunet <jbrunet@baylibre.com> | 2020-07-31 14:06:03 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2020-07-31 19:06:52 +0100 |
commit | da3f23fde9d7b4a7e0ca9a9a096cec3104df1b82 (patch) | |
tree | c495cd1405dc624c8f4bbdb3fa0fc52a841477d0 /sound/soc/meson/axg-card.c | |
parent | 4f8721542f7b75954bfad98c51aa59d683d35b50 (diff) | |
download | linux-da3f23fde9d7b4a7e0ca9a9a096cec3104df1b82.tar.bz2 |
ASoC: meson: cards: deal dpcm flag change
Commit b73287f0b074 ("ASoC: soc-pcm: dpcm: fix playback/capture checks")
changed the meaning of dpcm_playback/dpcm_capture and now requires the
CPU DAI BE to aligned with those flags.
This broke all Amlogic cards with uni-directional backends (All gx and
most axg cards).
While I'm still confused as to how this change is an improvement, those
cards can't remain broken forever. Hopefully, next time an API change is
done like that, all the users will be updated as part of the change, and
not left to fend for themselves.
Fixes: b73287f0b074 ("ASoC: soc-pcm: dpcm: fix playback/capture checks")
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Link: https://lore.kernel.org/r/20200731120603.2243261-1-jbrunet@baylibre.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/meson/axg-card.c')
-rw-r--r-- | sound/soc/meson/axg-card.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/sound/soc/meson/axg-card.c b/sound/soc/meson/axg-card.c index 47f2d93224fe..33058518c3da 100644 --- a/sound/soc/meson/axg-card.c +++ b/sound/soc/meson/axg-card.c @@ -327,20 +327,22 @@ static int axg_card_add_link(struct snd_soc_card *card, struct device_node *np, return ret; if (axg_card_cpu_is_playback_fe(dai_link->cpus->of_node)) - ret = meson_card_set_fe_link(card, dai_link, np, true); + return meson_card_set_fe_link(card, dai_link, np, true); else if (axg_card_cpu_is_capture_fe(dai_link->cpus->of_node)) - ret = meson_card_set_fe_link(card, dai_link, np, false); - else - ret = meson_card_set_be_link(card, dai_link, np); + return meson_card_set_fe_link(card, dai_link, np, false); + + ret = meson_card_set_be_link(card, dai_link, np); if (ret) return ret; - if (axg_card_cpu_is_tdm_iface(dai_link->cpus->of_node)) - ret = axg_card_parse_tdm(card, np, index); - else if (axg_card_cpu_is_codec(dai_link->cpus->of_node)) { + if (axg_card_cpu_is_codec(dai_link->cpus->of_node)) { dai_link->params = &codec_params; - dai_link->no_pcm = 0; /* link is not a DPCM BE */ + } else { + dai_link->no_pcm = 1; + snd_soc_dai_link_set_capabilities(dai_link); + if (axg_card_cpu_is_tdm_iface(dai_link->cpus->of_node)) + ret = axg_card_parse_tdm(card, np, index); } return ret; |