diff options
Diffstat (limited to 'sound/soc/codecs/wm8996.c')
-rw-r--r-- | sound/soc/codecs/wm8996.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sound/soc/codecs/wm8996.c b/sound/soc/codecs/wm8996.c index d8da10fe5b52..61f7daa4d0e6 100644 --- a/sound/soc/codecs/wm8996.c +++ b/sound/soc/codecs/wm8996.c | |||
@@ -108,7 +108,7 @@ static int wm8996_regulator_event_##n(struct notifier_block *nb, \ | |||
108 | struct wm8996_priv *wm8996 = container_of(nb, struct wm8996_priv, \ | 108 | struct wm8996_priv *wm8996 = container_of(nb, struct wm8996_priv, \ |
109 | disable_nb[n]); \ | 109 | disable_nb[n]); \ |
110 | if (event & REGULATOR_EVENT_DISABLE) { \ | 110 | if (event & REGULATOR_EVENT_DISABLE) { \ |
111 | regcache_cache_only(wm8996->regmap, true); \ | 111 | regcache_mark_dirty(wm8996->regmap); \ |
112 | } \ | 112 | } \ |
113 | return 0; \ | 113 | return 0; \ |
114 | } | 114 | } |
@@ -1120,7 +1120,8 @@ SND_SOC_DAPM_SUPPLY_S("SYSCLK", 1, WM8996_AIF_CLOCKING_1, 0, 0, NULL, 0), | |||
1120 | SND_SOC_DAPM_SUPPLY_S("SYSDSPCLK", 2, WM8996_CLOCKING_1, 1, 0, NULL, 0), | 1120 | SND_SOC_DAPM_SUPPLY_S("SYSDSPCLK", 2, WM8996_CLOCKING_1, 1, 0, NULL, 0), |
1121 | SND_SOC_DAPM_SUPPLY_S("AIFCLK", 2, WM8996_CLOCKING_1, 2, 0, NULL, 0), | 1121 | SND_SOC_DAPM_SUPPLY_S("AIFCLK", 2, WM8996_CLOCKING_1, 2, 0, NULL, 0), |
1122 | SND_SOC_DAPM_SUPPLY_S("Charge Pump", 2, WM8996_CHARGE_PUMP_1, 15, 0, cp_event, | 1122 | SND_SOC_DAPM_SUPPLY_S("Charge Pump", 2, WM8996_CHARGE_PUMP_1, 15, 0, cp_event, |
1123 | SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD), | 1123 | SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMU | |
1124 | SND_SOC_DAPM_POST_PMD), | ||
1124 | SND_SOC_DAPM_SUPPLY("Bandgap", SND_SOC_NOPM, 0, 0, bg_event, | 1125 | SND_SOC_DAPM_SUPPLY("Bandgap", SND_SOC_NOPM, 0, 0, bg_event, |
1125 | SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD), | 1126 | SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD), |
1126 | SND_SOC_DAPM_SUPPLY("LDO2", WM8996_POWER_MANAGEMENT_2, 1, 0, NULL, 0), | 1127 | SND_SOC_DAPM_SUPPLY("LDO2", WM8996_POWER_MANAGEMENT_2, 1, 0, NULL, 0), |
@@ -2007,6 +2008,7 @@ static int wm8996_set_sysclk(struct snd_soc_dai *dai, | |||
2007 | struct wm8996_priv *wm8996 = snd_soc_codec_get_drvdata(codec); | 2008 | struct wm8996_priv *wm8996 = snd_soc_codec_get_drvdata(codec); |
2008 | int lfclk = 0; | 2009 | int lfclk = 0; |
2009 | int ratediv = 0; | 2010 | int ratediv = 0; |
2011 | int sync = WM8996_REG_SYNC; | ||
2010 | int src; | 2012 | int src; |
2011 | int old; | 2013 | int old; |
2012 | 2014 | ||
@@ -2051,6 +2053,7 @@ static int wm8996_set_sysclk(struct snd_soc_dai *dai, | |||
2051 | case 32000: | 2053 | case 32000: |
2052 | case 32768: | 2054 | case 32768: |
2053 | lfclk = WM8996_LFCLK_ENA; | 2055 | lfclk = WM8996_LFCLK_ENA; |
2056 | sync = 0; | ||
2054 | break; | 2057 | break; |
2055 | default: | 2058 | default: |
2056 | dev_warn(codec->dev, "Unsupported clock rate %dHz\n", | 2059 | dev_warn(codec->dev, "Unsupported clock rate %dHz\n", |
@@ -2064,6 +2067,8 @@ static int wm8996_set_sysclk(struct snd_soc_dai *dai, | |||
2064 | WM8996_SYSCLK_SRC_MASK | WM8996_SYSCLK_DIV_MASK, | 2067 | WM8996_SYSCLK_SRC_MASK | WM8996_SYSCLK_DIV_MASK, |
2065 | src << WM8996_SYSCLK_SRC_SHIFT | ratediv); | 2068 | src << WM8996_SYSCLK_SRC_SHIFT | ratediv); |
2066 | snd_soc_update_bits(codec, WM8996_CLOCKING_1, WM8996_LFCLK_ENA, lfclk); | 2069 | snd_soc_update_bits(codec, WM8996_CLOCKING_1, WM8996_LFCLK_ENA, lfclk); |
2070 | snd_soc_update_bits(codec, WM8996_CONTROL_INTERFACE_1, | ||
2071 | WM8996_REG_SYNC, sync); | ||
2067 | snd_soc_update_bits(codec, WM8996_AIF_CLOCKING_1, | 2072 | snd_soc_update_bits(codec, WM8996_AIF_CLOCKING_1, |
2068 | WM8996_SYSCLK_ENA, old); | 2073 | WM8996_SYSCLK_ENA, old); |
2069 | 2074 | ||