diff options
author | John Mylchreest <johnm@gentoo.org> | 2003-04-17 10:19:24 +0000 |
---|---|---|
committer | John Mylchreest <johnm@gentoo.org> | 2003-04-17 10:19:24 +0000 |
commit | 8ceb87e82c63ee1ceecc1888e0a5f59a3c98c344 (patch) | |
tree | 1d2fee4aa952807afe1688964f57e78ab2f4bc34 /media-sound | |
parent | License for app-emulation/frodo. (diff) | |
download | gentoo-2-8ceb87e82c63ee1ceecc1888e0a5f59a3c98c344.tar.gz gentoo-2-8ceb87e82c63ee1ceecc1888e0a5f59a3c98c344.tar.bz2 gentoo-2-8ceb87e82c63ee1ceecc1888e0a5f59a3c98c344.zip |
Updated missing script files.
Diffstat (limited to 'media-sound')
-rw-r--r-- | media-sound/emu10k1-cvs/files/README.gentoo | 103 | ||||
-rw-r--r-- | media-sound/emu10k1-cvs/files/audigy-script | 208 | ||||
-rw-r--r-- | media-sound/emu10k1-cvs/files/emu10k1-script | 55 | ||||
-rw-r--r-- | media-sound/emu10k1-cvs/files/emu10k1.conf-gentoo-header | 15 | ||||
-rw-r--r-- | media-sound/emu10k1-cvs/files/modules-emu10k1 | 2 |
5 files changed, 383 insertions, 0 deletions
diff --git a/media-sound/emu10k1-cvs/files/README.gentoo b/media-sound/emu10k1-cvs/files/README.gentoo new file mode 100644 index 000000000000..912c3d164a7e --- /dev/null +++ b/media-sound/emu10k1-cvs/files/README.gentoo @@ -0,0 +1,103 @@ +This excellent Linux Audigy FAQ is from +http://basic-rip.co.uk/tenpin/linux_audigy_faq.html, which is currently +unreadable so we're adding a cached copy from google to this file for +safe-keeping. PLEASE NOTE: the current version of the Gentoo Linux emu10k1 +auto-detects emu10k1 or audigy and also uses a fixed audigy-script as described +in this FAQ. However, the MIDI/LiveWire fix may still be needed for some users. + +<audigy-faq> + +This page details my experience in getting my Creative Soundblaster Audigy to +work properly under Linux (Gentoo Linux to be exact) using the Open Sound +System driver. + +If you use Gentoo Linux then grab this package which contains an eBuild I wrote +to do all the below (last updated 11:53 11th Oct): +emu10k1-audigy-20020927-rl.tar.gz + +The first thing to do is download the driver source archive from +http://sourceforge.net/projects/emu10k1/. + +Extract the archive in a directory you have write access to (your home +directory): tar xvjf emu10k1-v0.20a.tar.bz2 + +Enter the extracted directory: cd emu10k1-v0.20 + +Next run: + +make +make all + +Then run (as root): + +make install + +If the first make fails then you will need to edit the file config so that the +line KERNEL_SOURCE := gives the location of your kernel source code. + +Ussually this location is: /usr/src/linux + +Next run (not as root): + +make tools + +Then run (as root): + +make install-tools + +The script audigy-script and the config file emu10k1.conf are both installed to +/usr/local/etc/. + +I have written replacements for these files which fix lots of bugs with the +default ones. I would advise you to read them and then replace the existing +ones with my versions: + +audigy-script +emu10k1.conf + +audigy-script is used to configure the soundcard so that all the channels are +setup properly and so that recording works. emu10k1.conf is used to set some +options for audigy-script. + +audigy-script sets up the following volume controls: + +Vol - Front Speaker Volumes +OGain - Rear Speaker Volumes +Igain - Center/Subwoofer Volumes + +Update: 30.10.02 + +If you find that you are only getting a particular sound source (eg. CD +playback) through the 2 front channels, you can mirror them to the rear 2 +channels by adding the following line to audigy-script: + +$DSPMGR -a"Pcm:$REAR" + +Also thanks to Colin McCambridge for these 2 tips: + +1) Don't download and use the 0.9.4 tools package from sourceforge, as it +appears to contain an old version of the emu-dspmgr program that does *not* +seem to support stereo input/output routing (Both the included script and yours +were broken when using that tool, because "Pcm" was not a valid input for the +route). The included tools in the driver package work just fine + +2) For people with Audigy Platinum cards that have the Audigy Drive and +InfraRed remote, the fix that took me so long to find to enable the system MIDI +messages triggered by the infrared remote (and thus enable the remote's +functionality) is this: + +Before compiling the emu10k1 driver, you have to edit the midi.h file and +uncomment the line #define USE_AUDIGY_DRIVE_MIDI. The Audigy card has two +MIDI devices, and since the emu10k1 developers have yet to get both working at +the same time, uncommenting that line switches support from the first to the +second on Audigy Platinum cards. + +If you find any problems with my scripts or any of my instructions then please +mail me: tenpin22@blueyonder.co.uk + +There are some forums on the driver Sourceforge homepage but I haven't found +them very active. You can find them here. + +I will be updating this page when I remember what else I was going to put on +it. +</audigy-faq> diff --git a/media-sound/emu10k1-cvs/files/audigy-script b/media-sound/emu10k1-cvs/files/audigy-script new file mode 100644 index 000000000000..347412a5c080 --- /dev/null +++ b/media-sound/emu10k1-cvs/files/audigy-script @@ -0,0 +1,208 @@ +#!/bin/bash -e +# +# audigy-script -- A setup script +# +# Author: Jonathan Boler (tenpin22@blueyonder.co.uk) Originally: Daniel Bertrand +# Last Updates: +# Daniel Robbins, 07th March 2003 (drobbins@gentoo.org) +# Set tone control defaults to 50/100 (neutral) +# Jonathan Boler, 11th October 2002 +# Version: 0.31 +# +# Optional argument processing: +# This script takes arguments which can override the settings in the +# config file. The following flags are supported: +# +# -d [yes|no] use the digital output +# -t [yes|no] enable the tone controls +# -3 [yes|no] enable ac3 passthrough +# -i [yes|no] enable livedrive ir + +# Default location of programs: +BASE_PATH=/usr +DSPPATH=$BASE_PATH/share/emu10k1 +AUMIX=`which aumix` + +# To use something other than /dev/dsp +# example "-D /dev/dsp1" +DSPDEV="" + +# To use something other than /dev/dsp +# example "-M /dev/mixer1" +MIXERDEV="" + +DSPMGR=$BASE_PATH/bin/emu-dspmgr $DSPDEV $MIXERDEV + +CONFIG=$BASE_PATH/bin/emu-config $DSPDEV $MIXERDEV + +SAVEARGS="$@" + +load(){ + +# Source configurations + . /etc/emu10k1.conf + +# Pick up any command line overrides +while getopts d:t:3:i: OPT $SAVEARGS; do + case "$OPT" in + d) + USE_DIGITAL_OUTPUT=$OPTARG + ;; + t) + ENABLE_TONE_CONTROL=$OPTARG + ;; + 3) + AC3PASSTHROUGH=$OPTARG + ;; + i) + ENABLE_LIVEDRIVE_IR=$OPTARG + ;; + *) + exit 1 + ;; + esac + shift 2 +done + +# Set some variables +if [ "$USE_DIGITAL_OUTPUT" = yes ]; then + FRONT="Dig Front" + CENTER="Dig Center" + SUB="Dig LFE" + REAR="Dig rear" + CTR_SUB="Dig ctr/sub" +else + FRONT="Front" + CENTER="Center" + SUB="Sub" + REAR="Rear" + CTR_SUB="Ctr/sub" +fi + +# Functions to enable inputs and volume controls + +enable_volume(){ + INPUT=$1 + VOLUME=$2 + + $DSPMGR -p"$VOLUME Vol" -l"$INPUT" -f$DSPPATH/vol_2.bin -c"Vol_L" -m"${VOLUME}_l" -c"Vol_R" -m"${VOLUME}_r" +} + +enable_with_vol(){ + INPUT=$1 + VOLUME=$2 + + $DSPMGR -a"$INPUT:$FRONT" -a"$INPUT:$REAR" -a"$INPUT:Headphones" + $DSPMGR -p"$VOLUME Vol" -l"$INPUT" -f$DSPPATH/vol_2.bin -c"Vol_L" -m"${VOLUME}_l" -c"Vol_R" -m"${VOLUME}_r" +} + + +# Start by clearing everything and stopping the FX8010 +$DSPMGR -x -z + + +# Enable inputs (route them to the outputs) and volume controls + +# Pcm can be up to 6 channels + +$DSPMGR -a"Pcm:$FRONT" -a"Pcm Rear:$REAR" -a"Pcm ctr/sub:$CTR_SUB" -a"Pcm:Headphones" +$DSPMGR -l"pcm" -l"Pcm Rear" -l"Pcm Ctr/sub" -f$DSPPATH/vol_pcm.bin -c"Vol_L" -m"pcm_l" -c"Vol_R" -m"pcm_r" + +# Other inputs are only stereo + +if [ "$ENABLE_CD_Spdif" = yes ]; then + enable_with_vol "CD-Spdif" "dig1" +fi + +if [ "$ENABLE_OPTICAL_SPDIF" = yes ]; then + enable_with_vol "Opt. Spdif" "dig2" +fi + +if [ "$ENABLE_LINE2_MIC2" = yes ]; then + enable_with_vol "Line2/Mic2" "line2" +fi + +if [ "$ENABLE_RCA_SPDIF" = yes ]; then + enable_with_vol "RCA Spdif" "dig3" +fi + +if [ "$ENABLE_RCA_AUX" = yes ]; then + enable_with_vol "RCA Aux2" "line3" +fi + + +# Analog-in is already routed to the analog front output +# So we route it only to the remaining outputs + +$DSPMGR -a"Analog:Recording" -a"Analog:Headphones" + +if [ "$USE_DIGITAL_OUTPUT" = yes ]; then + $DSPMGR -a"Analog:Dig Front" +fi + +# Output volume controls: +enable_volume "$FRONT" "vol" +enable_volume "$REAR" "ogain" +enable_volume "$CTR_SUB" "igain" + + +if [ "$ENABLE_TONE_CONTROL" = yes ] ; then + + TONE=tone.bin + + $DSPMGR -l"$FRONT L" -f$DSPPATH/$TONE -cbass -mbass -ctreble -mtreble + # The next 3 'inherit' the oss control of the above line: + $DSPMGR -l"$FRONT R" -f$DSPPATH/$TONE + $DSPMGR -l"$REAR R" -f$DSPPATH/$TONE + $DSPMGR -l"$REAR L" -f$DSPPATH/$TONE + + if [ -x $AUMIX ] ; then + # drobbins is an audiophile and has a problem with auto-bass and + # auto-treble. So these have been changed from 68 to 50. + $AUMIX -t 50 + $AUMIX -b 50 + fi +fi + + +# Need to toggle third output into digital mode + +if [ "$USE_DIGITAL_OUTPUT" = yes ] ; then + $CONFIG -d +fi + +# See if we should enable IR + +if [ "$ENABLE_LIVEDRIVE_IR" = yes ] ; then + $CONFIG -i +fi + +# for digital output we can do ac3passthrough +# this patch must be last in the signal chain +if [ "$USE_DIGITAL_OUTPUT" = yes ]; then + if [ "$AC3PASSTHROUGH" = yes ] ; then + $DSPMGR -l"dig front" -F"$DSPPATH/ac3pass-audigy.bin" + fi +fi + + +# Restart the FX8010 +$DSPMGR -y + +} + +case "$1" in + + restore | restart) + load + # Load mixer settings + $AUMIX -f /etc/aumixrc -L >/dev/null 2>&1 || : + ;; + save | stop) + # Save mixer settings + $AUMIX -f /etc/aumixrc -S >/dev/null 2>&1 || : + ;; + *) + load +esac + diff --git a/media-sound/emu10k1-cvs/files/emu10k1-script b/media-sound/emu10k1-cvs/files/emu10k1-script new file mode 100644 index 000000000000..4aba311ec630 --- /dev/null +++ b/media-sound/emu10k1-cvs/files/emu10k1-script @@ -0,0 +1,55 @@ +#!/bin/bash + +source /sbin/functions.sh +source /etc/emu10k1.conf + +# setup regex strings to match +AUDIGY_PCI_TAG="multimedia audio controller: creative labs.*audigy" +EMU10K1_PCI_TAG="multimedia audio controller: creative labs.*emu10k1" + +# first, lets try to read the driver information in /proc/driver/ +proc="`ls /proc/driver/emu10k1/*/info 2> /dev/null | awk '{print $1}'`" +if [ -z "${CARD_TYPE}" ] && [ ! -z "${proc}" ] && [ -e ${proc} ] ; then + if [ -n "$(egrep -i '^card type.*audigy.*' ${proc})" ] ; then + CARD_TYPE="audigy" + elif [ -n "$(egrep -i '^card type.*emu10k1.*' ${proc})" ] ; then + CARD_TYPE="emu" + fi +fi + +# if that didnt work, try to detect via lspci (sys-apps/pciutils) +if [ -z "${CARD_TYPE}" ] && [ -x /sbin/lspci ] ; then +echo 1 + if [ -n "$(lspci | egrep -i "${AUDIGY_PCI_TAG}")" ] ; then + CARD_TYPE="audigy" + elif [ -n "$(lspci | egrep -i "${EMU10K1_PCI_TAG}")" ] ; then + CARD_TYPE="emu" + fi +fi + +# if that didnt work, lets try via the kernel's /proc/pci interface +if [ -z "${CARD_TYPE}" ] && [ -e /proc/pci ] ; then + if [ -n "$(egrep -i "${AUDIGY_PCI_TAG}" /proc/pci)" ] ; then + CARD_TYPE="audigy" + elif [ -n "$(egrep -i "${EMU10K1_PCI_TAG}" /proc/pci)" ] ; then + CARD_TYPE="emu" + fi +fi + +# if that failed, make the user tell us what it is +case "`echo ${CARD_TYPE} | awk '{print toupper($1)}'`" in + AUDIGY) + /usr/bin/audigy-script $@ + ;; + EMU) + /usr/bin/emu-script $@ + ;; + *) + eerror "I was unable to figure out whether you have an Audigy" + eerror "or an Emu10k1 sound card. Further more, you have not" + eerror "told me what kind of sound card you have." + eerror "Please edit /etc/emu10k1.conf and set the CARD_TYPE" + eerror "variable. You will find it at the top of the file." + exit 1 + ;; +esac diff --git a/media-sound/emu10k1-cvs/files/emu10k1.conf-gentoo-header b/media-sound/emu10k1-cvs/files/emu10k1.conf-gentoo-header new file mode 100644 index 000000000000..20710ecdf74e --- /dev/null +++ b/media-sound/emu10k1-cvs/files/emu10k1.conf-gentoo-header @@ -0,0 +1,15 @@ +# Set your card type on the next line so that loading the +# kernel module works correctly. +# +# Accepted values are 'emu' and 'audigy' +# use 'audigy' if you have an audigy based sound card, +# otherwise use 'emu' +# +# Note: you should only have to set this if: +# (1) the auto-detect script fails +# - no lspci support +# - no /proc/pci support +# - the kernel just plain doesn't like you +# (2) you like to set everything +#CARD_TYPE="set_me" + diff --git a/media-sound/emu10k1-cvs/files/modules-emu10k1 b/media-sound/emu10k1-cvs/files/modules-emu10k1 new file mode 100644 index 000000000000..d2beec537e63 --- /dev/null +++ b/media-sound/emu10k1-cvs/files/modules-emu10k1 @@ -0,0 +1,2 @@ +post-install emu10k1 /usr/bin/emu10k1-script restore +pre-remove emu10k1 /usr/bin/emu10k1-script save |