aboutsummaryrefslogtreecommitdiffstats
path: root/src/mixer/alsa_mixer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mixer/alsa_mixer.c')
-rw-r--r--src/mixer/alsa_mixer.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/mixer/alsa_mixer.c b/src/mixer/alsa_mixer.c
index 892cef2b4..62f501110 100644
--- a/src/mixer/alsa_mixer.c
+++ b/src/mixer/alsa_mixer.c
@@ -30,8 +30,9 @@ struct alsa_mixer {
/** the base mixer class */
struct mixer base;
- char *device;
- char *control;
+ const char *device;
+ const char *control;
+
snd_mixer_t *handle;
snd_mixer_elem_t *elem;
long volume_min;
@@ -46,8 +47,8 @@ alsa_mixer_init(const struct config_param *param)
mixer_init(&am->base, &alsa_mixer);
- am->device = config_dup_block_string(param, "mixer_device", NULL);
- am->control = config_dup_block_string(param, "mixer_control", NULL);
+ am->device = config_get_block_string(param, "mixer_device", NULL);
+ am->control = config_get_block_string(param, "mixer_control", NULL);
am->handle = NULL;
am->elem = NULL;
@@ -63,8 +64,6 @@ alsa_mixer_finish(struct mixer *data)
{
struct alsa_mixer *am = (struct alsa_mixer *)data;
- g_free(am->device);
- g_free(am->control);
g_free(am);
}