diff options
author | Rohit kumar <quic_rohkumar@quicinc.com> | 2023-05-30 20:27:35 +0530 |
---|---|---|
committer | Rohit kumar <quic_rohkumar@quicinc.com> | 2023-09-04 15:26:14 +0530 |
commit | a8a581fb422c9c2af2d8858a678c008db80e1e3c (patch) | |
tree | 863ad03decd80b18453d20c217a78a586ea4cb8f /include | |
parent | 4fbaeef03cd1cb216e0f356c0433ca70f8b9c464 (diff) |
mixer: add support for pcm device specific mixer controls
Mixer control such as "Playback channel map" can be registered by
multiple pcm device nodes and is distinguished by device in
snd_ctl_elem_id. Add support to get the control handle associated
with mixer ctl name and device number.
Also, introduce API to get the device number associated with specific
mixer_ctl handle.
Diffstat (limited to 'include')
-rw-r--r-- | include/tinyalsa/mixer.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/tinyalsa/mixer.h b/include/tinyalsa/mixer.h index 7d0580f..149b395 100644 --- a/include/tinyalsa/mixer.h +++ b/include/tinyalsa/mixer.h @@ -103,6 +103,10 @@ struct mixer_ctl *mixer_get_ctl(struct mixer *mixer, unsigned int id); struct mixer_ctl *mixer_get_ctl_by_name(struct mixer *mixer, const char *name); +struct mixer_ctl *mixer_get_ctl_by_name_and_device(struct mixer *mixer, + const char *name, + unsigned int device); + struct mixer_ctl *mixer_get_ctl_by_name_and_index(struct mixer *mixer, const char *name, unsigned int index); @@ -153,6 +157,8 @@ int mixer_ctl_get_range_min(const struct mixer_ctl *ctl); int mixer_ctl_get_range_max(const struct mixer_ctl *ctl); +unsigned int mixer_ctl_get_device(const struct mixer_ctl *ctl); + int mixer_read_event(struct mixer *mixer, struct mixer_ctl_event *event); int mixer_consume_event(struct mixer *mixer); |