From ec8d8f8c8895de4bf1be389a45fe0fe3af57ca37 Mon Sep 17 00:00:00 2001 From: kyak Date: Fri, 17 Jun 2011 12:04:41 +0400 Subject: [PATCH] Store/restore alsa settings correctly. Update asound.state to enable microphone by default. --- nanonote-files/script-files/etc/asound.state | 80 +++++++++++-------- .../script-files/etc/init.d/ben-nanonote | 4 +- 2 files changed, 50 insertions(+), 34 deletions(-) diff --git a/nanonote-files/script-files/etc/asound.state b/nanonote-files/script-files/etc/asound.state index f727b09..ae86005 100644 --- a/nanonote-files/script-files/etc/asound.state +++ b/nanonote-files/script-files/etc/asound.state @@ -1,69 +1,85 @@ state.LB60 { control.1 { - comment.access 'read write' - comment.type INTEGER - comment.count 1 - comment.range '0 - 3' iface MIXER name 'Master Playback Volume' value 2 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 3' + } } control.2 { - comment.access 'read write' - comment.type INTEGER - comment.count 1 - comment.range '0 - 31' iface MIXER - name 'Capture Volume' - value 23 + name 'Master Capture Volume' + value 21 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 31' + } } control.3 { - comment.access 'read write' - comment.type BOOLEAN - comment.count 1 iface MIXER name 'Master Playback Switch' value true + comment { + access 'read write' + type BOOLEAN + count 1 + } } control.4 { - comment.access 'read write' - comment.type INTEGER - comment.count 1 - comment.range '0 - 3' iface MIXER name 'Mic Capture Volume' - value 0 + value 2 + comment { + access 'read write' + type INTEGER + count 1 + range '0 - 3' + } } control.5 { - comment.access 'read write' - comment.type BOOLEAN - comment.count 1 iface MIXER name 'Line Capture Switch' - value false + value true + comment { + access 'read write' + type BOOLEAN + count 1 + } } control.6 { - comment.access 'read write' - comment.type BOOLEAN - comment.count 1 iface MIXER name 'Mic Capture Switch' - value false + value true + comment { + access 'read write' + type BOOLEAN + count 1 + } } control.7 { - comment.access 'read write' - comment.type BOOLEAN - comment.count 1 iface MIXER name 'Output Mixer Bypass Switch' value false + comment { + access 'read write' + type BOOLEAN + count 1 + } } control.8 { - comment.access 'read write' - comment.type BOOLEAN - comment.count 1 iface MIXER name 'Output Mixer DAC Switch' value true + comment { + access 'read write' + type BOOLEAN + count 1 + } } } diff --git a/nanonote-files/script-files/etc/init.d/ben-nanonote b/nanonote-files/script-files/etc/init.d/ben-nanonote index 5b73e1c..88607c2 100755 --- a/nanonote-files/script-files/etc/init.d/ben-nanonote +++ b/nanonote-files/script-files/etc/init.d/ben-nanonote @@ -4,9 +4,9 @@ START=99 STOP=99 start() { - /usr/sbin/alsactl restore + /usr/sbin/alsactl restore -f /etc/asound.state } stop() { - /usr/sbin/alsactl store + /usr/sbin/alsactl store -f /etc/asound.state }