aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolin Chen <b42378@freescale.com>2013-07-31 08:07:05 -0400
committerNitin Garg <nitin.garg@freescale.com>2014-04-16 09:00:55 -0400
commit0f79cc80cfe9c3a97709181fd4724a693155b986 (patch)
treea7659eb864a70cc2f7bd43285f4ba97692a0baf2
parent511426d1cfa9c659f22d016d99e32d9e1b6ca773 (diff)
ASoC: spdif: Add S20_3LE and S24_LE support for dummy codec drivers
Generally, S/PDIF supports 20bit and optional 24bit samples. Thus add these two formats for the dummy codec drivers. If one S/PDIF controller has its own limitation, its CPU DAI driver should set the supported format by its own circumstance, since the soc-pcm driver will use the intersection of cpu_dai's formats and codec_dai's formats. Signed-off-by: Nicolin Chen <b42378@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org>
-rw-r--r--sound/soc/codecs/spdif_receiver.c2
-rw-r--r--sound/soc/codecs/spdif_transmitter.c5
2 files changed, 5 insertions, 2 deletions
diff --git a/sound/soc/codecs/spdif_receiver.c b/sound/soc/codecs/spdif_receiver.c
index dd8d856053fc..a0df12d71b75 100644
--- a/sound/soc/codecs/spdif_receiver.c
+++ b/sound/soc/codecs/spdif_receiver.c
@@ -24,6 +24,8 @@
24 24
25#define STUB_RATES SNDRV_PCM_RATE_8000_192000 25#define STUB_RATES SNDRV_PCM_RATE_8000_192000
26#define STUB_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | \ 26#define STUB_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | \
27 SNDRV_PCM_FMTBIT_S20_3LE | \
28 SNDRV_PCM_FMTBIT_S24_LE | \
27 SNDRV_PCM_FMTBIT_IEC958_SUBFRAME_LE) 29 SNDRV_PCM_FMTBIT_IEC958_SUBFRAME_LE)
28 30
29static struct snd_soc_codec_driver soc_codec_spdif_dir; 31static struct snd_soc_codec_driver soc_codec_spdif_dir;
diff --git a/sound/soc/codecs/spdif_transmitter.c b/sound/soc/codecs/spdif_transmitter.c
index 112a49d66e39..dfd03be12ceb 100644
--- a/sound/soc/codecs/spdif_transmitter.c
+++ b/sound/soc/codecs/spdif_transmitter.c
@@ -24,8 +24,9 @@
24#define DRV_NAME "spdif-dit" 24#define DRV_NAME "spdif-dit"
25 25
26#define STUB_RATES SNDRV_PCM_RATE_8000_96000 26#define STUB_RATES SNDRV_PCM_RATE_8000_96000
27#define STUB_FORMATS SNDRV_PCM_FMTBIT_S16_LE 27#define STUB_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | \
28 28 SNDRV_PCM_FMTBIT_S20_3LE | \
29 SNDRV_PCM_FMTBIT_S24_LE)
29 30
30static struct snd_soc_codec_driver soc_codec_spdif_dit; 31static struct snd_soc_codec_driver soc_codec_spdif_dit;
31 32