Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f934f3a6 authored by Aditya Bavanari's avatar Aditya Bavanari
Browse files

hal: Add snd device name index mapping for voice stereo speaker

Mapping for voice stereo speaker sound device is not present
in snd device index array due to which the backends and interfaces
are not properly assigned to this snd device. Add this mapping in
snd device index array to fix this issue.

Change-Id: I90f2305cef13d63537b81107339459ba5f4af5dd
parent d42d97a4
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -977,6 +977,7 @@ static struct name_to_index snd_device_name_index[SND_DEVICE_MAX] = {
    {TO_NAME_INDEX(SND_DEVICE_OUT_SPEAKER_AND_HEADPHONES_EXTERNAL_2)},
    {TO_NAME_INDEX(SND_DEVICE_OUT_VOICE_HANDSET)},
    {TO_NAME_INDEX(SND_DEVICE_OUT_VOICE_SPEAKER)},
    {TO_NAME_INDEX(SND_DEVICE_OUT_VOICE_SPEAKER_STEREO)},
    {TO_NAME_INDEX(SND_DEVICE_OUT_VOICE_SPEAKER_WSA)},
    {TO_NAME_INDEX(SND_DEVICE_OUT_VOICE_SPEAKER_HFP)},
    {TO_NAME_INDEX(SND_DEVICE_OUT_VOICE_SPEAKER_VBAT)},
@@ -2088,6 +2089,7 @@ static void set_platform_defaults(struct platform_data * my_data)
    hw_interface_table[SND_DEVICE_OUT_VOICE_HANDSET] = strdup("SLIMBUS_0_RX");
    hw_interface_table[SND_DEVICE_OUT_VOICE_HAC_HANDSET] = strdup("SLIMBUS_0_RX");
    hw_interface_table[SND_DEVICE_OUT_VOICE_SPEAKER] = strdup("SLIMBUS_0_RX");
    hw_interface_table[SND_DEVICE_OUT_VOICE_SPEAKER_STEREO] = strdup("SLIMBUS_0_RX");
    hw_interface_table[SND_DEVICE_OUT_VOICE_SPEAKER_VBAT] = strdup("SLIMBUS_0_RX");
    hw_interface_table[SND_DEVICE_OUT_VOICE_SPEAKER_2] = strdup("SLIMBUS_0_RX");
    hw_interface_table[SND_DEVICE_OUT_VOICE_SPEAKER_2_VBAT] = strdup("SLIMBUS_0_RX");
@@ -4845,6 +4847,7 @@ int platform_switch_voice_call_enable_device_config(void *platform,
        return ret;

    if ((out_snd_device == SND_DEVICE_OUT_VOICE_SPEAKER ||
         out_snd_device == SND_DEVICE_OUT_VOICE_SPEAKER_STEREO ||
         out_snd_device == SND_DEVICE_OUT_VOICE_SPEAKER_2 ||
         out_snd_device == SND_DEVICE_OUT_VOICE_SPEAKER_VBAT ||
         out_snd_device == SND_DEVICE_OUT_VOICE_SPEAKER_2_VBAT) &&