This patch consists in settings the channels_min, rates and formats of the dummy codec DAI driver to enable the creation of the PCM streams using it.
Signed-off-by: Selma Bensaid selma.bensaid@intel.com --- include/sound/pcm.h | 7 +++++++ sound/soc/soc-utils.c | 13 +++++++++++++ 2 files changed, 20 insertions(+), 0 deletions(-)
diff --git a/include/sound/pcm.h b/include/sound/pcm.h index ff536f1..649b0d5 100644 --- a/include/sound/pcm.h +++ b/include/sound/pcm.h @@ -203,6 +203,13 @@ struct snd_pcm_ops { #define SNDRV_PCM_FMTBIT_IEC958_SUBFRAME SNDRV_PCM_FMTBIT_IEC958_SUBFRAME_BE #endif
+#define SNDRV_PCM_FMTBIT_CONTINUOUS \ + (SNDRV_PCM_FMTBIT_S16 | SNDRV_PCM_FMTBIT_U16 |\ + SNDRV_PCM_FMTBIT_S24 | SNDRV_PCM_FMTBIT_U24 |\ + SNDRV_PCM_FMTBIT_S32 | SNDRV_PCM_FMTBIT_U32 |\ + SNDRV_PCM_FMTBIT_FLOAT | SNDRV_PCM_FMTBIT_FLOAT64 |\ + SNDRV_PCM_FMTBIT_IEC958_SUBFRAME) + struct snd_pcm_file { struct snd_pcm_substream *substream; int no_compat_mmap; diff --git a/sound/soc/soc-utils.c b/sound/soc/soc-utils.c index 6005370..79125a0 100644 --- a/sound/soc/soc-utils.c +++ b/sound/soc/soc-utils.c @@ -92,6 +92,19 @@ static struct snd_soc_platform_driver dummy_platform = { static struct snd_soc_codec_driver dummy_codec; static struct snd_soc_dai_driver dummy_dai = { .name = "snd-soc-dummy-dai", + .playback = { + .channels_min = 1, + .channels_max = 16, + .rates = SNDRV_PCM_RATE_CONTINUOUS, + .formats = SNDRV_PCM_FMTBIT_CONTINUOUS, + }, + .capture = { + .channels_min = 1, + .channels_max = 16, + .rates = SNDRV_PCM_RATE_CONTINUOUS, + .formats = SNDRV_PCM_FMTBIT_CONTINUOUS, + }, + .ops = NULL, };
static __devinit int snd_soc_dummy_probe(struct platform_device *pdev)