mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-10 06:26:57 +02:00
Upgraded the alsa-utils Portage package
Upgraded media-sound/alsa-utils to version 1.0.25-r1 on amd64, arm, x86 BUG=chromium-os:29554 TEST=build_packages on stumpy, daisy, x86-generic Change-Id: I1a361b9c3cc3859c857f310dfab5c53b25f07bf3 Reviewed-on: https://gerrit.chromium.org/gerrit/20462 Reviewed-by: Mike Frysinger <vapier@chromium.org> Commit-Ready: Dylan Reid <dgreid@chromium.org> Tested-by: Dylan Reid <dgreid@chromium.org>
This commit is contained in:
parent
a980f3ea16
commit
335baffeb0
2
sdk_container/src/third_party/portage-stable/media-sound/alsa-utils/Manifest
vendored
Normal file
2
sdk_container/src/third_party/portage-stable/media-sound/alsa-utils/Manifest
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
DIST alsa-driver-1.0.25.tar.bz2 3861484 RMD160 ad8b8093bf1de78cb0dcbb1b6a82ebb18d7aad6d SHA1 ebda37d18379466ca9d843e7a80d10bb706a6b04 SHA256 d80e219fd410b5bc62f9332e5964acd575cc8a0bcda80fa41d5eebeabde0ebc3
|
||||
DIST alsa-utils-1.0.25.tar.bz2 1132780 RMD160 8b1dc5c28d1fa6d9e0a79e029b6d69530f493e1d SHA1 c02eb4a3b9649950b803628371a840fb96ed6370 SHA256 2e676a2f634bbfe279b260e10a96f617cb72ee63c5bbf6c5f96bb615705b302c
|
79
sdk_container/src/third_party/portage-stable/media-sound/alsa-utils/alsa-utils-1.0.25-r1.ebuild
vendored
Normal file
79
sdk_container/src/third_party/portage-stable/media-sound/alsa-utils/alsa-utils-1.0.25-r1.ebuild
vendored
Normal file
@ -0,0 +1,79 @@
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/media-sound/alsa-utils/alsa-utils-1.0.25-r1.ebuild,v 1.7 2012/04/01 15:13:17 armin76 Exp $
|
||||
|
||||
EAPI=4
|
||||
inherit base systemd
|
||||
|
||||
MY_P=${P/_rc/rc}
|
||||
|
||||
DESCRIPTION="Advanced Linux Sound Architecture Utils (alsactl, alsamixer, etc.)"
|
||||
HOMEPAGE="http://www.alsa-project.org/"
|
||||
SRC_URI="mirror://alsaproject/utils/${MY_P}.tar.bz2
|
||||
mirror://alsaproject/driver/alsa-driver-${PV}.tar.bz2"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0.9"
|
||||
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ~ppc ppc64 sh sparc x86"
|
||||
IUSE="doc nls minimal"
|
||||
|
||||
COMMON_DEPEND=">=sys-libs/ncurses-5.1
|
||||
dev-util/dialog
|
||||
>=media-libs/alsa-lib-1.0.25
|
||||
media-libs/libsamplerate"
|
||||
DEPEND="${COMMON_DEPEND}
|
||||
doc? ( app-text/xmlto )"
|
||||
RDEPEND="${COMMON_DEPEND}
|
||||
!minimal? ( sys-apps/pciutils )"
|
||||
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${PN}-1.0.23-modprobe.d.patch"
|
||||
"${FILESDIR}/${P}-separate-usr-var-fs.patch"
|
||||
)
|
||||
|
||||
src_configure() {
|
||||
local myconf=""
|
||||
use doc || myconf="--disable-xmlto"
|
||||
|
||||
econf ${myconf} \
|
||||
$(use_enable nls) \
|
||||
"$(systemd_with_unitdir)"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
local ALSA_UTILS_DOCS="ChangeLog README TODO
|
||||
seq/aconnect/README.aconnect
|
||||
seq/aseqnet/README.aseqnet"
|
||||
|
||||
emake DESTDIR="${D}" install || die "emake install failed"
|
||||
|
||||
dodoc ${ALSA_UTILS_DOCS} || die
|
||||
|
||||
newbin "${WORKDIR}/alsa-driver-${PV}/utils/alsa-info.sh" \
|
||||
alsa-info
|
||||
|
||||
newinitd "${FILESDIR}/alsasound.initd-r5" alsasound
|
||||
newconfd "${FILESDIR}/alsasound.confd-r4" alsasound
|
||||
insinto /etc/modprobe.d
|
||||
newins "${FILESDIR}/alsa-modules.conf-rc" alsa.conf
|
||||
|
||||
keepdir /var/lib/alsa
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
echo
|
||||
elog "To take advantage of the init script, and automate the process of"
|
||||
elog "saving and restoring sound-card mixer levels you should"
|
||||
elog "add alsasound to the boot runlevel. You can do this as"
|
||||
elog "root like so:"
|
||||
elog " # rc-update add alsasound boot"
|
||||
echo
|
||||
ewarn "The ALSA core should be built into the kernel or loaded through other"
|
||||
ewarn "means. There is no longer any modular auto(un)loading in alsa-utils."
|
||||
echo
|
||||
if use minimal; then
|
||||
ewarn "The minimal use flag disables the dependency on pciutils that"
|
||||
ewarn "is needed by alsaconf at runtime."
|
||||
fi
|
||||
}
|
38
sdk_container/src/third_party/portage-stable/media-sound/alsa-utils/files/alsa-modules.conf-rc
vendored
Normal file
38
sdk_container/src/third_party/portage-stable/media-sound/alsa-utils/files/alsa-modules.conf-rc
vendored
Normal file
@ -0,0 +1,38 @@
|
||||
# Alsa kernel modules' configuration file.
|
||||
|
||||
# ALSA portion
|
||||
alias char-major-116 snd
|
||||
# OSS/Free portion
|
||||
alias char-major-14 soundcore
|
||||
|
||||
##
|
||||
## IMPORTANT:
|
||||
## You need to customise this section for your specific sound card(s)
|
||||
## and then run `update-modules' command.
|
||||
## Read alsa-driver's INSTALL file in /usr/share/doc for more info.
|
||||
##
|
||||
## ALSA portion
|
||||
## alias snd-card-0 snd-interwave
|
||||
## alias snd-card-1 snd-ens1371
|
||||
## OSS/Free portion
|
||||
## alias sound-slot-0 snd-card-0
|
||||
## alias sound-slot-1 snd-card-1
|
||||
##
|
||||
|
||||
# OSS/Free portion - card #1
|
||||
alias sound-service-0-0 snd-mixer-oss
|
||||
alias sound-service-0-1 snd-seq-oss
|
||||
alias sound-service-0-3 snd-pcm-oss
|
||||
alias sound-service-0-8 snd-seq-oss
|
||||
alias sound-service-0-12 snd-pcm-oss
|
||||
## OSS/Free portion - card #2
|
||||
## alias sound-service-1-0 snd-mixer-oss
|
||||
## alias sound-service-1-3 snd-pcm-oss
|
||||
## alias sound-service-1-12 snd-pcm-oss
|
||||
|
||||
alias /dev/mixer snd-mixer-oss
|
||||
alias /dev/dsp snd-pcm-oss
|
||||
alias /dev/midi snd-seq-oss
|
||||
|
||||
# Set this to the correct number of cards.
|
||||
options snd cards_limit=1
|
@ -0,0 +1,12 @@
|
||||
diff -uNr alsa-utils-1.0.23.ORIG//alsaconf/alsaconf.in alsa-utils-1.0.23/alsaconf/alsaconf.in
|
||||
--- alsa-utils-1.0.23.ORIG//alsaconf/alsaconf.in 2010-04-16 23:16:24.972269218 +0100
|
||||
+++ alsa-utils-1.0.23/alsaconf/alsaconf.in 2010-04-16 23:16:47.781310369 +0100
|
||||
@@ -301,7 +301,7 @@
|
||||
fi
|
||||
else
|
||||
if [ "$distribution" = "gentoo" ]; then
|
||||
- cfgfile="/etc/modules.d/alsa"
|
||||
+ cfgfile="/etc/modprobe.d/alsa.conf"
|
||||
elif [ "$kernel" = "new" ]; then
|
||||
cfgfile="/etc/modprobe.conf"
|
||||
if [ -d /etc/modprobe.d ]; then
|
@ -0,0 +1,7 @@
|
||||
diff -uNr alsa-utils-1.0.25.ORIG/alsactl/90-alsa-restore.rules alsa-utils-1.0.25/alsactl/90-alsa-restore.rules
|
||||
--- alsa-utils-1.0.25.ORIG/alsactl/90-alsa-restore.rules 2012-02-03 12:14:50.139393938 +0000
|
||||
+++ alsa-utils-1.0.25/alsactl/90-alsa-restore.rules 2012-02-03 12:16:02.660395020 +0000
|
||||
@@ -1,2 +1,3 @@
|
||||
ACTION=="add", SUBSYSTEM=="sound", KERNEL=="controlC*", KERNELS=="card*", \
|
||||
+ ENV{STARTUP}!="1", \
|
||||
RUN+="/usr/sbin/alsactl restore $attr{number}"
|
15
sdk_container/src/third_party/portage-stable/media-sound/alsa-utils/files/alsasound.confd-r4
vendored
Normal file
15
sdk_container/src/third_party/portage-stable/media-sound/alsa-utils/files/alsasound.confd-r4
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
# RESTORE_ON_START:
|
||||
# Do you want to restore your mixer settings? If not, your cards will be
|
||||
# muted.
|
||||
# no - Do not restore state
|
||||
# yes - Restore state
|
||||
|
||||
RESTORE_ON_START="yes"
|
||||
|
||||
# SAVE_ON_STOP:
|
||||
# Do you want to save changes made to your mixer volumes when alsasound
|
||||
# stops?
|
||||
# no - Do not save state
|
||||
# yes - Save state
|
||||
|
||||
SAVE_ON_STOP="yes"
|
83
sdk_container/src/third_party/portage-stable/media-sound/alsa-utils/files/alsasound.initd-r5
vendored
Normal file
83
sdk_container/src/third_party/portage-stable/media-sound/alsa-utils/files/alsasound.initd-r5
vendored
Normal file
@ -0,0 +1,83 @@
|
||||
#!/sbin/runscript
|
||||
# $Header: /var/cvsroot/gentoo-x86/media-sound/alsa-utils/files/alsasound.initd-r5,v 1.1 2012/02/20 09:03:53 chainsaw Exp $
|
||||
# Copyright 1999-2012 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
alsastatedir=/var/lib/alsa
|
||||
alsascrdir=/etc/alsa.d
|
||||
|
||||
extra_commands="save restore"
|
||||
|
||||
depend() {
|
||||
need localmount
|
||||
after bootmisc modules isapnp coldplug hotplug
|
||||
}
|
||||
|
||||
restore() {
|
||||
ebegin "Restoring Mixer Levels"
|
||||
|
||||
if [ ! -r "${alsastatedir}/asound.state" ] ; then
|
||||
ewarn "No mixer config in ${alsastatedir}/asound.state, you have to unmute your card!"
|
||||
eend 0
|
||||
return 0
|
||||
fi
|
||||
|
||||
local cards="$(sed -n -e 's/ *\([[:digit:]]*\) .*/\1/p' /proc/asound/cards)"
|
||||
local CARDNUM
|
||||
for cardnum in ${cards}; do
|
||||
[ -e /dev/snd/controlC${cardnum} ] || sleep 2
|
||||
[ -e /dev/snd/controlC${cardnum} ] || sleep 2
|
||||
[ -e /dev/snd/controlC${cardnum} ] || sleep 2
|
||||
[ -e /dev/snd/controlC${cardnum} ] || sleep 2
|
||||
alsactl -I -f "${alsastatedir}/asound.state" restore ${cardnum} \
|
||||
|| ewarn "Errors while restoring defaults, ignoring"
|
||||
done
|
||||
|
||||
for ossfile in "${alsastatedir}"/oss/card*_pcm* ; do
|
||||
[ -e "${ossfile}" ] || continue
|
||||
# We use cat because I'm not sure if cp works properly on /proc
|
||||
local procfile=${ossfile##${alsastatedir}/oss}
|
||||
procfile="$(echo "${procfile}" | sed -e 's,_,/,g')"
|
||||
if [ -e /proc/asound/"${procfile}"/oss ] ; then
|
||||
cat "${ossfile}" > /proc/asound/"${procfile}"/oss
|
||||
fi
|
||||
done
|
||||
|
||||
eend 0
|
||||
}
|
||||
|
||||
save() {
|
||||
ebegin "Storing ALSA Mixer Levels"
|
||||
|
||||
mkdir -p "${alsastatedir}"
|
||||
if ! alsactl -f "${alsastatedir}/asound.state" store; then
|
||||
eerror "Error saving levels."
|
||||
eend 1
|
||||
return 1
|
||||
fi
|
||||
|
||||
for ossfile in /proc/asound/card*/pcm*/oss; do
|
||||
[ -e "${ossfile}" ] || continue
|
||||
local device=${ossfile##/proc/asound/} ; device=${device%%/oss}
|
||||
device="$(echo "${device}" | sed -e 's,/,_,g')"
|
||||
mkdir -p "${alsastatedir}/oss/"
|
||||
cp "${ossfile}" "${alsastatedir}/oss/${device}"
|
||||
done
|
||||
|
||||
eend 0
|
||||
}
|
||||
|
||||
start() {
|
||||
if [ "${RESTORE_ON_START}" = "yes" ]; then
|
||||
restore
|
||||
fi
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
stop() {
|
||||
if [ "${SAVE_ON_STOP}" = "yes" ]; then
|
||||
save
|
||||
fi
|
||||
return 0
|
||||
}
|
Loading…
Reference in New Issue
Block a user