]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ASoC: spdif: Add stub DAPM widgets for Rx
authorMark Brown <broonie@linaro.org>
Mon, 19 Aug 2013 11:09:39 +0000 (12:09 +0100)
committerMark Brown <broonie@linaro.org>
Mon, 19 Aug 2013 11:20:53 +0000 (12:20 +0100)
Ensure that the driver continues to work with mandatory DAPM.

Signed-off-by: Mark Brown <broonie@linaro.org>
sound/soc/codecs/spdif_receiver.c

index 26d34744c677651a407909c3c18f61128d583199..e3501f40c7b3d866f965131e64ce2ae1227e1b77 100644 (file)
 #include <sound/initval.h>
 #include <linux/of.h>
 
+static const struct snd_soc_dapm_widget dir_widgets[] = {
+       SND_SOC_DAPM_INPUT("spdif-in"),
+};
+
+static const struct snd_soc_dapm_route dir_routes[] = {
+       { "Capture", NULL, "spdif-in" },
+};
+
 #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;
+static struct snd_soc_codec_driver soc_codec_spdif_dir = {
+       .dapm_widgets = dir_widgets,
+       .num_dapm_widgets = ARRAY_SIZE(dir_widgets),
+       .dapm_routes = dir_routes,
+       .num_dapm_routes = ARRAY_SIZE(dir_routes),
+};
 
 static struct snd_soc_dai_driver dir_stub_dai = {
        .name           = "dir-hifi",