[Pkg-sugar-commit] [sugar-record-activity] 05/09: Set Analog Mic Boost control on XO-{1.75, 4}
Jonas Smedegaard
dr at jones.dk
Mon Sep 14 19:38:33 UTC 2015
This is an automated email from the git hooks/post-receive script.
js pushed a commit to branch master
in repository sugar-record-activity.
commit 1fc10e839ffcf79fba258773bba0399c552b900a
Author: James Cameron <quozl at laptop.org>
Date: Thu Aug 27 13:12:38 2015 +1000
Set Analog Mic Boost control on XO-{1.75,4}
Set controls for best voice recording in quiet environment.
Audio recording level on XO-1.75 and XO-4 is set by two ALSA mixer
controls, Capture and Analog Mic Boost.
Capture is exposed on the Sugar Frame as Microphone. In noisy
places learners can reduce the Capture control to fix clipping.
Analog Mic Boost is not exposed in Sugar, is set to zero by Measure
activity quit, and persists at zero over reboots thanks to alsactl.
(Record might not capture any sound, or might only capture tapping on
the microphone. But this was not easily reproduced. The key discovery
is that testers often test alphabetically, and with the Measure activity
run first the Record activity will fail to capture sound.)
On XO-1.75 requires a new kernel. On XO-4 works immediately.
http://dev.laptop.org/ticket/12867
Signed-off-by: James Cameron <quozl at laptop.org>
---
record.py | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/record.py b/record.py
index e25010e..7b05879 100644
--- a/record.py
+++ b/record.py
@@ -20,6 +20,7 @@
#THE SOFTWARE.
import os
+import subprocess
import logging
import shutil
from gettext import gettext as _
@@ -102,6 +103,15 @@ class Record(activity.Activity):
else:
self.model.change_mode(constants.MODE_AUDIO)
+ # Restore critical hidden mixer controls to default
+ model = hw.get_xo_version()
+ if model == 1.75 or model == 4:
+ args = ['amixer', 'set', 'Analog Mic Boost', "100%"]
+ try:
+ subprocess.check_output(args)
+ except:
+ pass
+
def read_file(self, path):
self.model.read_file(path)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-sugar/sugar-record-activity.git
More information about the pkg-sugar-commit
mailing list