aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc
diff options
context:
space:
mode:
authorJarkko Nikula <jarkko.nikula@linux.intel.com>2014-05-19 09:17:27 -0400
committerMark Brown <broonie@linaro.org>2014-05-19 12:19:18 -0400
commitd77a14b579f6bfe2d149d3bcc5bd306e20d2d652 (patch)
tree5e40d7fa7a209b113a5ce0a27677e7f91ce8809b /sound/soc
parent831ffa45e7465e45ab2244da6bbed6bead47b6bc (diff)
ASoC: Remove needless snd_soc_dapm_enable_pin() from machine driver inits
ALSA SoC core marks widgets as connected by default when they are initialized in snd_soc_dapm_new_control() so there is no need to call snd_soc_dapm_enable_pin() from machine driver init functions. Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/atmel/snd-soc-afeb9260.c12
-rw-r--r--sound/soc/intel/byt-rt5640.c5
-rw-r--r--sound/soc/intel/haswell.c6
-rw-r--r--sound/soc/kirkwood/kirkwood-t5325.c13
-rw-r--r--sound/soc/omap/ams-delta.c2
-rw-r--r--sound/soc/pxa/brownstone.c5
-rw-r--r--sound/soc/pxa/palm27x.c8
-rw-r--r--sound/soc/pxa/poodle.c1
-rw-r--r--sound/soc/pxa/ttc-dkb.c4
-rw-r--r--sound/soc/samsung/h1940_uda1380.c5
-rw-r--r--sound/soc/samsung/rx1950_uda1380.c5
-rw-r--r--sound/soc/samsung/s3c24xx_simtec_hermes.c8
-rw-r--r--sound/soc/samsung/s3c24xx_simtec_tlv320aic23.c8
-rw-r--r--sound/soc/samsung/smartq_wm8987.c2
-rw-r--r--sound/soc/samsung/smdk_wm8994.c12
15 files changed, 0 insertions, 96 deletions
diff --git a/sound/soc/atmel/snd-soc-afeb9260.c b/sound/soc/atmel/snd-soc-afeb9260.c
index f65f08beac31..9579799ace54 100644
--- a/sound/soc/atmel/snd-soc-afeb9260.c
+++ b/sound/soc/atmel/snd-soc-afeb9260.c
@@ -80,17 +80,6 @@ static const struct snd_soc_dapm_route afeb9260_audio_map[] = {
80 {"MICIN", NULL, "Mic Jack"}, 80 {"MICIN", NULL, "Mic Jack"},
81}; 81};
82 82
83static int afeb9260_tlv320aic23_init(struct snd_soc_pcm_runtime *rtd)
84{
85 struct snd_soc_codec *codec = rtd->codec;
86 struct snd_soc_dapm_context *dapm = &codec->dapm;
87
88 snd_soc_dapm_enable_pin(dapm, "Headphone Jack");
89 snd_soc_dapm_enable_pin(dapm, "Line In");
90 snd_soc_dapm_enable_pin(dapm, "Mic Jack");
91
92 return 0;
93}
94 83
95/* Digital audio interface glue - connects codec <--> CPU */ 84/* Digital audio interface glue - connects codec <--> CPU */
96static struct snd_soc_dai_link afeb9260_dai = { 85static struct snd_soc_dai_link afeb9260_dai = {
@@ -100,7 +89,6 @@ static struct snd_soc_dai_link afeb9260_dai = {
100 .codec_dai_name = "tlv320aic23-hifi", 89 .codec_dai_name = "tlv320aic23-hifi",
101 .platform_name = "atmel_pcm-audio", 90 .platform_name = "atmel_pcm-audio",
102 .codec_name = "tlv320aic23-codec.0-001a", 91 .codec_name = "tlv320aic23-codec.0-001a",
103 .init = afeb9260_tlv320aic23_init,
104 .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_IF | 92 .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_IF |
105 SND_SOC_DAIFMT_CBM_CFM, 93 SND_SOC_DAIFMT_CBM_CFM,
106 .ops = &afeb9260_ops, 94 .ops = &afeb9260_ops,
diff --git a/sound/soc/intel/byt-rt5640.c b/sound/soc/intel/byt-rt5640.c
index b3195bb24b72..10df4c8d78e6 100644
--- a/sound/soc/intel/byt-rt5640.c
+++ b/sound/soc/intel/byt-rt5640.c
@@ -100,11 +100,6 @@ static int byt_rt5640_init(struct snd_soc_pcm_runtime *runtime)
100 snd_soc_dapm_ignore_suspend(dapm, "SPORP"); 100 snd_soc_dapm_ignore_suspend(dapm, "SPORP");
101 snd_soc_dapm_ignore_suspend(dapm, "SPORN"); 101 snd_soc_dapm_ignore_suspend(dapm, "SPORN");
102 102
103 snd_soc_dapm_enable_pin(dapm, "Headset Mic");
104 snd_soc_dapm_enable_pin(dapm, "Headphone");
105 snd_soc_dapm_enable_pin(dapm, "Speaker");
106 snd_soc_dapm_enable_pin(dapm, "Internal Mic");
107
108 return ret; 103 return ret;
109} 104}
110 105
diff --git a/sound/soc/intel/haswell.c b/sound/soc/intel/haswell.c
index 54345a2a7386..94c2c33ffe49 100644
--- a/sound/soc/intel/haswell.c
+++ b/sound/soc/intel/haswell.c
@@ -89,8 +89,6 @@ static struct snd_soc_ops haswell_rt5640_ops = {
89 89
90static int haswell_rtd_init(struct snd_soc_pcm_runtime *rtd) 90static int haswell_rtd_init(struct snd_soc_pcm_runtime *rtd)
91{ 91{
92 struct snd_soc_codec *codec = rtd->codec;
93 struct snd_soc_dapm_context *dapm = &codec->dapm;
94 struct sst_pdata *pdata = dev_get_platdata(rtd->platform->dev); 92 struct sst_pdata *pdata = dev_get_platdata(rtd->platform->dev);
95 struct sst_hsw *haswell = pdata->dsp; 93 struct sst_hsw *haswell = pdata->dsp;
96 int ret; 94 int ret;
@@ -104,10 +102,6 @@ static int haswell_rtd_init(struct snd_soc_pcm_runtime *rtd)
104 return ret; 102 return ret;
105 } 103 }
106 104
107 /* always connected */
108 snd_soc_dapm_enable_pin(dapm, "Headphones");
109 snd_soc_dapm_enable_pin(dapm, "Mic");
110
111 return 0; 105 return 0;
112} 106}
113 107
diff --git a/sound/soc/kirkwood/kirkwood-t5325.c b/sound/soc/kirkwood/kirkwood-t5325.c
index d213832b0c72..844b8415a011 100644
--- a/sound/soc/kirkwood/kirkwood-t5325.c
+++ b/sound/soc/kirkwood/kirkwood-t5325.c
@@ -52,18 +52,6 @@ static const struct snd_soc_dapm_route t5325_route[] = {
52 { "MIC2", NULL, "Mic Jack" }, 52 { "MIC2", NULL, "Mic Jack" },
53}; 53};
54 54
55static int t5325_dai_init(struct snd_soc_pcm_runtime *rtd)
56{
57 struct snd_soc_codec *codec = rtd->codec;
58 struct snd_soc_dapm_context *dapm = &codec->dapm;
59
60 snd_soc_dapm_enable_pin(dapm, "Mic Jack");
61 snd_soc_dapm_enable_pin(dapm, "Headphone Jack");
62 snd_soc_dapm_enable_pin(dapm, "Speaker");
63
64 return 0;
65}
66
67static struct snd_soc_dai_link t5325_dai[] = { 55static struct snd_soc_dai_link t5325_dai[] = {
68{ 56{
69 .name = "ALC5621", 57 .name = "ALC5621",
@@ -74,7 +62,6 @@ static struct snd_soc_dai_link t5325_dai[] = {
74 .codec_name = "alc562x-codec.0-001a", 62 .codec_name = "alc562x-codec.0-001a",
75 .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_CBS_CFS, 63 .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_CBS_CFS,
76 .ops = &t5325_ops, 64 .ops = &t5325_ops,
77 .init = t5325_dai_init,
78}, 65},
79}; 66};
80 67
diff --git a/sound/soc/omap/ams-delta.c b/sound/soc/omap/ams-delta.c
index 56a5219c0a00..44ae4561adcd 100644
--- a/sound/soc/omap/ams-delta.c
+++ b/sound/soc/omap/ams-delta.c
@@ -541,8 +541,6 @@ static int ams_delta_cx20442_init(struct snd_soc_pcm_runtime *rtd)
541 541
542 /* Set up initial pin constellation */ 542 /* Set up initial pin constellation */
543 snd_soc_dapm_disable_pin(dapm, "Mouthpiece"); 543 snd_soc_dapm_disable_pin(dapm, "Mouthpiece");
544 snd_soc_dapm_enable_pin(dapm, "Earpiece");
545 snd_soc_dapm_enable_pin(dapm, "Microphone");
546 snd_soc_dapm_disable_pin(dapm, "Speaker"); 544 snd_soc_dapm_disable_pin(dapm, "Speaker");
547 snd_soc_dapm_disable_pin(dapm, "AGCIN"); 545 snd_soc_dapm_disable_pin(dapm, "AGCIN");
548 snd_soc_dapm_disable_pin(dapm, "AGCOUT"); 546 snd_soc_dapm_disable_pin(dapm, "AGCOUT");
diff --git a/sound/soc/pxa/brownstone.c b/sound/soc/pxa/brownstone.c
index 9c128d4c8cbf..c8dd53f9c35d 100644
--- a/sound/soc/pxa/brownstone.c
+++ b/sound/soc/pxa/brownstone.c
@@ -50,11 +50,6 @@ static int brownstone_wm8994_init(struct snd_soc_pcm_runtime *rtd)
50 struct snd_soc_codec *codec = rtd->codec; 50 struct snd_soc_codec *codec = rtd->codec;
51 struct snd_soc_dapm_context *dapm = &codec->dapm; 51 struct snd_soc_dapm_context *dapm = &codec->dapm;
52 52
53 snd_soc_dapm_enable_pin(dapm, "Ext Spk");
54 snd_soc_dapm_enable_pin(dapm, "Headset Stereophone");
55 snd_soc_dapm_enable_pin(dapm, "Headset Mic");
56 snd_soc_dapm_enable_pin(dapm, "Main Mic");
57
58 /* set endpoints to not connected */ 53 /* set endpoints to not connected */
59 snd_soc_dapm_nc_pin(dapm, "HPOUT2P"); 54 snd_soc_dapm_nc_pin(dapm, "HPOUT2P");
60 snd_soc_dapm_nc_pin(dapm, "HPOUT2N"); 55 snd_soc_dapm_nc_pin(dapm, "HPOUT2N");
diff --git a/sound/soc/pxa/palm27x.c b/sound/soc/pxa/palm27x.c
index 3284c4b901cb..17f9521ff6ea 100644
--- a/sound/soc/pxa/palm27x.c
+++ b/sound/soc/pxa/palm27x.c
@@ -79,14 +79,6 @@ static int palm27x_ac97_init(struct snd_soc_pcm_runtime *rtd)
79 struct snd_soc_dapm_context *dapm = &codec->dapm; 79 struct snd_soc_dapm_context *dapm = &codec->dapm;
80 int err; 80 int err;
81 81
82 /* connected pins */
83 if (machine_is_palmld())
84 snd_soc_dapm_enable_pin(dapm, "MIC1");
85 snd_soc_dapm_enable_pin(dapm, "HPOUTL");
86 snd_soc_dapm_enable_pin(dapm, "HPOUTR");
87 snd_soc_dapm_enable_pin(dapm, "LOUT2");
88 snd_soc_dapm_enable_pin(dapm, "ROUT2");
89
90 /* not connected pins */ 82 /* not connected pins */
91 snd_soc_dapm_nc_pin(dapm, "OUT3"); 83 snd_soc_dapm_nc_pin(dapm, "OUT3");
92 snd_soc_dapm_nc_pin(dapm, "MONOOUT"); 84 snd_soc_dapm_nc_pin(dapm, "MONOOUT");
diff --git a/sound/soc/pxa/poodle.c b/sound/soc/pxa/poodle.c
index c6bdc6c0eff6..21f340065318 100644
--- a/sound/soc/pxa/poodle.c
+++ b/sound/soc/pxa/poodle.c
@@ -230,7 +230,6 @@ static int poodle_wm8731_init(struct snd_soc_pcm_runtime *rtd)
230 230
231 snd_soc_dapm_nc_pin(dapm, "LLINEIN"); 231 snd_soc_dapm_nc_pin(dapm, "LLINEIN");
232 snd_soc_dapm_nc_pin(dapm, "RLINEIN"); 232 snd_soc_dapm_nc_pin(dapm, "RLINEIN");
233 snd_soc_dapm_enable_pin(dapm, "MICIN");
234 233
235 return 0; 234 return 0;
236} 235}
diff --git a/sound/soc/pxa/ttc-dkb.c b/sound/soc/pxa/ttc-dkb.c
index 0b535b570622..9d7c5b7e9539 100644
--- a/sound/soc/pxa/ttc-dkb.c
+++ b/sound/soc/pxa/ttc-dkb.c
@@ -78,10 +78,6 @@ static int ttc_pm860x_init(struct snd_soc_pcm_runtime *rtd)
78 struct snd_soc_codec *codec = rtd->codec; 78 struct snd_soc_codec *codec = rtd->codec;
79 struct snd_soc_dapm_context *dapm = &codec->dapm; 79 struct snd_soc_dapm_context *dapm = &codec->dapm;
80 80
81 /* connected pins */
82 snd_soc_dapm_enable_pin(dapm, "Ext Speaker");
83 snd_soc_dapm_enable_pin(dapm, "Ext Mic 1");
84 snd_soc_dapm_enable_pin(dapm, "Ext Mic 3");
85 snd_soc_dapm_disable_pin(dapm, "Headset Mic 2"); 81 snd_soc_dapm_disable_pin(dapm, "Headset Mic 2");
86 snd_soc_dapm_disable_pin(dapm, "Headset Stereophone"); 82 snd_soc_dapm_disable_pin(dapm, "Headset Stereophone");
87 83
diff --git a/sound/soc/samsung/h1940_uda1380.c b/sound/soc/samsung/h1940_uda1380.c
index 88b09e022503..9f2fb69dbaae 100644
--- a/sound/soc/samsung/h1940_uda1380.c
+++ b/sound/soc/samsung/h1940_uda1380.c
@@ -176,11 +176,6 @@ static struct platform_device *s3c24xx_snd_device;
176static int h1940_uda1380_init(struct snd_soc_pcm_runtime *rtd) 176static int h1940_uda1380_init(struct snd_soc_pcm_runtime *rtd)
177{ 177{
178 struct snd_soc_codec *codec = rtd->codec; 178 struct snd_soc_codec *codec = rtd->codec;
179 struct snd_soc_dapm_context *dapm = &codec->dapm;
180
181 snd_soc_dapm_enable_pin(dapm, "Headphone Jack");
182 snd_soc_dapm_enable_pin(dapm, "Speaker");
183 snd_soc_dapm_enable_pin(dapm, "Mic Jack");
184 179
185 snd_soc_jack_new(codec, "Headphone Jack", SND_JACK_HEADPHONE, 180 snd_soc_jack_new(codec, "Headphone Jack", SND_JACK_HEADPHONE,
186 &hp_jack); 181 &hp_jack);
diff --git a/sound/soc/samsung/rx1950_uda1380.c b/sound/soc/samsung/rx1950_uda1380.c
index 2982d9e7f268..5b3e504d3a32 100644
--- a/sound/soc/samsung/rx1950_uda1380.c
+++ b/sound/soc/samsung/rx1950_uda1380.c
@@ -221,11 +221,6 @@ static int rx1950_hw_params(struct snd_pcm_substream *substream,
221static int rx1950_uda1380_init(struct snd_soc_pcm_runtime *rtd) 221static int rx1950_uda1380_init(struct snd_soc_pcm_runtime *rtd)
222{ 222{
223 struct snd_soc_codec *codec = rtd->codec; 223 struct snd_soc_codec *codec = rtd->codec;
224 struct snd_soc_dapm_context *dapm = &codec->dapm;
225
226 snd_soc_dapm_enable_pin(dapm, "Headphone Jack");
227 snd_soc_dapm_enable_pin(dapm, "Speaker");
228 snd_soc_dapm_enable_pin(dapm, "Mic Jack");
229 224
230 snd_soc_jack_new(codec, "Headphone Jack", SND_JACK_HEADPHONE, 225 snd_soc_jack_new(codec, "Headphone Jack", SND_JACK_HEADPHONE,
231 &hp_jack); 226 &hp_jack);
diff --git a/sound/soc/samsung/s3c24xx_simtec_hermes.c b/sound/soc/samsung/s3c24xx_simtec_hermes.c
index d8a0543cae5e..2d30b7b6818a 100644
--- a/sound/soc/samsung/s3c24xx_simtec_hermes.c
+++ b/sound/soc/samsung/s3c24xx_simtec_hermes.c
@@ -63,14 +63,6 @@ static const struct snd_soc_dapm_route base_map[] = {
63*/ 63*/
64static int simtec_hermes_init(struct snd_soc_pcm_runtime *rtd) 64static int simtec_hermes_init(struct snd_soc_pcm_runtime *rtd)
65{ 65{
66 struct snd_soc_codec *codec = rtd->codec;
67 struct snd_soc_dapm_context *dapm = &codec->dapm;
68
69 snd_soc_dapm_enable_pin(dapm, "Headphone Jack");
70 snd_soc_dapm_enable_pin(dapm, "Line In");
71 snd_soc_dapm_enable_pin(dapm, "Line Out");
72 snd_soc_dapm_enable_pin(dapm, "Mic Jack");
73
74 simtec_audio_init(rtd); 66 simtec_audio_init(rtd);
75 67
76 return 0; 68 return 0;
diff --git a/sound/soc/samsung/s3c24xx_simtec_tlv320aic23.c b/sound/soc/samsung/s3c24xx_simtec_tlv320aic23.c
index 1ac0d7a63a3a..83f6c7d49cd6 100644
--- a/sound/soc/samsung/s3c24xx_simtec_tlv320aic23.c
+++ b/sound/soc/samsung/s3c24xx_simtec_tlv320aic23.c
@@ -52,14 +52,6 @@ static const struct snd_soc_dapm_route base_map[] = {
52*/ 52*/
53static int simtec_tlv320aic23_init(struct snd_soc_pcm_runtime *rtd) 53static int simtec_tlv320aic23_init(struct snd_soc_pcm_runtime *rtd)
54{ 54{
55 struct snd_soc_codec *codec = rtd->codec;
56 struct snd_soc_dapm_context *dapm = &codec->dapm;
57
58 snd_soc_dapm_enable_pin(dapm, "Headphone Jack");
59 snd_soc_dapm_enable_pin(dapm, "Line In");
60 snd_soc_dapm_enable_pin(dapm, "Line Out");
61 snd_soc_dapm_enable_pin(dapm, "Mic Jack");
62
63 simtec_audio_init(rtd); 55 simtec_audio_init(rtd);
64 56
65 return 0; 57 return 0;
diff --git a/sound/soc/samsung/smartq_wm8987.c b/sound/soc/samsung/smartq_wm8987.c
index c3b2adafb7b5..df55db5d3554 100644
--- a/sound/soc/samsung/smartq_wm8987.c
+++ b/sound/soc/samsung/smartq_wm8987.c
@@ -162,8 +162,6 @@ static int smartq_wm8987_init(struct snd_soc_pcm_runtime *rtd)
162 snd_soc_dapm_nc_pin(dapm, "ROUT1"); 162 snd_soc_dapm_nc_pin(dapm, "ROUT1");
163 163
164 /* set endpoints to default off mode */ 164 /* set endpoints to default off mode */
165 snd_soc_dapm_enable_pin(dapm, "Internal Speaker");
166 snd_soc_dapm_enable_pin(dapm, "Internal Mic");
167 snd_soc_dapm_disable_pin(dapm, "Headphone Jack"); 165 snd_soc_dapm_disable_pin(dapm, "Headphone Jack");
168 166
169 /* Headphone jack detection */ 167 /* Headphone jack detection */
diff --git a/sound/soc/samsung/smdk_wm8994.c b/sound/soc/samsung/smdk_wm8994.c
index 682eb4f7ba0c..fc25cc00f0f2 100644
--- a/sound/soc/samsung/smdk_wm8994.c
+++ b/sound/soc/samsung/smdk_wm8994.c
@@ -89,18 +89,6 @@ static int smdk_wm8994_init_paiftx(struct snd_soc_pcm_runtime *rtd)
89 struct snd_soc_codec *codec = rtd->codec; 89 struct snd_soc_codec *codec = rtd->codec;
90 struct snd_soc_dapm_context *dapm = &codec->dapm; 90 struct snd_soc_dapm_context *dapm = &codec->dapm;
91 91
92 /* HeadPhone */
93 snd_soc_dapm_enable_pin(dapm, "HPOUT1R");
94 snd_soc_dapm_enable_pin(dapm, "HPOUT1L");
95
96 /* MicIn */
97 snd_soc_dapm_enable_pin(dapm, "IN1LN");
98 snd_soc_dapm_enable_pin(dapm, "IN1RN");
99
100 /* LineIn */
101 snd_soc_dapm_enable_pin(dapm, "IN2LN");
102 snd_soc_dapm_enable_pin(dapm, "IN2RN");
103
104 /* Other pins NC */ 92 /* Other pins NC */
105 snd_soc_dapm_nc_pin(dapm, "HPOUT2P"); 93 snd_soc_dapm_nc_pin(dapm, "HPOUT2P");
106 snd_soc_dapm_nc_pin(dapm, "HPOUT2N"); 94 snd_soc_dapm_nc_pin(dapm, "HPOUT2N");