diff options
author | Mark Brown <broonie@linaro.org> | 2013-08-13 18:30:00 +0100 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-08-15 11:33:15 +0100 |
commit | e7a5cb4223c86df522a97e21742aeef153db4ebb (patch) | |
tree | 51746ec45bca5773dd29fdfddfad9e2eb28039be | |
parent | 5332e1d26fd182444e15e6481029347ab032d7cb (diff) | |
download | op-kernel-dev-e7a5cb4223c86df522a97e21742aeef153db4ebb.zip op-kernel-dev-e7a5cb4223c86df522a97e21742aeef153db4ebb.tar.gz |
ASoC: pcm1792a: Add DAPM support
Provide DAPM for the device, ensuring operation with DAPM required by the
core and making it easier to hook up external hardware to it.
Signed-off-by: Mark Brown <broonie@linaro.org>
-rw-r--r-- | sound/soc/codecs/pcm1792a.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/sound/soc/codecs/pcm1792a.c b/sound/soc/codecs/pcm1792a.c index c57d3a5..2a8eccf 100644 --- a/sound/soc/codecs/pcm1792a.c +++ b/sound/soc/codecs/pcm1792a.c @@ -154,6 +154,20 @@ static const struct snd_kcontrol_new pcm1792a_controls[] = { pcm1792a_dac_tlv), }; +static const struct snd_soc_dapm_widget pcm1792a_dapm_widgets[] = { +SND_SOC_DAPM_OUTPUT("IOUTL+"), +SND_SOC_DAPM_OUTPUT("IOUTL-"), +SND_SOC_DAPM_OUTPUT("IOUTR+"), +SND_SOC_DAPM_OUTPUT("IOUTR-"), +}; + +static const struct snd_soc_dapm_route pcm1792a_dapm_routes[] = { + { "IOUTL+", NULL, "Playback" }, + { "IOUTL-", NULL, "Playback" }, + { "IOUTR+", NULL, "Playback" }, + { "IOUTR-", NULL, "Playback" }, +}; + static struct snd_soc_dai_driver pcm1792a_dai = { .name = "pcm1792a-hifi", .playback = { @@ -184,6 +198,10 @@ static const struct regmap_config pcm1792a_regmap = { static struct snd_soc_codec_driver soc_codec_dev_pcm1792a = { .controls = pcm1792a_controls, .num_controls = ARRAY_SIZE(pcm1792a_controls), + .dapm_widgets = pcm1792a_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(pcm1792a_dapm_widgets), + .dapm_routes = pcm1792a_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(pcm1792a_dapm_routes), }; static int pcm1792a_spi_probe(struct spi_device *spi) |