mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 05:36:47 +00:00
various fixes to alsa
This commit is contained in:
parent
df29a33e1c
commit
990902258e
@ -12,6 +12,7 @@ cd $PKG_BUILD
|
|||||||
--build=$HOST_NAME \
|
--build=$HOST_NAME \
|
||||||
--prefix=/usr \
|
--prefix=/usr \
|
||||||
--sysconfdir=/etc \
|
--sysconfdir=/etc \
|
||||||
|
--with-plugindir=/usr/lib \
|
||||||
--localstatedir=/var \
|
--localstatedir=/var \
|
||||||
--disable-static \
|
--disable-static \
|
||||||
--enable-shared \
|
--enable-shared \
|
||||||
|
@ -4,9 +4,10 @@
|
|||||||
|
|
||||||
mkdir -p $INSTALL/usr/lib
|
mkdir -p $INSTALL/usr/lib
|
||||||
cp -PR $PKG_BUILD/src/.libs/libasound.so* $INSTALL/usr/lib
|
cp -PR $PKG_BUILD/src/.libs/libasound.so* $INSTALL/usr/lib
|
||||||
|
cp -PR $PKG_BUILD/modules/mixer/simple/.libs/*.so $INSTALL/usr/lib
|
||||||
|
|
||||||
mkdir -p $INSTALL/usr/lib/alsa-lib/smixer
|
#mkdir -p $INSTALL/usr/lib/alsa-lib/smixer
|
||||||
cp -PR $PKG_BUILD/modules/mixer/simple/.libs/*.so $INSTALL/usr/lib/alsa-lib/smixer
|
#cp -PR $PKG_BUILD/modules/mixer/simple/.libs/*.so $INSTALL/usr/lib/alsa-lib/smixer
|
||||||
|
|
||||||
mkdir -p $INSTALL/usr/share/alsa
|
mkdir -p $INSTALL/usr/share/alsa
|
||||||
sed 's%.*~/\.asoundrc.*%%' $PKG_BUILD/src/conf/alsa.conf > $INSTALL/usr/share/alsa/alsa.conf
|
sed 's%.*~/\.asoundrc.*%%' $PKG_BUILD/src/conf/alsa.conf > $INSTALL/usr/share/alsa/alsa.conf
|
||||||
|
@ -4,8 +4,13 @@
|
|||||||
#
|
#
|
||||||
# runlevels: geexbox, debug, configure
|
# runlevels: geexbox, debug, configure
|
||||||
|
|
||||||
|
. /etc/funcs
|
||||||
|
|
||||||
echo "### Setting up sound card ###"
|
echo "### Setting up sound card ###"
|
||||||
|
|
||||||
|
make_persistent file /etc/audio /var/data/config/audio
|
||||||
|
make_persistent file /etc/asound.conf /var/data/config/asound.conf
|
||||||
|
|
||||||
# include audio configuration file
|
# include audio configuration file
|
||||||
. /etc/audio
|
. /etc/audio
|
||||||
|
|
||||||
@ -21,16 +26,16 @@ mixer() {
|
|||||||
mixer 'Channel Mode' "${CHANNELS}ch"
|
mixer 'Channel Mode' "${CHANNELS}ch"
|
||||||
|
|
||||||
# set common mixer params
|
# set common mixer params
|
||||||
mixer Master 100%
|
mixer Master 90%
|
||||||
mixer Front 100%
|
mixer Front 90%
|
||||||
mixer PCM 100%
|
mixer PCM 90%
|
||||||
mixer Synth 100%
|
mixer Synth 90%
|
||||||
# mute CD, since using digital audio instead
|
# mute CD, since using digital audio instead
|
||||||
mixer CD 0% mute
|
mixer CD 0% mute
|
||||||
# Only unmute Line and Aux if they are possibly used.
|
# Only unmute Line and Aux if they are possibly used.
|
||||||
if [ -e /var/use_dxr3 -o -e /var/tvcard -o -e /var/dvbcard -o -e /var/digimatrix ]; then
|
if [ -e /var/use_dxr3 -o -e /var/tvcard -o -e /var/dvbcard -o -e /var/digimatrix ]; then
|
||||||
mixer Line 100%
|
mixer Line 90%
|
||||||
mixer Aux 100%
|
mixer Aux 90%
|
||||||
else
|
else
|
||||||
mixer Line 0% mute
|
mixer Line 0% mute
|
||||||
mixer Aux 0% mute
|
mixer Aux 0% mute
|
||||||
@ -38,78 +43,78 @@ fi
|
|||||||
# mute mic
|
# mute mic
|
||||||
mixer Mic 0% mute
|
mixer Mic 0% mute
|
||||||
# ESS 1969 chipset has 2 PCM channels
|
# ESS 1969 chipset has 2 PCM channels
|
||||||
mixer PCM,1 100%
|
mixer PCM,1 90%
|
||||||
# Trident/YMFPCI/emu10k1
|
# Trident/YMFPCI/emu10k1
|
||||||
mixer Wave 100%
|
mixer Wave 100%
|
||||||
mixer Music 100%
|
mixer Music 100%
|
||||||
mixer AC97 100%
|
mixer AC97 100%
|
||||||
mixer Surround 100%
|
mixer Surround 90%
|
||||||
mixer 'Surround Digital' 100%
|
mixer 'Surround Digital' 90%
|
||||||
mixer 'Wave Surround' 100%
|
mixer 'Wave Surround' 90%
|
||||||
if [ "$CHANNELS" = 6 ]; then
|
if [ "$CHANNELS" = 6 ]; then
|
||||||
mixer 'Duplicate Front' 0% off
|
mixer 'Duplicate Front' 0% off
|
||||||
else
|
else
|
||||||
mixer 'Duplicate Front' 100%
|
mixer 'Duplicate Front' 90%
|
||||||
fi
|
fi
|
||||||
mixer 'Sigmatel 4-Speaker Stereo' 100%
|
mixer 'Sigmatel 4-Speaker Stereo' 90%
|
||||||
# CS4237B chipset:
|
# CS4237B chipset:
|
||||||
mixer 'Master Digital' 100%
|
mixer 'Master Digital' 90%
|
||||||
# DRC
|
# DRC
|
||||||
mixer 'Dynamic Range Compression' 100%
|
mixer 'Dynamic Range Compression' 90%
|
||||||
# Envy24 chips with analog outs
|
# Envy24 chips with analog outs
|
||||||
mixer DAC 100%
|
mixer DAC 90%
|
||||||
mixer DAC,0 100%
|
mixer DAC,0 90%
|
||||||
mixer DAC,1 100%
|
mixer DAC,1 90%
|
||||||
# some notebooks use headphone instead of master
|
# some notebooks use headphone instead of master
|
||||||
mixer Headphone 100%
|
mixer Headphone 90%
|
||||||
mixer 'Internal Speaker' 75%
|
mixer 'Internal Speaker' 75%
|
||||||
mixer Playback 100%
|
mixer Playback 100%
|
||||||
|
|
||||||
mixer Center 100%
|
mixer Center 90%
|
||||||
mixer LFE 90%
|
mixer LFE 90%
|
||||||
mixer Center/LFE 90%
|
mixer Center/LFE 90%
|
||||||
|
|
||||||
# Required for newer Via hardware
|
# Required for newer Via hardware
|
||||||
mixer 'VIA DXS,0' 100%
|
mixer 'VIA DXS,0' 80%
|
||||||
mixer 'VIA DXS,1' 100%
|
mixer 'VIA DXS,1' 80%
|
||||||
mixer 'VIA DXS,2' 100%
|
mixer 'VIA DXS,2' 80%
|
||||||
mixer 'VIA DXS,3' 100%
|
mixer 'VIA DXS,3' 80%
|
||||||
|
|
||||||
# Intel P4P800-MX (Ubuntu bug #5813)
|
# Intel P4P800-MX (Ubuntu bug #5813)
|
||||||
mixer 'Master Playback Switch' on
|
mixer 'Master Playback Switch' on
|
||||||
|
|
||||||
# Required at least for Via 823x hardware on DFI K8M800-MLVF Mobo
|
# Required at least for Via 823x hardware on DFI K8M800-MLVF Mobo
|
||||||
mixer 'IEC958 Capture Monitor' 100%
|
mixer 'IEC958 Capture Monitor' 0% off
|
||||||
|
|
||||||
# Required on some notebooks with ICH4:
|
# Required on some notebooks with ICH4:
|
||||||
mixer 'Headphone Jack Sense' 100%
|
mixer 'Headphone Jack Sense' 0% off
|
||||||
mixer 'Line Jack Sense' 100%
|
mixer 'Line Jack Sense' 0% off
|
||||||
|
|
||||||
# Required on some Vaio notebooks (B3XP):
|
# Required on some Vaio notebooks (B3XP):
|
||||||
mixer 'External Amplifier' 100%
|
mixer 'External Amplifier' 0% mute
|
||||||
|
|
||||||
# Required for either Analog or Digital output
|
# Required for either Analog or Digital output
|
||||||
mixer 'SB Live Analog/Digital Output Jack' $SBL_AUDIGY
|
mixer 'SB Live Analog/Digital Output Jack' $SBL_AUDIGY
|
||||||
mixer 'Audigy Analog/Digital Output Jack' $SBL_AUDIGY
|
mixer 'Audigy Analog/Digital Output Jack' $SBL_AUDIGY
|
||||||
|
|
||||||
# set SPDIF mixer params
|
# set digital output mixer params
|
||||||
if [ "$SOUNDCARD_MODE" = SPDIF ]; then
|
if [ "$SOUNDCARD_MODE" = digital -o "$SOUNDCARD_MODE" = hdmi ]; then
|
||||||
mixer 'IEC958' 100% on
|
mixer 'IEC958' 90% on
|
||||||
mixer 'IEC958 Output' 100%
|
mixer 'IEC958 Output' 90%
|
||||||
mixer 'IEC958 Playback AC97-SPSA' $AC97_SPSA
|
mixer 'IEC958 Playback AC97-SPSA' $AC97_SPSA
|
||||||
mixer 'IEC958 Coaxial' 100%
|
mixer 'IEC958 Coaxial' 90%
|
||||||
mixer 'IEC958 LiveDrive' 100%
|
mixer 'IEC958 LiveDrive' 90%
|
||||||
mixer 'IEC958 Optical Raw' 100%
|
mixer 'IEC958 Optical Raw' 90%
|
||||||
mixer 'SPDIF Out' 100%
|
mixer 'SPDIF Out' 90%
|
||||||
mixer 'SPDIF Front' 100%
|
mixer 'SPDIF Front' 90%
|
||||||
mixer 'SPDIF Rear' 100%
|
mixer 'SPDIF Rear' 90%
|
||||||
mixer 'SPDIF Center/LFE' 100%
|
mixer 'SPDIF Center/LFE' 90%
|
||||||
mixer 'Master Digital' 100%
|
mixer 'Master Digital' 80%
|
||||||
else
|
else
|
||||||
mixer 'SPDIF Out' 100%
|
mixer 'SPDIF Out' 0% off
|
||||||
mixer 'Analog Front' 100%
|
mixer 'Analog Front' 90%
|
||||||
mixer 'Analog Rear' 100%
|
mixer 'Analog Rear' 90%
|
||||||
mixer 'Analog Center/LFE' 100%
|
mixer 'Analog Center/LFE' 90%
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
@ -3,16 +3,17 @@
|
|||||||
# Soundcard's ID (0 for first card, 1 for second, ...)
|
# Soundcard's ID (0 for first card, 1 for second, ...)
|
||||||
ALSA_CARD="0"
|
ALSA_CARD="0"
|
||||||
|
|
||||||
# Output mode (SPDIF or analog)
|
# Output mode ( analog/digital/hdmi )
|
||||||
|
# digital is used for SPDIF/IEC958 output
|
||||||
SOUNDCARD_MODE="analog"
|
SOUNDCARD_MODE="analog"
|
||||||
|
|
||||||
# SPDIF passthrough mode (none, ac3, dts or ac3dts)
|
# passthrough mode for digital/hdmi outputs (none, ac3, dts or ac3dts)
|
||||||
# (Note: in analog mode this option is ignored)
|
# (Note: in analog mode this option is ignored)
|
||||||
# none : software audio decoding for all streams
|
# none : software audio decoding for all streams
|
||||||
# ac3 : enable hardware passthrough for AC-3 streams only
|
# ac3 : enable hardware passthrough for AC-3 streams only
|
||||||
# dts : enable hardware passthrough for DTS streams only
|
# dts : enable hardware passthrough for DTS streams only
|
||||||
# ac3dts : enable hardware passthrough for both AC-3 and DTS streams
|
# ac3dts : enable hardware passthrough for both AC-3 and DTS streams
|
||||||
SPDIF_PT_MODE="none"
|
SOUNDCARD_PT_MODE="none"
|
||||||
|
|
||||||
# IEC958 Playback AC97-SPSA Mode:
|
# IEC958 Playback AC97-SPSA Mode:
|
||||||
# 0. PCM1
|
# 0. PCM1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user