Created
October 27, 2009 00:59
-
-
Save rgo/219198 to your computer and use it in GitHub Desktop.
Slackware: upgrade alsa
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Instructions and dependencies: | |
# You must run it with admin privileges | |
# You need src2pkg to generate packages | |
# Working directory is where src and packages will be stored | |
# | |
# Based on scripts read in http://aldeby.org/blog/index.php/how-to-update-alsa-to-latest-version-easily.html | |
# Credits: | |
# 2007 Bob Nelson admin@stchman.com | |
# 2009 Aldeby http://aldeby.org/blog: various tweaks in order to prompt you with a choice among few most common modes to try out | |
# 2009 Rafael García - http://rafagarcia.net : Adapted to generate Slackware packages as root. Added configure help, remove menu and generate tgz packages | |
WORKING_DIR=/usr/local/src/alsa-1.0.21/ | |
# Ensure root | |
if [[ $EUID -ne 0 ]]; then | |
echo "This script must be run as root" 1>&2 | |
exit 1 | |
fi | |
# Working directory | |
mkdir -p $WORKING_DIR | |
cd $WORKING_DIR | |
# Download sources | |
wget ftp://ftp.alsa-project.org/pub/driver/alsa-driver-1.0.21.tar.bz2 | |
wget ftp://ftp.alsa-project.org/pub/firmware/alsa-firmware-1.0.20.tar.bz2 | |
wget ftp://ftp.alsa-project.org/pub/lib/alsa-lib-1.0.21a.tar.bz2 | |
wget ftp://ftp.alsa-project.org/pub/utils/alsa-utils-1.0.21.tar.bz2 | |
# Generate packages | |
src2pkg -e='--with-cards=hda-intel --with-kernel=/usr/src/linux' alsa-driver-1.0.21.tar.bz2 | |
src2pkg alsa-lib-1.0.21a.tar.bz2 | |
src2pkg alsa-utils-1.0.21.tar.bz2 | |
src2pkg alsa-firmware-1.0.20.tar.bz2 | |
mkdir -p packages | |
cp /tmp/alsa*tgz packages | |
upgradepkg --install-new packages/alsa*tgz | |
# Remember modify /etc/modprobe.d/sound | |
cat <<EOF | |
Remember to configure your mode which best fits you /etc/modprobe.d/sound | |
To know your model: | |
$ cat /proc/asound/card0/codec#* | grep Codec | |
A model list: http://www.kernel.org/doc/Documentation/sound/alsa/HD-Audio-Models.txt | |
== Example | |
options snd slots=snd-hda-intel | |
options snd-hda-intel model=dell-m4-1 | |
alias snd-card-0 snd-hda-intel | |
alias sound-slot-0 snd-hda-intel | |
== | |
EOF | |
# Reboot the computer | |
echo "Save your work and REBOOT your computer to make changes effective!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment