Author: alexander
Date: 2007-10-10 07:23:21 -0600 (Wed, 10 Oct 2007)
New Revision: 2101
Modified:
trunk/packages/alsa-utils/set-alsa-volume
Log:
Made "Playback" a PCM-like control (i.e., always at 74% or 0dB),
because of SB16. Made the "volume=-15dB" boot argument work.
FIXME: some USB audio cards have none of the "Master", "Front" and "Headphone"
controls. It is currently impossible to set the volume from the command line
on such cards. Help wanted from hardware owners.
Modified: trunk/packages/alsa-utils/set-alsa-volume
===================================================================
--- trunk/packages/alsa-utils/set-alsa-volume 2007-10-08 15:38:53 UTC (rev
2100)
+++ trunk/packages/alsa-utils/set-alsa-volume 2007-10-10 13:23:21 UTC (rev
2101)
@@ -26,7 +26,7 @@
# Errors are ignored, because not all controls exist on all cards
set_master_level()
{
- amixer -c "$CARD" -q set "$1" "$MASTER_VOLUME" unmute
+ amixer -c "$CARD" -q -- set "$1" "$MASTER_VOLUME" unmute
}
# PCM volume and similar controls are first set to 0dB and unmuted.
@@ -41,9 +41,9 @@
# Further errors are ignored, because not all controls exist on all cards
set_pcm_level()
{
- AMIXER_OUTPUT=` amixer -c "$CARD" -q set "$1" 0dB unmute 2>&1`
+ AMIXER_OUTPUT=` amixer -c "$CARD" -q -- set "$1" 0dB unmute 2>&1`
if [ "$AMIXER_OUTPUT" = 'amixer: Invalid command!' ] ; then
- amixer -c "$CARD" -q set "$1" "74%" unmute
+ amixer -c "$CARD" -q -- set "$1" "74%" unmute
fi
}
@@ -57,7 +57,6 @@
set_master_level "Master Mono"
set_master_level "Master Digital"
set_master_level "Headphone"
-set_master_level "Playback"
set_master_level "Front"
# Some card-specific quirks
@@ -76,6 +75,7 @@
# is 74% or, equivalently, 0dB there.
set_pcm_level "Wave"
set_pcm_level "AC97"
+set_pcm_level "Playback"
set_pcm_level "Dynamic Range Compression"
# This script should never fail due to
--
http://linuxfromscratch.org/mailman/listinfo/livecd
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page