summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMark Farrugia <mark.farrugia@fiberdyne.com.au>2019-02-01 12:11:58 +1100
committerMark Farrugia <mark.farrugia@fiberdyne.com.au>2019-02-01 12:17:42 +1100
commite3d18ca279933147d0f2336fd3356958e18d133b (patch)
tree4116a03151ff4e93de79d2127c2350195a117681 /include
parentc80e9f59a309f428c412c11bf207f186f89ce59e (diff)
Add error checking macros, and initial support for volume control
Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
Diffstat (limited to 'include')
-rw-r--r--include/avirt/avirt.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/avirt/avirt.h b/include/avirt/avirt.h
index 92eb23c..f1c4060 100644
--- a/include/avirt/avirt.h
+++ b/include/avirt/avirt.h
@@ -71,4 +71,21 @@ int snd_avirt_pcm_info(const char *pcm_name, snd_pcm_info_t *pcm_info);
* @return: The ALSA card index on success, negative ERRNO otherwise
*/
int snd_avirt_card_index_get(int avirt_idx);
+
+/**
+ * snd_avirt_ctl_set_volume - Set an ALSA mixer volume value
+ * @name: The ALSA volume control name to set
+ * @volume: The volume to set
+ * @return: 0 on success, negative ERRNO otherwise
+ */
+int snd_avirt_ctl_set_volume(const char *name, long volume);
+
+/**
+ * snd_avirt_ctl_set_volume - Get an ALSA mixer volume value
+ * @name: The ALSA volume control name to get
+ * @volume: Populate this with the gotten value
+ * @return: 0 on success, negative ERRNO otherwise
+ */
+int snd_avirt_ctl_get_volume(const char *name, long *volume);
+
#endif // _AVIRT_H_