aboutsummaryrefslogtreecommitdiff
path: root/src/mixer_hw.c
diff options
context:
space:
mode:
authorRohit kumar <rohitkr@codeaurora.org>2020-06-02 11:14:38 +0530
committerRohit kumar <rohitkr@codeaurora.org>2020-06-02 12:31:17 +0530
commitf38405c4fd804fc3482055f1345095343ef243c5 (patch)
treeafa8e91e4c19f4a1c929d928ec9764b3445ad7fa /src/mixer_hw.c
parentbdc1fcf5f04b1bc2f97e9d449ced1c516f70d4af (diff)
mixer: Add plugin support for mixer_consume/read_event
snd_ctl_event is needed by client to get details of event received. Introduce mixer_read_event() with plugin support to support this.
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,