Skip to content

Commit e90dbd3

Browse files
yesanishherebroonie
authored andcommitted
ASoC: machine: update documentation
1. Added clocking details. 2. Updated ways to register the dai's 3. Bit more detail about card registration details. Signed-off-by: anish kumar <[email protected]> Reviewed-by: Bagas Sanjaya <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 125d0f6 commit e90dbd3

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

Documentation/sound/soc/machine.rst

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,18 @@ struct snd_soc_dai_link is used to set up each DAI in your machine. e.g.
7171
.ops = &corgi_ops,
7272
};
7373

74+
In the above struct, dai’s are registered using names but you can pass
75+
either dai name or device tree node but not both. Also, names used here
76+
for cpu/codec/platform dais should be globally unique.
77+
78+
Additionaly below example macro can be used to register cpu, codec and
79+
platform dai::
80+
81+
SND_SOC_DAILINK_DEFS(wm2200_cpu_dsp,
82+
DAILINK_COMP_ARRAY(COMP_CPU("samsung-i2s.0")),
83+
DAILINK_COMP_ARRAY(COMP_CODEC("spi0.0", "wm0010-sdi1")),
84+
DAILINK_COMP_ARRAY(COMP_PLATFORM("samsung-i2s.0")));
85+
7486
struct snd_soc_card then sets up the machine with its DAIs. e.g.
7587
::
7688

@@ -81,6 +93,10 @@ struct snd_soc_card then sets up the machine with its DAIs. e.g.
8193
.num_links = 1,
8294
};
8395

96+
Following this, ``devm_snd_soc_register_card`` can be used to register
97+
the sound card. During the registration, the individual components
98+
such as the codec, CPU, and platform are probed. If all these components
99+
are successfully probed, the sound card gets registered.
84100

85101
Machine Power Map
86102
-----------------
@@ -95,3 +111,13 @@ Machine Controls
95111
----------------
96112

97113
Machine specific audio mixer controls can be added in the DAI init function.
114+
115+
116+
Clocking Controls
117+
-----------------
118+
119+
As previously noted, clock configuration is handled within the machine driver.
120+
For details on the clock APIs that the machine driver can utilize for
121+
setup, please refer to Documentation/sound/soc/clocking.rst. However, the
122+
callback needs to be registered by the CPU/Codec/Platform drivers to configure
123+
the clocks that is needed for the corresponding device operation.

0 commit comments

Comments
 (0)