diff options
| author | Lars-Peter Clausen <lars@metafoo.de> | 2015-01-09 16:03:30 -0500 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2015-01-09 16:05:55 -0500 |
| commit | 3cfaaaa0e729aa10a5e2dfe1efb1c05a6f5a89d1 (patch) | |
| tree | 6af728c15a630c60a069f3fc39a585a9c3444514 | |
| parent | c529d0a420ba4ba2031f61a4b86f59e31ddc964e (diff) | |
ASoC: magician: Automatically disconnect non-connected pins
All DAPM input and output pins of the uda1380 are either used in the card's
DAPM routing table or are marked as not connected.
Set the fully_routed flag of the card instead of manually marking the unused
inputs and outputs as not connected. This makes the code a bit shorter and
cleaner.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
| -rw-r--r-- | sound/soc/pxa/magician.c | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/sound/soc/pxa/magician.c b/sound/soc/pxa/magician.c index 259e048681c0..241d0be42d7a 100644 --- a/sound/soc/pxa/magician.c +++ b/sound/soc/pxa/magician.c | |||
| @@ -391,25 +391,6 @@ static const struct snd_kcontrol_new uda1380_magician_controls[] = { | |||
| 391 | magician_get_input, magician_set_input), | 391 | magician_get_input, magician_set_input), |
| 392 | }; | 392 | }; |
| 393 | 393 | ||
| 394 | /* | ||
| 395 | * Logic for a uda1380 as connected on a HTC Magician | ||
| 396 | */ | ||
| 397 | static int magician_uda1380_init(struct snd_soc_pcm_runtime *rtd) | ||
| 398 | { | ||
| 399 | struct snd_soc_codec *codec = rtd->codec; | ||
| 400 | struct snd_soc_dapm_context *dapm = &codec->dapm; | ||
| 401 | |||
| 402 | /* NC codec pins */ | ||
| 403 | snd_soc_dapm_nc_pin(dapm, "VOUTLHP"); | ||
| 404 | snd_soc_dapm_nc_pin(dapm, "VOUTRHP"); | ||
| 405 | |||
| 406 | /* FIXME: is anything connected here? */ | ||
| 407 | snd_soc_dapm_nc_pin(dapm, "VINL"); | ||
| 408 | snd_soc_dapm_nc_pin(dapm, "VINR"); | ||
| 409 | |||
| 410 | return 0; | ||
| 411 | } | ||
| 412 | |||
| 413 | /* magician digital audio interface glue - connects codec <--> CPU */ | 394 | /* magician digital audio interface glue - connects codec <--> CPU */ |
| 414 | static struct snd_soc_dai_link magician_dai[] = { | 395 | static struct snd_soc_dai_link magician_dai[] = { |
| 415 | { | 396 | { |
| @@ -419,7 +400,6 @@ static struct snd_soc_dai_link magician_dai[] = { | |||
| 419 | .codec_dai_name = "uda1380-hifi-playback", | 400 | .codec_dai_name = "uda1380-hifi-playback", |
| 420 | .platform_name = "pxa-pcm-audio", | 401 | .platform_name = "pxa-pcm-audio", |
| 421 | .codec_name = "uda1380-codec.0-0018", | 402 | .codec_name = "uda1380-codec.0-0018", |
| 422 | .init = magician_uda1380_init, | ||
| 423 | .ops = &magician_playback_ops, | 403 | .ops = &magician_playback_ops, |
| 424 | }, | 404 | }, |
| 425 | { | 405 | { |
| @@ -446,6 +426,7 @@ static struct snd_soc_card snd_soc_card_magician = { | |||
| 446 | .num_dapm_widgets = ARRAY_SIZE(uda1380_dapm_widgets), | 426 | .num_dapm_widgets = ARRAY_SIZE(uda1380_dapm_widgets), |
| 447 | .dapm_routes = audio_map, | 427 | .dapm_routes = audio_map, |
| 448 | .num_dapm_routes = ARRAY_SIZE(audio_map), | 428 | .num_dapm_routes = ARRAY_SIZE(audio_map), |
| 429 | .fully_routed = true, | ||
| 449 | }; | 430 | }; |
| 450 | 431 | ||
| 451 | static struct platform_device *magician_snd_device; | 432 | static struct platform_device *magician_snd_device; |
