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

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

Merge "hal: Address missing sysfs update during DP disconnect"

parents 10404ee2 e3b6d483
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -185,7 +185,7 @@ static int update_ext_disp_sysfs_node(const struct audio_device *adev, int node_
    return ret;
}

static void check_and_set_ext_disp_connection_status(const struct audio_device *adev,
static void audio_extn_ext_disp_set_parameters(const struct audio_device *adev,
                                                     struct str_parms *parms)
{
    char value[32] = {0};
@@ -204,13 +204,14 @@ static void check_and_set_ext_disp_connection_status(const struct audio_device *
            && (atoi(value) & AUDIO_DEVICE_OUT_AUX_DIGITAL)){
        //params = "disconnect=1024" for external display disconnection.
        update_ext_disp_sysfs_node(adev, 0);
        ALOGV("invalidate cached edid");
        platform_invalidate_hdmi_config(adev->platform);
    } else {
        // handle ext disp devices only
        return;
    }
}


#ifndef FM_POWER_OPT
#define audio_extn_fm_set_parameters(adev, parms) (0)
#else
@@ -772,7 +773,7 @@ void audio_extn_set_parameters(struct audio_device *adev,
   audio_extn_source_track_set_parameters(adev, parms);
   audio_extn_fbsp_set_parameters(parms);
   audio_extn_keep_alive_set_parameters(adev, parms);
   check_and_set_ext_disp_connection_status(adev, parms);
   audio_extn_ext_disp_set_parameters(adev, parms);
   if (adev->offload_effects_set_parameters != NULL)
       adev->offload_effects_set_parameters(parms);
}
+7 −4
Original line number Diff line number Diff line
@@ -4259,10 +4259,13 @@ static int adev_set_parameters(struct audio_hw_device *dev, const char *kvpairs)
    ret = str_parms_get_str(parms, AUDIO_PARAMETER_DEVICE_DISCONNECT, value, sizeof(value));
    if (ret >= 0) {
        val = atoi(value);
        if (val & AUDIO_DEVICE_OUT_AUX_DIGITAL) {
            ALOGV("invalidate cached edid");
            platform_invalidate_hdmi_config(adev->platform);
        } else if ((val & AUDIO_DEVICE_OUT_USB_DEVICE) ||
        /*
         * The HDMI / Displayport disconnect handling has been moved to
         * audio extension to ensure that its parameters are not
         * invalidated prior to updating sysfs of the disconnect event
         * Invalidate will be handled by audio_extn_ext_disp_set_parameters()
         */
        if ((val & AUDIO_DEVICE_OUT_USB_DEVICE) ||
                   !(val ^ AUDIO_DEVICE_IN_USB_DEVICE)) {
            ret = str_parms_get_str(parms, "card", value, sizeof(value));
            if (ret >= 0) {
+1 −0
Original line number Diff line number Diff line
@@ -163,6 +163,7 @@ bool platform_check_codec_dsd_support(void *platform);
bool platform_check_codec_asrc_support(void *platform);
int platform_get_backend_index(snd_device_t snd_device);
int platform_get_ext_disp_type(void *platform);
void platform_invalidate_hdmi_config(void *platform);

int platform_send_audio_cal(void* platform, int acdb_dev_id, int acdb_device_type,
    int app_type, int topology_id, int sample_rate, uint32_t module_id, uint32_t param_id,