Lines Matching +full:audio +full:- +full:graph
8 Dynamic PCM allows an ALSA PCM device to digitally route its PCM audio to
10 digital audio to I2S DAI0, I2S DAI1 or PDM DAI2. This is useful for on SoC DSP
15 graph representing the DSP internal audio paths and uses the mixer settings to
18 DPCM re-uses all the existing component codec, platform and DAI drivers without
22 Phone Audio System with SoC based DSP
23 -------------------------------------
25 Consider the following phone audio subsystem. This will be used in this
26 document for all examples :-
29 | Front End PCMs | SoC DSP | Back End DAIs | Audio devices |
32 PCM0 <------------> * * <----DAI0-----> Codec Headset
34 PCM1 <------------> * * <----DAI1-----> Codec Speakers
36 PCM2 <------------> * * <----DAI2-----> MODEM
38 PCM3 <------------> * * <----DAI3-----> BT
40 * * <----DAI4-----> DMIC
42 * * <----DAI5-----> FM
45 This diagram shows a simple smart phone audio subsystem. It supports Bluetooth,
48 supports 6 back end (BE) DAIs. Each FE PCM can digitally route audio data to any
49 of the BE DAIs. The FE PCM devices can also route audio to more than 1 BE DAI.
53 Example - DPCM Switching playback from DAI0 to DAI1
54 ---------------------------------------------------
56 Audio is being played to the Headset. After a while the user removes the headset
57 and audio continues playing on the speakers.
59 Playback on PCM0 to Headset would look like :-
65 PCM1 <------------> * * <----DAI1-----> Codec Speakers
67 PCM2 <------------> * * <----DAI2-----> MODEM
69 PCM3 <------------> * * <----DAI3-----> BT
71 * * <----DAI4-----> DMIC
73 * * <----DAI5-----> FM
76 The headset is removed from the jack by user so the speakers must now be used :-
80 PCM0 <============> * * <----DAI0-----> Codec Headset
82 PCM1 <------------> * * <====DAI1=====> Codec Speakers
84 PCM2 <------------> * * <----DAI2-----> MODEM
86 PCM3 <------------> * * <----DAI3-----> BT
88 * * <----DAI4-----> DMIC
90 * * <----DAI5-----> FM
93 The audio driver processes this as follows :-
97 2. Machine driver OR audio HAL disables the Headset path.
102 4. Machine driver or audio HAL enables the speaker path.
107 In this example, the machine driver or userspace audio HAL can alter the routing
109 the link up or down. Audio playback does not stop during this transition.
117 except that we also have to :-
123 3. Define widget graph connections.
127 -------------------
130 | Front End PCMs | SoC DSP | Back End DAIs | Audio devices |
133 PCM0 <------------> * * <----DAI0-----> Codec Headset
135 PCM1 <------------> * * <----DAI1-----> Codec Speakers
137 PCM2 <------------> * * <----DAI2-----> MODEM
139 PCM3 <------------> * * <----DAI3-----> BT
141 * * <----DAI4-----> DMIC
143 * * <----DAI5-----> FM
147 FE DAI links are defined as follows :-
155 .platform_name = "dsp-audio",
156 .codec_name = "snd-soc-dummy",
157 .codec_dai_name = "snd-soc-dummy-dai",
176 The BE DAIs are configured as follows :-
183 .cpu_dai_name = "ssp-dai.0",
184 .platform_name = "snd-soc-dummy",
186 .codec_name = "rt5640.0-001c",
187 .codec_dai_name = "rt5640-aif1",
204 like a BT phone call :-
208 PCM0 <------------> * * <----DAI0-----> Codec Headset
210 PCM1 <------------> * * <----DAI1-----> Codec Speakers
212 PCM2 <------------> * * <====DAI2=====> MODEM
214 PCM3 <------------> * * <====DAI3=====> BT
216 * * <----DAI4-----> DMIC
218 * * <----DAI5-----> FM
232 --------------------
253 rate->min = rate->max = 48000;
254 channels->min = channels->max = 2;
264 Widget graph connections
265 ------------------------
267 The BE DAI links will normally be connected to the graph at initialisation time
269 has to be set explicitly in the driver :-
272 /* BE for codec Headset - DAI0 is dummy and managed by DSP FW */
282 implement :-
284 1. Front End PCM DAIs - i.e. struct snd_soc_dai_driver.
286 2. DAPM graph showing DSP audio routing from FE DAIs to BEs.
288 3. DAPM widgets from DSP graph.
296 Items 6 is important for routing the audio outside of the DSP. AIF need to be
298 have :-
304 The BE AIF are used to connect the DSP graph to the graphs for the other
305 component drivers (e.g. codec graph).
316 PCM0 <------------> * * <----DAI0-----> Codec Headset
318 PCM1 <------------> * * <====DAI1=====> Codec Speakers/Mic
320 PCM2 <------------> * * <====DAI2=====> MODEM
322 PCM3 <------------> * * <----DAI3-----> BT
324 * * <----DAI4-----> DMIC
326 * * <----DAI5-----> FM
332 The host can control the hostless link either by :-
334 1. Configuring the link as a CODEC <-> CODEC style link. In this case the link
335 is enabled or disabled by the state of the DAPM graph. This usually means
340 graph. Control is then carried out by the FE as regular PCM operations.
342 userspace code to control the link. Its recommended to use CODEC<->CODEC
346 CODEC <-> CODEC link
347 --------------------
349 This DAI link is enabled when DAPM detects a valid path within the DAPM graph.
367 .codec_dai_name = "modem-aif1",
383 -----------