ASoC: Remove redundant snd_soc_dapm_sync() calls from machine drivers
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Sat, 8 Oct 2011 12:29:18 +0000 (13:29 +0100)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Sat, 8 Oct 2011 13:10:54 +0000 (14:10 +0100)
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: Mark Brown <broonie@opensource.wolfsonmicro.com>
31 files changed:
sound/soc/atmel/playpaq_wm8510.c
sound/soc/atmel/sam9g20_wm8731.c
sound/soc/atmel/snd-soc-afeb9260.c
sound/soc/davinci/davinci-evm.c
sound/soc/kirkwood/kirkwood-t5325.c
sound/soc/mid-x86/mfld_machine.c
sound/soc/pxa/corgi.c
sound/soc/pxa/e740_wm9705.c
sound/soc/pxa/e750_wm9705.c
sound/soc/pxa/e800_wm9712.c
sound/soc/pxa/magician.c
sound/soc/pxa/mioa701_wm9713.c
sound/soc/pxa/palm27x.c
sound/soc/pxa/saarb.c
sound/soc/pxa/tavorevb3.c
sound/soc/pxa/tosa.c
sound/soc/pxa/z2.c
sound/soc/pxa/zylonite.c
sound/soc/samsung/goni_wm8994.c
sound/soc/samsung/h1940_uda1380.c
sound/soc/samsung/jive_wm8750.c
sound/soc/samsung/neo1973_wm8753.c
sound/soc/samsung/rx1950_uda1380.c
sound/soc/samsung/s3c24xx_simtec_hermes.c
sound/soc/samsung/s3c24xx_simtec_tlv320aic23.c
sound/soc/samsung/smartq_wm8987.c
sound/soc/samsung/smdk_wm8580.c
sound/soc/samsung/smdk_wm8994.c
sound/soc/sh/sh7760-ac97.c
sound/soc/tegra/tegra_wm8903.c
sound/soc/tegra/trimslice.c

index 2909bfaed265b5d1778cda8141ca3539f122a37b..73ae99ad45787061a4cb5deb3816ac9cec6a81e0 100644 (file)
@@ -338,7 +338,6 @@ static int playpaq_wm8510_init(struct snd_soc_pcm_runtime *rtd)
        /* always connected pins */
        snd_soc_dapm_enable_pin(dapm, "Int Mic");
        snd_soc_dapm_enable_pin(dapm, "Ext Spk");
-       snd_soc_dapm_sync(dapm);
 
 
 
index bad3aa14d5b39cad30bfc877b51dfd0deaf45bf9..0377c5451aed9bbe1e9f61f2959dab6b6637da93 100644 (file)
@@ -173,8 +173,6 @@ static int at91sam9g20ek_wm8731_init(struct snd_soc_pcm_runtime *rtd)
        /* always connected */
        snd_soc_dapm_enable_pin(dapm, "Ext Spk");
 
-       snd_soc_dapm_sync(dapm);
-
        return 0;
 }
 
index 5e4d499d8434ea7377e68419aa34c9b90f8bacd0..d427e9217ce4c264ff8f0b8ad44ec41e25d17c31 100644 (file)
@@ -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, "Mic Jack");
 
-       snd_soc_dapm_sync(dapm);
-
        return 0;
 }
 
index fe7984221eb9bcad2bd027e219e15c8ba9f06360..f78c3f0f280c23e12065a1c9ad226dc981e944c3 100644 (file)
@@ -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, "Line In");
 
-       snd_soc_dapm_sync(dapm);
-
        return 0;
 }
 
index c8d21956ab52346dfe6a74b670eeb62cb590bdb6..c772b3cf4039f77386dbc4d77551b70a0e8a1323 100644 (file)
@@ -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, "Speaker");
 
-       snd_soc_dapm_sync(dapm);
-
        return 0;
 }
 
