From 1a5e1da9ae2b8b01d456651009de8a27af7b4ece Mon Sep 17 00:00:00 2001 From: ejurgensen Date: Mon, 4 Apr 2016 23:42:52 +0200 Subject: [PATCH] [alsa] Fixup of volume return values --- src/outputs/alsa.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/outputs/alsa.c b/src/outputs/alsa.c index 3a7a2139..a8b1fd0c 100644 --- a/src/outputs/alsa.c +++ b/src/outputs/alsa.c @@ -37,7 +37,6 @@ #include "player.h" #include "outputs.h" -#define ALSA_PACKETS_WRITE_MAX 10 #define PACKET_SIZE STOB(AIRTUNES_V2_PACKET_SAMPLES) // TODO Unglobalise these and add support for multiple sound cards @@ -749,12 +748,12 @@ alsa_device_volume_set(struct output_device *device, output_status_cb cb) as = device->session->session; if (!mixer_hdl || !vol_elem) - return -1; + return 0; snd_mixer_handle_events(mixer_hdl); if (!snd_mixer_selem_is_active(vol_elem)) - return -1; + return 0; switch (device->volume) { @@ -775,9 +774,10 @@ alsa_device_volume_set(struct output_device *device, output_status_cb cb) snd_mixer_selem_set_playback_volume_all(vol_elem, pcm_vol); + as->status_cb = cb; alsa_status(as); - return 0; + return 1; } static void