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

Commit 8e5fb4bc authored by Linux Build Service Account's avatar Linux Build Service Account
Browse files

Promotion of av-userspace.lnx.1.0-00021.

CRs      Change ID                                   Subject
--------------------------------------------------------------------------------------------------------------
         I5468b2875d0fd028e5c32f25c15b5de0095e7007   hal: audio_extn: enable speaker protection for tasha
         Ic08ee32a3cbff3f2dc17ea9e46e9cc7f84bf4182   HAL: 8953 HAL bringup
         I4985b2d12dc0ee3f62089423e3a71d530f66027c   post_proc: fix inconsistency in virtualizer state from s
946670   I3d456aad2ca49095a0dfe5883f4374e22a437256   HAL: Identify the track offload session
         Ic3774c54d1fcdfc4125062c6cdf976262717bb12   hal: Add support for msm8953 and msm8937

Change-Id: If3abbb5822ff1bdaae9ada86d9c1cab3a522d861
CRs-Fixed: 946670
parents 228852d5 4d1e1a16
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
ifneq ($(filter mpq8092 msm8960 msm8226 msm8x26 msm8610 msm8974 msm8x74 apq8084 msm8916 msm8994 msm8992 msm8909 msm8996 msm8952 msm8937 thorium,$(TARGET_BOARD_PLATFORM)),)
ifneq ($(filter mpq8092 msm8960 msm8226 msm8x26 msm8610 msm8974 msm8x74 apq8084 msm8916 msm8994 msm8992 msm8909 msm8996 msm8952 msm8937 thorium titanium,$(TARGET_BOARD_PLATFORM)),)

MY_LOCAL_PATH := $(call my-dir)

+1 −1
Original line number Diff line number Diff line
@@ -32,7 +32,7 @@ ifneq ($(filter msm8996,$(TARGET_BOARD_PLATFORM)),)
endif
endif

ifneq ($(filter msm8916 msm8909 msm8952 msm8937 thorium,$(TARGET_BOARD_PLATFORM)),)
ifneq ($(filter msm8916 msm8909 msm8952 msm8937 thorium titanium,$(TARGET_BOARD_PLATFORM)),)
  AUDIO_PLATFORM = msm8916
  MULTIPLE_HW_VARIANTS_ENABLED := true
  LOCAL_CFLAGS := -DPLATFORM_MSM8916
+0 −4
Original line number Diff line number Diff line
@@ -285,16 +285,12 @@ int32_t audio_extn_read_xml(struct audio_device *adev, uint32_t mixer_card,
#define audio_extn_spkr_prot_calib_cancel(adev) (0)
#define audio_extn_spkr_prot_stop_processing(snd_device)     (0)
#define audio_extn_spkr_prot_is_enabled() (false)
#define audio_extn_spkr_prot_get_acdb_id(snd_device)         (-EINVAL)
#define audio_extn_get_spkr_prot_snd_device(snd_device) (snd_device)
#define audio_extn_spkr_prot_set_parameters(parms, value, len)   (0)
#else
void audio_extn_spkr_prot_init(void *adev);
int audio_extn_spkr_prot_start_processing(snd_device_t snd_device);
void audio_extn_spkr_prot_stop_processing(snd_device_t snd_device);
bool audio_extn_spkr_prot_is_enabled();
int audio_extn_spkr_prot_get_acdb_id(snd_device_t snd_device);
int audio_extn_get_spkr_prot_snd_device(snd_device_t snd_device);
void audio_extn_spkr_prot_calib_cancel(void *adev);
void audio_extn_spkr_prot_set_parameters(struct str_parms *parms,
                                         char *value, int len);
+3 −52
Original line number Diff line number Diff line
@@ -1061,55 +1061,6 @@ void audio_extn_spkr_prot_init(void *adev)
    }
}

int audio_extn_spkr_prot_get_acdb_id(snd_device_t snd_device)
{
    int acdb_id;

    switch(snd_device) {
    case SND_DEVICE_OUT_SPEAKER:
    case SND_DEVICE_OUT_SPEAKER_WSA:
        acdb_id = platform_get_snd_device_acdb_id(SND_DEVICE_OUT_SPEAKER_PROTECTED);
        break;
    case SND_DEVICE_OUT_SPEAKER_VBAT:
        acdb_id = platform_get_snd_device_acdb_id(SND_DEVICE_OUT_SPEAKER_PROTECTED_VBAT);
        break;
    case SND_DEVICE_OUT_VOICE_SPEAKER_VBAT:
        acdb_id = platform_get_snd_device_acdb_id(SND_DEVICE_OUT_VOICE_SPEAKER_PROTECTED_VBAT);
        break;
    case SND_DEVICE_OUT_VOICE_SPEAKER:

    case SND_DEVICE_OUT_VOICE_SPEAKER_WSA:

        acdb_id = platform_get_snd_device_acdb_id(SND_DEVICE_OUT_VOICE_SPEAKER_PROTECTED);
        break;
    default:
        acdb_id = -EINVAL;
        break;
    }
    return acdb_id;
}