index 1d818dc57973bae18d0670e9d40e2c4da54fd8d4..598f48c0d8f5de74a3ee863b44c19c150e9edd0e 100644 (file)
@@ -233,7 +233,6 @@ static int mfld_init(struct snd_soc_pcm_runtime *runtime)
        /* always connected */
        snd_soc_dapm_enable_pin(dapm, "Headphones");
        snd_soc_dapm_enable_pin(dapm, "Mic");
-       snd_soc_dapm_sync(dapm);
 
        ret_val = snd_soc_add_controls(codec, mfld_snd_controls,
                                ARRAY_SIZE(mfld_snd_controls));
@@ -251,7 +250,6 @@ static int mfld_init(struct snd_soc_pcm_runtime *runtime)
        /* we dont use linein in this so set to NC */
        snd_soc_dapm_disable_pin(dapm, "LINEINL");
        snd_soc_dapm_disable_pin(dapm, "LINEINR");
-       snd_soc_dapm_sync(dapm);
 
        /* Headset and button jack detection */
        ret_val = snd_soc_jack_new(codec, "Intel(R) MID Audio Jack",
index 28757fb9df31d49ac5c37f63ae668a157338949c..b0e2fb720910533d442be66e68db112dbbc93dce 100644 (file)
@@ -299,7 +299,6 @@ static int corgi_wm8731_init(struct snd_soc_pcm_runtime *rtd)
        /* Set up corgi specific audio path audio_map */
        snd_soc_dapm_add_routes(dapm, audio_map, ARRAY_SIZE(audio_map));
 
-       snd_soc_dapm_sync(dapm);
        return 0;
 }
 
index dc65650a6fa15af240a43de9dab1dbe5e929f228..35ed7eb8cff2e6793147cd52c2acec6a9d86e6b6 100644 (file)
@@ -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_sync(dapm);
-
        return 0;
 }
 
index 51897fcd911b9c922f8151af161a73f1588c1131..ce5f056009a7d5770ae85d4bce9bfff73eb538b7 100644 (file)
@@ -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_sync(dapm);
-
        return 0;
 }
 
index 053ed208e59f00b713aac31268b0a4163c34f71b..6a8f38b6c3799800b2c283fd231f388584eeeaaf 100644 (file)
@@ -80,7 +80,6 @@ static int e800_ac97_init(struct snd_soc_pcm_runtime *rtd)
                                        ARRAY_SIZE(e800_dapm_widgets));
 
        snd_soc_dapm_add_routes(dapm, audio_map, ARRAY_SIZE(audio_map));
-       snd_soc_dapm_sync(dapm);
 
        return 0;
 }
index 098e5f4b7d41484fbe8665ca507cf8ae94e22fe3..e79f516c400e6df35a57b41356fe3ce39882e3ca 100644 (file)
@@ -423,7 +423,6 @@ static int magician_uda1380_init(struct snd_soc_pcm_runtime *rtd)
        /* Set up magician specific audio path interconnects */
        snd_soc_dapm_add_routes(dapm, audio_map, ARRAY_SIZE(audio_map));
 
-       snd_soc_dapm_sync(dapm);
        return 0;
 }
 
index 38ca6759907e9d0d333c7c6f0407b9e5d3f8d260..0b8d1ee738a45ae82c2e3dc22efca0d2ab6c152a 100644 (file)
@@ -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, "GSM Line In");
        snd_soc_dapm_enable_pin(dapm, "GSM Line Out");
-       snd_soc_dapm_sync(dapm);
 
        return 0;
 }
index 504e4004f004ea6a7dbc0f682d43d25d0071259b..7edc1fb71fae05288eebd25ce16d82d122c83227 100644 (file)
@@ -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, "MIC2");
 
-       err = snd_soc_dapm_sync(dapm);
-       if (err)
-               return err;
-
        /* Jack detection API stuff */
        err = snd_soc_jack_new(codec, "Headphone Jack",
                                SND_JACK_HEADPHONE, &hs_jack);
