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

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

Merge "hal: enable HPX fade-in when seeking restarts offload playback"

parents 5f5e167b 44b3427c
Loading
Loading
Loading
Loading
+8 −12
Original line number Diff line number Diff line
@@ -150,20 +150,16 @@ static void fade_node(bool need_data) {
    if (strncmp("true", prop, sizeof("true")))
        return;
    int fd, n = 0;
    if ((fd = open(FADE_NOTIFY_FILE, O_RDONLY)) < 0)
        ALOGV("No fade node");
    else {
        ALOGV("fade node exists, remove it before creating it");
        close(fd);
        remove(FADE_NOTIFY_FILE);
    }
    if ((fd = open(FADE_NOTIFY_FILE, O_TRUNC|O_WRONLY)) < 0) {
        ALOGV("No fade node, create one");
        fd = creat(FADE_NOTIFY_FILE, S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH);
    char *str = need_data ? "need" : "have";
        if (fd < 0) {
        ALOGE("DTS_EAGLE_HAL (%s): opening fade notifier node failed", __func__);
            ALOGE("DTS_EAGLE_HAL (%s): Creating fade notifier node failed", __func__);
            return;
        }
        chmod(FADE_NOTIFY_FILE, S_IRWXU|S_IRGRP|S_IXGRP|S_IROTH);
    }
    char *str = need_data ? "need" : "have";
    n = write(fd, str, strlen(str));
    close(fd);
    if (n > 0)
+1 −0
Original line number Diff line number Diff line
@@ -2114,6 +2114,7 @@ static ssize_t out_write(struct audio_stream_out *stream, const void *buffer,
        }
        if (!out->playback_started && ret >= 0) {
            compress_start(out->compr);
            audio_extn_dts_eagle_fade(adev, true, out);
            out->playback_started = 1;
            out->offload_state = OFFLOAD_STATE_PLAYING;