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: wcd-mbhc: cleanup swap_gnd_mic api

Remove confusing and unused argument in swap_gnd_mic api, the second
argument active is not really used, and always set to true in the mbhc
drivers.

The callback itself is used to toggle the gnd_mic lines when a cross
connection is detected by mbhc circuits, so there is no need of this
argument.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Link: https://patch.msgid.link/20250327100633.11530-4-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Srinivas Kandagatla and committed by
Mark Brown
6417066f 0af2f6be

+5 -5
+1 -1
sound/soc/codecs/wcd-mbhc-v2.c
··· 1260 1260 if (pt_gnd_mic_swap_cnt == mbhc->swap_thr) { 1261 1261 /* US_EU gpio present, flip switch */ 1262 1262 if (mbhc->cfg->swap_gnd_mic) { 1263 - if (mbhc->cfg->swap_gnd_mic(component, true)) 1263 + if (mbhc->cfg->swap_gnd_mic(component)) 1264 1264 continue; 1265 1265 } 1266 1266 }
+1 -1
sound/soc/codecs/wcd-mbhc-v2.h
··· 194 194 int num_btn; 195 195 bool mono_stero_detection; 196 196 bool typec_analog_mux; 197 - bool (*swap_gnd_mic)(struct snd_soc_component *component, bool active); 197 + bool (*swap_gnd_mic)(struct snd_soc_component *component); 198 198 bool hs_ext_micbias; 199 199 bool gnd_det_en; 200 200 uint32_t linein_th;
+1 -1
sound/soc/codecs/wcd937x.c
··· 2656 2656 dev_warn(dev, "Micbias3 DT property not found\n"); 2657 2657 } 2658 2658 2659 - static bool wcd937x_swap_gnd_mic(struct snd_soc_component *component, bool active) 2659 + static bool wcd937x_swap_gnd_mic(struct snd_soc_component *component) 2660 2660 { 2661 2661 int value; 2662 2662 struct wcd937x_priv *wcd937x;
+1 -1
sound/soc/codecs/wcd938x.c
··· 3230 3230 dev_info(dev, "%s: Micbias4 DT property not found\n", __func__); 3231 3231 } 3232 3232 3233 - static bool wcd938x_swap_gnd_mic(struct snd_soc_component *component, bool active) 3233 + static bool wcd938x_swap_gnd_mic(struct snd_soc_component *component) 3234 3234 { 3235 3235 int value; 3236 3236
+1 -1
sound/soc/codecs/wcd939x.c
··· 3215 3215 } 3216 3216 3217 3217 #if IS_ENABLED(CONFIG_TYPEC) 3218 - static bool wcd939x_swap_gnd_mic(struct snd_soc_component *component, bool active) 3218 + static bool wcd939x_swap_gnd_mic(struct snd_soc_component *component) 3219 3219 { 3220 3220 struct wcd939x_priv *wcd939x = snd_soc_component_get_drvdata(component); 3221 3221