qcom/audio/hal: Do not enable Fluence in speaker mode by default
- Speaker volume is low during voice call. - Fluence is enabled by default even in speaker mode during voice call. Mako does not meet the spec for Fluence due to mics placement issue. - Fix the issue by not enabling Fluence in speaker mode. - If the device supports it, set the property to enable fluence. Bug: 8272345 Change-Id: I9c4726409c4eb8d39dfbbb2f47e3075a6f6d5cc3
This commit is contained in:
parent
096c87f83c
commit
02317798de
|
@ -530,10 +530,10 @@ static snd_device_t get_input_snd_device(struct audio_device *adev)
|
|||
} else if (out_device & AUDIO_DEVICE_OUT_ALL_SCO) {
|
||||
snd_device = SND_DEVICE_IN_BT_SCO_MIC ;
|
||||
} else if (out_device & AUDIO_DEVICE_OUT_SPEAKER) {
|
||||
if (adev->fluence_in_voice_call &&
|
||||
if (adev->fluence_in_voice_call && adev->fluence_in_spkr_mode &&
|
||||
adev->dualmic_config == DUALMIC_CONFIG_ENDFIRE) {
|
||||
snd_device = SND_DEVICE_IN_VOICE_SPEAKER_DMIC_EF;
|
||||
} else if (adev->fluence_in_voice_call &&
|
||||
} else if (adev->fluence_in_voice_call && adev->fluence_in_spkr_mode &&
|
||||
adev->dualmic_config == DUALMIC_CONFIG_BROADSIDE) {
|
||||
snd_device = SND_DEVICE_IN_VOICE_SPEAKER_DMIC_BS;
|
||||
} else {
|
||||
|
@ -1959,6 +1959,7 @@ static void init_platform_data(struct audio_device *adev)
|
|||
char value[PROPERTY_VALUE_MAX];
|
||||
|
||||
adev->dualmic_config = DUALMIC_CONFIG_NONE;
|
||||
adev->fluence_in_spkr_mode = false;
|
||||
adev->fluence_in_voice_call = false;
|
||||
adev->fluence_in_voice_rec = false;
|
||||
adev->mic_type_analog = false;
|
||||
|
@ -1986,6 +1987,11 @@ static void init_platform_data(struct audio_device *adev)
|
|||
if (!strncmp("true", value, 4)) {
|
||||
adev->fluence_in_voice_rec = true;
|
||||
}
|
||||
|
||||
property_get("persist.audio.fluence.speaker",value,"");
|
||||
if (!strncmp("true", value, 4)) {
|
||||
adev->fluence_in_spkr_mode = true;
|
||||
}
|
||||
}
|
||||
|
||||
adev->acdb_handle = dlopen(LIB_ACDB_LOADER, RTLD_NOW);
|
||||
|
|
|
@ -226,6 +226,7 @@ struct audio_device {
|
|||
int acdb_settings;
|
||||
|
||||
bool mic_type_analog;
|
||||
bool fluence_in_spkr_mode;
|
||||
bool fluence_in_voice_call;
|
||||
bool fluence_in_voice_rec;
|
||||
int dualmic_config;
|
||||
|
|
Loading…
Reference in New Issue