Merge "asoc: codecs: enable bcs port for headset record"
这个提交包含在:
@@ -46,6 +46,7 @@ enum {
|
||||
ALLOW_BUCK_DISABLE,
|
||||
HPH_COMP_DELAY,
|
||||
HPH_PA_DELAY,
|
||||
AMIC2_BCS_ENABLE,
|
||||
};
|
||||
|
||||
static const DECLARE_TLV_DB_SCALE(line_gain, 0, 7, 1);
|
||||
@@ -1305,10 +1306,21 @@ static int wcd937x_codec_enable_adc(struct snd_soc_dapm_widget *w,
|
||||
WCD937X_DIGITAL_CDC_ANA_CLK_CTL, 0x08, 0x08);
|
||||
snd_soc_component_update_bits(component,
|
||||
WCD937X_DIGITAL_CDC_ANA_CLK_CTL, 0x10, 0x10);
|
||||
/* Enable BCS for Headset mic */
|
||||
if (w->shift == 1 && !(snd_soc_component_read32(component,
|
||||
WCD937X_TX_NEW_TX_CH2_SEL) & 0x80)) {
|
||||
wcd937x_tx_connect_port(codec, MBHC, true);
|
||||
set_bit(AMIC2_BCS_ENABLE, &wcd937x->status_mask);
|
||||
}
|
||||
wcd937x_tx_connect_port(component, ADC1 + (w->shift), true);
|
||||
break;
|
||||
case SND_SOC_DAPM_POST_PMD:
|
||||
wcd937x_tx_connect_port(component, ADC1 + (w->shift), false);
|
||||
if (w->shift == 1 &&
|
||||
test_bit(AMIC2_BCS_ENABLE, &wcd937x->status_mask)) {
|
||||
wcd937x_tx_connect_port(codec, MBHC, false);
|
||||
clear_bit(AMIC2_BCS_ENABLE, &wcd937x->status_mask);
|
||||
}
|
||||
snd_soc_component_update_bits(component,
|
||||
WCD937X_DIGITAL_CDC_ANA_CLK_CTL, 0x08, 0x00);
|
||||
break;
|
||||
|
@@ -57,6 +57,7 @@ enum {
|
||||
ALLOW_BUCK_DISABLE,
|
||||
HPH_COMP_DELAY,
|
||||
HPH_PA_DELAY,
|
||||
AMIC2_BCS_ENABLE,
|
||||
};
|
||||
|
||||
enum {
|
||||
@@ -1442,10 +1443,21 @@ static int wcd938x_codec_enable_adc(struct snd_soc_dapm_widget *w,
|
||||
break;
|
||||
}
|
||||
set_bit(w->shift, &wcd938x->status_mask);
|
||||
/* Enable BCS for Headset mic */
|
||||
if (w->shift == 1 && !(snd_soc_component_read32(component,
|
||||
WCD938X_TX_NEW_AMIC_MUX_CFG) & 0x80)) {
|
||||
wcd938x_tx_connect_port(component, MBHC, true);
|
||||
set_bit(AMIC2_BCS_ENABLE, &wcd938x->status_mask);
|
||||
}
|
||||
wcd938x_tx_connect_port(component, ADC1 + (w->shift), true);
|
||||
break;
|
||||
case SND_SOC_DAPM_POST_PMD:
|
||||
wcd938x_tx_connect_port(component, ADC1 + (w->shift), false);
|
||||
if (w->shift == 1 &&
|
||||
test_bit(AMIC2_BCS_ENABLE, &wcd938x->status_mask)) {
|
||||
wcd938x_tx_connect_port(component, MBHC, false);
|
||||
clear_bit(AMIC2_BCS_ENABLE, &wcd938x->status_mask);
|
||||
}
|
||||
snd_soc_component_update_bits(component,
|
||||
WCD938X_DIGITAL_CDC_ANA_CLK_CTL, 0x08, 0x00);
|
||||
clear_bit(w->shift, &wcd938x->status_mask);
|
||||
|
在新工单中引用
屏蔽一个用户