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

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

hal: Fix incorrect device selection for incall recording

Incall recording usecase should select non-fluence
device in audio path to avoid recorded data from
getting cancelled in audio path when fluence is
enabled.
Fix by adding missing break for the case statements.

Change-Id: I3832013423956683f403c8322d0547325c336c73
parent e1a7c4cb
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -331,15 +331,21 @@ snd_device_t voice_get_incall_rec_snd_device(snd_device_t in_snd_device)
    case SND_DEVICE_IN_VOICE_DMIC:
    case SND_DEVICE_IN_AANC_HANDSET_MIC:
        incall_record_device = SND_DEVICE_IN_HANDSET_MIC;
        break;
    case SND_DEVICE_IN_VOICE_SPEAKER_MIC:
    case SND_DEVICE_IN_VOICE_SPEAKER_DMIC:
    case SND_DEVICE_IN_VOICE_SPEAKER_DMIC_BROADSIDE:
    case SND_DEVICE_IN_VOICE_SPEAKER_QMIC:
        incall_record_device = SND_DEVICE_IN_VOICE_SPEAKER_MIC;
        break;
    default:
        incall_record_device = in_snd_device;
    }

    ALOGD("%s: in_snd_device(%d: %s) incall_record_device(%d: %s)", __func__,
          in_snd_device, platform_get_snd_device_name(in_snd_device),
          incall_record_device,  platform_get_snd_device_name(incall_record_device));

    return incall_record_device;
}