From: Jaroslav Kysela Date: Tue, 11 Jan 2000 17:35:50 +0000 (+0000) Subject: Added snd_hwdep_ioctl function. X-Git-Tag: v1.0.3~1345 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=be2d24f3e7ae2b362aeee9afd746c852673b28de;p=alsa-lib.git Added snd_hwdep_ioctl function. --- diff --git a/include/hwdep.h b/include/hwdep.h index ad62dd65..81918192 100644 --- a/include/hwdep.h +++ b/include/hwdep.h @@ -21,6 +21,7 @@ int snd_hwdep_close(snd_hwdep_t *handle); int snd_hwdep_file_descriptor(snd_hwdep_t *handle); int snd_hwdep_block_mode(snd_hwdep_t *handle, int enable); int snd_hwdep_info(snd_hwdep_t *handle, snd_hwdep_info_t * info); +int snd_hwdep_ioctl(snd_hwdep_t *handle, int request, void * arg); ssize_t snd_hwdep_write(snd_hwdep_t *handle, const void *buffer, size_t size); ssize_t snd_hwdep_read(snd_hwdep_t *handle, void *buffer, size_t size); diff --git a/src/hwdep/hwdep.c b/src/hwdep/hwdep.c index c5544aab..22e6001c 100644 --- a/src/hwdep/hwdep.c +++ b/src/hwdep/hwdep.c @@ -119,6 +119,15 @@ int snd_hwdep_info(snd_hwdep_t *hwdep, snd_hwdep_info_t * info) return 0; } +int snd_hwdep_ioctl(snd_hwdep_t *hwdep, int request, void * arg) +{ + if (!hwdep) + return -EINVAL; + if (ioctl(hwdep->fd, request, arg) < 0) + return -errno; + return 0; +} + ssize_t snd_hwdep_write(snd_hwdep_t *hwdep, const void *buffer, size_t size) { ssize_t result;