asoc: codecs: Set EAR compander if mixer ctl set
Enable compander based on mixer ctl set for ear path. Change-Id: Ie6287469f1baa9dba239d369bd5a29ed8e44522f Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

parent
d155d7f509
commit
2e025248a2
@@ -577,6 +577,7 @@ static int wcd937x_codec_ear_dac_event(struct snd_soc_dapm_widget *w,
|
|||||||
snd_soc_component_update_bits(component,
|
snd_soc_component_update_bits(component,
|
||||||
WCD937X_HPH_NEW_INT_RDAC_HD2_CTL_L,
|
WCD937X_HPH_NEW_INT_RDAC_HD2_CTL_L,
|
||||||
0x0F, 0x06);
|
0x0F, 0x06);
|
||||||
|
if (wcd937x->comp1_enable)
|
||||||
snd_soc_component_update_bits(component,
|
snd_soc_component_update_bits(component,
|
||||||
WCD937X_DIGITAL_CDC_COMP_CTL_0,
|
WCD937X_DIGITAL_CDC_COMP_CTL_0,
|
||||||
0x02, 0x02);
|
0x02, 0x02);
|
||||||
@@ -595,6 +596,10 @@ static int wcd937x_codec_ear_dac_event(struct snd_soc_dapm_widget *w,
|
|||||||
snd_soc_component_update_bits(component,
|
snd_soc_component_update_bits(component,
|
||||||
WCD937X_HPH_NEW_INT_RDAC_HD2_CTL_L,
|
WCD937X_HPH_NEW_INT_RDAC_HD2_CTL_L,
|
||||||
0x0F, 0x01);
|
0x0F, 0x01);
|
||||||
|
if (wcd937x->comp1_enable)
|
||||||
|
snd_soc_component_update_bits(component,
|
||||||
|
WCD937X_DIGITAL_CDC_COMP_CTL_0,
|
||||||
|
0x02, 0x00);
|
||||||
break;
|
break;
|
||||||
};
|
};
|
||||||
return 0;
|
return 0;
|
||||||
|
@@ -681,8 +681,10 @@ static int wcd938x_codec_ear_dac_event(struct snd_soc_dapm_widget *w,
|
|||||||
WCD938X_DIGITAL_CDC_HPH_GAIN_CTL, 0x04, 0x04);
|
WCD938X_DIGITAL_CDC_HPH_GAIN_CTL, 0x04, 0x04);
|
||||||
snd_soc_component_update_bits(component,
|
snd_soc_component_update_bits(component,
|
||||||
WCD938X_DIGITAL_CDC_DIG_CLK_CTL, 0x01, 0x01);
|
WCD938X_DIGITAL_CDC_DIG_CLK_CTL, 0x01, 0x01);
|
||||||
|
if (wcd938x->comp1_enable)
|
||||||
snd_soc_component_update_bits(component,
|
snd_soc_component_update_bits(component,
|
||||||
WCD938X_DIGITAL_CDC_COMP_CTL_0, 0x02, 0x02);
|
WCD938X_DIGITAL_CDC_COMP_CTL_0,
|
||||||
|
0x02, 0x02);
|
||||||
}
|
}
|
||||||
/* 5 msec delay as per HW requirement */
|
/* 5 msec delay as per HW requirement */
|
||||||
usleep_range(5000, 5010);
|
usleep_range(5000, 5010);
|
||||||
@@ -707,8 +709,10 @@ static int wcd938x_codec_ear_dac_event(struct snd_soc_dapm_widget *w,
|
|||||||
WCD938X_DIGITAL_CDC_HPH_GAIN_CTL, 0x04, 0x00);
|
WCD938X_DIGITAL_CDC_HPH_GAIN_CTL, 0x04, 0x00);
|
||||||
snd_soc_component_update_bits(component,
|
snd_soc_component_update_bits(component,
|
||||||
WCD938X_DIGITAL_CDC_DIG_CLK_CTL, 0x01, 0x00);
|
WCD938X_DIGITAL_CDC_DIG_CLK_CTL, 0x01, 0x00);
|
||||||
|
if (wcd938x->comp1_enable)
|
||||||
snd_soc_component_update_bits(component,
|
snd_soc_component_update_bits(component,
|
||||||
WCD938X_DIGITAL_CDC_COMP_CTL_0, 0x02, 0x00);
|
WCD938X_DIGITAL_CDC_COMP_CTL_0,
|
||||||
|
0x02, 0x00);
|
||||||
}
|
}
|
||||||
snd_soc_component_update_bits(component,
|
snd_soc_component_update_bits(component,
|
||||||
WCD938X_ANA_EAR_COMPANDER_CTL, 0x80, 0x00);
|
WCD938X_ANA_EAR_COMPANDER_CTL, 0x80, 0x00);
|
||||||
|
Reference in New Issue
Block a user