Lines Matching +full:bt +full:- +full:pcm +full:- +full:int +full:- +full:params

2 Dynamic PCM
8 Dynamic PCM allows an ALSA PCM device to digitally route its PCM audio to
9 various digital endpoints during the PCM stream runtime. e.g. PCM0 can route
16 determine the path used by each ALSA PCM.
18 DPCM re-uses all the existing component codec, platform and DAI drivers without
23 -------------------------------------
26 document for all examples :-
32 PCM0 <------------> * * <----DAI0-----> Codec Headset
34 PCM1 <------------> * * <----DAI1-----> Codec Speakers
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
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 ---------------------------------------------------
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 :-
99 3. DPCM runs the PCM trigger(stop), hw_free(), shutdown() operations on DAI0
104 5. DPCM runs the PCM ops for startup(), hw_params(), prepare() and
108 and then DPCM will take care of managing the DAI PCM operations to either bring
117 except that we also have to :-
121 2. Define any FE/BE PCM operations.
127 -------------------
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",
174 The BE DAIs are configured as follows :-
181 .cpu_dai_name = "ssp-dai.0",
182 .platform_name = "snd-soc-dummy",
184 .codec_name = "rt5640.0-001c",
185 .codec_dai_name = "rt5640-aif1",
199 like a BT phone call :-
203 PCM0 <------------> * * <----DAI0-----> Codec Headset
205 PCM1 <------------> * * <----DAI1-----> Codec Speakers
207 PCM2 <------------> * * <====DAI2=====> MODEM
209 PCM3 <------------> * * <====DAI3=====> BT
211 * * <----DAI4-----> DMIC
213 * * <----DAI5-----> FM
216 This allows the host CPU to sleep while the DSP, MODEM DAI and the BT DAI are
226 FE/BE PCM operations
227 --------------------
229 The BE above also exports some PCM operations and a ``fixup`` callback. The fixup
231 FE hw params. i.e. the DSP may perform SRC or ASRC from the FE to BE.
233 e.g. DSP converts all FE hw params to run at fixed rate of 48k, 16bit, stereo for
239 static int dai0_fixup(struct snd_soc_pcm_runtime *rtd,
240 struct snd_pcm_hw_params *params)
242 struct snd_interval *rate = hw_param_interval(params,
244 struct snd_interval *channels = hw_param_interval(params,
248 rate->min = rate->max = 48000;
249 channels->min = channels->max = 2;
252 params_set_format(params, SNDRV_PCM_FORMAT_S16_LE);
256 The other PCM operation are the same as for regular DAI links. Use as necessary.
260 ------------------------
264 has to be set explicitly in the driver :-
267 /* BE for codec Headset - DAI0 is dummy and managed by DSP FW */
277 implement :-
279 1. Front End PCM DAIs - i.e. struct snd_soc_dai_driver.
293 have :-
303 Hostless PCM streams
306 A hostless PCM stream is a stream that is not routed through the host CPU. An
311 PCM0 <------------> * * <----DAI0-----> Codec Headset
313 PCM1 <------------> * * <====DAI1=====> Codec Speakers/Mic
315 PCM2 <------------> * * <====DAI2=====> MODEM
317 PCM3 <------------> * * <----DAI3-----> BT
319 * * <----DAI4-----> DMIC
321 * * <----DAI5-----> FM
324 In this case the PCM data is routed via the DSP. The host CPU in this use case
327 The host can control the hostless link either by :-
329 1. Configuring the link as a CODEC <-> CODEC style link. In this case the link
335 graph. Control is then carried out by the FE as regular PCM operations.
337 userspace code to control the link. Its recommended to use CODEC<->CODEC
338 unless your HW needs more fine grained sequencing of the PCM ops.
341 CODEC <-> CODEC link
342 --------------------
362 .codec_dai_name = "modem-aif1",
372 valid path and then calls the PCM operations to start the link. DAPM will also
373 call the appropriate PCM operations to disable the DAI when the path is no
378 -----------
380 The DAI link(s) are enabled by a FE that does not read or write any PCM data.
382 DAI links. The DAI links will be started when the FE PCM is started and stopped
383 when the FE PCM is stopped. Note that the FE PCM cannot read or write data in