From f4ff244ef65e69c7e0524cf2e09453a07ced54ac9fc175ad68ad4db251ad1b63 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Thu, 19 Feb 2009 16:35:34 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/alsa?expand=0&rev=62 --- alsa-init.sh | 10 ++++- alsa-lib-git-fixes.diff | 87 +++++++++++++++++++++++++++++++++++++++++ alsa.changes | 8 ++++ alsa.spec | 7 +++- 4 files changed, 110 insertions(+), 2 deletions(-) diff --git a/alsa-init.sh b/alsa-init.sh index db521ab..4ea6a58 100644 --- a/alsa-init.sh +++ b/alsa-init.sh @@ -2,5 +2,13 @@ # alsa-init card# /usr/bin/set_default_volume -f $1 >/dev/null 2>&1 -test -s /etc/asound.state && exec /usr/sbin/alsactl -F restore $1 >/dev/null 2>&1 +test -s /etc/asound.state && /usr/sbin/alsactl -F restore $1 >/dev/null 2>&1 +# increase buffer-preallocation size (for PA) +if [ -f /proc/asound/card$1/pcm0p/sub0/prealloc_max ]; then + pmax=$(< /proc/asound/card$1/pcm0p/sub0/prealloc_max) + if [ $pmax -gt 1024 ]; then + echo 1024 > /proc/asound/card$1/pcm0p/sub0/prealloc + fi +fi + exit 0 diff --git a/alsa-lib-git-fixes.diff b/alsa-lib-git-fixes.diff index 624fe8d..6b45f0f 100644 --- a/alsa-lib-git-fixes.diff +++ b/alsa-lib-git-fixes.diff @@ -49,6 +49,37 @@ index f73871f..bad0944 100644 if BUILD_PYTHON smixer_python_la_SOURCES = python.c +diff --git a/src/conf/cards/CMI8788.conf b/src/conf/cards/CMI8788.conf +index 26910d5..0ca71e9 100644 +--- a/src/conf/cards/CMI8788.conf ++++ b/src/conf/cards/CMI8788.conf +@@ -13,7 +13,7 @@ CMI8788.pcm.front.0 { + card $CARD + } + +-# default with dmix+softvol & dsnoop ++# default with dmix & dsnoop + CMI8788.pcm.default { + @args [ CARD ] + @args.CARD { +@@ -23,15 +23,8 @@ CMI8788.pcm.default { + playback.pcm { + type plug + slave.pcm { +- type softvol +- slave.pcm { +- @func concat +- strings [ "dmix:" $CARD ",FORMAT=S32_LE" ] +- } +- control { +- name "PCM Playback Volume" +- card $CARD +- } ++ @func concat ++ strings [ "dmix:" $CARD ",FORMAT=S32_LE" ] + } + } + capture.pcm { diff --git a/src/conf/cards/GUS.conf b/src/conf/cards/GUS.conf index 80e3058..d744c54 100644 --- a/src/conf/cards/GUS.conf @@ -116,6 +147,62 @@ index bcbcb9b..800281e 100644 } +diff --git a/src/control/control_ext.c b/src/control/control_ext.c +index a8675c1..d1fe8ea 100644 +--- a/src/control/control_ext.c ++++ b/src/control/control_ext.c +@@ -107,6 +107,7 @@ static int snd_ctl_ext_elem_list(snd_ctl_t *handle, snd_ctl_elem_list_t *list) + ret = ext->callback->elem_list(ext, offset, ids); + if (ret < 0) + return ret; ++ ids->numid = offset + 1; /* fake number */ + list->used++; + offset++; + ids++; +@@ -114,13 +115,24 @@ static int snd_ctl_ext_elem_list(snd_ctl_t *handle, snd_ctl_elem_list_t *list) + return 0; + } + ++static snd_ctl_ext_key_t get_elem(snd_ctl_ext_t *ext, snd_ctl_elem_id_t *id) ++{ ++ int numid = id->numid; ++ if (numid > 0) { ++ ext->callback->elem_list(ext, numid - 1, id); ++ id->numid = numid; ++ } else ++ id->numid = 0; ++ return ext->callback->find_elem(ext, id); ++} ++ + static int snd_ctl_ext_elem_info(snd_ctl_t *handle, snd_ctl_elem_info_t *info) + { + snd_ctl_ext_t *ext = handle->private_data; + snd_ctl_ext_key_t key; + int type, ret; + +- key = ext->callback->find_elem(ext, &info->id); ++ key = get_elem(ext, &info->id); + if (key == SND_CTL_EXT_KEY_NOT_FOUND) + return -ENOENT; + ret = ext->callback->get_attribute(ext, key, &type, &info->access, &info->count); +@@ -200,7 +212,7 @@ static int snd_ctl_ext_elem_read(snd_ctl_t *handle, snd_ctl_elem_value_t *contro + int type, ret; + unsigned int access, count; + +- key = ext->callback->find_elem(ext, &control->id); ++ key = get_elem(ext, &control->id); + if (key == SND_CTL_EXT_KEY_NOT_FOUND) + return -ENOENT; + ret = ext->callback->get_attribute(ext, key, &type, &access, &count); +@@ -254,7 +266,7 @@ static int snd_ctl_ext_elem_write(snd_ctl_t *handle, snd_ctl_elem_value_t *contr + int type, ret; + unsigned int access, count; + +- key = ext->callback->find_elem(ext, &control->id); ++ key = get_elem(ext, &control->id); + if (key == SND_CTL_EXT_KEY_NOT_FOUND) + return -ENOENT; + ret = ext->callback->get_attribute(ext, key, &type, &access, &count); diff --git a/src/mixer/simple_none.c b/src/mixer/simple_none.c index 0f4dd3a..4802200 100644 --- a/src/mixer/simple_none.c diff --git a/alsa.changes b/alsa.changes index b2b7620..cdbc436 100644 --- a/alsa.changes +++ b/alsa.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Tue Feb 17 17:02:38 CET 2009 - tiwai@suse.de + +- set the ctl numids properly with external plugins (bnc#462032) +- fix oxygen driver config (removal of softfloat again) +- increase the preallocated buffer size for HD-audio to improve + the performance of PA + ------------------------------------------------------------------- Mon Feb 16 14:21:47 CET 2009 - tiwai@suse.de diff --git a/alsa.spec b/alsa.spec index b4f0523..5938fdc 100644 --- a/alsa.spec +++ b/alsa.spec @@ -34,7 +34,7 @@ Obsoletes: alsa-64bit # Summary: Advanced Linux Sound Architecture Version: 1.0.18 -Release: 15 +Release: 17 Source: ftp://ftp.alsa-project.org/pub/lib/alsa-lib-%{package_version}.tar.bz2 Source8: 40-alsa.rules Source11: alsasound @@ -244,6 +244,11 @@ exit 0 %{_datadir}/alsa %changelog +* Tue Feb 17 2009 tiwai@suse.de +- set the ctl numids properly with external plugins (bnc#462032) +- fix oxygen driver config (removal of softfloat again) +- increase the preallocated buffer size for HD-audio to improve + the performance of PA * Mon Feb 16 2009 tiwai@suse.de - Fix HD-audio config file (bnc#469886) * Tue Feb 03 2009 tiwai@suse.de