Merge "hal: Avoid stereo device selection for target with single speaker"

This commit is contained in:
Linux Build Service Account 2017-11-10 06:32:26 -08:00 committed by Gerrit - the friendly Code Review server
commit c4c174c086
2 changed files with 30 additions and 0 deletions

View File

@ -1841,6 +1841,10 @@
<path name="speaker-mono-2" />
</path>
<path name="speaker-hdk">
<path name="speaker-mono" />
</path>
<path name="speaker-fluid">
<path name="speaker-mono" />
</path>
@ -2063,6 +2067,14 @@
<path name="handset-qrd" />
</path>
<path name="voice-handset-hdk">
<path name="handset-qrd" />
</path>
<path name="voice-handset-tmus-hdk">
<path name="handset-qrd" />
</path>
<path name="voice-speaker">
<path name="speaker-mono" />
</path>
@ -2071,6 +2083,10 @@
<path name="speaker-mono-2" />
</path>
<path name="voice-speaker-hdk">
<path name="speaker-mono" />
</path>
<path name="voice-speaker-2">
<path name="speaker-mono-2" />
</path>
@ -2412,6 +2428,11 @@
<path name="handset-qrd" />
</path>
<path name="voice-tty-hco-handset-hdk">
<ctl name="TTY Mode" value="HCO" />
<path name="handset-qrd" />
</path>
<path name="voice-tty-full-headset-mic">
<path name="amic2" />
<ctl name="ADC2 Volume" value="0" />

View File

@ -383,6 +383,15 @@ static void update_hardware_info_sdm845(struct hardware_info *hw_info, const ch
hw_info->num_snd_devices = ARRAY_SIZE(tavil_qrd_variant_devices);
hw_info->is_stereo_spkr = false;
strlcpy(hw_info->dev_extn, "-qrd", sizeof(hw_info->dev_extn));
} else if (!strcmp(snd_card_name, "sdm845-tavil-hdk-snd-card")) {
strlcpy(hw_info->type, " hdk", sizeof(hw_info->type));
strlcpy(hw_info->name, "sdm845", sizeof(hw_info->name));
hw_info->snd_devices = (snd_device_t *)tavil_qrd_variant_devices;
hw_info->num_snd_devices = ARRAY_SIZE(tavil_qrd_variant_devices);
hw_info->is_stereo_spkr = false;
strlcpy(hw_info->dev_extn, "-hdk", sizeof(hw_info->dev_extn));
} else if (!strcmp(snd_card_name, "sdm845-qvr-tavil-snd-card")) {
hw_info->is_stereo_spkr = false;
} else {
ALOGW("%s: Not a sdm845 device", __func__);
}