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

Commit a24fc3fe authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "hal: MBDRC: use correct ACDB id when speaker protection is enabled"

parents 8d395ad4 0b8ea6f7
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -741,12 +741,17 @@ bool platform_send_gain_dep_cal(void *platform, int level) {

            if (usecase != NULL &&
                usecase->type == PCM_PLAYBACK &&
                (usecase->stream.out->devices == AUDIO_DEVICE_OUT_SPEAKER ||
                usecase->stream.out->devices == AUDIO_DEVICE_OUT_SPEAKER_SAFE)) {
                usecase->stream.out->devices == AUDIO_DEVICE_OUT_SPEAKER) {

                ALOGV("%s: out device is %d", __func__,  usecase->out_snd_device);
                app_type = usecase->stream.out->app_type_cfg.app_type;

                if (audio_extn_spkr_prot_is_enabled()) {
                    acdb_dev_id = audio_extn_spkr_prot_get_acdb_id(usecase->out_snd_device);
                } else {
                    acdb_dev_id = acdb_device_table[usecase->out_snd_device];
                }

                if (!my_data->acdb_send_gain_dep_cal(acdb_dev_id, app_type,
                                                     acdb_dev_type, mode, level)) {
                    // set ret_val true if at least one calibration is set successfully