diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2015-01-09 16:03:29 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-01-09 16:05:55 -0500 |
commit | c529d0a420ba4ba2031f61a4b86f59e31ddc964e (patch) | |
tree | 31b983ff0020dd0c939eaf28c934e5e8130f1faa /sound/soc/pxa | |
parent | 7523f69e584cba16775cbc70a4f0adcb84625894 (diff) |
ASoC: hx4700: Automatically disconnect non-connected pins
All DAPM input and output pins of the ak4641 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>
Diffstat (limited to 'sound/soc/pxa')
-rw-r--r-- | sound/soc/pxa/hx4700.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/sound/soc/pxa/hx4700.c b/sound/soc/pxa/hx4700.c index ce26551052a3..73eb5ddf9753 100644 --- a/sound/soc/pxa/hx4700.c +++ b/sound/soc/pxa/hx4700.c | |||
@@ -127,15 +127,8 @@ static const struct snd_soc_dapm_route hx4700_audio_map[] = { | |||
127 | static int hx4700_ak4641_init(struct snd_soc_pcm_runtime *rtd) | 127 | static int hx4700_ak4641_init(struct snd_soc_pcm_runtime *rtd) |
128 | { | 128 | { |
129 | struct snd_soc_codec *codec = rtd->codec; | 129 | struct snd_soc_codec *codec = rtd->codec; |
130 | struct snd_soc_dapm_context *dapm = &codec->dapm; | ||
131 | int err; | 130 | int err; |
132 | 131 | ||
133 | /* NC codec pins */ | ||
134 | /* FIXME: is anything connected here? */ | ||
135 | snd_soc_dapm_nc_pin(dapm, "MOUT1"); | ||
136 | snd_soc_dapm_nc_pin(dapm, "MICEXT"); | ||
137 | snd_soc_dapm_nc_pin(dapm, "AUX"); | ||
138 | |||
139 | /* Jack detection API stuff */ | 132 | /* Jack detection API stuff */ |
140 | err = snd_soc_jack_new(codec, "Headphone Jack", | 133 | err = snd_soc_jack_new(codec, "Headphone Jack", |
141 | SND_JACK_HEADPHONE, &hs_jack); | 134 | SND_JACK_HEADPHONE, &hs_jack); |
@@ -184,6 +177,7 @@ static struct snd_soc_card snd_soc_card_hx4700 = { | |||
184 | .num_dapm_widgets = ARRAY_SIZE(hx4700_dapm_widgets), | 177 | .num_dapm_widgets = ARRAY_SIZE(hx4700_dapm_widgets), |
185 | .dapm_routes = hx4700_audio_map, | 178 | .dapm_routes = hx4700_audio_map, |
186 | .num_dapm_routes = ARRAY_SIZE(hx4700_audio_map), | 179 | .num_dapm_routes = ARRAY_SIZE(hx4700_audio_map), |
180 | .fully_routed = true, | ||
187 | }; | 181 | }; |
188 | 182 | ||
189 | static struct gpio hx4700_audio_gpios[] = { | 183 | static struct gpio hx4700_audio_gpios[] = { |