summaryrefslogtreecommitdiff
path: root/sound/soc/generic/audio-graph-card.c
diff options
context:
space:
mode:
authorSameer Pujar <spujar@nvidia.com>2021-09-13 22:12:11 +0530
committerMark Brown <broonie@kernel.org>2021-09-20 13:31:29 +0100
commit30b428d02cbc9888d84407306d54dce8c2b8bfbf (patch)
treec0169921e606cf63ddae7212c2216a2f3ce1b112 /sound/soc/generic/audio-graph-card.c
parent7a226f2eabdc2e839d8f07c5ce087136f9c0f35c (diff)
ASoC: audio-graph: Fixup CPU endpoint hw_params in a BE<->BE link
When multiple components are connected back to back in an audio path, hw_param fixup may be required for CPU or Codec endpoint of BE<->BE DAI links. Currently fixup support is available for Codec and this commit adds similar feature for CPU endpoint of a BE<->BE link. For example a resampler component can be plugged into an audio path. [ FE -> BE1 -> ... -> resampler -> ... BEn ] The resampler DAI links can be: BEx (CPU) -> resampler input (Codec) resampler output (CPU) -> BEy (Codec) Thus input and output sample rate parameters for resampler can be fixed up as per the resample requirement. Signed-off-by: Sameer Pujar <spujar@nvidia.com> Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/1631551342-25469-4-git-send-email-spujar@nvidia.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, 3 insertions, 1 deletions
diff --git a/sound/soc/generic/audio-graph-card.c b/sound/soc/generic/audio-graph-card.c
index 546f6fd0609e..7eb027238327 100644
--- a/sound/soc/generic/audio-graph-card.c
+++ b/sound/soc/generic/audio-graph-card.c
@@ -310,8 +310,10 @@ static int graph_dai_link_of_dpcm(struct asoc_simple_priv *priv,
* For example: FE <-> BE1 <-> BE2 <-> ... <-> BEn where
* there are 'n' BE components in the path.
*/
- if (card->component_chaining && !soc_component_is_pcm(cpus))
+ if (card->component_chaining && !soc_component_is_pcm(cpus)) {
dai_link->no_pcm = 1;
+ dai_link->be_hw_params_fixup = asoc_simple_be_hw_params_fixup;
+ }
asoc_simple_canonicalize_cpu(cpus, is_single_links);
asoc_simple_canonicalize_platform(platforms, cpus);