summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/spdif_transmitter.c
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2013-08-04 23:32:04 +0400
committerMark Brown <broonie@linaro.org>2013-08-05 15:32:40 +0400
commit6ad709482e151068b7197f4572edeeae5eeaff93 (patch)
treea998e1f000c39914e4f3196a859908600d1c0867 /sound/soc/codecs/spdif_transmitter.c
parentdb5ff9541b61ef8394bad0fb05508921b8c5b17b (diff)
downloadlinux-6ad709482e151068b7197f4572edeeae5eeaff93.tar.xz
ASoC: spdif_transceiver: add output pin widget
CODECs without any outputs now remain powered down, which means any paths to these codecs also remain powered down. Add an always-enabled output pin widget to the spdif transceiver codec. This enables DAPM to correctly identify that the spdif transceiver is in use when playback is enabled, which will then allow DAPM to power up any links from the CPU DAI to the S/PDIF transceiver. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc/codecs/spdif_transmitter.c')
-rw-r--r--sound/soc/codecs/spdif_transmitter.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/sound/soc/codecs/spdif_transmitter.c b/sound/soc/codecs/spdif_transmitter.c
index efc3d88d7f8c..4e96d10d61a2 100644
--- a/sound/soc/codecs/spdif_transmitter.c
+++ b/sound/soc/codecs/spdif_transmitter.c
@@ -29,7 +29,20 @@
SNDRV_PCM_FMTBIT_S20_3LE | \
SNDRV_PCM_FMTBIT_S24_LE)
-static struct snd_soc_codec_driver soc_codec_spdif_dit;
+static const struct snd_soc_dapm_widget dit_widgets[] = {
+ SND_SOC_DAPM_OUTPUT("spdif-out"),
+};
+
+static const const struct snd_soc_dapm_route dit_routes[] = {
+ { "spdif-out", NULL, "Playback" },
+};
+
+static struct snd_soc_codec_driver soc_codec_spdif_dit = {
+ .dapm_widgets = dit_widgets,
+ .num_dapm_widgets = ARRAY_SIZE(dit_widgets),
+ .dapm_routes = dit_routes,
+ .num_dapm_routes = ARRAY_SIZE(dit_routes),
+};
static struct snd_soc_dai_driver dit_stub_dai = {
.name = "dit-hifi",