// SPDX-License-Identifier: (GPL-2.0+ OR MIT) /* * Copyright (c) 2021 Amlogic, Inc. All rights reserved. */ #include #include #include #include #include #include "audio_controls_proc.h" #include "aml_audio_log.h" #define UPDATE_PROC_NAME "proc/lgtv-driver/audio/update" int audio_proc_ioctl_update(unsigned int cmd, struct Ioctl_update_storage *proc_info_storage_t) { int fd = -1; int ret = -1; fd = open(UPDATE_PROC_NAME, O_RDWR); if (fd < 0) { ALOGE("open adec node failed"); return -1; } ret = ioctl(fd, cmd, proc_info_storage_t); if (ret < 0) { ALOGE("error: ioctl failed\n"); close(fd); return -1; } close(fd); return 0; }