aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2016-11-11 16:55:29 +0100
committerTakashi Iwai <tiwai@suse.de>2016-11-11 17:35:10 +0100
commitc6ab9e57e84ee015bb9c5de213d9f85e5fd4e085 (patch)
treeadcc13f5864783da1342be5be836447a75d03b54 /Documentation/sound
parentMerge branch 'topic/doc' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into topic/restize-docs (diff)
downloadlinux-dev-c6ab9e57e84ee015bb9c5de213d9f85e5fd4e085.tar.xz
linux-dev-c6ab9e57e84ee015bb9c5de213d9f85e5fd4e085.zip
ASoC: doc: ReSTize codec_to_codec.txt
Yet another simple conversion from a plain text file. Renamed to codec-to-codec.rst to align with others. Acked-by: Mark Brown <broonie@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'Documentation/sound')
-rw-r--r--Documentation/sound/soc/codec-to-codec.rst (renamed from Documentation/sound/alsa/soc/codec_to_codec.txt)79
-rw-r--r--Documentation/sound/soc/index.rst1
2 files changed, 43 insertions, 37 deletions
diff --git a/Documentation/sound/alsa/soc/codec_to_codec.txt b/Documentation/sound/soc/codec-to-codec.rst
index 704a6483652c..810109d7500d 100644
--- a/Documentation/sound/alsa/soc/codec_to_codec.txt
+++ b/Documentation/sound/soc/codec-to-codec.rst
@@ -1,37 +1,41 @@
+==============================================
Creating codec to codec dai link for ALSA dapm
-===================================================
+==============================================
Mostly the flow of audio is always from CPU to codec so your system
will look as below:
+::
- --------- ---------
-| | dai | |
- CPU -------> codec
-| | | |
- --------- ---------
+ --------- ---------
+ | | dai | |
+ CPU -------> codec
+ | | | |
+ --------- ---------
In case your system looks as below:
- ---------
- | |
- codec-2
- | |
- ---------
- |
- dai-2
- |
- ---------- ---------
-| | dai-1 | |
- CPU -------> codec-1
-| | | |
- ---------- ---------
- |
- dai-3
- |
- ---------
- | |
- codec-3
- | |
- ---------
+::
+
+ ---------
+ | |
+ codec-2
+ | |
+ ---------
+ |
+ dai-2
+ |
+ ---------- ---------
+ | | dai-1 | |
+ CPU -------> codec-1
+ | | | |
+ ---------- ---------
+ |
+ dai-3
+ |
+ ---------
+ | |
+ codec-3
+ | |
+ ---------
Suppose codec-2 is a bluetooth chip and codec-3 is connected to
a speaker and you have a below scenario:
@@ -42,20 +46,21 @@ connection should be used.
Your dai_link should appear as below in your machine
file:
+::
-/*
- * this pcm stream only supports 24 bit, 2 channel and
- * 48k sampling rate.
- */
-static const struct snd_soc_pcm_stream dsp_codec_params = {
+ /*
+ * this pcm stream only supports 24 bit, 2 channel and
+ * 48k sampling rate.
+ */
+ static const struct snd_soc_pcm_stream dsp_codec_params = {
.formats = SNDRV_PCM_FMTBIT_S24_LE,
.rate_min = 48000,
.rate_max = 48000,
.channels_min = 2,
.channels_max = 2,
-};
+ };
-{
+ {
.name = "CPU-DSP",
.stream_name = "CPU-DSP",
.cpu_dai_name = "samsung-i2s.0",
@@ -66,8 +71,8 @@ static const struct snd_soc_pcm_stream dsp_codec_params = {
| SND_SOC_DAIFMT_CBM_CFM,
.ignore_suspend = 1,
.params = &dsp_codec_params,
-},
-{
+ },
+ {
.name = "DSP-CODEC",
.stream_name = "DSP-CODEC",
.cpu_dai_name = "wm0010-sdi2",
@@ -77,7 +82,7 @@ static const struct snd_soc_pcm_stream dsp_codec_params = {
| SND_SOC_DAIFMT_CBM_CFM,
.ignore_suspend = 1,
.params = &dsp_codec_params,
-},
+ },
Above code snippet is motivated from sound/soc/samsung/speyside.c.
diff --git a/Documentation/sound/soc/index.rst b/Documentation/sound/soc/index.rst
index e142a0f25c5b..e57df2dab2fd 100644
--- a/Documentation/sound/soc/index.rst
+++ b/Documentation/sound/soc/index.rst
@@ -17,3 +17,4 @@ The documentation is spilt into the following sections:-
clocking
jack
dpcm
+ codec-to-codec