int audio_extn_get_spkr_prot_snd_device(snd_device_t snd_device)
{
    if (!handle.spkr_prot_enable)
        return snd_device;

    switch(snd_device) {
    case SND_DEVICE_OUT_SPEAKER:
    case SND_DEVICE_OUT_SPEAKER_WSA:
        return SND_DEVICE_OUT_SPEAKER_PROTECTED;
    case SND_DEVICE_OUT_SPEAKER_VBAT:
        return SND_DEVICE_OUT_SPEAKER_PROTECTED_VBAT;
    case SND_DEVICE_OUT_VOICE_SPEAKER_VBAT:
        return SND_DEVICE_OUT_VOICE_SPEAKER_PROTECTED_VBAT;
    case SND_DEVICE_OUT_VOICE_SPEAKER:
    case SND_DEVICE_OUT_VOICE_SPEAKER_WSA:
        return SND_DEVICE_OUT_VOICE_SPEAKER_PROTECTED;
    default:
        return snd_device;
    }
}

int audio_extn_spkr_prot_start_processing(snd_device_t snd_device)
{
    struct audio_usecase *uc_info_tx;
@@ -1123,13 +1074,13 @@ int audio_extn_spkr_prot_start_processing(snd_device_t snd_device)
       ALOGE("%s: Invalid params", __func__);
       return -EINVAL;
    }
    snd_device = audio_extn_get_spkr_prot_snd_device(snd_device);
    snd_device = platform_get_spkr_prot_snd_device(snd_device);
    spkr_prot_set_spkrstatus(true);
    uc_info_tx = (struct audio_usecase *)calloc(1, sizeof(struct audio_usecase));
    if (!uc_info_tx) {
        return -ENOMEM;
    }
    ALOGV("%s: snd_device(%d: %s)", __func__, snd_device,
    ALOGD("%s: snd_device(%d: %s)", __func__, snd_device,
           platform_get_snd_device_name(snd_device));
    audio_route_apply_and_update_path(adev->audio_route,
           platform_get_snd_device_name(snd_device));
@@ -1201,7 +1152,7 @@ void audio_extn_spkr_prot_stop_processing(snd_device_t snd_device)
    struct audio_device *adev = handle.adev_handle;

    ALOGV("%s: Entry", __func__);
    snd_device = audio_extn_get_spkr_prot_snd_device(snd_device);
    snd_device = platform_get_spkr_prot_snd_device(snd_device);
    spkr_prot_set_spkrstatus(false);
    pthread_mutex_lock(&handle.mutex_spkr_prot);
    if (adev && handle.spkr_processing_state == SPKR_PROCESSING_IN_PROGRESS) {
+2 −2
Original line number Diff line number Diff line
@@ -588,7 +588,7 @@ int audio_extn_utils_send_app_type_cfg(struct audio_device *adev,
        goto exit_send_app_type_cfg;
    }
    snd_device = (snd_device == SND_DEVICE_OUT_SPEAKER) ?
                 audio_extn_get_spkr_prot_snd_device(snd_device) : snd_device;
                 platform_get_spkr_prot_snd_device(snd_device) : snd_device;
    acdb_dev_id = platform_get_snd_device_acdb_id(snd_device);
    if (acdb_dev_id < 0) {
        ALOGE("%s: Couldn't get the acdb dev id", __func__);
@@ -657,7 +657,7 @@ void audio_extn_utils_send_audio_calibration(struct audio_device *adev,
        struct stream_out *out = usecase->stream.out;
        int snd_device = usecase->out_snd_device;
        snd_device = (snd_device == SND_DEVICE_OUT_SPEAKER) ?
                     audio_extn_get_spkr_prot_snd_device(snd_device) : snd_device;
                     platform_get_spkr_prot_snd_device(snd_device) : snd_device;
        platform_send_audio_calibration(adev->platform, usecase,
                                        out->app_type_cfg.app_type,
                                        usecase->stream.out->app_type_cfg.sample_rate);
Loading