mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-30 22:03:17 +01:00
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 <[email protected]> Tested-by: Srinivas Kandagatla <[email protected]> Reviewed-by: Srinivas Kandagatla <[email protected]>> --- Reviewed-by: Srinivas Kandagatla <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
This commit is contained in:
1 parent
38fc5addd2
commit
902f497a1f
1 file changed
+1
-9
@@ -1567,17 +1567,14 @@ static int wsa_macro_enable_mix_path(struct snd_soc_dapm_widget *w,
|
||||
struct snd_kcontrol *kcontrol, int event)
|
||||
{
|
||||
struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
|
||||
u16 path_reg, gain_reg;
|
||||
int val;
|
||||
u16 path_reg;
|
||||
|
||||
switch (w->shift) {
|
||||
case WSA_MACRO_RX_MIX0:
|
||||
path_reg = CDC_WSA_RX0_RX_PATH_MIX_CTL;
|
||||
gain_reg = CDC_WSA_RX0_RX_VOL_MIX_CTL;
|
||||
break;
|
||||
case WSA_MACRO_RX_MIX1:
|
||||
path_reg = CDC_WSA_RX1_RX_PATH_MIX_CTL;
|
||||
gain_reg = CDC_WSA_RX1_RX_VOL_MIX_CTL;
|
||||
break;
|
||||
default:
|
||||
return 0;
|
||||
@@ -1585,8 +1582,6 @@ static int wsa_macro_enable_mix_path(struct snd_soc_dapm_widget *w,
|
||||
|
||||
switch (event) {
|
||||
case SND_SOC_DAPM_POST_PMU:
|
||||
val = snd_soc_component_read(component, gain_reg);
|
||||
snd_soc_component_write(component, gain_reg, val);
|
||||
break;
|
||||
case SND_SOC_DAPM_POST_PMD:
|
||||
snd_soc_component_update_bits(component, path_reg,
|
||||
@@ -1931,7 +1926,6 @@ static int wsa_macro_enable_interpolator(struct snd_soc_dapm_widget *w,
|
||||
struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
|
||||
u16 gain_reg;
|
||||
u16 reg;
|
||||
int val;
|
||||
struct wsa_macro *wsa = snd_soc_component_get_drvdata(component);
|
||||
|
||||
if (w->shift == WSA_MACRO_COMP1) {
|
||||
@@ -1971,8 +1965,6 @@ static int wsa_macro_enable_interpolator(struct snd_soc_dapm_widget *w,
|
||||
CDC_WSA_RX_PGA_HALF_DB_MASK,
|
||||
CDC_WSA_RX_PGA_HALF_DB_ENABLE);
|
||||
}
|
||||
val = snd_soc_component_read(component, gain_reg);
|
||||
snd_soc_component_write(component, gain_reg, val);
|
||||
wsa_macro_config_ear_spkr_gain(component, wsa,
|
||||
event, gain_reg);
|
||||
break;
|
||||
|
||||
Reference in new issue
Block a user