From eb1a6af39b70375d93ed25e7c916f64463e00614 Mon Sep 17 00:00:00 2001 From: Liam Girdwood Date: Fri, 6 Oct 2006 18:34:51 +0200 Subject: [ALSA] ASoC: documentation & maintainer This patch adds documentation describing the ASoC architecture and a maintainer entry for ASoC. The documentation includes the following files:- codec.txt: Codec driver internals. DAI.txt: Description of Digital Audio Interface standards and how to configure a DAI within your codec and CPU DAI drivers. dapm.txt: Dynamic Audio Power Management. platform.txt: Platform audio DMA and DAI. machine.txt: Machine driver internals. pop_clicks.txt: How to minimise audio artifacts. clocking.txt: ASoC clocking for best power performance. Signed-off-by: Liam Girdwood Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela --- Documentation/sound/alsa/soc/platform.txt | 58 +++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 Documentation/sound/alsa/soc/platform.txt (limited to 'Documentation/sound/alsa/soc/platform.txt') diff --git a/Documentation/sound/alsa/soc/platform.txt b/Documentation/sound/alsa/soc/platform.txt new file mode 100644 index 000000000000..c88df261e922 --- /dev/null +++ b/Documentation/sound/alsa/soc/platform.txt @@ -0,0 +1,58 @@ +ASoC Platform Driver +==================== + +An ASoC platform driver can be divided into audio DMA and SoC DAI configuration +and control. 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)(snd_pcm_substream_t *); + void (*shutdown)(snd_pcm_substream_t *); + int (*hw_params)(snd_pcm_substream_t *, snd_pcm_hw_params_t *); + int (*hw_free)(snd_pcm_substream_t *); + int (*prepare)(snd_pcm_substream_t *); + int (*trigger)(snd_pcm_substream_t *, int); +}; + +The platform driver exports it's DMA functionailty via struct snd_soc_platform:- + +struct snd_soc_platform { + 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)(snd_card_t *, struct snd_soc_codec_dai *, snd_pcm_t *); + void (*pcm_free)(snd_pcm_t *); + + /* platform stream ops */ + snd_pcm_ops_t *pcm_ops; +}; + +Please refer to the alsa driver documentation for details of audio DMA. +http://www.alsa-project.org/~iwai/writing-an-alsa-driver/c436.htm + +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. -- cgit v1.2.3-59-g8ed1b From 5b78efd2ef206265aa789485580df9799c54b650 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Fri, 24 Nov 2006 16:12:50 +0100 Subject: [ALSA] Fix documentation of ASoC Fixed obsolete *_t typedefs in ASoC documentation. Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela --- Documentation/sound/alsa/soc/codec.txt | 10 +++++----- Documentation/sound/alsa/soc/platform.txt | 18 +++++++++--------- 2 files changed, 14 insertions(+), 14 deletions(-) (limited to 'Documentation/sound/alsa/soc/platform.txt') diff --git a/Documentation/sound/alsa/soc/codec.txt b/Documentation/sound/alsa/soc/codec.txt index 47b36cb16840..274657a03e1c 100644 --- a/Documentation/sound/alsa/soc/codec.txt +++ b/Documentation/sound/alsa/soc/codec.txt @@ -170,11 +170,11 @@ The codec driver also supports the following alsa operations:- /* SoC audio ops */ struct snd_soc_ops { - int (*startup)(snd_pcm_substream_t *); - void (*shutdown)(snd_pcm_substream_t *); - int (*hw_params)(snd_pcm_substream_t *, snd_pcm_hw_params_t *); - int (*hw_free)(snd_pcm_substream_t *); - int (*prepare)(snd_pcm_substream_t *); + 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 *); }; Please refer to the alsa driver PCM documentation for details. diff --git a/Documentation/sound/alsa/soc/platform.txt b/Documentation/sound/alsa/soc/platform.txt index c88df261e922..e95b16d5a53b 100644 --- a/Documentation/sound/alsa/soc/platform.txt +++ b/Documentation/sound/alsa/soc/platform.txt @@ -12,12 +12,12 @@ The platform DMA driver optionally supports the following alsa operations:- /* SoC audio ops */ struct snd_soc_ops { - int (*startup)(snd_pcm_substream_t *); - void (*shutdown)(snd_pcm_substream_t *); - int (*hw_params)(snd_pcm_substream_t *, snd_pcm_hw_params_t *); - int (*hw_free)(snd_pcm_substream_t *); - int (*prepare)(snd_pcm_substream_t *); - int (*trigger)(snd_pcm_substream_t *, int); + 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 it's DMA functionailty via struct snd_soc_platform:- @@ -31,11 +31,11 @@ struct snd_soc_platform { int (*resume)(struct platform_device *pdev, struct snd_soc_cpu_dai *cpu_dai); /* pcm creation and destruction */ - int (*pcm_new)(snd_card_t *, struct snd_soc_codec_dai *, snd_pcm_t *); - void (*pcm_free)(snd_pcm_t *); + int (*pcm_new)(struct snd_card *, struct snd_soc_codec_dai *, struct snd_pcm *); + void (*pcm_free)(struct snd_pcm *); /* platform stream ops */ - snd_pcm_ops_t *pcm_ops; + struct snd_pcm_ops *pcm_ops; }; Please refer to the alsa driver documentation for details of audio DMA. -- cgit v1.2.3-59-g8ed1b