diff options
author | Paul Kocialkowski <contact@paulk.fr> | 2012-10-12 22:00:23 +0200 |
---|---|---|
committer | Paul Kocialkowski <contact@paulk.fr> | 2012-10-12 22:00:23 +0200 |
commit | 7656237bb6e6fe676a318e491c60a2337446c722 (patch) | |
tree | bb9b232dde5d47d84c15404b3afddf53cec8f094 /mixer.c | |
parent | 4d6c6cc6e65fdfb2f6ed4a66c062bbf7b1706f0b (diff) | |
download | hardware_tinyalsa-audio-7656237bb6e6fe676a318e491c60a2337446c722.zip hardware_tinyalsa-audio-7656237bb6e6fe676a318e491c60a2337446c722.tar.gz hardware_tinyalsa-audio-7656237bb6e6fe676a318e491c60a2337446c722.tar.bz2 |
Mixer: Provide supported devices
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Diffstat (limited to 'mixer.c')
-rw-r--r-- | mixer.c | 34 |
1 files changed, 34 insertions, 0 deletions
@@ -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); |