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

Commit e236ff0f authored by Shiv Maliyappanahalli's avatar Shiv Maliyappanahalli Committed by Gerrit - the friendly Code Review server
Browse files

hal: fix no audio in fm playback usecase

- FM playback is broken since incorrect pcm id is used. Fix
by adding the missing usecase to the usecase index table.

- Remove headphones from backend default table as it incorrectly
appends headphones to the usecase name even when independent backend
for headphones is not enabled.

Change-Id: I7bfa3cd3516c37404570a61586eff0a4e419fb25
parent dbcddf24
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -667,6 +667,8 @@ static struct name_to_index usecase_name_index[AUDIO_USECASE_MAX] = {
    {TO_NAME_INDEX(USECASE_INCALL_REC_DOWNLINK)},
    {TO_NAME_INDEX(USECASE_INCALL_REC_UPLINK_AND_DOWNLINK)},
    {TO_NAME_INDEX(USECASE_AUDIO_HFP_SCO)},
    {TO_NAME_INDEX(USECASE_AUDIO_PLAYBACK_FM)},
    {TO_NAME_INDEX(USECASE_AUDIO_RECORD_FM_VIRTUAL)},
};

#define NO_COLS 2
@@ -1065,7 +1067,6 @@ static void set_platform_defaults()
    backend_tag_table[SND_DEVICE_IN_USB_HEADSET_MIC] = strdup("usb-headset-mic");
    backend_tag_table[SND_DEVICE_IN_CAPTURE_FM] = strdup("capture-fm");
    backend_tag_table[SND_DEVICE_OUT_TRANSMISSION_FM] = strdup("transmission-fm");
    backend_tag_table[SND_DEVICE_OUT_HEADPHONES] = strdup("headphones");
    backend_tag_table[SND_DEVICE_OUT_HEADPHONES_44_1] = strdup("headphones-44.1");
    backend_tag_table[SND_DEVICE_OUT_VOICE_SPEAKER_VBAT] = strdup("voice-speaker-vbat");