Commit 60b6f1a1 authored by Stas Sergeev's avatar Stas Sergeev Committed by Mark Brown

ASoC: define playback and capture streams in dummy codec

This patch adds a playback and capture streams to the dummy codec DAI
configuration. Most permissive set of sampling rates and formats is used.

This patch is needed for playback and capturing on a codec-less systems,
as otherwise the PCM device nodes are not even created.
Signed-off-by: default avatarStas Sergeev <stsp@users.sourceforge.net>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent 379cf397
...@@ -90,8 +90,33 @@ static struct snd_soc_platform_driver dummy_platform = { ...@@ -90,8 +90,33 @@ static struct snd_soc_platform_driver dummy_platform = {
}; };
static struct snd_soc_codec_driver dummy_codec; static struct snd_soc_codec_driver dummy_codec;
#define STUB_RATES SNDRV_PCM_RATE_8000_192000
#define STUB_FORMATS (SNDRV_PCM_FMTBIT_S8 | \
SNDRV_PCM_FMTBIT_U8 | \
SNDRV_PCM_FMTBIT_S16_LE | \
SNDRV_PCM_FMTBIT_U16_LE | \
SNDRV_PCM_FMTBIT_S24_LE | \
SNDRV_PCM_FMTBIT_U24_LE | \
SNDRV_PCM_FMTBIT_S32_LE | \
SNDRV_PCM_FMTBIT_U32_LE | \
SNDRV_PCM_FMTBIT_IEC958_SUBFRAME_LE)
static struct snd_soc_dai_driver dummy_dai = { static struct snd_soc_dai_driver dummy_dai = {
.name = "snd-soc-dummy-dai", .name = "snd-soc-dummy-dai",
.playback = {
.stream_name = "Playback",
.channels_min = 1,
.channels_max = 384,
.rates = STUB_RATES,
.formats = STUB_FORMATS,
},
.capture = {
.stream_name = "Capture",
.channels_min = 1,
.channels_max = 384,
.rates = STUB_RATES,
.formats = STUB_FORMATS,
},
}; };
static int snd_soc_dummy_probe(struct platform_device *pdev) static int snd_soc_dummy_probe(struct platform_device *pdev)
......
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