From 460ff35c3952eefbf8d89242d5019733344ca6a7 Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Thu, 14 Aug 2008 17:51:46 +0200 Subject: [PATCH] alsactl init - fixed enumeration string setting, update Lenovo T61 config (dB) Signed-off-by: Jaroslav Kysela --- alsactl/init/hda | 4 ++-- alsactl/init_parse.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/alsactl/init/hda b/alsactl/init/hda index b4ec2ea..43dfec2 100644 --- a/alsactl/init/hda +++ b/alsactl/init/hda @@ -25,10 +25,10 @@ LABEL="Lenovo T61" # playback CTL{reset}="mixer" CTL{name}="Headphone Playback Switch", CTL{value}="on,on" -CTL{name}="PCM Playback Volume", CTL{value}="30,30" +CTL{name}="PCM Playback Volume", CTL{value}="-13.5dB,-13.5dB" # capture CTL{name}="Input Source", CTL{value}="Internal Mic" CTL{name}="Internal Mic Boost", CTL{value}="1" -CTL{name}="Capture Volume", CTL{value}="45,45" +CTL{name}="Capture Volume", CTL{value}="9dB,9dB" CTL{name}="Capture Switch", CTL{value}="on,on" RESULT="true", EXIT="return" diff --git a/alsactl/init_parse.c b/alsactl/init_parse.c index c4c757b..08af01c 100644 --- a/alsactl/init_parse.c +++ b/alsactl/init_parse.c @@ -423,7 +423,7 @@ static int set_ctl_value(struct space *space, const char *value) remove_trailing_chars((char *)value, ' '); items = snd_ctl_elem_info_get_items(space->ctl_info); for (idx2 = 0; idx2 < items; idx2++) { - snd_ctl_elem_info_set_item(space->ctl_info, idx); + snd_ctl_elem_info_set_item(space->ctl_info, idx2); elem = snd_hctl_find_elem(space->ctl_handle, space->ctl_id); if (elem == NULL) return -ENOENT;