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

Configure Feed

Select the types of activity you want to include in your feed.

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 <yesanishhere@gmail.com>
Reviewed-by: Bagas Sanjaya <bagasdotme@gmail.com>
Link: https://patch.msgid.link/20241109192231.11623-1-yesanishhere@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

anish kumar and committed by
Mark Brown
e90dbd38 125d0f69

+26
+26
Documentation/sound/soc/machine.rst
··· 71 71 .ops = &corgi_ops, 72 72 }; 73 73 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 + 74 86 struct snd_soc_card then sets up the machine with its DAIs. e.g. 75 87 :: 76 88 ··· 93 81 .num_links = 1, 94 82 }; 95 83 84 + Following this, ``devm_snd_soc_register_card`` can be used to register 85 + the sound card. During the registration, the individual components 86 + such as the codec, CPU, and platform are probed. If all these components 87 + are successfully probed, the sound card gets registered. 96 88 97 89 Machine Power Map 98 90 ----------------- ··· 111 95 ---------------- 112 96 113 97 Machine specific audio mixer controls can be added in the DAI init function. 98 + 99 + 100 + Clocking Controls 101 + ----------------- 102 + 103 + As previously noted, clock configuration is handled within the machine driver. 104 + For details on the clock APIs that the machine driver can utilize for 105 + setup, please refer to Documentation/sound/soc/clocking.rst. However, the 106 + callback needs to be registered by the CPU/Codec/Platform drivers to configure 107 + the clocks that is needed for the corresponding device operation.