From 4e53fb69af63b46499141b0e1b476173f5785bd8 Mon Sep 17 00:00:00 2001 From: Laxminath Kasam Date: Wed, 26 Feb 2020 08:56:00 +0530 Subject: [PATCH] asoc: wsa881x-analog: Update boost preset based on 8810/15 Update boost level setting of value 5.5v and 6v for 8815 and 8810 variants. Change-Id: I6e71c58bddb4958f1eda4ab4d4630bcb6073dcdb Signed-off-by: Laxminath Kasam --- asoc/codecs/wsa881x-analog.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/asoc/codecs/wsa881x-analog.c b/asoc/codecs/wsa881x-analog.c index c6b40669b3..d322f315b9 100644 --- a/asoc/codecs/wsa881x-analog.c +++ b/asoc/codecs/wsa881x-analog.c @@ -397,9 +397,14 @@ static int wsa881x_boost_ctrl(struct snd_soc_component *component, bool enable) snd_soc_component_update_bits(component, WSA881X_BOOST_SLOPE_COMP_ISENSE_FB, 0x03, 0x00); - snd_soc_component_update_bits(component, - WSA881X_BOOST_PRESET_OUT1, - 0xF0, 0x70); + if (snd_soc_component_read32(component, WSA881X_OTP_REG_0)) + snd_soc_component_update_bits(component, + WSA881X_BOOST_PRESET_OUT1, + 0xF0, 0x70); + else + snd_soc_component_update_bits(component, + WSA881X_BOOST_PRESET_OUT1, + 0xF0, 0xB0); snd_soc_component_update_bits(component, WSA881X_ANA_CTL, 0x03, 0x01); snd_soc_component_update_bits(component,