Loading hal/audio_extn/dts_eagle.c +8 −12 Original line number Diff line number Diff line Loading @@ -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) Loading hal/audio_hw.c +1 −0 Original line number Diff line number Diff line Loading @@ -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; Loading Loading
hal/audio_extn/dts_eagle.c +8 −12 Original line number Diff line number Diff line Loading @@ -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) Loading
hal/audio_hw.c +1 −0 Original line number Diff line number Diff line Loading @@ -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; Loading