summaryrefslogtreecommitdiffstats
path: root/sound/soc/generic/audio-graph-card.c
diff options
context:
space:
mode:
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>2020-07-07 16:04:37 -0500
committerMark Brown <broonie@kernel.org>2020-07-08 13:51:35 +0100
commit25612477d20b522a3203707ff23575b99f639fff (patch)
treed04a15d39308d77a2af99b0b2cfab2aa2b4c4c91 /sound/soc/generic/audio-graph-card.c
parent503ed52225ed3d369c8e0dedf13556a7bc1e5c2b (diff)
downloadlinux-25612477d20b522a3203707ff23575b99f639fff.tar.gz
linux-25612477d20b522a3203707ff23575b99f639fff.tar.bz2
linux-25612477d20b522a3203707ff23575b99f639fff.zip
ASoC: soc-dai: set dai_link dpcm_ flags with a helper
Add a helper to walk through all the DAIs and set dpcm_playback and dpcm_capture flags based on the DAIs capabilities, and use this helper to avoid setting these flags arbitrarily in generic cards. The commit referenced in the Fixes tag did not introduce the configuration issue but will prevent the card from probing when detecting invalid configurations. Fixes: b73287f0b0745 ('ASoC: soc-pcm: dpcm: fix playback/capture checks') Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Link: https://lore.kernel.org/r/20200707210439.115300-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/generic/audio-graph-card.c')
-rw-r--r--sound/soc/generic/audio-graph-card.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/generic/audio-graph-card.c b/sound/soc/generic/audio-graph-card.c
index 9ad35d9940fe..97b4f5480a31 100644
--- a/sound/soc/generic/audio-graph-card.c
+++ b/sound/soc/generic/audio-graph-card.c
@@ -317,8 +317,8 @@ static int graph_dai_link_of_dpcm(struct asoc_simple_priv *priv,
if (ret < 0)
goto out_put_node;
- dai_link->dpcm_playback = 1;
- dai_link->dpcm_capture = 1;
+ snd_soc_dai_link_set_capabilities(dai_link);
+
dai_link->ops = &graph_ops;
dai_link->init = asoc_simple_dai_init;