From e3d18ca279933147d0f2336fd3356958e18d133b Mon Sep 17 00:00:00 2001 From: Mark Farrugia Date: Fri, 1 Feb 2019 12:11:58 +1100 Subject: Add error checking macros, and initial support for volume control Signed-off-by: Mark Farrugia --- include/avirt/avirt.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'include/avirt/avirt.h') 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_ -- cgit 1.2.3-korg