Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Sameer Pujar and committed by
Mark Brown
30b428d0 7a226f2e

+3 -1
+3 -1
sound/soc/generic/audio-graph-card.c
··· 310 310 * For example: FE <-> BE1 <-> BE2 <-> ... <-> BEn where 311 311 * there are 'n' BE components in the path. 312 312 */ 313 - if (card->component_chaining && !soc_component_is_pcm(cpus)) 313 + if (card->component_chaining && !soc_component_is_pcm(cpus)) { 314 314 dai_link->no_pcm = 1; 315 + dai_link->be_hw_params_fixup = asoc_simple_be_hw_params_fixup; 316 + } 315 317 316 318 asoc_simple_canonicalize_cpu(cpus, is_single_links); 317 319 asoc_simple_canonicalize_platform(platforms, cpus);