From d8a5d624cc39c416f008e52b940f47cf619dbd9e Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Thu, 10 Nov 2016 22:21:56 +0100 Subject: ASoC: doc: ReSTize platform.txt A simple conversion from a plain text file. Acked-by: Mark Brown Signed-off-by: Takashi Iwai --- Documentation/sound/alsa/soc/platform.txt | 79 ----------------------------- Documentation/sound/soc/index.rst | 1 + Documentation/sound/soc/platform.rst | 82 +++++++++++++++++++++++++++++++ 3 files changed, 83 insertions(+), 79 deletions(-) delete mode 100644 Documentation/sound/alsa/soc/platform.txt create mode 100644 Documentation/sound/soc/platform.rst (limited to 'Documentation') diff --git a/Documentation/sound/alsa/soc/platform.txt b/Documentation/sound/alsa/soc/platform.txt deleted file mode 100644 index 3a08a2c9150c..000000000000 --- a/Documentation/sound/alsa/soc/platform.txt +++ /dev/null @@ -1,79 +0,0 @@ -ASoC Platform Driver -==================== - -An ASoC platform driver class can be divided into audio DMA drivers, SoC DAI -drivers and DSP drivers. The platform drivers only target the SoC CPU and must -have no board specific code. - -Audio DMA -========= - -The platform DMA driver optionally supports the following ALSA operations:- - -/* SoC audio ops */ -struct snd_soc_ops { - int (*startup)(struct snd_pcm_substream *); - void (*shutdown)(struct snd_pcm_substream *); - int (*hw_params)(struct snd_pcm_substream *, struct snd_pcm_hw_params *); - int (*hw_free)(struct snd_pcm_substream *); - int (*prepare)(struct snd_pcm_substream *); - int (*trigger)(struct snd_pcm_substream *, int); -}; - -The platform driver exports its DMA functionality via struct -snd_soc_platform_driver:- - -struct snd_soc_platform_driver { - char *name; - - int (*probe)(struct platform_device *pdev); - int (*remove)(struct platform_device *pdev); - int (*suspend)(struct platform_device *pdev, struct snd_soc_cpu_dai *cpu_dai); - int (*resume)(struct platform_device *pdev, struct snd_soc_cpu_dai *cpu_dai); - - /* pcm creation and destruction */ - int (*pcm_new)(struct snd_card *, struct snd_soc_codec_dai *, struct snd_pcm *); - void (*pcm_free)(struct snd_pcm *); - - /* - * For platform caused delay reporting. - * Optional. - */ - snd_pcm_sframes_t (*delay)(struct snd_pcm_substream *, - struct snd_soc_dai *); - - /* platform stream ops */ - struct snd_pcm_ops *pcm_ops; -}; - -Please refer to the ALSA driver documentation for details of audio DMA. -http://www.alsa-project.org/~iwai/writing-an-alsa-driver/ - -An example DMA driver is soc/pxa/pxa2xx-pcm.c - - -SoC DAI Drivers -=============== - -Each SoC DAI driver must provide the following features:- - - 1) Digital audio interface (DAI) description - 2) Digital audio interface configuration - 3) PCM's description - 4) SYSCLK configuration - 5) Suspend and resume (optional) - -Please see codec.txt for a description of items 1 - 4. - - -SoC DSP Drivers -=============== - -Each SoC DSP driver usually supplies the following features :- - - 1) DAPM graph - 2) Mixer controls - 3) DMA IO to/from DSP buffers (if applicable) - 4) Definition of DSP front end (FE) PCM devices. - -Please see DPCM.txt for a description of item 4. diff --git a/Documentation/sound/soc/index.rst b/Documentation/sound/soc/index.rst index 0c0c38e582b4..c5a55195bf4d 100644 --- a/Documentation/sound/soc/index.rst +++ b/Documentation/sound/soc/index.rst @@ -11,3 +11,4 @@ The documentation is spilt into the following sections:- codec dai dapm + platform diff --git a/Documentation/sound/soc/platform.rst b/Documentation/sound/soc/platform.rst new file mode 100644 index 000000000000..d5574904d981 --- /dev/null +++ b/Documentation/sound/soc/platform.rst @@ -0,0 +1,82 @@ +==================== +ASoC Platform Driver +==================== + +An ASoC platform driver class can be divided into audio DMA drivers, SoC DAI +drivers and DSP drivers. The platform drivers only target the SoC CPU and must +have no board specific code. + +Audio DMA +========= + +The platform DMA driver optionally supports the following ALSA operations:- +:: + + /* SoC audio ops */ + struct snd_soc_ops { + int (*startup)(struct snd_pcm_substream *); + void (*shutdown)(struct snd_pcm_substream *); + int (*hw_params)(struct snd_pcm_substream *, struct snd_pcm_hw_params *); + int (*hw_free)(struct snd_pcm_substream *); + int (*prepare)(struct snd_pcm_substream *); + int (*trigger)(struct snd_pcm_substream *, int); + }; + +The platform driver exports its DMA functionality via struct +snd_soc_platform_driver:- +:: + + struct snd_soc_platform_driver { + char *name; + + int (*probe)(struct platform_device *pdev); + int (*remove)(struct platform_device *pdev); + int (*suspend)(struct platform_device *pdev, struct snd_soc_cpu_dai *cpu_dai); + int (*resume)(struct platform_device *pdev, struct snd_soc_cpu_dai *cpu_dai); + + /* pcm creation and destruction */ + int (*pcm_new)(struct snd_card *, struct snd_soc_codec_dai *, struct snd_pcm *); + void (*pcm_free)(struct snd_pcm *); + + /* + * For platform caused delay reporting. + * Optional. + */ + snd_pcm_sframes_t (*delay)(struct snd_pcm_substream *, + struct snd_soc_dai *); + + /* platform stream ops */ + struct snd_pcm_ops *pcm_ops; + }; + +Please refer to the ALSA driver documentation for details of audio DMA. +http://www.alsa-project.org/~iwai/writing-an-alsa-driver/ + +An example DMA driver is soc/pxa/pxa2xx-pcm.c + + +SoC DAI Drivers +=============== + +Each SoC DAI driver must provide the following features:- + +1. Digital audio interface (DAI) description +2. Digital audio interface configuration +3. PCM's description +4. SYSCLK configuration +5. Suspend and resume (optional) + +Please see codec.txt for a description of items 1 - 4. + + +SoC DSP Drivers +=============== + +Each SoC DSP driver usually supplies the following features :- + +1. DAPM graph +2. Mixer controls +3. DMA IO to/from DSP buffers (if applicable) +4. Definition of DSP front end (FE) PCM devices. + +Please see DPCM.txt for a description of item 4. -- cgit v1.2.3