Lines Matching +full:audio +full:- +full:graph +full:- +full:card

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,
47 modem. This sound card exposes 4 DSP front end (FE) ALSA PCM devices and
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 :-
153 DAILINK_COMP_ARRAY(COMP_PLATFORM("dsp-audio")));
176 The BE DAIs are configured as follows :-
180 DAILINK_COMP_ARRAY(COMP_CPU("ssp-dai.0")),
181 DAILINK_COMP_ARRAY(COMP_CODEC("rt5640.0-001c", "rt5640-aif1")));
202 like a BT phone call :-
206 PCM0 <------------> * * <----DAI0-----> Codec Headset
208 PCM1 <------------> * * <----DAI1-----> Codec Speakers
210 PCM2 <------------> * * <====DAI2=====> MODEM
212 PCM3 <------------> * * <====DAI3=====> BT
214 * * <----DAI4-----> DMIC
216 * * <----DAI5-----> FM
230 --------------------
251 rate->min = rate->max = 48000;
252 channels->min = channels->max = 2;
262 Widget graph connections
263 ------------------------
265 The BE DAI links will normally be connected to the graph at initialisation time
267 has to be set explicitly in the driver :-
270 /* BE for codec Headset - DAI0 is dummy and managed by DSP FW */
280 implement :-
282 1. Front End PCM DAIs - i.e. struct snd_soc_dai_driver.
284 2. DAPM graph showing DSP audio routing from FE DAIs to BEs.
286 3. DAPM widgets from DSP graph.
294 Items 6 is important for routing the audio outside of the DSP. AIF need to be
296 have :-
302 The BE AIF are used to connect the DSP graph to the graphs for the other
303 component drivers (e.g. codec graph).
314 PCM0 <------------> * * <----DAI0-----> Codec Headset
316 PCM1 <------------> * * <====DAI1=====> Codec Speakers/Mic
318 PCM2 <------------> * * <====DAI2=====> MODEM
320 PCM3 <------------> * * <----DAI3-----> BT
322 * * <----DAI4-----> DMIC
324 * * <----DAI5-----> FM
330 The host can control the hostless link either by :-
332 1. Configuring the link as a CODEC <-> CODEC style link. In this case the link
333 is enabled or disabled by the state of the DAPM graph. This usually means
338 graph. Control is then carried out by the FE as regular PCM operations.
340 userspace code to control the link. Its recommended to use CODEC<->CODEC
344 CODEC <-> CODEC link
345 --------------------
347 This DAI link is enabled when DAPM detects a valid path within the DAPM graph.
365 .codec_dai_name = "modem-aif1",
381 -----------