summaryrefslogtreecommitdiffstats
path: root/mixer.c
diff options
context:
space:
mode:
Diffstat (limited to 'mixer.c')
-rw-r--r--mixer.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/mixer.c b/mixer.c
index 065b939..508fea8 100644
--- a/mixer.c
+++ b/mixer.c
@@ -777,6 +777,40 @@ int tinyalsa_mixer_set_voice_volume(struct tinyalsa_mixer *mixer, audio_devices_
&mixer->input, "voice-volume");
}
+audio_devices_t tinyalsa_mixer_get_supported_devices(struct tinyalsa_mixer *mixer)
+{
+ struct tinyalsa_mixer_device *mixer_device;
+ audio_devices_t devices = 0x00;
+ struct list_head *list;
+
+ LOGD("%s(%p)", __func__, mixer);
+
+ if(mixer == NULL)
+ return -1;
+
+ list = mixer->output.devices;
+ while(list != NULL) {
+ if(list->data != NULL) {
+ mixer_device = (struct tinyalsa_mixer_device *) list->data;
+ devices |= mixer_device->props.type;
+ }
+
+ list = list->next;
+ }
+
+ list = mixer->input.devices;
+ while(list != NULL) {
+ if(list->data != NULL) {
+ mixer_device = (struct tinyalsa_mixer_device *) list->data;
+ devices |= mixer_device->props.type;
+ }
+
+ list = list->next;
+ }
+
+ return devices;
+}
+
struct tinyalsa_mixer_io_props *tinyalsa_mixer_get_output_props(struct tinyalsa_mixer *mixer)
{
LOGD("%s(%p)", __func__, mixer);