From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on sa.local.altlinux.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham autolearn_force=no version=3.4.1 From: kovalev@altlinux.org To: devel-kernel@lists.altlinux.org Date: Tue, 30 Jul 2024 20:47:58 +0300 Message-Id: <20240730174758.15640-1-kovalev@altlinux.org> X-Mailer: git-send-email 2.33.8 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [d-kernel] [PATCH c10f2/c10f1 6.1.y] ASoC: codecs: ES8326: set ADC_SRC registers in es8326_init() X-BeenThere: devel-kernel@lists.altlinux.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: ALT Linux kernel packages development List-Id: ALT Linux kernel packages development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jul 2024 17:48:04 -0000 Archived-At: List-Archive: List-Post: From: Vasiliy Kovalev ES8326_ADC1_SRC and ES8326_ADC2_SRC registers is used to select analog microphone and headset microphone. Set the values in the registers similar to the hp remove event. By default, the analog microphone does not work properly, but if you connect and disconnect the headset, the specified ADC codec registers are set to correct values. Thanks to Aquarius developers for providing a working version of the driver source code, which helped identify the problem in the upstream driver during debugging and comparison. The problem has been passed on to the driver developers, and soon a more informative patch will appear in the upstream. Signed-off-by: Vasiliy Kovalev --- sound/soc/codecs/es8326.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sound/soc/codecs/es8326.c b/sound/soc/codecs/es8326.c index 873082dce133f..2ca4f213715c1 100644 --- a/sound/soc/codecs/es8326.c +++ b/sound/soc/codecs/es8326.c @@ -1068,6 +1068,8 @@ static void es8326_init(struct snd_soc_component *component) regmap_write(es8326->regmap, ES8326_ADC_MUTE, 0x0f); regmap_write(es8326->regmap, ES8326_CLK_DIV_LRCK, 0xff); + regmap_write(es8326->regmap, ES8326_ADC1_SRC, 0x44); + regmap_write(es8326->regmap, ES8326_ADC2_SRC, 0x66); es8326_disable_micbias(es8326->component); msleep(200); -- 2.33.8