diff options
author | Samuel Holland <samuel@sholland.org> | 2020-03-05 06:11:43 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2020-03-06 15:24:11 +0100 |
commit | 95cfc0a0aaf575207152dd7601e782702565a6f1 (patch) | |
tree | 0c871e7bb05463b74a731e29e59ff0d01838a692 /Documentation/sound/soc | |
parent | ASoC: pcm: Export parameter intersection logic (diff) | |
download | linux-95cfc0a0aaf575207152dd7601e782702565a6f1.tar.xz linux-95cfc0a0aaf575207152dd7601e782702565a6f1.zip |
ASoC: simple-card: Add support for codec2codec DAI links
Following the example in cb2cf0de1174 ("ASoC: soc-core: care Codec <->
Codec case by non_legacy_dai_naming"), determine if a DAI link contains
only codec DAIs by examining the non_legacy_dai_naming flag in each
DAI's component.
For now, we assume there is only one or a small set of valid PCM stream
parameters, so num_params == 1 is good enough. We also assume that the
same params are valid for all supported streams. params is set to the
subset of parameters common among all DAIs, and then the existing code
automatically chooses the highest quality of the remaining values when
the link is brought up.
Signed-off-by: Samuel Holland <samuel@sholland.org>
Link: https://lore.kernel.org/r/20200305051143.60691-4-samuel@sholland.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'Documentation/sound/soc')
-rw-r--r-- | Documentation/sound/soc/codec-to-codec.rst | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Documentation/sound/soc/codec-to-codec.rst b/Documentation/sound/soc/codec-to-codec.rst index 810109d7500d..4eaa9a0c41fc 100644 --- a/Documentation/sound/soc/codec-to-codec.rst +++ b/Documentation/sound/soc/codec-to-codec.rst @@ -104,5 +104,10 @@ Make sure to name your corresponding cpu and codec playback and capture dai names ending with "Playback" and "Capture" respectively as dapm core will link and power those dais based on the name. -Note that in current device tree there is no way to mark a dai_link -as codec to codec. However, it may change in future. +A dai_link in a "simple-audio-card" will automatically be detected as +codec to codec when all DAIs on the link belong to codec components. +The dai_link will be initialized with the subset of stream parameters +(channels, format, sample rate) supported by all DAIs on the link. Since +there is no way to provide these parameters in the device tree, this is +mostly useful for communication with simple fixed-function codecs, such +as a Bluetooth controller or cellular modem. |