Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ASoC: codecs: lpass-wsa-macro: remove useless gain read/write sequence

Reading and writing the same value to this register does nothing.

Looking at downstream driver it seems there was meant to be an offset added

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Tested-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>> ---
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Link: https://patch.msgid.link/20251117051523.16462-2-jonathan@marek.ca
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Jonathan Marek and committed by
Mark Brown
902f497a 38fc5add

+1 -9
+1 -9
sound/soc/codecs/lpass-wsa-macro.c
··· 1567 1567 struct snd_kcontrol *kcontrol, int event) 1568 1568 { 1569 1569 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); 1570 - u16 path_reg, gain_reg; 1571 - int val; 1570 + u16 path_reg; 1572 1571 1573 1572 switch (w->shift) { 1574 1573 case WSA_MACRO_RX_MIX0: 1575 1574 path_reg = CDC_WSA_RX0_RX_PATH_MIX_CTL; 1576 - gain_reg = CDC_WSA_RX0_RX_VOL_MIX_CTL; 1577 1575 break; 1578 1576 case WSA_MACRO_RX_MIX1: 1579 1577 path_reg = CDC_WSA_RX1_RX_PATH_MIX_CTL; 1580 - gain_reg = CDC_WSA_RX1_RX_VOL_MIX_CTL; 1581 1578 break; 1582 1579 default: 1583 1580 return 0; ··· 1582 1585 1583 1586 switch (event) { 1584 1587 case SND_SOC_DAPM_POST_PMU: 1585 - val = snd_soc_component_read(component, gain_reg); 1586 - snd_soc_component_write(component, gain_reg, val); 1587 1588 break; 1588 1589 case SND_SOC_DAPM_POST_PMD: 1589 1590 snd_soc_component_update_bits(component, path_reg, ··· 1926 1931 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); 1927 1932 u16 gain_reg; 1928 1933 u16 reg; 1929 - int val; 1930 1934 struct wsa_macro *wsa = snd_soc_component_get_drvdata(component); 1931 1935 1932 1936 if (w->shift == WSA_MACRO_COMP1) { ··· 1965 1971 CDC_WSA_RX_PGA_HALF_DB_MASK, 1966 1972 CDC_WSA_RX_PGA_HALF_DB_ENABLE); 1967 1973 } 1968 - val = snd_soc_component_read(component, gain_reg); 1969 - snd_soc_component_write(component, gain_reg, val); 1970 1974 wsa_macro_config_ear_spkr_gain(component, wsa, 1971 1975 event, gain_reg); 1972 1976 break;