diff options
author | Mark Brown <broonie@linaro.org> | 2013-08-22 14:28:32 +0100 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-08-22 14:28:32 +0100 |
commit | 7c24d7d67b63b5508bd1875cc05dd2f98f9206d4 (patch) | |
tree | eb78bee890b02f71d3014192e1f086ec472d57b8 /sound/soc/codecs | |
parent | ab8a4364ec0c180bff7fca9375846bff98d97566 (diff) | |
parent | 2e7fb942a30563125d6aac497fa0dcddbb7d731d (diff) | |
download | linux-7c24d7d67b63b5508bd1875cc05dd2f98f9206d4.tar.bz2 |
Merge remote-tracking branch 'asoc/topic/cs4271' into asoc-next
Diffstat (limited to 'sound/soc/codecs')
-rw-r--r-- | sound/soc/codecs/cs4271.c | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/sound/soc/codecs/cs4271.c b/sound/soc/codecs/cs4271.c index 03036b326732..a20f1bb8f071 100644 --- a/sound/soc/codecs/cs4271.c +++ b/sound/soc/codecs/cs4271.c @@ -173,6 +173,26 @@ struct cs4271_private { bool enable_soft_reset; }; +static const struct snd_soc_dapm_widget cs4271_dapm_widgets[] = { +SND_SOC_DAPM_INPUT("AINA"), +SND_SOC_DAPM_INPUT("AINB"), + +SND_SOC_DAPM_OUTPUT("AOUTA+"), +SND_SOC_DAPM_OUTPUT("AOUTA-"), +SND_SOC_DAPM_OUTPUT("AOUTB+"), +SND_SOC_DAPM_OUTPUT("AOUTB-"), +}; + +static const struct snd_soc_dapm_route cs4271_dapm_routes[] = { + { "Capture", NULL, "AINA" }, + { "Capture", NULL, "AINB" }, + + { "AOUTA+", NULL, "Playback" }, + { "AOUTA-", NULL, "Playback" }, + { "AOUTB+", NULL, "Playback" }, + { "AOUTB-", NULL, "Playback" }, +}; + /* * @freq is the desired MCLK rate * MCLK rate should (c) be the sample rate, multiplied by one of the @@ -576,8 +596,7 @@ static int cs4271_probe(struct snd_soc_codec *codec) CS4271_MODE2_MUTECAEQUB, CS4271_MODE2_MUTECAEQUB); - return snd_soc_add_codec_controls(codec, cs4271_snd_controls, - ARRAY_SIZE(cs4271_snd_controls)); + return 0; } static int cs4271_remove(struct snd_soc_codec *codec) @@ -596,6 +615,13 @@ static struct snd_soc_codec_driver soc_codec_dev_cs4271 = { .remove = cs4271_remove, .suspend = cs4271_soc_suspend, .resume = cs4271_soc_resume, + + .controls = cs4271_snd_controls, + .num_controls = ARRAY_SIZE(cs4271_snd_controls), + .dapm_widgets = cs4271_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(cs4271_dapm_widgets), + .dapm_routes = cs4271_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(cs4271_dapm_routes), }; #if defined(CONFIG_SPI_MASTER) |