asoc: wsa883x: Update low_noise gain for receiver
Add changes to use wsa883x for receiver with low_noise mode settings. Change-Id: Icfa43ebbdb1e366f365053535f541bee03751ca3 Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

parent
4a24723e3d
commit
ae258cb2f8
@@ -530,6 +530,12 @@ static const char * const wsa_dev_mode_text[] = {
|
||||
"speaker", "receiver", "ultrasound"
|
||||
};
|
||||
|
||||
enum {
|
||||
SPEAKER,
|
||||
RECEIVER,
|
||||
ULTRASOUND,
|
||||
};
|
||||
|
||||
static const struct soc_enum wsa_dev_mode_enum =
|
||||
SOC_ENUM_SINGLE_EXT(ARRAY_SIZE(wsa_dev_mode_text), wsa_dev_mode_text);
|
||||
|
||||
@@ -1112,8 +1118,18 @@ static int wsa883x_spkr_event(struct snd_soc_dapm_widget *w,
|
||||
true);
|
||||
/* Added delay as per HW sequence */
|
||||
usleep_range(250, 300);
|
||||
snd_soc_component_update_bits(component, WSA883X_DRE_CTL_1,
|
||||
0x01, 0x01);
|
||||
if (wsa883x->dev_mode == RECEIVER) {
|
||||
snd_soc_component_update_bits(component,
|
||||
WSA883X_DRE_CTL_0,
|
||||
0xF0, 0x00);
|
||||
} else if (wsa883x->dev_mode == SPEAKER) {
|
||||
snd_soc_component_update_bits(component,
|
||||
WSA883X_DRE_CTL_0,
|
||||
0xF0, 0x90);
|
||||
}
|
||||
snd_soc_component_update_bits(component,
|
||||
WSA883X_DRE_CTL_1,
|
||||
0x01, 0x01);
|
||||
/* Added delay as per HW sequence */
|
||||
usleep_range(250, 300);
|
||||
|
||||
|
Reference in New Issue
Block a user