aboutsummaryrefslogtreecommitdiff
path: root/Documentation/sound/alsa/soc/platform.txt
diff options
context:
space:
mode:
authorLiam Girdwood <liam.girdwood@wolfsonmicro.com>2006-10-06 18:34:51 +0200
committerJaroslav Kysela <perex@suse.cz>2007-02-09 09:00:20 +0100
commiteb1a6af39b70375d93ed25e7c916f64463e00614 (patch)
treea5cb9228ad4f5cad115d491a413a3ad0a0e7de29 /Documentation/sound/alsa/soc/platform.txt
parenta3288176de3fdd439d9bca0a0b9ca749c12ac5ac (diff)
[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 <liam.girdwood@wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'Documentation/sound/alsa/soc/platform.txt')
-rw-r--r--Documentation/sound/alsa/soc/platform.txt58
1 files changed, 58 insertions, 0 deletions
diff --git a/Documentation/sound/alsa/soc/platform.txt b/Documentation/sound/alsa/soc/platform.txt
new file mode 100644
index 00000000000..c88df261e92
--- /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.