static int m3_card_suspend_post(struct snd_soc_card *card) { struct snd_soc_codec *codec = card->rtd->codec; struct snd_soc_dai *aif1_dai = card->rtd[0].codec_dai; struct snd_soc_dai *aif2_dai = card->rtd[1].codec_dai; int ret; if (!codec->active) { ret = snd_soc_dai_set_sysclk(aif2_dai, WM8994_SYSCLK_MCLK2, MIDAS_DEFAULT_MCLK2, SND_SOC_CLOCK_IN); if (ret < 0) dev_err(codec->dev, "Unable to switch to MCLK2: %d\n", ret); ret = snd_soc_dai_set_pll(aif2_dai, WM8994_FLL2, 0, 0, 0); if (ret < 0) dev_err(codec->dev, "Unable to stop FLL2\n"); ret = snd_soc_dai_set_sysclk(aif1_dai, WM8994_SYSCLK_MCLK2, MIDAS_DEFAULT_MCLK2, SND_SOC_CLOCK_IN); if (ret < 0) dev_err(codec->dev, "Unable to switch to MCLK2\n"); ret = snd_soc_dai_set_pll(aif1_dai, WM8994_FLL1, 0, 0, 0); if (ret < 0) dev_err(codec->dev, "Unable to stop FLL1\n"); ret = snd_soc_dai_set_fmt(aif1_dai, SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS); if (ret < 0) dev_err(codec->dev, "Unable to set I2S SLAVE MODE\n"); midas_snd_set_mclk(false, true); } #ifdef CONFIG_ARCH_EXYNOS5 exynos5_sys_powerdown_xxti_control(midas_snd_get_mclk() ? 1 : 0); #else /* for CONFIG_ARCH_EXYNOS5 */ exynos4_sys_powerdown_xusbxti_control(midas_snd_get_mclk() ? 1 : 0); #endif return 0; }
static int midas_card_suspend(struct snd_soc_card *card) { struct snd_soc_codec *codec = card->rtd->codec; struct snd_soc_dai *aif1_dai = card->rtd[0].codec_dai; struct snd_soc_dai *aif2_dai = card->rtd[1].codec_dai; int ret; if (!codec->active) { #ifndef SND_USE_BIAS_LEVEL ret = snd_soc_dai_set_sysclk(aif2_dai, WM8994_SYSCLK_MCLK2, MIDAS_DEFAULT_MCLK2, SND_SOC_CLOCK_IN); if (ret < 0) dev_err(codec->dev, "Unable to switch to MCLK2: %d\n", ret); ret = snd_soc_dai_set_pll(aif2_dai, WM8994_FLL2, 0, 0, 0); if (ret < 0) dev_err(codec->dev, "Unable to stop FLL2\n"); ret = snd_soc_dai_set_sysclk(aif1_dai, WM8994_SYSCLK_MCLK2, MIDAS_DEFAULT_MCLK2, SND_SOC_CLOCK_IN); if (ret < 0) dev_err(codec->dev, "Unable to switch to MCLK2\n"); ret = snd_soc_dai_set_pll(aif1_dai, WM8994_FLL1, 0, 0, 0); if (ret < 0) dev_err(codec->dev, "Unable to stop FLL1\n"); midas_micd_set_rate(codec); #endif midas_snd_set_mclk(false, true); } #ifdef CONFIG_ARCH_EXYNOS5 exynos5_sys_powerdown_xxti_control(midas_snd_get_mclk() ? 1 : 0); #else /* for CONFIG_ARCH_EXYNOS5 */ exynos4_sys_powerdown_xusbxti_control(midas_snd_get_mclk() ? 1 : 0); #endif return 0; }