summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2014-09-30 15:31:44 +0200
committerroot2014-09-30 15:31:44 +0200
commit9603fef6474ba118a427ecec58a84676e50abc9b (patch)
tree27e40b8efa4695024152bab607c674af8a3b93dc
parent[alsa] Disable alsa config generation - breaks vmware mic input (diff)
downloadtm-scripts-9603fef6474ba118a427ecec58a84676e50abc9b.tar.gz
tm-scripts-9603fef6474ba118a427ecec58a84676e50abc9b.tar.xz
tm-scripts-9603fef6474ba118a427ecec58a84676e50abc9b.zip
[vmchooser] Fix microphone input even more
-rwxr-xr-xremote/modules/vmchooser/data/opt/openslx/scripts/vmchooser-run_virt41
-rwxr-xr-xremote/modules/vmchooser2/data/opt/openslx/scripts/vmchooser-run_virt41
2 files changed, 58 insertions, 24 deletions
diff --git a/remote/modules/vmchooser/data/opt/openslx/scripts/vmchooser-run_virt b/remote/modules/vmchooser/data/opt/openslx/scripts/vmchooser-run_virt
index 231ef6fe..5c697d6c 100755
--- a/remote/modules/vmchooser/data/opt/openslx/scripts/vmchooser-run_virt
+++ b/remote/modules/vmchooser/data/opt/openslx/scripts/vmchooser-run_virt
@@ -435,19 +435,36 @@ writelog "\tVM Hostname:\t\t$hostname"
if lspci -n | grep -E -i '8086:1e20( |$)'; then
VOL="100%" # bwPC 4: Speaker too quiet :-(
else
- VOL="80%"
+ VOL="85%"
fi
-# Adjust sound volume
-amixer -q sset Master "$VOL" unmute 2>/dev/null
-amixer -q sset PCM "$VOL" unmute 2>/dev/null
-amixer -q sset CD "$VOL" unmute 2>/dev/null
-amixer -q sset Headphone "$VOL" unmute 2>/dev/null
-amixer -q sset Front "$VOL" unmute 2>/dev/null
-amixer -q sset Speaker "$VOL" unmute 2>/dev/null # annoying built-in speaker
-amixer -q sset 'Front Mic' "$VOL" unmute 2>/dev/null # to be checked if Mic is actually activated
-amixer -q sset 'Rear Mic' "$VOL" unmute 2>/dev/null # =""=
-amixer -q sset 'Capture' "$VOL" cap unmute 2>/dev/null # to be checked if Mic is actually activated
-amixer -q -c pcsp sset Master "0%" mute 2>/dev/null # fix random static noise when starting vmplayer when module snd_pcsp (not pcspkr) is loaded
+if true; then
+ echo "Setting up volume..."
+ # Adjust sound volume (playback)... Random mixer names we have encountered during testing
+ amixer -q sset 'Master' "$VOL" unmute
+ amixer -q sset 'PCM' "$VOL" unmute
+ amixer -q sset 'CD' "$VOL" unmute
+ amixer -q sset 'Headphone' "$VOL" unmute
+ amixer -q sset 'Front' "$VOL" unmute
+ amixer -q sset 'Speaker' "$VOL" unmute
+ # Recording. It seems that (most) devices need the volume set to 0, so you
+ # don't hear your own mic input, but should be unmuted. Also on some cards,
+ # you need to set the cap option on the mic you want to use, while other cards
+ # will just ignore that option.
+ # Plus, most cards have a Capture mixer, which needs to be set to cap too, and
+ # have its volume turned up. (There'll probably be some cards that need yet
+ # another setup, but this works for now on 4 tested cards)
+ amixer -q sset 'Rear Mic Boost' "50%" cap unmute
+ amixer -q sset 'Rear Mic' "0%" cap unmute
+ amixer -q sset 'Front Mic Boost' "50%" cap unmute
+ amixer -q sset 'Front Mic' "0%" cap unmute
+ amixer -q sset 'Mic Boost' "50%" cap unmute
+ amixer -q sset 'Mic' "0%" cap unmute
+ amixer -q sset 'Capture' "100%" cap unmute
+ amixer -q sset 'Input Source' 'Front Mic' # Let's hope nobody uses rear mic...
+ # fix random static noise when starting vmplayer when module snd_pcsp (not pcspkr) is loaded
+ amixer -q -c pcsp sset Master "0%" mute
+ echo "Done setting up volume."
+fi >> "${LOGFILE}" 2>&1
# Start printer daemon
QUEUE="STANDARD" # This has to match the queue you configured in your VM
diff --git a/remote/modules/vmchooser2/data/opt/openslx/scripts/vmchooser-run_virt b/remote/modules/vmchooser2/data/opt/openslx/scripts/vmchooser-run_virt
index 231ef6fe..5c697d6c 100755
--- a/remote/modules/vmchooser2/data/opt/openslx/scripts/vmchooser-run_virt
+++ b/remote/modules/vmchooser2/data/opt/openslx/scripts/vmchooser-run_virt
@@ -435,19 +435,36 @@ writelog "\tVM Hostname:\t\t$hostname"
if lspci -n | grep -E -i '8086:1e20( |$)'; then
VOL="100%" # bwPC 4: Speaker too quiet :-(
else
- VOL="80%"
+ VOL="85%"
fi
-# Adjust sound volume
-amixer -q sset Master "$VOL" unmute 2>/dev/null
-amixer -q sset PCM "$VOL" unmute 2>/dev/null
-amixer -q sset CD "$VOL" unmute 2>/dev/null
-amixer -q sset Headphone "$VOL" unmute 2>/dev/null
-amixer -q sset Front "$VOL" unmute 2>/dev/null
-amixer -q sset Speaker "$VOL" unmute 2>/dev/null # annoying built-in speaker
-amixer -q sset 'Front Mic' "$VOL" unmute 2>/dev/null # to be checked if Mic is actually activated
-amixer -q sset 'Rear Mic' "$VOL" unmute 2>/dev/null # =""=
-amixer -q sset 'Capture' "$VOL" cap unmute 2>/dev/null # to be checked if Mic is actually activated
-amixer -q -c pcsp sset Master "0%" mute 2>/dev/null # fix random static noise when starting vmplayer when module snd_pcsp (not pcspkr) is loaded
+if true; then
+ echo "Setting up volume..."
+ # Adjust sound volume (playback)... Random mixer names we have encountered during testing
+ amixer -q sset 'Master' "$VOL" unmute
+ amixer -q sset 'PCM' "$VOL" unmute
+ amixer -q sset 'CD' "$VOL" unmute
+ amixer -q sset 'Headphone' "$VOL" unmute
+ amixer -q sset 'Front' "$VOL" unmute
+ amixer -q sset 'Speaker' "$VOL" unmute
+ # Recording. It seems that (most) devices need the volume set to 0, so you
+ # don't hear your own mic input, but should be unmuted. Also on some cards,
+ # you need to set the cap option on the mic you want to use, while other cards
+ # will just ignore that option.
+ # Plus, most cards have a Capture mixer, which needs to be set to cap too, and
+ # have its volume turned up. (There'll probably be some cards that need yet
+ # another setup, but this works for now on 4 tested cards)
+ amixer -q sset 'Rear Mic Boost' "50%" cap unmute
+ amixer -q sset 'Rear Mic' "0%" cap unmute
+ amixer -q sset 'Front Mic Boost' "50%" cap unmute
+ amixer -q sset 'Front Mic' "0%" cap unmute
+ amixer -q sset 'Mic Boost' "50%" cap unmute
+ amixer -q sset 'Mic' "0%" cap unmute
+ amixer -q sset 'Capture' "100%" cap unmute
+ amixer -q sset 'Input Source' 'Front Mic' # Let's hope nobody uses rear mic...
+ # fix random static noise when starting vmplayer when module snd_pcsp (not pcspkr) is loaded
+ amixer -q -c pcsp sset Master "0%" mute
+ echo "Done setting up volume."
+fi >> "${LOGFILE}" 2>&1
# Start printer daemon
QUEUE="STANDARD" # This has to match the queue you configured in your VM