mirror of
https://github.com/archr-linux/Arch-R.git
synced 2026-03-31 14:41:55 -07:00
- switching on the second IEC958 channel on ASRock ION 330 and other to have sound over hdmi - cosmetics
102 lines
1.9 KiB
Bash
Executable File
102 lines
1.9 KiB
Bash
Executable File
#!/bin/sh
|
|
#
|
|
# setup alsa (especially the mixer config)
|
|
|
|
mixer() {
|
|
parm=${3:-on}
|
|
amixer sset "$1" "$2" $parm >/dev/null 2>&1
|
|
amixer sset "$1" $parm >/dev/null 2>&1
|
|
}
|
|
|
|
(
|
|
. /etc/profile
|
|
|
|
progress "Setting up sound card"
|
|
|
|
if [ -f $HOME/.config/sound.conf ]; then
|
|
|
|
alsactl restore -f $HOME/.config/sound.conf
|
|
|
|
else
|
|
|
|
# set common mixer params
|
|
mixer Master 100%
|
|
mixer Front 100%
|
|
mixer PCM 100%
|
|
mixer Synth 100%
|
|
|
|
# mute CD, since using digital audio instead
|
|
mixer CD 0% mute
|
|
|
|
# Only unmute Line and Aux if they are possibly used.
|
|
mixer Line 100%
|
|
mixer Aux 100%
|
|
|
|
# mute mic
|
|
mixer Mic 0% mute
|
|
|
|
# ESS 1969 chipset has 2 PCM channels
|
|
mixer PCM,1 100%
|
|
|
|
# Trident/YMFPCI/emu10k1
|
|
mixer Wave 100%
|
|
mixer Music 100%
|
|
mixer AC97 100%
|
|
mixer Surround 90%
|
|
mixer 'Surround Digital' 90%
|
|
mixer 'Wave Surround' 90%
|
|
mixer 'Duplicate Front' 90%
|
|
mixer 'Sigmatel 4-Speaker Stereo' 90%
|
|
|
|
# CS4237B chipset:
|
|
mixer 'Master Digital' 100%
|
|
|
|
# DRC
|
|
mixer 'Dynamic Range Compression' 90%
|
|
|
|
# Envy24 chips with analog outs
|
|
mixer DAC 100%
|
|
mixer DAC,0 100%
|
|
mixer DAC,1 100%
|
|
|
|
# some notebooks use headphone instead of master
|
|
mixer Headphone 100%
|
|
mixer Speaker 100%
|
|
mixer 'Internal Speaker' 0% mute
|
|
mixer Playback 100%
|
|
|
|
mixer Center 100%
|
|
mixer LFE 100%
|
|
mixer Center/LFE 100%
|
|
|
|
# Intel P4P800-MX (Ubuntu bug #5813)
|
|
mixer 'Master Playback Switch' on
|
|
|
|
# set digital output mixer params
|
|
mixer 'IEC958' 100% on
|
|
mixer 'IEC958 Output' 100%
|
|
mixer 'IEC958 Coaxial' 100%
|
|
mixer 'IEC958 LiveDrive' 100%
|
|
mixer 'IEC958 Optical Raw' 100%
|
|
mixer 'SPDIF Out' 100%
|
|
mixer 'SPDIF Front' 100%
|
|
mixer 'SPDIF Rear' 100%
|
|
mixer 'SPDIF Center/LFE' 100%
|
|
mixer 'Master Digital' 100%
|
|
|
|
mixer 'Analog Front' 100%
|
|
mixer 'Analog Rear' 100%
|
|
mixer 'Analog Center/LFE' 100%
|
|
|
|
# ASRock ION 330 (and perhaps others) has 2 IEC958 channels
|
|
mixer IEC958,1 on
|
|
|
|
# ASRock ION 330 has Master Front set to 0
|
|
mixer 'Master Front' 100%
|
|
|
|
fi
|
|
|
|
)&
|
|
|
|
exit 0
|