index 9595189fc681c4fdbb9d3a6bd1311da96d39ecdb..d9467a2c6de0ec635d0c4d9a0cc8f838b24f8f64 100644 (file)
@@ -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 Stereophone");
 
-       ret = snd_soc_dapm_sync(dapm);
-       if (ret)
-               return ret;
-
        /* Headset jack detection */
        snd_soc_jack_new(codec, "Headphone Jack", SND_JACK_HEADPHONE
                        | SND_JACK_BTN_0 | SND_JACK_BTN_1 | SND_JACK_BTN_2,
index f881f65ec172bb20884c2070437dbeee0d0874be..eeec892e0e0480ac07a167cfc84f626ea552121d 100644 (file)
@@ -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 Stereophone");
 
-       ret = snd_soc_dapm_sync(dapm);
-       if (ret)
-               return ret;
-
        /* Headset jack detection */
        snd_soc_jack_new(codec, "Headphone Jack", SND_JACK_HEADPHONE
                        | SND_JACK_BTN_0 | SND_JACK_BTN_1 | SND_JACK_BTN_2,
index 9a2351366957a20ce85579fff47f376612bce34a..620fc69ae6324507a6feab69f3ea66d33f2d5d6d 100644 (file)
@@ -211,7 +211,6 @@ static int tosa_ac97_init(struct snd_soc_pcm_runtime *rtd)
        /* set up tosa specific audio path audio_map */
        snd_soc_dapm_add_routes(dapm, audio_map, ARRAY_SIZE(audio_map));
 
-       snd_soc_dapm_sync(dapm);
        return 0;
 }
 
index 4b81ffd87566eeda0cb6b4f7ed53b52b9050a936..b311ffe04b71f6a0a1e87bd7470f0b50a422ecd3 100644 (file)
@@ -161,10 +161,6 @@ static int z2_wm8750_init(struct snd_soc_pcm_runtime *rtd)
        /* Set up z2 specific audio paths */
        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 */
        ret = snd_soc_jack_new(codec, "Headset Jack", SND_JACK_HEADSET,
                                &hs_jack);
index 2b8350b522329253d4d4fda27a7859f68861cc18..580aae38e502ce859e0d58978f0f0c0d0b30d4ba 100644 (file)
@@ -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, "Headset Earpiece");
 
-       snd_soc_dapm_sync(dapm);
        return 0;
 }
 
index eb6d72ed55a7d53accac1809921572ba92570d87..86ece1a973756aa03b284b846973899475d30d49 100644 (file)
@@ -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_sync(dapm);
-
        /* Headset jack detection */
        ret = snd_soc_jack_new(codec, "Headset Jack",
                        SND_JACK_HEADSET | SND_JACK_MECHANICAL | SND_JACK_AVOUT,
index c6c65892294e4bf8cee9829a1c6fb456e522aebd..52025c92f04c9158f0eec2e034274f6ee2d25c79 100644 (file)
@@ -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, "Mic Jack");
 
-       snd_soc_dapm_sync(dapm);
-
        snd_soc_jack_new(codec, "Headphone Jack", SND_JACK_HEADPHONE,
                &hp_jack);
 
index ed8f13a29c859660afc4142ca1b945577f441506..bb69e9fbaef6fcf218d0a3d0b4df6f53da79a915 100644 (file)
@@ -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_sync(dapm);
 
        return 0;
 }
index 16152ed086488fcc7ab15061b7a831adee42b741..7207189cd21196aa0dc574aec3bed3b88d9869e9 100644 (file)
@@ -367,8 +367,6 @@ static int neo1973_wm8753_init(struct snd_soc_pcm_runtime *rtd)
                        return ret;
        }
 
-       snd_soc_dapm_sync(dapm);
-
        return 0;
 }
 
@@ -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, "Headphone");
 
-       snd_soc_dapm_sync(dapm);
-
        return 0;
 }
 
index bc8c1676459f781b56b28e5fbcadd9ad7732f4a4..e5ad67fa77e20b78bd542afdcdc20d88be0c6b98 100644 (file)
@@ -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, "Mic Jack");
 
