From e8c4b0a69c839cb576eaa4a39f66582b949d913f Mon Sep 17 00:00:00 2001 From: Xingyu Wu Date: Tue, 23 Aug 2022 18:00:25 +0800 Subject: [PATCH] sound:wm8960:Supports simultaneous recording and playback Playback would be failed by changing ADCDIV register when recording. So do not change ADCDIV register can make simultaneous recording and playback. Signed-off-by: Xingyu Wu --- sound/soc/codecs/wm8960.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/wm8960.c b/sound/soc/codecs/wm8960.c index c18f55e..2a53220 100755 --- a/sound/soc/codecs/wm8960.c +++ b/sound/soc/codecs/wm8960.c @@ -932,16 +932,15 @@ static int wm8960_hw_params(struct snd_pcm_substream *substream, if (!tx) { snd_soc_component_update_bits(component, WM8960_LINVOL, 0x1<<7, 0x1<<7); snd_soc_component_update_bits(component, WM8960_RINVOL, 0x1<<7, 0x1<<7); - snd_soc_component_write(component, WM8960_CLOCK1, 0x00); //0xd8 snd_soc_component_write(component, WM8960_ALC1, 0x1bb); snd_soc_component_write(component, WM8960_ALC2, 0x30); snd_soc_component_write(component, WM8960_ALC3, 0x30); snd_soc_component_write(component, WM8960_NOISEG, 0xf9); - snd_soc_component_write(component, WM8960_ADDCTL1, 0xc0); - snd_soc_component_write(component, WM8960_ADDCTL3, 0x03); + snd_soc_component_update_bits(component, WM8960_ADDCTL1, 0x1cf, 0xc0); + snd_soc_component_update_bits(component, WM8960_ADDCTL3, 0x47, 0x03); snd_soc_component_write(component, WM8960_BYPASS1, 0x00); snd_soc_component_write(component, WM8960_BYPASS2, 0x00); - snd_soc_component_write(component, WM8960_ADDCTL4, 0x00); + snd_soc_component_update_bits(component, WM8960_ADDCTL4, 0x73, 0); } else { if (params_channels(params) == 1) snd_soc_component_write(component, WM8960_LOUT1, 0x100); -- 2.7.4