Anhang: alsa setup.sh
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | #!/bin/sh # This script will recompile the ALSA drivers for Ubuntu # This procedure was gotten from # https://help.ubuntu.com/community/HdaIntelSoundHowto # # Authored by Bob Nelson admin@stchman.com # Updated by CJay554 CJay554@yahoo.com # Updated Version to 1.0.18a # # This script updated 9/6/2007 script_name="alsa_setup.sh" # To use an updated version of the drivers that may be online, just edit the version variable with the version you would like to download (NOTE: some downloads require an "a" at the end of the version number while others do not. Ex. for 1.0.18 theres alsa-driver-1.0.18a and alsa-lib-1.0.18, to edit this just add an "a" after the "version" on the first wget. version="1.0.19" # Script must run as root if [ $USER != "root" ]; then echo "You need to run this script as root." echo "Use 'sudo ./$script_name' then enter your password when prompted." exit 1 fi # Install the required tools sudo apt-get -y install build-essential ncurses-dev gettext # Install your kernel headers sudo apt-get -y install linux-headers-`uname -r` # Change to users home folder cd ~ # Get the files from www.alsa-project.org/ wget ftp://ftp.alsa-project.org/pub/driver/alsa-driver-"$version".tar.bz2 #add an "a" if need be in this line for 1.0.18 wget ftp://ftp.alsa-project.org/pub/lib/alsa-lib-"$version".tar.bz2 wget ftp://ftp.alsa-project.org/pub/utils/alsa-utils-"$version".tar.bz2 # make a new folder sudo mkdir -p /usr/src/alsa # Change to that folder cd /usr/src/alsa # Copy the downloaded files to the newly made folder sudo cp ~/alsa* . # Unpack the tar archive files sudo tar xjf alsa-driver* sudo tar xjf alsa-lib* sudo tar xjf alsa-utils* #Compile and install alsa-driver cd alsa-driver* sudo ./configure --with-cards=hda-intel --with-kernel=/usr/src/linux-headers-$(uname -r) sudo make sudo make install # Compile and install alsa-lib cd ../alsa-lib* sudo ./configure sudo make sudo make install # Compile and install alsa-utils cd ../alsa-utils* sudo ./configure sudo make sudo make install # Remove the archives as they are no longer needed rm -f ~/alsa-driver* rm -f ~/alsa-lib* rm -f ~/alsa-utils* # Add the following line to the file, replacing '3stack' with your model sudo echo -e '\n' >> /etc/modprobe.d/alsa-base sudo echo "options snd-hda-intel model=auto" >> /etc/modprobe.d/alsa-base # Reboot the computer sudo reboot |
ALSA_setup.sh