-       snd_soc_dapm_sync(dapm);
-
        snd_soc_jack_new(codec, "Headphone Jack", SND_JACK_HEADPHONE,
                &hp_jack);
 
index ce6aef6041793b40ac1f8b494feea76ae3f14b90..359530bc7a9a8e66710a67165f9e9669b5f46f00 100644 (file)
@@ -76,7 +76,6 @@ static int simtec_hermes_init(struct snd_soc_pcm_runtime *rtd)
        snd_soc_dapm_enable_pin(dapm, "Mic Jack");
 
        simtec_audio_init(rtd);
-       snd_soc_dapm_sync(dapm);
 
        return 0;
 }
index a7ef7db5468734047bf32cf1b7bb1e982b1233ce..8bad349a9897d331868fcb11f9f53448fdc92b6c 100644 (file)
@@ -65,7 +65,6 @@ static int simtec_tlv320aic23_init(struct snd_soc_pcm_runtime *rtd)
        snd_soc_dapm_enable_pin(dapm, "Mic Jack");
 
        simtec_audio_init(rtd);
-       snd_soc_dapm_sync(dapm);
 
        return 0;
 }
index bbd14768ecd3dafc559ecee6ddfff34d855cf2c5..6db4e554ea039fd1fbc868cc20e9c996b987a7b8 100644 (file)
@@ -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_disable_pin(dapm, "Headphone Jack");
 
-       err = snd_soc_dapm_sync(dapm);
-       if (err)
-               return err;
-
        /* Headphone jack detection */
        err = snd_soc_jack_new(codec, "Headphone Jack",
                               SND_JACK_HEADPHONE, &smartq_jack);
index 20deecf3b243ad38a7f1b1c44512c59c33de5bb6..54c4cce899d7b6bc27a600f969118149b75a60f8 100644 (file)
@@ -173,9 +173,6 @@ static int smdk_wm8580_init_paiftx(struct snd_soc_pcm_runtime *rtd)
         */
        snd_soc_dapm_disable_pin(dapm, "MicIn");
 
-       /* signal a DAPM event */
-       snd_soc_dapm_sync(dapm);
-
        return 0;
 }
 
@@ -191,9 +188,6 @@ static int smdk_wm8580_init_paifrx(struct snd_soc_pcm_runtime *rtd)
        /* Set up PAIFRX audio path */
        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;
 }
 
index 45fbe2b3727fb87ffe2d36f96ae7c9964bb54044..f75e43997d5beb5b27a82f8d023eddd33311538e 100644 (file)
@@ -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, "IN2RP:VXRP");
 
-       snd_soc_dapm_sync(dapm);
-
        return 0;
 }
 
index 917d3ceadc9d984ca82bb8f635de98333b4f6fe5..c62ae689c4a157c4373d6957af42d16fcd4dbe29 100644 (file)
 extern struct snd_soc_dai_driver sh4_hac_dai[2];
 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 = {
        .name = "AC97",
        .stream_name = "AC97 HiFi",
@@ -33,7 +27,6 @@ static struct snd_soc_dai_link sh7760_ac97_dai = {
        .codec_dai_name = "ac97-hifi",
        .platform_name = "sh7760-pcm-audio",
        .codec_name = "ac97-codec",
-       .init = machine_init,
        .ops = NULL,
 };
 
index be27f1d229af9df67fd8bb2dc269e3f2337b31a0..a81cf39257bf2ff8aa68df2b7a9ef408887f0ed7 100644 (file)
@@ -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_sync(dapm);
-
        return 0;
 }
 
index 8fc07e9adf2e0e41d1d6568e60930b1c65d79023..b3a7efa6d960c75eed9f764000eea0fd1f8d46fa 100644 (file)
@@ -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, "MICIN");
 
-       snd_soc_dapm_sync(dapm);
-
        return 0;
 }