diff options
Diffstat (limited to 'backends/alsa/alsa-stream-input-control.c')
-rw-r--r-- | backends/alsa/alsa-stream-input-control.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/backends/alsa/alsa-stream-input-control.c b/backends/alsa/alsa-stream-input-control.c index 2ef0c42..2e3f46d 100644 --- a/backends/alsa/alsa-stream-input-control.c +++ b/backends/alsa/alsa-stream-input-control.c @@ -22,6 +22,7 @@ #include <libmatemixer/matemixer.h> #include <libmatemixer/matemixer-private.h> +#include "alsa-constants.h" #include "alsa-element.h" #include "alsa-stream-control.h" #include "alsa-stream-input-control.h" @@ -51,8 +52,7 @@ static gboolean alsa_stream_input_control_get_decibel_from_volume (AlsaStreamCon guint volume, gdouble *decibel); -static void read_volume_data (snd_mixer_elem_t *el, - AlsaControlData *data); +static void read_volume_data (snd_mixer_elem_t *el, AlsaControlData *data); static void alsa_stream_input_control_class_init (AlsaStreamInputControlClass *klass) @@ -77,12 +77,14 @@ alsa_stream_input_control_init (AlsaStreamInputControl *control) AlsaStreamControl * alsa_stream_input_control_new (const gchar *name, const gchar *label, - MateMixerStreamControlRole role) + MateMixerStreamControlRole role, + AlsaStream *stream) { return g_object_new (ALSA_TYPE_STREAM_INPUT_CONTROL, "name", name, "label", label, "role", role, + "stream", stream, NULL); } @@ -98,7 +100,6 @@ alsa_stream_input_control_load (AlsaStreamControl *control) if G_UNLIKELY (el == NULL) return FALSE; - /* Expect that the element has a volume control */ if G_UNLIKELY (snd_mixer_selem_has_capture_volume (el) == 0 && snd_mixer_selem_has_common_volume (el) == 0) { g_warn_if_reached (); @@ -180,8 +181,7 @@ alsa_stream_input_control_set_channel_volume (AlsaStreamControl *contr if G_UNLIKELY (el == NULL) return FALSE; - /* Set the volume for a single channels, the volume may still be "joined" and - * set all the channels by itself */ + /* Set the volume for a single channel */ ret = snd_mixer_selem_set_capture_volume (el, channel, volume); if (ret < 0) { g_warning ("Failed to set channel volume: %s", snd_strerror (ret)); |