From 9956b2a9465c538c8792235c1ee02d2f90b84641 Mon Sep 17 00:00:00 2001 From: Michal Ratajsky Date: Wed, 20 Aug 2014 17:43:30 +0200 Subject: Notify on mute from main library and add a debug message --- backends/alsa/alsa-stream-control.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'backends/alsa') diff --git a/backends/alsa/alsa-stream-control.c b/backends/alsa/alsa-stream-control.c index 97a0f8b..b5500d1 100644 --- a/backends/alsa/alsa-stream-control.c +++ b/backends/alsa/alsa-stream-control.c @@ -291,8 +291,6 @@ alsa_stream_control_set_mute (MateMixerStreamControl *mmsc, gboolean mute) for (i = 0; i < control->priv->data.channels; i++) control->priv->data.m[i] = mute; - - _mate_mixer_stream_control_set_mute (mmsc, mute); } return TRUE; } -- cgit v1.2.1 From b6955dd78085d642f10325ec6d929e7421224d74 Mon Sep 17 00:00:00 2001 From: Michal Ratajsky Date: Thu, 21 Aug 2014 17:11:44 +0200 Subject: Fix memory problems in ALSA and MateMixerToggle and rename toggle option properties --- backends/alsa/alsa-backend.c | 10 ++++++---- backends/alsa/alsa-device.c | 2 +- backends/alsa/alsa-toggle.c | 4 ++-- 3 files changed, 9 insertions(+), 7 deletions(-) (limited to 'backends/alsa') diff --git a/backends/alsa/alsa-backend.c b/backends/alsa/alsa-backend.c index 6bac691..2493d45 100644 --- a/backends/alsa/alsa-backend.c +++ b/backends/alsa/alsa-backend.c @@ -363,10 +363,12 @@ read_device (AlsaBackend *alsa, const gchar *card) static void add_device (AlsaBackend *alsa, AlsaDevice *device) { - alsa->priv->devices = g_list_insert_sorted_with_data (alsa->priv->devices, - device, - (GCompareDataFunc) compare_devices, - NULL); + /* Takes reference of device */ + alsa->priv->devices = + g_list_insert_sorted_with_data (alsa->priv->devices, + device, + (GCompareDataFunc) compare_devices, + NULL); /* Keep track of device identifiers */ g_hash_table_add (alsa->priv->devices_ids, g_strdup (ALSA_DEVICE_GET_ID (device))); diff --git a/backends/alsa/alsa-device.c b/backends/alsa/alsa-device.c index f7f705e..03dd7c0 100644 --- a/backends/alsa/alsa-device.c +++ b/backends/alsa/alsa-device.c @@ -230,7 +230,7 @@ alsa_device_finalize (GObject *object) close_mixer (device); - G_OBJECT_CLASS (alsa_device_parent_class)->dispose (object); + G_OBJECT_CLASS (alsa_device_parent_class)->finalize (object); } AlsaDevice * diff --git a/backends/alsa/alsa-toggle.c b/backends/alsa/alsa-toggle.c index a7958c9..c843985 100644 --- a/backends/alsa/alsa-toggle.c +++ b/backends/alsa/alsa-toggle.c @@ -92,8 +92,8 @@ alsa_toggle_new (const gchar *name, "label", label, "flags", MATE_MIXER_SWITCH_TOGGLE, "role", role, - "state-option-on", on, - "state-option-off", off, + "on-state-option", on, + "off-state-option", off, NULL); toggle->priv->type = type; -- cgit v1.2.1 From 652eb260c2574312664c35acd10893d7a6460426 Mon Sep 17 00:00:00 2001 From: Michal Ratajsky Date: Fri, 29 Aug 2014 00:01:41 +0200 Subject: Include backend flags in backend info and add a flag indicating stored controls support --- backends/alsa/alsa-backend.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'backends/alsa') diff --git a/backends/alsa/alsa-backend.c b/backends/alsa/alsa-backend.c index 2493d45..0b7895e 100644 --- a/backends/alsa/alsa-backend.c +++ b/backends/alsa/alsa-backend.c @@ -28,6 +28,7 @@ #define BACKEND_NAME "ALSA" #define BACKEND_PRIORITY 20 +#define BACKEND_FLAGS MATE_MIXER_BACKEND_NO_FLAGS #define ALSA_DEVICE_GET_ID(d) \ (g_object_get_data (G_OBJECT (d), "__matemixer_alsa_device_id")) @@ -97,10 +98,11 @@ backend_module_init (GTypeModule *module) { alsa_backend_register_type (module); - info.name = BACKEND_NAME; - info.priority = BACKEND_PRIORITY; - info.g_type = ALSA_TYPE_BACKEND; - info.backend_type = MATE_MIXER_BACKEND_ALSA; + info.name = BACKEND_NAME; + info.priority = BACKEND_PRIORITY; + info.g_type = ALSA_TYPE_BACKEND; + info.backend_flags = BACKEND_FLAGS; + info.backend_type = MATE_MIXER_BACKEND_ALSA; } const MateMixerBackendInfo *backend_module_get_info (void) -- cgit v1.2.1