Commit c6ab9e57 authored by Takashi Iwai's avatar Takashi Iwai

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: default avatarMark Brown <broonie@kernel.org>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 76228a2b
==============================================
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 | |
| | dai | |
CPU -------> codec
| | | |
| | | |
--------- ---------
In case your system looks as below:
::
---------
| |
codec-2
......@@ -20,9 +24,9 @@ In case your system looks as below:
dai-2
|
---------- ---------
| | dai-1 | |
| | dai-1 | |
CPU -------> codec-1
| | | |
| | | |
---------- ---------
|
dai-3
......@@ -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 = {
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.
......
......@@ -17,3 +17,4 @@ The documentation is spilt into the following sections:-
clocking
jack
dpcm
codec-to-codec
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment