Commit 87bea31c authored by Mark Brown's avatar Mark Brown

ASoC: Remove redundant snd_soc_dapm_sync() calls from machine drivers

The core will sync DAPM as part of the card initialization, there is no
need for machine drivers to do so during their setup.

OMAP drivers are omitted as I know Peter already has patches for them.
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent 4f4c0072
...@@ -338,7 +338,6 @@ static int playpaq_wm8510_init(struct snd_soc_pcm_runtime *rtd) ...@@ -338,7 +338,6 @@ static int playpaq_wm8510_init(struct snd_soc_pcm_runtime *rtd)
/* always connected pins */ /* always connected pins */
snd_soc_dapm_enable_pin(dapm, "Int Mic"); snd_soc_dapm_enable_pin(dapm, "Int Mic");
snd_soc_dapm_enable_pin(dapm, "Ext Spk"); snd_soc_dapm_enable_pin(dapm, "Ext Spk");
snd_soc_dapm_sync(dapm);
......
...@@ -173,8 +173,6 @@ static int at91sam9g20ek_wm8731_init(struct snd_soc_pcm_runtime *rtd) ...@@ -173,8 +173,6 @@ static int at91sam9g20ek_wm8731_init(struct snd_soc_pcm_runtime *rtd)
/* always connected */ /* always connected */
snd_soc_dapm_enable_pin(dapm, "Ext Spk"); snd_soc_dapm_enable_pin(dapm, "Ext Spk");
snd_soc_dapm_sync(dapm);
return 0; return 0;
} }
......
...@@ -117,8 +117,6 @@ static int afeb9260_tlv320aic23_init(struct snd_soc_pcm_runtime *rtd) ...@@ -117,8 +117,6 @@ static int afeb9260_tlv320aic23_init(struct snd_soc_pcm_runtime *rtd)
snd_soc_dapm_enable_pin(dapm, "Line In"); snd_soc_dapm_enable_pin(dapm, "Line In");
snd_soc_dapm_enable_pin(dapm, "Mic Jack"); snd_soc_dapm_enable_pin(dapm, "Mic Jack");
snd_soc_dapm_sync(dapm);
return 0; return 0;
} }
......
...@@ -150,8 +150,6 @@ static int evm_aic3x_init(struct snd_soc_pcm_runtime *rtd) ...@@ -150,8 +150,6 @@ static int evm_aic3x_init(struct snd_soc_pcm_runtime *rtd)
snd_soc_dapm_enable_pin(dapm, "Mic Jack"); snd_soc_dapm_enable_pin(dapm, "Mic Jack");
snd_soc_dapm_enable_pin(dapm, "Line In"); snd_soc_dapm_enable_pin(dapm, "Line In");
snd_soc_dapm_sync(dapm);
return 0; return 0;
} }
......
...@@ -79,8 +79,6 @@ static int t5325_dai_init(struct snd_soc_pcm_runtime *rtd) ...@@ -79,8 +79,6 @@ static int t5325_dai_init(struct snd_soc_pcm_runtime *rtd)
snd_soc_dapm_enable_pin(dapm, "Headphone Jack"); snd_soc_dapm_enable_pin(dapm, "Headphone Jack");
snd_soc_dapm_enable_pin(dapm, "Speaker"); snd_soc_dapm_enable_pin(dapm, "Speaker");
snd_soc_dapm_sync(dapm);
return 0; return 0;
} }
......
...@@ -233,7 +233,6 @@ static int mfld_init(struct snd_soc_pcm_runtime *runtime) ...@@ -233,7 +233,6 @@ static int mfld_init(struct snd_soc_pcm_runtime *runtime)
/* always connected */ /* always connected */
snd_soc_dapm_enable_pin(dapm, "Headphones"); snd_soc_dapm_enable_pin(dapm, "Headphones");
snd_soc_dapm_enable_pin(dapm, "Mic"); snd_soc_dapm_enable_pin(dapm, "Mic");
snd_soc_dapm_sync(dapm);
ret_val = snd_soc_add_controls(codec, mfld_snd_controls, ret_val = snd_soc_add_controls(codec, mfld_snd_controls,
ARRAY_SIZE(mfld_snd_controls)); ARRAY_SIZE(mfld_snd_controls));
...@@ -251,7 +250,6 @@ static int mfld_init(struct snd_soc_pcm_runtime *runtime) ...@@ -251,7 +250,6 @@ static int mfld_init(struct snd_soc_pcm_runtime *runtime)
/* we dont use linein in this so set to NC */ /* we dont use linein in this so set to NC */
snd_soc_dapm_disable_pin(dapm, "LINEINL"); snd_soc_dapm_disable_pin(dapm, "LINEINL");
snd_soc_dapm_disable_pin(dapm, "LINEINR"); snd_soc_dapm_disable_pin(dapm, "LINEINR");
snd_soc_dapm_sync(dapm);
/* Headset and button jack detection */ /* Headset and button jack detection */
ret_val = snd_soc_jack_new(codec, "Intel(R) MID Audio Jack", ret_val = snd_soc_jack_new(codec, "Intel(R) MID Audio Jack",
......
...@@ -299,7 +299,6 @@ static int corgi_wm8731_init(struct snd_soc_pcm_runtime *rtd) ...@@ -299,7 +299,6 @@ static int corgi_wm8731_init(struct snd_soc_pcm_runtime *rtd)
/* Set up corgi specific audio path audio_map */ /* Set up corgi specific audio path audio_map */
snd_soc_dapm_add_routes(dapm, audio_map, ARRAY_SIZE(audio_map)); snd_soc_dapm_add_routes(dapm, audio_map, ARRAY_SIZE(audio_map));
snd_soc_dapm_sync(dapm);
return 0; return 0;
} }
......
...@@ -108,8 +108,6 @@ static int e740_ac97_init(struct snd_soc_pcm_runtime *rtd) ...@@ -108,8 +108,6 @@ static int e740_ac97_init(struct snd_soc_pcm_runtime *rtd)
snd_soc_dapm_add_routes(dapm, audio_map, ARRAY_SIZE(audio_map)); snd_soc_dapm_add_routes(dapm, audio_map, ARRAY_SIZE(audio_map));
snd_soc_dapm_sync(dapm);
return 0; return 0;
} }
......
...@@ -90,8 +90,6 @@ static int e750_ac97_init(struct snd_soc_pcm_runtime *rtd) ...@@ -90,8 +90,6 @@ static int e750_ac97_init(struct snd_soc_pcm_runtime *rtd)
snd_soc_dapm_add_routes(dapm, audio_map, ARRAY_SIZE(audio_map)); snd_soc_dapm_add_routes(dapm, audio_map, ARRAY_SIZE(audio_map));
snd_soc_dapm_sync(dapm);
return 0; return 0;
} }
......
...@@ -80,7 +80,6 @@ static int e800_ac97_init(struct snd_soc_pcm_runtime *rtd) ...@@ -80,7 +80,6 @@ static int e800_ac97_init(struct snd_soc_pcm_runtime *rtd)
ARRAY_SIZE(e800_dapm_widgets)); ARRAY_SIZE(e800_dapm_widgets));
snd_soc_dapm_add_routes(dapm, audio_map, ARRAY_SIZE(audio_map)); snd_soc_dapm_add_routes(dapm, audio_map, ARRAY_SIZE(audio_map));
snd_soc_dapm_sync(dapm);
return 0; return 0;
} }
......
...@@ -423,7 +423,6 @@ static int magician_uda1380_init(struct snd_soc_pcm_runtime *rtd) ...@@ -423,7 +423,6 @@ static int magician_uda1380_init(struct snd_soc_pcm_runtime *rtd)
/* Set up magician specific audio path interconnects */ /* Set up magician specific audio path interconnects */
snd_soc_dapm_add_routes(dapm, audio_map, ARRAY_SIZE(audio_map)); snd_soc_dapm_add_routes(dapm, audio_map, ARRAY_SIZE(audio_map));
snd_soc_dapm_sync(dapm);
return 0; return 0;
} }
......
...@@ -151,7 +151,6 @@ static int mioa701_wm9713_init(struct snd_soc_pcm_runtime *rtd) ...@@ -151,7 +151,6 @@ static int mioa701_wm9713_init(struct snd_soc_pcm_runtime *rtd)
snd_soc_dapm_enable_pin(dapm, "Front Mic"); snd_soc_dapm_enable_pin(dapm, "Front Mic");
snd_soc_dapm_enable_pin(dapm, "GSM Line In"); snd_soc_dapm_enable_pin(dapm, "GSM Line In");
snd_soc_dapm_enable_pin(dapm, "GSM Line Out"); snd_soc_dapm_enable_pin(dapm, "GSM Line Out");
snd_soc_dapm_sync(dapm);
return 0; return 0;
} }
......
...@@ -107,10 +107,6 @@ static int palm27x_ac97_init(struct snd_soc_pcm_runtime *rtd) ...@@ -107,10 +107,6 @@ static int palm27x_ac97_init(struct snd_soc_pcm_runtime *rtd)
snd_soc_dapm_nc_pin(dapm, "PHONE"); snd_soc_dapm_nc_pin(dapm, "PHONE");
snd_soc_dapm_nc_pin(dapm, "MIC2"); snd_soc_dapm_nc_pin(dapm, "MIC2");
err = snd_soc_dapm_sync(dapm);
if (err)
return err;
/* Jack detection API stuff */ /* Jack detection API stuff */
err = snd_soc_jack_new(codec, "Headphone Jack", err = snd_soc_jack_new(codec, "Headphone Jack",
SND_JACK_HEADPHONE, &hs_jack); SND_JACK_HEADPHONE, &hs_jack);
......
...@@ -146,10 +146,6 @@ static int saarb_pm860x_init(struct snd_soc_pcm_runtime *rtd) ...@@ -146,10 +146,6 @@ static int saarb_pm860x_init(struct snd_soc_pcm_runtime *rtd)
snd_soc_dapm_disable_pin(dapm, "Headset Mic 2"); snd_soc_dapm_disable_pin(dapm, "Headset Mic 2");
snd_soc_dapm_disable_pin(dapm, "Headset Stereophone"); snd_soc_dapm_disable_pin(dapm, "Headset Stereophone");
ret = snd_soc_dapm_sync(dapm);
if (ret)
return ret;
/* Headset jack detection */ /* Headset jack detection */
snd_soc_jack_new(codec, "Headphone Jack", SND_JACK_HEADPHONE snd_soc_jack_new(codec, "Headphone Jack", SND_JACK_HEADPHONE
| SND_JACK_BTN_0 | SND_JACK_BTN_1 | SND_JACK_BTN_2, | SND_JACK_BTN_0 | SND_JACK_BTN_1 | SND_JACK_BTN_2,
......
...@@ -146,10 +146,6 @@ static int evb3_pm860x_init(struct snd_soc_pcm_runtime *rtd) ...@@ -146,10 +146,6 @@ static int evb3_pm860x_init(struct snd_soc_pcm_runtime *rtd)
snd_soc_dapm_disable_pin(dapm, "Headset Mic 2"); snd_soc_dapm_disable_pin(dapm, "Headset Mic 2");
snd_soc_dapm_disable_pin(dapm, "Headset Stereophone"); snd_soc_dapm_disable_pin(dapm, "Headset Stereophone");
ret = snd_soc_dapm_sync(dapm);
if (ret)
return ret;
/* Headset jack detection */ /* Headset jack detection */
snd_soc_jack_new(codec, "Headphone Jack", SND_JACK_HEADPHONE snd_soc_jack_new(codec, "Headphone Jack", SND_JACK_HEADPHONE
| SND_JACK_BTN_0 | SND_JACK_BTN_1 | SND_JACK_BTN_2, | SND_JACK_BTN_0 | SND_JACK_BTN_1 | SND_JACK_BTN_2,
......
...@@ -211,7 +211,6 @@ static int tosa_ac97_init(struct snd_soc_pcm_runtime *rtd) ...@@ -211,7 +211,6 @@ static int tosa_ac97_init(struct snd_soc_pcm_runtime *rtd)
/* set up tosa specific audio path audio_map */ /* set up tosa specific audio path audio_map */
snd_soc_dapm_add_routes(dapm, audio_map, ARRAY_SIZE(audio_map)); snd_soc_dapm_add_routes(dapm, audio_map, ARRAY_SIZE(audio_map));
snd_soc_dapm_sync(dapm);
return 0; return 0;
} }
......
...@@ -161,10 +161,6 @@ static int z2_wm8750_init(struct snd_soc_pcm_runtime *rtd) ...@@ -161,10 +161,6 @@ static int z2_wm8750_init(struct snd_soc_pcm_runtime *rtd)
/* Set up z2 specific audio paths */ /* Set up z2 specific audio paths */
snd_soc_dapm_add_routes(dapm, audio_map, ARRAY_SIZE(audio_map)); snd_soc_dapm_add_routes(dapm, audio_map, ARRAY_SIZE(audio_map));
ret = snd_soc_dapm_sync(dapm);
if (ret)
goto err;
/* Jack detection API stuff */ /* Jack detection API stuff */
ret = snd_soc_jack_new(codec, "Headset Jack", SND_JACK_HEADSET, ret = snd_soc_jack_new(codec, "Headset Jack", SND_JACK_HEADSET,
&hs_jack); &hs_jack);
......
...@@ -87,7 +87,6 @@ static int zylonite_wm9713_init(struct snd_soc_pcm_runtime *rtd) ...@@ -87,7 +87,6 @@ static int zylonite_wm9713_init(struct snd_soc_pcm_runtime *rtd)
snd_soc_dapm_enable_pin(dapm, "Headphone"); snd_soc_dapm_enable_pin(dapm, "Headphone");
snd_soc_dapm_enable_pin(dapm, "Headset Earpiece"); snd_soc_dapm_enable_pin(dapm, "Headset Earpiece");
snd_soc_dapm_sync(dapm);
return 0; return 0;
} }
......
...@@ -120,8 +120,6 @@ static int goni_wm8994_init(struct snd_soc_pcm_runtime *rtd) ...@@ -120,8 +120,6 @@ static int goni_wm8994_init(struct snd_soc_pcm_runtime *rtd)
snd_soc_dapm_nc_pin(dapm, "SPKOUTRP"); snd_soc_dapm_nc_pin(dapm, "SPKOUTRP");
} }
snd_soc_dapm_sync(dapm);
/* Headset jack detection */ /* Headset jack detection */
ret = snd_soc_jack_new(codec, "Headset Jack", ret = snd_soc_jack_new(codec, "Headset Jack",
SND_JACK_HEADSET | SND_JACK_MECHANICAL | SND_JACK_AVOUT, SND_JACK_HEADSET | SND_JACK_MECHANICAL | SND_JACK_AVOUT,
......
...@@ -198,8 +198,6 @@ static int h1940_uda1380_init(struct snd_soc_pcm_runtime *rtd) ...@@ -198,8 +198,6 @@ static int h1940_uda1380_init(struct snd_soc_pcm_runtime *rtd)
snd_soc_dapm_enable_pin(dapm, "Speaker"); snd_soc_dapm_enable_pin(dapm, "Speaker");
snd_soc_dapm_enable_pin(dapm, "Mic Jack"); snd_soc_dapm_enable_pin(dapm, "Mic Jack");
snd_soc_dapm_sync(dapm);
snd_soc_jack_new(codec, "Headphone Jack", SND_JACK_HEADPHONE, snd_soc_jack_new(codec, "Headphone Jack", SND_JACK_HEADPHONE,
&hp_jack); &hp_jack);
......
...@@ -120,7 +120,6 @@ static int jive_wm8750_init(struct snd_soc_pcm_runtime *rtd) ...@@ -120,7 +120,6 @@ static int jive_wm8750_init(struct snd_soc_pcm_runtime *rtd)
} }
snd_soc_dapm_add_routes(dapm, audio_map, ARRAY_SIZE(audio_map)); snd_soc_dapm_add_routes(dapm, audio_map, ARRAY_SIZE(audio_map));
snd_soc_dapm_sync(dapm);
return 0; return 0;
} }
......
...@@ -367,8 +367,6 @@ static int neo1973_wm8753_init(struct snd_soc_pcm_runtime *rtd) ...@@ -367,8 +367,6 @@ static int neo1973_wm8753_init(struct snd_soc_pcm_runtime *rtd)
return ret; return ret;
} }
snd_soc_dapm_sync(dapm);
return 0; return 0;
} }
...@@ -409,8 +407,6 @@ static int neo1973_lm4857_init(struct snd_soc_dapm_context *dapm) ...@@ -409,8 +407,6 @@ static int neo1973_lm4857_init(struct snd_soc_dapm_context *dapm)
snd_soc_dapm_ignore_suspend(dapm, "Handset Spk"); snd_soc_dapm_ignore_suspend(dapm, "Handset Spk");
snd_soc_dapm_ignore_suspend(dapm, "Headphone"); snd_soc_dapm_ignore_suspend(dapm, "Headphone");
snd_soc_dapm_sync(dapm);
return 0; return 0;
} }
......
...@@ -238,8 +238,6 @@ static int rx1950_uda1380_init(struct snd_soc_pcm_runtime *rtd) ...@@ -238,8 +238,6 @@ static int rx1950_uda1380_init(struct snd_soc_pcm_runtime *rtd)
snd_soc_dapm_enable_pin(dapm, "Speaker"); snd_soc_dapm_enable_pin(dapm, "Speaker");
snd_soc_dapm_enable_pin(dapm, "Mic Jack"); snd_soc_dapm_enable_pin(dapm, "Mic Jack");
snd_soc_dapm_sync(dapm);
snd_soc_jack_new(codec, "Headphone Jack", SND_JACK_HEADPHONE, snd_soc_jack_new(codec, "Headphone Jack", SND_JACK_HEADPHONE,
&hp_jack); &hp_jack);
......
...@@ -76,7 +76,6 @@ static int simtec_hermes_init(struct snd_soc_pcm_runtime *rtd) ...@@ -76,7 +76,6 @@ static int simtec_hermes_init(struct snd_soc_pcm_runtime *rtd)
snd_soc_dapm_enable_pin(dapm, "Mic Jack"); snd_soc_dapm_enable_pin(dapm, "Mic Jack");
simtec_audio_init(rtd); simtec_audio_init(rtd);
snd_soc_dapm_sync(dapm);
return 0; return 0;
} }
......
...@@ -65,7 +65,6 @@ static int simtec_tlv320aic23_init(struct snd_soc_pcm_runtime *rtd) ...@@ -65,7 +65,6 @@ static int simtec_tlv320aic23_init(struct snd_soc_pcm_runtime *rtd)
snd_soc_dapm_enable_pin(dapm, "Mic Jack"); snd_soc_dapm_enable_pin(dapm, "Mic Jack");
simtec_audio_init(rtd); simtec_audio_init(rtd);
snd_soc_dapm_sync(dapm);
return 0; return 0;
} }
......
...@@ -178,10 +178,6 @@ static int smartq_wm8987_init(struct snd_soc_pcm_runtime *rtd) ...@@ -178,10 +178,6 @@ static int smartq_wm8987_init(struct snd_soc_pcm_runtime *rtd)
snd_soc_dapm_enable_pin(dapm, "Internal Mic"); snd_soc_dapm_enable_pin(dapm, "Internal Mic");
snd_soc_dapm_disable_pin(dapm, "Headphone Jack"); snd_soc_dapm_disable_pin(dapm, "Headphone Jack");
err = snd_soc_dapm_sync(dapm);
if (err)
return err;
/* Headphone jack detection */ /* Headphone jack detection */
err = snd_soc_jack_new(codec, "Headphone Jack", err = snd_soc_jack_new(codec, "Headphone Jack",
SND_JACK_HEADPHONE, &smartq_jack); SND_JACK_HEADPHONE, &smartq_jack);
......
...@@ -173,9 +173,6 @@ static int smdk_wm8580_init_paiftx(struct snd_soc_pcm_runtime *rtd) ...@@ -173,9 +173,6 @@ static int smdk_wm8580_init_paiftx(struct snd_soc_pcm_runtime *rtd)
*/ */
snd_soc_dapm_disable_pin(dapm, "MicIn"); snd_soc_dapm_disable_pin(dapm, "MicIn");
/* signal a DAPM event */
snd_soc_dapm_sync(dapm);
return 0; return 0;
} }
...@@ -191,9 +188,6 @@ static int smdk_wm8580_init_paifrx(struct snd_soc_pcm_runtime *rtd) ...@@ -191,9 +188,6 @@ static int smdk_wm8580_init_paifrx(struct snd_soc_pcm_runtime *rtd)
/* Set up PAIFRX audio path */ /* Set up PAIFRX audio path */
snd_soc_dapm_add_routes(dapm, audio_map_rx, ARRAY_SIZE(audio_map_rx)); snd_soc_dapm_add_routes(dapm, audio_map_rx, ARRAY_SIZE(audio_map_rx));
/* signal a DAPM event */
snd_soc_dapm_sync(dapm);
return 0; return 0;
} }
......
...@@ -117,8 +117,6 @@ static int smdk_wm8994_init_paiftx(struct snd_soc_pcm_runtime *rtd) ...@@ -117,8 +117,6 @@ static int smdk_wm8994_init_paiftx(struct snd_soc_pcm_runtime *rtd)
snd_soc_dapm_nc_pin(dapm, "IN1RP"); snd_soc_dapm_nc_pin(dapm, "IN1RP");
snd_soc_dapm_nc_pin(dapm, "IN2RP:VXRP"); snd_soc_dapm_nc_pin(dapm, "IN2RP:VXRP");
snd_soc_dapm_sync(dapm);
return 0; return 0;
} }
......
...@@ -20,12 +20,6 @@ ...@@ -20,12 +20,6 @@
extern struct snd_soc_dai_driver sh4_hac_dai[2]; extern struct snd_soc_dai_driver sh4_hac_dai[2];
extern struct snd_soc_platform_driver sh7760_soc_platform; extern struct snd_soc_platform_driver sh7760_soc_platform;
static int machine_init(struct snd_soc_pcm_runtime *rtd)
{
snd_soc_dapm_sync(&rtd->codec->dapm);
return 0;
}
static struct snd_soc_dai_link sh7760_ac97_dai = { static struct snd_soc_dai_link sh7760_ac97_dai = {
.name = "AC97", .name = "AC97",
.stream_name = "AC97 HiFi", .stream_name = "AC97 HiFi",
...@@ -33,7 +27,6 @@ static struct snd_soc_dai_link sh7760_ac97_dai = { ...@@ -33,7 +27,6 @@ static struct snd_soc_dai_link sh7760_ac97_dai = {
.codec_dai_name = "ac97-hifi", .codec_dai_name = "ac97-hifi",
.platform_name = "sh7760-pcm-audio", .platform_name = "sh7760-pcm-audio",
.codec_name = "ac97-codec", .codec_name = "ac97-codec",
.init = machine_init,
.ops = NULL, .ops = NULL,
}; };
......
...@@ -339,8 +339,6 @@ static int tegra_wm8903_init(struct snd_soc_pcm_runtime *rtd) ...@@ -339,8 +339,6 @@ static int tegra_wm8903_init(struct snd_soc_pcm_runtime *rtd)
snd_soc_dapm_nc_pin(dapm, "LINEOUTL"); snd_soc_dapm_nc_pin(dapm, "LINEOUTL");
} }
snd_soc_dapm_sync(dapm);
return 0; return 0;
} }
......
...@@ -124,8 +124,6 @@ static int trimslice_asoc_init(struct snd_soc_pcm_runtime *rtd) ...@@ -124,8 +124,6 @@ static int trimslice_asoc_init(struct snd_soc_pcm_runtime *rtd)
snd_soc_dapm_nc_pin(dapm, "RHPOUT"); snd_soc_dapm_nc_pin(dapm, "RHPOUT");
snd_soc_dapm_nc_pin(dapm, "MICIN"); snd_soc_dapm_nc_pin(dapm, "MICIN");
snd_soc_dapm_sync(dapm);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment