From: Nicolin Chen Date: Wed, 31 Jul 2013 12:07:05 +0000 (+0800) Subject: ASoC: spdif: Add S20_3LE and S24_LE support for dummy codec drivers X-Git-Tag: accepted/tizen/common/20141203.182822~1038^2~176^2~20^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=db5ff9541b61ef8394bad0fb05508921b8c5b17b;p=platform%2Fkernel%2Flinux-arm64.git 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 Signed-off-by: Mark Brown --- diff --git a/sound/soc/codecs/spdif_receiver.c b/sound/soc/codecs/spdif_receiver.c index e9d7881..26d3474 100644 --- a/sound/soc/codecs/spdif_receiver.c +++ b/sound/soc/codecs/spdif_receiver.c @@ -25,6 +25,8 @@ #define STUB_RATES SNDRV_PCM_RATE_8000_192000 #define STUB_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | \ + SNDRV_PCM_FMTBIT_S20_3LE | \ + SNDRV_PCM_FMTBIT_S24_LE | \ SNDRV_PCM_FMTBIT_IEC958_SUBFRAME_LE) static 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 1828049..efc3d88 100644 --- a/sound/soc/codecs/spdif_transmitter.c +++ b/sound/soc/codecs/spdif_transmitter.c @@ -25,8 +25,9 @@ #define DRV_NAME "spdif-dit" #define STUB_RATES SNDRV_PCM_RATE_8000_96000 -#define STUB_FORMATS SNDRV_PCM_FMTBIT_S16_LE - +#define STUB_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | \ + SNDRV_PCM_FMTBIT_S20_3LE | \ + SNDRV_PCM_FMTBIT_S24_LE) static struct snd_soc_codec_driver soc_codec_spdif_dit;