• Home
  • Raw
  • Download

Lines Matching +full:dsp +full:- +full:aif1

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 -------------------------------------
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
35 * DSP *
36 PCM2 <------------> * * <----DAI2-----> MODEM
38 PCM3 <------------> * * <----DAI3-----> BT
40 * * <----DAI4-----> DMIC
42 * * <----DAI5-----> FM
47 modem. This sound card exposes 4 DSP front end (FE) ALSA PCM devices and
53 Example - DPCM Switching playback from DAI0 to DAI1
54 ---------------------------------------------------
59 Playback on PCM0 to Headset would look like :-
65 PCM1 <------------> * * <----DAI1-----> Codec Speakers
66 * DSP *
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
83 * DSP *
84 PCM2 <------------> * * <----DAI2-----> MODEM
86 PCM3 <------------> * * <----DAI3-----> BT
88 * * <----DAI4-----> DMIC
90 * * <----DAI5-----> FM
93 The audio driver processes this as follows :-
117 except that we also have to :-
127 -------------------
130 | Front End PCMs | SoC DSP | Back End DAIs | Audio devices |
133 PCM0 <------------> * * <----DAI0-----> Codec Headset
135 PCM1 <------------> * * <----DAI1-----> Codec Speakers
136 * DSP *
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",
169 each FE. This allows the ASoC core to trigger the DSP before or after the other
170 components (as some DSPs have strong requirements for the ordering DAI/DSP
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",
198 This BE DAI link connects DAI0 to the codec (in this case RT5460 AIF1). It sets
204 like a BT phone call :-
208 PCM0 <------------> * * <----DAI0-----> Codec Headset
210 PCM1 <------------> * * <----DAI1-----> Codec Speakers
211 * DSP *
212 PCM2 <------------> * * <====DAI2=====> MODEM
214 PCM3 <------------> * * <====DAI3=====> BT
216 * * <----DAI4-----> DMIC
218 * * <----DAI5-----> FM
221 This allows the host CPU to sleep while the DSP, MODEM DAI and the BT DAI are
228 DSP firmware.
232 --------------------
236 FE hw params. i.e. the DSP may perform SRC or ASRC from the FE to BE.
238 e.g. DSP converts all FE hw params to run at fixed rate of 48k, 16bit, stereo for
252 /* The DSP will convert the FE rate to 48k, stereo */
253 rate->min = rate->max = 48000;
254 channels->min = channels->max = 2;
265 ------------------------
269 has to be set explicitly in the driver :-
272 /* BE for codec Headset - DAI0 is dummy and managed by DSP FW */
273 {"DAI0 CODEC IN", NULL, "AIF1 Capture"},
274 {"AIF1 Playback", NULL, "DAI0 CODEC OUT"},
277 Writing a DPCM DSP driver
280 The DPCM DSP driver looks much like a standard platform class ASoC driver
281 combined with elements from a codec class driver. A DSP platform driver must
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
316 PCM0 <------------> * * <----DAI0-----> Codec Headset
318 PCM1 <------------> * * <====DAI1=====> Codec Speakers/Mic
319 * DSP *
320 PCM2 <------------> * * <====DAI2=====> MODEM
322 PCM3 <------------> * * <----DAI3-----> BT
324 * * <----DAI4-----> DMIC
326 * * <----DAI5-----> FM
329 In this case the PCM data is routed via the DSP. The host CPU in this use case
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
342 userspace code to control the link. Its recommended to use CODEC<->CODEC
346 CODEC <-> CODEC link
347 --------------------
367 .codec_dai_name = "modem-aif1",
382 -----------