OBS User unknown 2009-02-19 16:35:34 +00:00 committed by Git OBS Bridge
parent 59863cae97
commit f4ff244ef6
4 changed files with 110 additions and 2 deletions

View File

@ -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

View File

@ -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
}
<confdir:pcm/surround40.conf>
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

View File

@ -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

View File

@ -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