Skip to content

Commit 057efcf

Browse files
stephan-ghbroonie
authored andcommitted
ASoC: msm8916-wcd-analog: Fix MIC BIAS Internal1
MIC BIAS Internal1 is broken at the moment because we always enable the internal rbias resistor to the TX2 line (connected to the headset microphone), rather than enabling the resistor connected to TX1. Move the RBIAS code to pm8916_wcd_analog_enable_micbias_int1/2() to fix this. Fixes: 585e881 ("ASoC: codecs: Add msm8916-wcd analog codec") Cc: Srinivas Kandagatla <[email protected]> Signed-off-by: Stephan Gerhold <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 877167e commit 057efcf

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

sound/soc/codecs/msm8916-wcd-analog.c

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -396,9 +396,6 @@ static int pm8916_wcd_analog_enable_micbias_int(struct snd_soc_component
396396

397397
switch (event) {
398398
case SND_SOC_DAPM_PRE_PMU:
399-
snd_soc_component_update_bits(component, CDC_A_MICB_1_INT_RBIAS,
400-
MICB_1_INT_TX2_INT_RBIAS_EN_MASK,
401-
MICB_1_INT_TX2_INT_RBIAS_EN_ENABLE);
402399
snd_soc_component_update_bits(component, reg, MICB_1_EN_PULL_DOWN_EN_MASK, 0);
403400
snd_soc_component_update_bits(component, CDC_A_MICB_1_EN,
404401
MICB_1_EN_OPA_STG2_TAIL_CURR_MASK,
@@ -448,6 +445,14 @@ static int pm8916_wcd_analog_enable_micbias_int1(struct
448445
struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
449446
struct pm8916_wcd_analog_priv *wcd = snd_soc_component_get_drvdata(component);
450447

448+
switch (event) {
449+
case SND_SOC_DAPM_PRE_PMU:
450+
snd_soc_component_update_bits(component, CDC_A_MICB_1_INT_RBIAS,
451+
MICB_1_INT_TX1_INT_RBIAS_EN_MASK,
452+
MICB_1_INT_TX1_INT_RBIAS_EN_ENABLE);
453+
break;
454+
}
455+
451456
return pm8916_wcd_analog_enable_micbias_int(component, event, w->reg,
452457
wcd->micbias1_cap_mode);
453458
}
@@ -558,6 +563,11 @@ static int pm8916_wcd_analog_enable_micbias_int2(struct
558563
struct pm8916_wcd_analog_priv *wcd = snd_soc_component_get_drvdata(component);
559564

560565
switch (event) {
566+
case SND_SOC_DAPM_PRE_PMU:
567+
snd_soc_component_update_bits(component, CDC_A_MICB_1_INT_RBIAS,
568+
MICB_1_INT_TX2_INT_RBIAS_EN_MASK,
569+
MICB_1_INT_TX2_INT_RBIAS_EN_ENABLE);
570+
break;
561571
case SND_SOC_DAPM_POST_PMU:
562572
pm8916_mbhc_configure_bias(wcd, true);
563573
break;

0 commit comments

Comments
 (0)