X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/disorder/blobdiff_plain/b50cfb8a0d4fc71877ae0bfcd7b28879886a2ac1..ba70caca3f9debf14c9f551ff4dcaddd1eb07d3d:/lib/uaudio-alsa.c diff --git a/lib/uaudio-alsa.c b/lib/uaudio-alsa.c index be716cf..14b2d2a 100644 --- a/lib/uaudio-alsa.c +++ b/lib/uaudio-alsa.c @@ -26,6 +26,7 @@ #include "mem.h" #include "log.h" #include "uaudio.h" +#include "configuration.h" /** @brief The current PCM handle */ static snd_pcm_t *alsa_pcm; @@ -240,6 +241,12 @@ static void alsa_set_volume(int *left, int *right) { *right = to_percent(r); } +static void alsa_configure(void) { + uaudio_set("device", config->device); + uaudio_set("mixer-control", config->mixer); + uaudio_set("mixer-channel", config->channel); +} + const struct uaudio uaudio_alsa = { .name = "alsa", .options = alsa_options, @@ -251,6 +258,7 @@ const struct uaudio uaudio_alsa = { .close_mixer = alsa_close_mixer, .get_volume = alsa_get_volume, .set_volume = alsa_set_volume, + .configure = alsa_configure }; #endif