5 An ASoC platform driver class can be divided into audio DMA drivers, SoC DAI
6 drivers and DSP drivers. The platform drivers only target the SoC CPU and must
7 have no board specific code.
12 The platform DMA driver optionally supports the following ALSA operations:-
17 int (*startup)(struct snd_pcm_substream *);
18 void (*shutdown)(struct snd_pcm_substream *);
19 int (*hw_params)(struct snd_pcm_substream *, struct snd_pcm_hw_params *);
20 int (*hw_free)(struct snd_pcm_substream *);
21 int (*prepare)(struct snd_pcm_substream *);
22 int (*trigger)(struct snd_pcm_substream *, int);
25 The platform driver exports its DMA functionality via struct
26 snd_soc_platform_driver:-
29 struct snd_soc_platform_driver {
32 int (*probe)(struct platform_device *pdev);
33 int (*remove)(struct platform_device *pdev);
34 int (*suspend)(struct platform_device *pdev, struct snd_soc_cpu_dai *cpu_dai);
35 int (*resume)(struct platform_device *pdev, struct snd_soc_cpu_dai *cpu_dai);
37 /* pcm creation and destruction */
38 int (*pcm_new)(struct snd_card *, struct snd_soc_codec_dai *, struct snd_pcm *);
39 void (*pcm_free)(struct snd_pcm *);
42 * For platform caused delay reporting.
45 snd_pcm_sframes_t (*delay)(struct snd_pcm_substream *,
46 struct snd_soc_dai *);
48 /* platform stream ops */
49 struct snd_pcm_ops *pcm_ops;
52 Please refer to the ALSA driver documentation for details of audio DMA.
53 http://www.alsa-project.org/~iwai/writing-an-alsa-driver/
55 An example DMA driver is soc/pxa/pxa2xx-pcm.c
61 Each SoC DAI driver must provide the following features:-
63 1. Digital audio interface (DAI) description
64 2. Digital audio interface configuration
66 4. SYSCLK configuration
67 5. Suspend and resume (optional)
69 Please see codec.txt for a description of items 1 - 4.
75 Each SoC DSP driver usually supplies the following features :-
79 3. DMA IO to/from DSP buffers (if applicable)
80 4. Definition of DSP front end (FE) PCM devices.
82 Please see DPCM.txt for a description of item 4.