aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/spdif_receiver.c
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2013-08-19 07:09:39 -0400
committerMark Brown <broonie@linaro.org>2013-08-19 07:20:53 -0400
commit2f6e3ba0e0645011cbbd0289e9082d8007141498 (patch)
tree9198caa5203847ad0094901306b7cab6593b24d8 /sound/soc/codecs/spdif_receiver.c
parent6ad709482e151068b7197f4572edeeae5eeaff93 (diff)
ASoC: spdif: Add stub DAPM widgets for Rx
Ensure that the driver continues to work with mandatory DAPM. Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc/codecs/spdif_receiver.c')
-rw-r--r--sound/soc/codecs/spdif_receiver.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/sound/soc/codecs/spdif_receiver.c b/sound/soc/codecs/spdif_receiver.c
index 26d34744c677..e3501f40c7b3 100644
--- a/sound/soc/codecs/spdif_receiver.c
+++ b/sound/soc/codecs/spdif_receiver.c
@@ -23,13 +23,26 @@
23#include <sound/initval.h> 23#include <sound/initval.h>
24#include <linux/of.h> 24#include <linux/of.h>
25 25
26static const struct snd_soc_dapm_widget dir_widgets[] = {
27 SND_SOC_DAPM_INPUT("spdif-in"),
28};
29
30static const struct snd_soc_dapm_route dir_routes[] = {
31 { "Capture", NULL, "spdif-in" },
32};
33
26#define STUB_RATES SNDRV_PCM_RATE_8000_192000 34#define STUB_RATES SNDRV_PCM_RATE_8000_192000
27#define STUB_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | \ 35#define STUB_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | \
28 SNDRV_PCM_FMTBIT_S20_3LE | \ 36 SNDRV_PCM_FMTBIT_S20_3LE | \
29 SNDRV_PCM_FMTBIT_S24_LE | \ 37 SNDRV_PCM_FMTBIT_S24_LE | \
30 SNDRV_PCM_FMTBIT_IEC958_SUBFRAME_LE) 38 SNDRV_PCM_FMTBIT_IEC958_SUBFRAME_LE)
31 39
32static struct snd_soc_codec_driver soc_codec_spdif_dir; 40static struct snd_soc_codec_driver soc_codec_spdif_dir = {
41 .dapm_widgets = dir_widgets,
42 .num_dapm_widgets = ARRAY_SIZE(dir_widgets),
43 .dapm_routes = dir_routes,
44 .num_dapm_routes = ARRAY_SIZE(dir_routes),
45};
33 46
34static struct snd_soc_dai_driver dir_stub_dai = { 47static struct snd_soc_dai_driver dir_stub_dai = {
35 .name = "dir-hifi", 48 .name = "dir-hifi",