OBS User unknown 2008-11-17 15:37:58 +00:00 committed by Git OBS Bridge
parent 4cb01c174b
commit b761627544
6 changed files with 138 additions and 70 deletions

View File

@ -1,66 +1,21 @@
Changes In Init Script On SL10.0
--------------------------------
The alsasound initscript was changed to improve the boot/halt speed.
Now the script assumes that the devices are configured and initialized
via udev/coldplug, and does only minimal jobs with start and stop
commands. The modules to be loaded are listed in
/etc/sysconfig/hardware/cfg-* files. Also, the restoration of sound
set-up is done via udev instead of alsasound init script.
If you have a problem with loading sound modules, try to reconfigure
the sound device via yast. Note that the new alsaconf sets up the
hwcfg file properly.
When "restart" or "reload" command is used, alsasound behaves like
the older version, i.e. reload the modules. This is provided just
for convenience.
General
-------
Since SuSE-6.4, the alsa modules come with the kernel rpms specifically
compiled for those kernels and the alsa package contains the libs, utils
and mixers for alsa.
ALSA is constantly improving, as this file. If you have any improvements
for it, please send them via http://www.suse.de/feedback
Sound Driver Loading
--------------------
Since openSUSE-11.0, all sound driver modules are loaded via udev.
The setups in /etc/sysconfig/hardware/* that have been used for 10.0
and later systems are no longer used and simply ignored.
Module Configuration on Linux 2.6 Kernels
-----------------------------------------
The configuration of ALSA modules is written to /etc/modprobe.d/sound
file via YaST and alsaconf. Don't modify /etc/modprobe.conf directly,
since this file may be overwritten when the package is updated.
file via YaST. Don't modify /etc/modprobe.conf directly, since this
file may be overwritten when the package is updated.
Module Option Names
-------------------
The module option names are renamed to the standard style without
snd_ prefix. For example, the former "snd_index" module option became
now "index".
generate-modprobe.conf script in module-init-tools package converts
these names automatically.
ALSACONF
--------
The alsaconf script included in alsa-utils package is only for older
distros in general. It still might work in some cases, but avoid it
unless you are really sure why you use it.
Changes from ALSA 0.5.x to 0.9.0
--------------------------------
Along with the upgrade to ALSA ver.0.9.0, there have been many changes
done from ver.0.5.0, which was included in SuSE 6.x and 7.x
distributions.
First of all, the name of top-level driver module becomes now like
"snd-sb16.o" while the older version uses "snd-card-sb16.o".
If you upgrade the existing system, please set up the sound
configuration again.
Package Splitting
-----------------
The gamix and alsa-tools (envy24control, cspctl and sbiload) are split
to inidividual packages.
The programs in alsa-tools are also divided to two packages, alsa-tools
and alsa-tools-gui. The latter includes the programs with the graphical
interface (gtk, fltk), while the former includes only the console
applications such as the firmware loaders.

View File

@ -2,5 +2,5 @@
# alsa-init card#
/usr/bin/set_default_volume -f $1 >/dev/null 2>&1
exec /usr/sbin/alsactl -F restore $1 >/dev/null 2>&1
test -s /etc/asound.state && exec /usr/sbin/alsactl -F restore $1 >/dev/null 2>&1
exit 0

94
alsa-lib-git-fixes.diff Normal file
View File

@ -0,0 +1,94 @@
diff --git a/src/mixer/simple_none.c b/src/mixer/simple_none.c
index ef277de..8d6aae8 100644
--- a/src/mixer/simple_none.c
+++ b/src/mixer/simple_none.c
@@ -809,14 +809,14 @@ static int simple_update(snd_mixer_elem_t *melem)
if (caps & (SM_CAP_GSWITCH|SM_CAP_CSWITCH))
caps |= SM_CAP_CSWITCH_JOIN;
if (caps & (SM_CAP_GVOLUME|SM_CAP_CVOLUME))
- caps |= SM_CAP_PVOLUME_JOIN;
+ caps |= SM_CAP_CVOLUME_JOIN;
if (pchannels > 1 || cchannels > 1) {
if (simple->ctls[CTL_SINGLE].elem &&
simple->ctls[CTL_SINGLE].values > 1) {
if (caps & SM_CAP_GSWITCH)
- caps &= ~SM_CAP_PSWITCH_JOIN;
+ caps &= ~(SM_CAP_PSWITCH_JOIN|SM_CAP_CSWITCH_JOIN);
else
- caps &= ~SM_CAP_PVOLUME_JOIN;
+ caps &= ~(SM_CAP_PVOLUME_JOIN|SM_CAP_CVOLUME_JOIN);
}
if (simple->ctls[CTL_GLOBAL_ROUTE].elem ||
(simple->ctls[CTL_GLOBAL_SWITCH].elem &&
@@ -946,6 +946,8 @@ static int base_len(const char *name, selem_ctl_type_t *type)
static int _snd_mixer_selem_set_volume(snd_mixer_elem_t *elem, int dir, snd_mixer_selem_channel_id_t channel, long value)
{
selem_none_t *s = snd_mixer_elem_get_private(elem);
+ if (s->selem.caps & SM_CAP_GVOLUME)
+ dir = SM_PLAY;
if ((unsigned int) channel >= s->str[dir].channels)
return 0;
if (value < s->str[dir].min || value > s->str[dir].max)
@@ -1064,6 +1066,8 @@ static int get_volume_ops(snd_mixer_elem_t *elem, int dir,
snd_mixer_selem_channel_id_t channel, long *value)
{
selem_none_t *s = snd_mixer_elem_get_private(elem);
+ if (s->selem.caps & SM_CAP_GVOLUME)
+ dir = SM_PLAY;
if ((unsigned int) channel >= s->str[dir].channels)
return -EINVAL;
*value = s->str[dir].vol[channel];
@@ -1158,6 +1162,8 @@ static int get_dB_range_ops(snd_mixer_elem_t *elem, int dir,
selem_none_t *s = snd_mixer_elem_get_private(elem);
selem_ctl_t *c;
+ if (s->selem.caps & SM_CAP_GVOLUME)
+ dir = SM_PLAY;
c = get_selem_ctl(s, dir);
if (! c)
return -EINVAL;
@@ -1199,6 +1205,8 @@ static int get_dB_ops(snd_mixer_elem_t *elem,
int err;
long volume, db_gain;
+ if (s->selem.caps & SM_CAP_GVOLUME)
+ dir = SM_PLAY;
c = get_selem_ctl(s, dir);
if (! c)
return -EINVAL;
@@ -1216,6 +1224,8 @@ static int get_switch_ops(snd_mixer_elem_t *elem, int dir,
snd_mixer_selem_channel_id_t channel, int *value)
{
selem_none_t *s = snd_mixer_elem_get_private(elem);
+ if (s->selem.caps & SM_CAP_GSWITCH)
+ dir = SM_PLAY;
if ((unsigned int) channel >= s->str[dir].channels)
return -EINVAL;
*value = !!(s->str[dir].sw & (1 << channel));
@@ -1240,6 +1250,8 @@ static int ask_dB_vol_ops(snd_mixer_elem_t *elem, int dir,
selem_none_t *s = snd_mixer_elem_get_private(elem);
selem_ctl_t *c;
+ if (s->selem.caps & SM_CAP_GVOLUME)
+ dir = SM_PLAY;
c = get_selem_ctl(s, dir);
if (! c)
return -EINVAL;
@@ -1255,6 +1267,8 @@ static int set_dB_ops(snd_mixer_elem_t *elem, int dir,
long value;
int err;
+ if (s->selem.caps & SM_CAP_GVOLUME)
+ dir = SM_PLAY;
c = get_selem_ctl(s, dir);
if (! c)
return -EINVAL;
@@ -1269,6 +1283,8 @@ static int set_switch_ops(snd_mixer_elem_t *elem, int dir,
{
int changed;
selem_none_t *s = snd_mixer_elem_get_private(elem);
+ if (s->selem.caps & SM_CAP_GSWITCH)
+ dir = SM_PLAY;
if (dir == SM_PLAY) {
if (! (s->selem.caps & (SM_CAP_GSWITCH|SM_CAP_PSWITCH)))
return -EINVAL;

View File

@ -1,3 +1,15 @@
-------------------------------------------------------------------
Thu Nov 13 15:02:02 CET 2008 - tiwai@suse.de
- check /etc/asound.state before calling alsactl restore
(related bug bnc#444349)
-------------------------------------------------------------------
Mon Nov 10 17:40:52 CET 2008 - tiwai@suse.de
- fix a long-standing mixer bug with global/simple mixer elements
- update README.SuSE
-------------------------------------------------------------------
Wed Oct 29 14:26:06 CET 2008 - tiwai@suse.de

View File

@ -29,7 +29,7 @@ PreReq: %insserv_prereq %fillup_prereq
AutoReqProv: on
Summary: Advanced Linux Sound Architecture
Version: 1.0.18
Release: 6
Release: 7
Source: ftp://ftp.alsa-project.org/pub/lib/alsa-lib-%{package_version}.tar.bz2
Source8: 40-alsa.rules
Source11: alsasound
@ -45,7 +45,7 @@ Source31: all_notes_off.bin
Source32: all_notes_off.mid
Source33: alsa-info.sh
Source34: alsa-init.sh
# Patch: alsa-lib-git-fixes.diff
Patch: alsa-lib-git-fixes.diff
Url: http://www.alsa-project.org/
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@ -117,7 +117,7 @@ Authors:
%prep
%setup -q -n alsa-lib-%{package_version}
# %patch -p1
%patch -p1
%build
# build alsa-lib
@ -239,6 +239,12 @@ exit 0
%{_datadir}/alsa
%changelog
* Thu Nov 13 2008 tiwai@suse.de
- check /etc/asound.state before calling alsactl restore
(related bug bnc#444349)
* Mon Nov 10 2008 tiwai@suse.de
- fix a long-standing mixer bug with global/simple mixer elements
- update README.SuSE
* Wed Oct 29 2008 tiwai@suse.de
- updated to alsa-lib version 1.0.18-final
just including all previous fixes
@ -953,9 +959,9 @@ exit 0
- updated to version 0.9.4.
- fixed the option of head command in alsa-scripts (bug #27413).
- updated alsaconf; -p shows the card name, too.
* Fri Jun 13 2003 ro@suse.de
* Thu Jun 12 2003 ro@suse.de
- added /etc/hotplug and /etc/hotplug/usb to filelist
* Tue May 27 2003 ro@suse.de
* Mon May 26 2003 ro@suse.de
- add static libaoss to filelist of devel subpackage
* Tue Apr 15 2003 tiwai@suse.de
- fixed the option of head command in the new POSIX way.
@ -2159,11 +2165,11 @@ exit 0
- linux/* header files installed under /usr/include/alsa/linux
- added SuSEconfig.alsa
- added triggers
* Fri Jun 09 2000 bk@suse.de
* Thu Jun 08 2000 bk@suse.de
- fixed kernel_version define -> %%(uname -r)
- changed linux_header_dir to /usr/src/linux/include/linux
(should fit with the pre-install then)
* Fri Jun 09 2000 ro@suse.de
* Thu Jun 08 2000 ro@suse.de
- added pre-install for alsadev: create linux-srcdir if nonexistant
* Thu Jun 08 2000 tiwai@suse.de
- linux/* header files are installed under
@ -2215,7 +2221,7 @@ exit 0
- updated to alsa-0.5.6, cvsexport 2000-03-17.tar.bz2
* Tue Mar 14 2000 bk@suse.de
- disabled kernel headers in the file list
* Sun Mar 12 2000 bk@suse.de
* Sat Mar 11 2000 bk@suse.de
- added isapnp to Requires:
* Thu Mar 09 2000 ro@suse.de
- removed k_deflt from neededforbuild (endless rebuild-loop)
@ -2225,7 +2231,7 @@ exit 0
- added gamix from http://www1.tcnet.ne.jp/fmurata/linux/down/
- alsa modules are no longer built here.
- wrote listcards.sh and added generated /usr/doc/packages/alsa/cards.txt
* Mon Mar 06 2000 ro@suse.de
* Sun Mar 05 2000 ro@suse.de
- added Makefile.module and subpackage km_alsa to build the
kernel-modules
* Sat Mar 04 2000 bk@suse.de
@ -2329,7 +2335,7 @@ exit 0
* Mon Oct 11 1999 ro@suse.de
- patched to compile wavefront.c on axp
- simplified specfile
* Tue Sep 21 1999 ro@suse.de
* Mon Sep 20 1999 ro@suse.de
- fixed filelist
* Sat Sep 18 1999 bk@suse.de
- major update to version 0.4.1b, many changes
@ -2339,7 +2345,7 @@ exit 0
- set kernel-version to 2.2.12
* Tue Jul 20 1999 bk@suse.de
- added libtoolize --force to use ltconfig and ltmain from libtool
* Sat Jul 17 1999 ro@suse.de
* Fri Jul 16 1999 ro@suse.de
- set kernel version to 2.2.10
* Fri Jul 16 1999 ro@suse.de
- fixed filelist

View File

@ -126,7 +126,8 @@ start_all() {
echo -n "Starting sound driver"
load_modules && start_rest
# hack - in case the mixer isn't restored
(sleep 1; $alsactl -F -f $asoundcfg restore >/dev/null 2>&1)
# this shouldn't be needed anymore since udev cares
# (sleep 1; $alsactl -F -f $asoundcfg restore >/dev/null 2>&1)
rc_status
}