From: "William Hubbs" <williamh@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/livecd-tools:bl2-only commit in: /
Date: Sat, 12 Feb 2011 02:17:44 +0000 (UTC) [thread overview]
Message-ID: <e9ab68604c8b21a8c942b10ca9ce3cd683713eb5.williamH@gentoo> (raw)
commit: e9ab68604c8b21a8c942b10ca9ce3cd683713eb5
Author: William Hubbs <williamh <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 12 02:12:53 2011 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Sat Feb 12 02:15:59 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/livecd-tools.git;a=commit;h=e9ab6860
update sound and software speech handling
migrate unmute code to a separate script. Also migrate the espeakup
service to the list_services function.
---
autoconfig | 47 +++++------------------------------------------
unmute | 49 +++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 54 insertions(+), 42 deletions(-)
diff --git a/autoconfig b/autoconfig
index 06be5f1..32fff56 100755
--- a/autoconfig
+++ b/autoconfig
@@ -257,6 +257,11 @@ list_services() {
local svcs="$(check_svc ${ACPI} acpid)"
svcs="${svcs} $(check_svc ${ALSA} alsasound)"
+ svcs="${svcs} $(check_svc ${ALSA} unmute)"
+ if [ "${SPEAKUP_MODULE}" = "speakup_soft" ] && rc-service -e espeakup
+ then
+ svcs="${svcs} espeakup"
+ fi
svcs="${svcs} $(check_svc ${APM} apmd)"
svcs="${svcs} $(check_svc ${BRLTTY} brltty)"
svcs="${svcs} $(check_svc ${COLDPLUG} coldplug hotplug)"
@@ -588,48 +593,6 @@ start() {
&& einfo " ${WARN}${SOUND_FULLNAME} "
[ -n "${SOUND_DRIVER}" ] \
&& einfo " driver = ${SOUND_DRIVER}"
-
- if [ -e /proc/asound/cards ]
- then
- for i in $(cat /proc/asound/cards | awk '{print $1}' | grep ^[[:digit:]])
- do
- if [ -d /proc/asound/card$i ] && [ -x /usr/bin/amixer ]
- then
- amixer -c $i scontrols > /etc/amixer
- [ -n "$(grep Master /etc/amixer)" ] \
- && amixer -c $i -q set Master 95% unmute \
- >/dev/null 2>&1
- [ -n "$(grep Front /etc/amixer)" ] \
- && amixer -c $i -q set Front 95% unmute \
- >/dev/null 2>&1
- [ -n "$(grep HDMI /etc/amixer)" ] \
- && amixer -c $i -q set HDMI 95% unmute \
- >/dev/null 2>&1
- [ -n "$(grep IEC958 /etc/amixer)" ] \
- && amixer -c $i -q set IEC958 95% unmute \
- >/dev/null 2>&1
- [ -n "$(grep PCM /etc/amixer)" ] \
- && amixer -c $i -q set PCM 95% unmute \
- >/dev/null 2>&1
- [ -n "$(grep Speaker /etc/amixer)" ] \
- && amixer -c $i -q set Speaker 95% unmute \
- >/dev/null 2>&1
- [ -n "$(grep Mic /etc/amixer)" ] \
- && amixer -c $i -q set Mic 95% mute cap \
- >/dev/null 2>&1
- [ -n "$(grep Wave /etc/amixer)" ] \
- && amixer -c $i -q set Wave 95% unmute \
- >/dev/null 2>&1
- [ -n "$(grep Capture /etc/amixer)" ] \
- && amixer -c $i -q set Capture 95% unmute cap \
- >/dev/null 2>&1
- fi
- done
-
- if [ "${SPEAKUP_MODULE}" = "speakup_soft" ]
- then
- rc-service -i espeakup start
- fi
fi
fi
else
diff --git a/unmute b/unmute
new file mode 100755
index 0000000..7e73c83
--- /dev/null
+++ b/unmute
@@ -0,0 +1,49 @@
+#!/sbin/runscript
+
+depend()
+{
+ need alsasound
+}
+
+start()
+{
+ if [ -e /proc/asound/cards ]
+ then
+ for i in $(cat /proc/asound/cards | awk '{print $1}' | grep ^[[:digit:]])
+ do
+ einfo "unmuting sound card $i"
+ if [ -d /proc/asound/card$i ] && [ -x /usr/bin/amixer ]
+ then
+ amixer -c $i scontrols > /etc/amixer
+ [ -n "$(grep Master /etc/amixer)" ] \
+ && amixer -c $i -q set Master 95% unmute \
+ >/dev/null 2>&1
+ [ -n "$(grep Front /etc/amixer)" ] \
+ && amixer -c $i -q set Front 95% unmute \
+ >/dev/null 2>&1
+ [ -n "$(grep HDMI /etc/amixer)" ] \
+ && amixer -c $i -q set HDMI 95% unmute \
+ >/dev/null 2>&1
+ [ -n "$(grep IEC958 /etc/amixer)" ] \
+ && amixer -c $i -q set IEC958 95% unmute \
+ >/dev/null 2>&1
+ [ -n "$(grep PCM /etc/amixer)" ] \
+ && amixer -c $i -q set PCM 95% unmute \
+ >/dev/null 2>&1
+ [ -n "$(grep Speaker /etc/amixer)" ] \
+ && amixer -c $i -q set Speaker 95% unmute \
+ >/dev/null 2>&1
+ [ -n "$(grep Mic /etc/amixer)" ] \
+ && amixer -c $i -q set Mic 95% mute cap \
+ >/dev/null 2>&1
+ [ -n "$(grep Wave /etc/amixer)" ] \
+ && amixer -c $i -q set Wave 95% unmute \
+ >/dev/null 2>&1
+ [ -n "$(grep Capture /etc/amixer)" ] \
+ && amixer -c $i -q set Capture 95% unmute cap \
+ >/dev/null 2>&1
+ fi
+ done
+ fi
+ return 0
+}
next reply other threads:[~2011-02-12 2:17 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-12 2:17 William Hubbs [this message]
-- strict thread matches above, loose matches on Subject: below --
2011-02-17 5:43 [gentoo-commits] proj/livecd-tools:bl2-only commit in: / William Hubbs
2011-02-13 19:27 William Hubbs
2011-02-12 22:15 William Hubbs
2011-02-12 20:04 William Hubbs
2011-02-12 7:19 William Hubbs
2011-02-12 6:32 William Hubbs
2011-02-12 5:33 William Hubbs
2011-02-12 4:33 William Hubbs
2011-02-12 0:45 William Hubbs
2011-02-11 23:45 William Hubbs
2011-02-11 22:34 William Hubbs
2011-02-11 22:27 William Hubbs
2011-02-11 22:18 William Hubbs
2011-02-11 21:14 William Hubbs
2011-02-11 21:07 Robin H. Johnson
2011-02-11 20:35 Robin H. Johnson
2011-02-11 20:21 William Hubbs
2011-02-11 17:43 William Hubbs
2011-02-11 4:22 William Hubbs
2011-02-11 0:26 William Hubbs
2011-02-11 0:06 Robin H. Johnson
2011-02-10 23:57 William Hubbs
2011-02-10 23:26 William Hubbs
2011-02-10 21:11 Robin H. Johnson
2011-02-10 21:11 Robin H. Johnson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e9ab68604c8b21a8c942b10ca9ce3cd683713eb5.williamH@gentoo \
--to=williamh@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox