diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2015-04-11 04:47:58 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-04-12 07:45:26 -0400 |
commit | 59c41d15e63063545b1f91f7ad5411c25f6d046d (patch) | |
tree | e31d10a80f431b966cab80c07071848d9a464c00 /sound | |
parent | d4bdaced1a81ca2953557f8ecae842b42879fda4 (diff) |
ASoC: n810: Automatically disconnect non-connected pins
All CODEC input and output widgets are either in the DAPM routing table or
manually marked as non-connected. This means the card is fully routed and we
can let the core take care of disconnecting non-connected pins.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/omap/n810.c | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/sound/soc/omap/n810.c b/sound/soc/omap/n810.c index 617eae37581c..dcb5336b5698 100644 --- a/sound/soc/omap/n810.c +++ b/sound/soc/omap/n810.c | |||
@@ -254,24 +254,6 @@ static const struct snd_kcontrol_new aic33_n810_controls[] = { | |||
254 | n810_get_input, n810_set_input), | 254 | n810_get_input, n810_set_input), |
255 | }; | 255 | }; |
256 | 256 | ||
257 | static int n810_aic33_init(struct snd_soc_pcm_runtime *rtd) | ||
258 | { | ||
259 | struct snd_soc_codec *codec = rtd->codec; | ||
260 | struct snd_soc_dapm_context *dapm = &codec->dapm; | ||
261 | |||
262 | /* Not connected */ | ||
263 | snd_soc_dapm_nc_pin(dapm, "MONO_LOUT"); | ||
264 | snd_soc_dapm_nc_pin(dapm, "HPLCOM"); | ||
265 | snd_soc_dapm_nc_pin(dapm, "HPRCOM"); | ||
266 | snd_soc_dapm_nc_pin(dapm, "MIC3L"); | ||
267 | snd_soc_dapm_nc_pin(dapm, "MIC3R"); | ||
268 | snd_soc_dapm_nc_pin(dapm, "LINE1R"); | ||
269 | snd_soc_dapm_nc_pin(dapm, "LINE2L"); | ||
270 | snd_soc_dapm_nc_pin(dapm, "LINE2R"); | ||
271 | |||
272 | return 0; | ||
273 | } | ||
274 | |||
275 | /* Digital audio interface glue - connects codec <--> CPU */ | 257 | /* Digital audio interface glue - connects codec <--> CPU */ |
276 | static struct snd_soc_dai_link n810_dai = { | 258 | static struct snd_soc_dai_link n810_dai = { |
277 | .name = "TLV320AIC33", | 259 | .name = "TLV320AIC33", |
@@ -282,7 +264,6 @@ static struct snd_soc_dai_link n810_dai = { | |||
282 | .codec_dai_name = "tlv320aic3x-hifi", | 264 | .codec_dai_name = "tlv320aic3x-hifi", |
283 | .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | | 265 | .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | |
284 | SND_SOC_DAIFMT_CBM_CFM, | 266 | SND_SOC_DAIFMT_CBM_CFM, |
285 | .init = n810_aic33_init, | ||
286 | .ops = &n810_ops, | 267 | .ops = &n810_ops, |
287 | }; | 268 | }; |
288 | 269 | ||
@@ -299,6 +280,7 @@ static struct snd_soc_card snd_soc_n810 = { | |||
299 | .num_dapm_widgets = ARRAY_SIZE(aic33_dapm_widgets), | 280 | .num_dapm_widgets = ARRAY_SIZE(aic33_dapm_widgets), |
300 | .dapm_routes = audio_map, | 281 | .dapm_routes = audio_map, |
301 | .num_dapm_routes = ARRAY_SIZE(audio_map), | 282 | .num_dapm_routes = ARRAY_SIZE(audio_map), |
283 | .fully_routed = true, | ||
302 | }; | 284 | }; |
303 | 285 | ||
304 | static struct platform_device *n810_snd_device; | 286 | static struct platform_device *n810_snd_device; |