From 680f1e06f59dc9bab392ffabeff53c02405cb2ae Mon Sep 17 00:00:00 2001 From: Shengjiu Wang Date: Mon, 22 Jan 2018 11:17:34 +0800 Subject: [PATCH] MLK-17428-4: ASoC: AK5558: fix issue for 8k and 16kHz The first time recording for 8k and 16k is ok after boot up, but there is no data recorded for second time recording, so re-init the registers when BIAS_OFF to fix the issue. Signed-off-by: Shengjiu Wang --- sound/soc/codecs/ak5558.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sound/soc/codecs/ak5558.c b/sound/soc/codecs/ak5558.c index 10b63c8fbece..29963711bc19 100644 --- a/sound/soc/codecs/ak5558.c +++ b/sound/soc/codecs/ak5558.c @@ -259,6 +259,8 @@ static const struct snd_soc_dapm_widget ak5558_dapm_widgets[] = { }; +static int ak5558_init_reg(struct snd_soc_codec *codec); + static const struct snd_soc_dapm_route ak5558_intercon[] = { {"AK5558 Ch1 Enable", "On", "AIN1"}, @@ -516,7 +518,7 @@ static int ak5558_set_bias_level(struct snd_soc_codec *codec, case SND_SOC_BIAS_STANDBY: break; case SND_SOC_BIAS_OFF: - snd_soc_write(codec, AK5558_00_POWER_MANAGEMENT1, 0x00); + ak5558_init_reg(codec); break; } return 0; -- 2.17.1