aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Barksdale <amatus@amatus.name>2014-10-27 10:22:27 -0500
committerDavid Barksdale <amatus@amatus.name>2014-10-27 10:22:27 -0500
commit6877d7f60404ed63978b6725c85760437c24b7f8 (patch)
treec874950322a654248410befa5151106eb0d81555
parent744ca80687aea3a9f0160a87d26f175a1c28a288 (diff)
Add GoBook XR-1 sound fix
-rw-r--r--blacklist-gobook-xr1-sound.conf3
-rwxr-xr-xgobook-xr1-sound34
-rwxr-xr-xgobook-xr1.sh15
3 files changed, 48 insertions, 4 deletions
diff --git a/blacklist-gobook-xr1-sound.conf b/blacklist-gobook-xr1-sound.conf
new file mode 100644
index 0000000..172fab9
--- /dev/null
+++ b/blacklist-gobook-xr1-sound.conf
@@ -0,0 +1,3 @@
+blacklist snd_hda_codec
+blacklist snd_hda_codec_si3054
+blacklist snd_hda_codec_realtek
diff --git a/gobook-xr1-sound b/gobook-xr1-sound
new file mode 100755
index 0000000..df8e63d
--- /dev/null
+++ b/gobook-xr1-sound
@@ -0,0 +1,34 @@
+#! /bin/sh
+### BEGIN INIT INFO
+# Provides: gobook-xr1-sound
+# Required-Start: $syslog $remote_fs
+# Required-Stop: $syslog $remote_fs
+# Should-Start:
+# Should-Stop:
+# X-Start-Before:
+# X-Stop-After:
+# Default-Start: 2 3 4 5
+# Default-Stop: 1
+# Short-Description: GoBook XR-1 Sound
+# Description: Does a little dance with sound modules
+### END INIT INFO
+
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+SCRIPTNAME=gobook-xr1-touchscreen
+
+case "$1" in
+ start)
+ modprobe snd_hda_codec_realtek
+ rmmod snd_hda_intel
+ modprobe snd_hda_intel
+ rmmod snd_hda_intel
+ rmmod snd_hda_codec_realtek
+ modprobe snd_hda_intel
+ ;;
+ *)
+ echo "Usage: $SCRIPTNAME {start}" >&2
+ exit 3
+ ;;
+esac
+
+exit 0
diff --git a/gobook-xr1.sh b/gobook-xr1.sh
index cacefce..d7cbe37 100755
--- a/gobook-xr1.sh
+++ b/gobook-xr1.sh
@@ -5,7 +5,14 @@ sudo install -m 755 gobook-xr1-touchscreen /etc/init.d/
sudo update-rc.d gobook-xr1-touchscreen defaults
# Calibrate touchscreen
-sudo apt-get install -y xinput-calibrator
-xinput_calibrator | sed -n -e '/Section/,/EndSection/p' > 99-calibration.conf
-sudo install -m 644 99-calibration.conf /usr/share/X11/xorg.conf.d/
-rm 99-calibration.conf
+if ! test -e /usr/share/X11/xorg.conf.d/99-calibration.conf; then
+ sudo apt-get install -y xinput-calibrator
+ xinput_calibrator | sed -n -e '/Section/,/EndSection/p' > 99-calibration.conf
+ sudo install -m 644 99-calibration.conf /usr/share/X11/xorg.conf.d/
+ rm 99-calibration.conf
+fi
+
+# Fix sound
+sudo install -m 644 blacklist-gobook-xr1-sound.conf /etc/modprobe.d/
+sudo install -m 755 gobook-xr1-sound /etc/init.d/
+sudo update-rc.d gobook-xr1-sound defaults