diff options
author | Mark Brown <broonie@linaro.org> | 2013-08-11 13:28:42 +0200 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-08-13 14:38:36 +0200 |
commit | 4601736a6f8e7ae09f1010df02e1ced605043cad (patch) | |
tree | 93c5ba1affafd7840d4ff8c33e55b2296a8fec38 /sound/soc/codecs/ak4554.c | |
parent | ASoC: ak4554: add DT support (diff) | |
download | linux-4601736a6f8e7ae09f1010df02e1ced605043cad.tar.xz linux-4601736a6f8e7ae09f1010df02e1ced605043cad.zip |
ASoC: ak4554: Add DAPM support
This makes it possible to hook the device into a more complex board and
ensures it will continue to work with non-DAPM support removed from the
core.
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc/codecs/ak4554.c')
-rw-r--r-- | sound/soc/codecs/ak4554.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/sound/soc/codecs/ak4554.c b/sound/soc/codecs/ak4554.c index 6aed9c4d06d6..79e9555766c0 100644 --- a/sound/soc/codecs/ak4554.c +++ b/sound/soc/codecs/ak4554.c @@ -29,6 +29,22 @@ * CPU-DAI2 (capture only fmt = LEFT_J) ---+ */ +static const struct snd_soc_dapm_widget ak4554_dapm_widgets[] = { +SND_SOC_DAPM_INPUT("AINL"), +SND_SOC_DAPM_INPUT("AINR"), + +SND_SOC_DAPM_OUTPUT("AOUTL"), +SND_SOC_DAPM_OUTPUT("AOUTR"), +}; + +static const struct snd_soc_dapm_route ak4554_dapm_routes[] = { + { "Capture", NULL, "AINL" }, + { "Capture", NULL, "AINR" }, + + { "AOUTL", NULL, "Playback" }, + { "AOUTR", NULL, "Playback" }, +}; + static struct snd_soc_dai_driver ak4554_dai = { .name = "ak4554-hifi", .playback = { @@ -49,6 +65,10 @@ static struct snd_soc_dai_driver ak4554_dai = { }; static struct snd_soc_codec_driver soc_codec_dev_ak4554 = { + .dapm_widgets = ak4554_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(ak4554_dapm_widgets), + .dapm_routes = ak4554_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(ak4554_dapm_routes), }; static int ak4554_soc_probe(struct platform_device *pdev) |