aboutsummaryrefslogtreecommitdiff
path: root/src/mixer_hw.c
diff options
context:
space:
mode:
authorTaylor Holberton <tay10r@protonmail.com>2020-06-03 09:43:06 -0400
committerGitHub <noreply@github.com>2020-06-03 09:43:06 -0400
commit1a53e3a9daa9ea7226c2884c6ad45c31a146c9fe (patch)
tree582e20875d0bb1803b8ce15b7cba81c293772349 /src/mixer_hw.c
parent102f06d85c60e0ac52d755fbdd8d3f8531f5e3d5 (diff)
parentdf855e804886f2846d0bdb6d8b1aad506452f051 (diff)
Merge pull request #159 from rohkkumar/plugin_update
Mixer event plugin update
Diffstat (limited to 'src/mixer_hw.c')
-rw-r--r--src/mixer_hw.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mixer_hw.c b/src/mixer_hw.c
index 2e86dfa..da5a390 100644
--- a/src/mixer_hw.c
+++ b/src/mixer_hw.c
@@ -82,9 +82,18 @@ static int mixer_hw_ioctl(void *data, unsigned int cmd, ...)
return ioctl(hw_data->fd, cmd, arg);
}
+static ssize_t mixer_hw_read_event(void *data, struct snd_ctl_event *ev,
+ size_t size)
+{
+ struct mixer_hw_data *hw_data = data;
+
+ return read(hw_data->fd, ev, size);
+}
+
static const struct mixer_ops mixer_hw_ops = {
.close = mixer_hw_close,
.ioctl = mixer_hw_ioctl,
+ .read_event = mixer_hw_read_event,
};
int mixer_hw_open(unsigned int card, void **data,