aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/tlv320aic26.c
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2013-08-16 07:24:47 -0400
committerMark Brown <broonie@linaro.org>2013-08-16 07:32:44 -0400
commit4a11bc2fdd7f526c70e013366171d66f27656203 (patch)
tree4863e5f2df56dcb907686d654eb7e6c685df142a /sound/soc/codecs/tlv320aic26.c
parentc21bb9b1b7de87ee33c8ebf94a155be2aa551849 (diff)
ASoC: tlv320aic26: Add basic DAPM support
Provide external widgets for the CODEC to ensure the device continues to function with DAPM mandatory and to make it easier to hook the device up to other components. Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc/codecs/tlv320aic26.c')
-rw-r--r--sound/soc/codecs/tlv320aic26.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/sound/soc/codecs/tlv320aic26.c b/sound/soc/codecs/tlv320aic26.c
index 93cf692a8db7..7b8f3d965f43 100644
--- a/sound/soc/codecs/tlv320aic26.c
+++ b/sound/soc/codecs/tlv320aic26.c
@@ -119,6 +119,22 @@ static int aic26_reg_write(struct snd_soc_codec *codec, unsigned int reg,
119 return 0; 119 return 0;
120} 120}
121 121
122static const struct snd_soc_dapm_widget tlv320aic26_dapm_widgets[] = {
123SND_SOC_DAPM_INPUT("MICIN"),
124SND_SOC_DAPM_INPUT("AUX"),
125
126SND_SOC_DAPM_OUTPUT("HPL"),
127SND_SOC_DAPM_OUTPUT("HPR"),
128};
129
130static const struct snd_soc_dapm_route tlv320aic26_dapm_routes[] = {
131 { "Capture", NULL, "MICIN" },
132 { "Capture", NULL, "AUX" },
133
134 { "HPL", NULL, "Playback" },
135 { "HPR", NULL, "Playback" },
136};
137
122/* --------------------------------------------------------------------- 138/* ---------------------------------------------------------------------
123 * Digital Audio Interface Operations 139 * Digital Audio Interface Operations
124 */ 140 */
@@ -402,6 +418,10 @@ static struct snd_soc_codec_driver aic26_soc_codec_dev = {
402 .write = aic26_reg_write, 418 .write = aic26_reg_write,
403 .reg_cache_size = AIC26_NUM_REGS, 419 .reg_cache_size = AIC26_NUM_REGS,
404 .reg_word_size = sizeof(u16), 420 .reg_word_size = sizeof(u16),
421 .dapm_widgets = tlv320aic26_dapm_widgets,
422 .num_dapm_widgets = ARRAY_SIZE(tlv320aic26_dapm_widgets),
423 .dapm_routes = tlv320aic26_dapm_routes,
424 .num_dapm_routes = ARRAY_SIZE(tlv320aic26_dapm_routes),
405}; 425};
406 426
407/* --------------------------------------------------------------------- 427/* ---------------------------------------------------------------------