slitaz-tools rev 629

soundconf: remove tazdialog call and use setmixer script (save a few lines)
author Christophe Lincoln <pankso@slitaz.org>
date Thu Jun 16 18:59:15 2011 +0200 (2011-06-16)
parents b8be57e0e90b
children 75d3beebab35
files tinyutils/soundconf
line diff
     1.1 --- a/tinyutils/soundconf	Tue Jun 14 23:36:15 2011 +0200
     1.2 +++ b/tinyutils/soundconf	Thu Jun 16 18:59:15 2011 +0200
     1.3 @@ -271,17 +271,9 @@
     1.4  esac
     1.5  
     1.6  # cfgfile = base config file to remove/update the sound setting
     1.7 -cfgfile="/etc/modprobe.conf"
     1.8 +cfgfile="/etc/sound.conf"
     1.9  
    1.10 -# Check for dialog
    1.11 -if which tazdialog > /dev/null; then
    1.12 -    DIALOG=tazdialog
    1.13 -elif which dialog > /dev/null; then
    1.14 -    DIALOG=dialog
    1.15 -else
    1.16 -	xecho "Error, dialog or whiptail not found."
    1.17 -    exit 1
    1.18 -fi
    1.19 +DIALOG=dialog
    1.20  
    1.21  #
    1.22  # remove the previous configuration by alsaconf
    1.23 @@ -291,48 +283,10 @@
    1.24  }
    1.25  
    1.26  #
    1.27 -# set default mixer volumes
    1.28 +# set default mixer volumes with SliTaz setmixer script
    1.29  #
    1.30  set_mixers() {
    1.31 -    amixer -s -q <<EOF
    1.32 -set Master 75% unmute
    1.33 -set Master -12dB
    1.34 -set 'Master Mono' 75% unmute
    1.35 -set 'Master Mono' -12dB
    1.36 -set Front 75% unmute
    1.37 -set Front -12dB
    1.38 -set PCM 90% unmute
    1.39 -set PCM 0dB
    1.40 -mixer Synth 90% unmute
    1.41 -mixer Synth 0dB
    1.42 -mixer CD 90% unmute
    1.43 -mixer CD 0dB
    1.44 -# mute mic
    1.45 -set Mic 0% mute
    1.46 -# ESS 1969 chipset has 2 PCM channels
    1.47 -set PCM,1 90% unmute
    1.48 -set PCM,1 0dB
    1.49 -# Trident/YMFPCI/emu10k1
    1.50 -set Wave 100% unmute
    1.51 -set Music 100% unmute
    1.52 -set AC97 100% unmute
    1.53 -# CS4237B chipset:
    1.54 -set 'Master Digital' 75% unmute
    1.55 -# Envy24 chips with analog outs
    1.56 -set DAC 90% unmute
    1.57 -set DAC -12dB
    1.58 -set DAC,0 90% unmute
    1.59 -set DAC,0 -12dB
    1.60 -set DAC,1 90% unmute
    1.61 -set DAC,1 -12dB
    1.62 -# some notebooks use headphone instead of master
    1.63 -set Headphone 75% unmute
    1.64 -set Headphone -12dB
    1.65 -set Playback 100% unmute
    1.66 -# turn off digital switches
    1.67 -set "SB Live Analog/Digital Output Jack" off
    1.68 -set "Audigy Analog/Digital Output Jack" off
    1.69 -EOF
    1.70 +    setmixer
    1.71  }
    1.72  
    1.73  # FAREWELL