aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorlcapriotti <lcapriotti@svn>2010-09-22 14:09:01 +0000
committerlcapriotti <lcapriotti@svn>2010-09-22 14:09:01 +0000
commitbf034dce58f5e0719e2485625849bb079428c21d (patch)
treef5eefa0825fd7bf49575c7691ce69dc443c46a61 /tools
parent8902140045f97364571331e27c17dff28aec652a (diff)
related to ticket #9157, it should mitigates the issue
git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@34070 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
Diffstat (limited to 'tools')
-rwxr-xr-xtools/XBMCLive/setAlsaVolumes17
1 files changed, 10 insertions, 7 deletions
diff --git a/tools/XBMCLive/setAlsaVolumes b/tools/XBMCLive/setAlsaVolumes
index 83fa275fdf..1b18402ad8 100755
--- a/tools/XBMCLive/setAlsaVolumes
+++ b/tools/XBMCLive/setAlsaVolumes
@@ -23,7 +23,7 @@
import sys, subprocess
-gVolumeLevel = "100"
+gVolumeLevel = "90"
def runSilent(aCmdline):
process = subprocess.Popen(aCmdline, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE)
@@ -38,14 +38,17 @@ if __name__ == '__main__':
mixerList = runSilent("amixer scontrols")
- arMixers = mixerList.split('\n')
+ arMixers = mixerList.split('\n')
for aMixer in arMixers:
nameStart = aMixer.find("'")
if nameStart>0:
# print "Mixer name=" + aMixer[nameStart:]
- output = runSilent("amixer sget " + aMixer[nameStart:])
- if output.find("pvolume") > 0:
- output = runSilent("amixer sset " + aMixer[nameStart:] + " " + gVolumeLevel + "% unmute")
- if output.find("pswitch") > 0:
- output = runSilent("amixer sset " + aMixer[nameStart:] + " unmute")
+ if "Mic" in aMixer[nameStart:]:
+ output = runSilent("amixer sset " + aMixer[nameStart:] + " mute")
+ else:
+ output = runSilent("amixer sget " + aMixer[nameStart:])
+ if output.find("pvolume") > 0:
+ output = runSilent("amixer sset " + aMixer[nameStart:] + " " + gVolumeLevel + "% unmute")
+ if output.find("pswitch") > 0:
+ output = runSilent("amixer sset " + aMixer[nameStart:] + " unmute")
runSilent("amixer sset Capture nocap")