mirror of
https://github.com/torvalds/linux.git
synced 2026-06-01 11:03:43 +02:00
ASoC: codecs: wcd937x: fix AUX PA sequencing and mixer controls
Enable AUX PA sequencing during AUX DAC DAPM events and keep the AUX-specific RX supplies enabled while the path is active. Add the missing AUX-related mixer controls, including CLSH PA and DSD left/right switches, so AUX playback can be routed from userspace. Signed-off-by: Ajay Kumar Nandam <ajay.nandam@oss.qualcomm.com> Link: https://patch.msgid.link/20260420180221.785113-1-ajay.nandam@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
dad701bdb7
commit
74c876bfd7
|
|
@ -546,6 +546,9 @@ static int wcd937x_codec_aux_dac_event(struct snd_soc_dapm_widget *w,
|
|||
snd_soc_component_update_bits(component,
|
||||
WCD937X_DIGITAL_CDC_ANA_CLK_CTL,
|
||||
BIT(2), BIT(2));
|
||||
snd_soc_component_update_bits(component,
|
||||
WCD937X_AUX_AUXPA,
|
||||
BIT(4), BIT(4));
|
||||
snd_soc_component_update_bits(component,
|
||||
WCD937X_DIGITAL_CDC_DIG_CLK_CTL,
|
||||
BIT(2), BIT(2));
|
||||
|
|
@ -562,6 +565,9 @@ static int wcd937x_codec_aux_dac_event(struct snd_soc_dapm_widget *w,
|
|||
snd_soc_component_update_bits(component,
|
||||
WCD937X_DIGITAL_CDC_ANA_CLK_CTL,
|
||||
BIT(2), 0x00);
|
||||
snd_soc_component_update_bits(component,
|
||||
WCD937X_AUX_AUXPA,
|
||||
BIT(4), 0x00);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
@ -730,10 +736,23 @@ static int wcd937x_codec_enable_aux_pa(struct snd_soc_dapm_widget *w,
|
|||
snd_soc_component_update_bits(component,
|
||||
WCD937X_ANA_RX_SUPPLIES,
|
||||
BIT(1), BIT(1));
|
||||
/* Enable AUX PA related RX supplies */
|
||||
snd_soc_component_update_bits(component,
|
||||
WCD937X_ANA_RX_SUPPLIES,
|
||||
BIT(6), BIT(6));
|
||||
snd_soc_component_update_bits(component,
|
||||
WCD937X_ANA_RX_SUPPLIES,
|
||||
BIT(7), BIT(7));
|
||||
enable_irq(wcd937x->aux_pdm_wd_int);
|
||||
break;
|
||||
case SND_SOC_DAPM_PRE_PMD:
|
||||
disable_irq_nosync(wcd937x->aux_pdm_wd_int);
|
||||
snd_soc_component_update_bits(component,
|
||||
WCD937X_ANA_RX_SUPPLIES,
|
||||
BIT(6), 0x00);
|
||||
snd_soc_component_update_bits(component,
|
||||
WCD937X_ANA_RX_SUPPLIES,
|
||||
BIT(7), 0x00);
|
||||
break;
|
||||
case SND_SOC_DAPM_POST_PMD:
|
||||
usleep_range(2000, 2010);
|
||||
|
|
@ -2051,7 +2070,12 @@ static const struct snd_kcontrol_new wcd937x_snd_controls[] = {
|
|||
wcd937x_get_swr_port, wcd937x_set_swr_port),
|
||||
SOC_SINGLE_EXT("LO Switch", WCD937X_LO, 0, 1, 0,
|
||||
wcd937x_get_swr_port, wcd937x_set_swr_port),
|
||||
|
||||
SOC_SINGLE_EXT("CLSH PA Switch", WCD937X_CLSH, 0, 1, 0,
|
||||
wcd937x_get_swr_port, wcd937x_set_swr_port),
|
||||
SOC_SINGLE_EXT("DSD_L Switch", WCD937X_DSD_L, 0, 1, 0,
|
||||
wcd937x_get_swr_port, wcd937x_set_swr_port),
|
||||
SOC_SINGLE_EXT("DSD_R Switch", WCD937X_DSD_R, 0, 1, 0,
|
||||
wcd937x_get_swr_port, wcd937x_set_swr_port),
|
||||
SOC_SINGLE_EXT("ADC1 Switch", WCD937X_ADC1, 1, 1, 0,
|
||||
wcd937x_get_swr_port, wcd937x_set_swr_port),
|
||||
SOC_SINGLE_EXT("ADC2 Switch", WCD937X_ADC2, 1, 1, 0,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user