This commit is contained in:
parent
d399150833
commit
275274ebea
34
alsa-lib-fix-dmix-subdevice.diff
Normal file
34
alsa-lib-fix-dmix-subdevice.diff
Normal file
@ -0,0 +1,34 @@
|
||||
tree 923dc1303d0a
|
||||
parent 5e72b6913eb3
|
||||
author tiwai 1190034232 -7200
|
||||
committer tiwai 1190034232 -7200
|
||||
revision 2329
|
||||
|
||||
Fix subdevice number to 0 for dmix/dsnoop
|
||||
|
||||
The dmix and dsnoop plugins need a fixed substream number instead of
|
||||
the next-available one (-1) as the default number. Now it's set to 0.
|
||||
diff --git a/src/conf/pcm/dmix.conf b/src/conf/pcm/dmix.conf
|
||||
--- a/src/conf/pcm/dmix.conf
|
||||
+++ b/src/conf/pcm/dmix.conf
|
||||
@@ -20,7 +20,7 @@ pcm.!dmix {
|
||||
}
|
||||
@args.SUBDEV {
|
||||
type integer
|
||||
- default -1
|
||||
+ default 0
|
||||
}
|
||||
@args.FORMAT {
|
||||
type string
|
||||
diff --git a/src/conf/pcm/dsnoop.conf b/src/conf/pcm/dsnoop.conf
|
||||
--- a/src/conf/pcm/dsnoop.conf
|
||||
+++ b/src/conf/pcm/dsnoop.conf
|
||||
@@ -20,7 +20,7 @@ pcm.!dsnoop {
|
||||
}
|
||||
@args.SUBDEV {
|
||||
type integer
|
||||
- default -1
|
||||
+ default 0
|
||||
}
|
||||
@args.FORMAT {
|
||||
type string
|
77
alsa-lib-fix-input-source-as-capture.diff
Normal file
77
alsa-lib-fix-input-source-as-capture.diff
Normal file
@ -0,0 +1,77 @@
|
||||
tree fc6b0b3b0c20
|
||||
parent 652611f58008
|
||||
author tiwai 1188391711 -7200
|
||||
committer tiwai 1188391711 -7200
|
||||
revision 2318
|
||||
|
||||
Handle "Input Source" as a capture element
|
||||
|
||||
Some drivers use "Input Source" as the capture source mixer element because
|
||||
mixer abstraction layer can't handle multiple "Capture Source" elements.
|
||||
This patch adds a hack to handle Input Source as a capture route, and let
|
||||
mixer apps know that it's a capture stuff, at least.
|
||||
diff --git a/src/mixer/simple_none.c b/src/mixer/simple_none.c
|
||||
--- a/src/mixer/simple_none.c
|
||||
+++ b/src/mixer/simple_none.c
|
||||
@@ -918,6 +918,19 @@ static int base_len(const char *name, se
|
||||
}
|
||||
p++;
|
||||
}
|
||||
+
|
||||
+ /* Special case - handle "Input Source" as a capture route.
|
||||
+ * Note that it's *NO* capture source. A capture source is split over
|
||||
+ * sub-elements, and multiple capture-sources will result in an error.
|
||||
+ * That's why some drivers use "Input Source" as a workaround.
|
||||
+ * Hence, this is a workaround for a workaround to get the things
|
||||
+ * straight back again. Sigh.
|
||||
+ */
|
||||
+ if (!strcmp(name, "Input Source")) {
|
||||
+ *type = CTL_CAPTURE_ROUTE;
|
||||
+ return strlen(name);
|
||||
+ }
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1629,7 +1642,12 @@ static int simple_add1(snd_mixer_class_t
|
||||
{
|
||||
unsigned int n;
|
||||
if (ctype == SND_CTL_ELEM_TYPE_ENUMERATED) {
|
||||
- type = CTL_GLOBAL_ENUM;
|
||||
+ if (type == CTL_PLAYBACK_ROUTE)
|
||||
+ type = CTL_PLAYBACK_ENUM;
|
||||
+ else if (type == CTL_CAPTURE_ROUTE)
|
||||
+ type = CTL_CAPTURE_ENUM;
|
||||
+ else
|
||||
+ type = CTL_GLOBAL_ENUM;
|
||||
break;
|
||||
}
|
||||
if (ctype != SND_CTL_ELEM_TYPE_BOOLEAN)
|
||||
@@ -1644,7 +1662,12 @@ static int simple_add1(snd_mixer_class_t
|
||||
case CTL_PLAYBACK_SWITCH:
|
||||
case CTL_CAPTURE_SWITCH:
|
||||
if (ctype == SND_CTL_ELEM_TYPE_ENUMERATED) {
|
||||
- type = CTL_GLOBAL_ENUM;
|
||||
+ if (type == CTL_PLAYBACK_SWITCH)
|
||||
+ type = CTL_PLAYBACK_ENUM;
|
||||
+ else if (type == CTL_CAPTURE_SWITCH)
|
||||
+ type = CTL_CAPTURE_ENUM;
|
||||
+ else
|
||||
+ type = CTL_GLOBAL_ENUM;
|
||||
break;
|
||||
}
|
||||
if (ctype != SND_CTL_ELEM_TYPE_BOOLEAN)
|
||||
@@ -1654,7 +1677,12 @@ static int simple_add1(snd_mixer_class_t
|
||||
case CTL_PLAYBACK_VOLUME:
|
||||
case CTL_CAPTURE_VOLUME:
|
||||
if (ctype == SND_CTL_ELEM_TYPE_ENUMERATED) {
|
||||
- type = CTL_GLOBAL_ENUM;
|
||||
+ if (type == CTL_PLAYBACK_VOLUME)
|
||||
+ type = CTL_PLAYBACK_ENUM;
|
||||
+ else if (type == CTL_CAPTURE_VOLUME)
|
||||
+ type = CTL_CAPTURE_ENUM;
|
||||
+ else
|
||||
+ type = CTL_GLOBAL_ENUM;
|
||||
break;
|
||||
}
|
||||
if (ctype != SND_CTL_ELEM_TYPE_INTEGER)
|
23
alsa-lib-fix-use-after-free.diff
Normal file
23
alsa-lib-fix-use-after-free.diff
Normal file
@ -0,0 +1,23 @@
|
||||
tree 65d47cdd771c
|
||||
parent 7bb5b9fa6c6c
|
||||
author tiwai 1187180553 -7200
|
||||
committer tiwai 1187180553 -7200
|
||||
revision 2312
|
||||
|
||||
Fix use after free
|
||||
|
||||
Fixed use after free (ALSA bug#3300).
|
||||
diff --git a/src/confmisc.c b/src/confmisc.c
|
||||
--- a/src/confmisc.c
|
||||
+++ b/src/confmisc.c
|
||||
@@ -764,9 +764,9 @@ static int parse_card(snd_config_t *root
|
||||
return err;
|
||||
}
|
||||
card = snd_card_get_index(str);
|
||||
- free(str);
|
||||
if (card < 0)
|
||||
SNDERR("cannot find card '%s'", str);
|
||||
+ free(str);
|
||||
return card;
|
||||
}
|
||||
|
@ -1,3 +1,11 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Sep 17 16:04:20 CEST 2007 - tiwai@suse.de
|
||||
|
||||
- fix the wrong subdevice number for dmix/dsnoop plugins (#325676)
|
||||
- fix the handling of "Input Source", to be as a capture element
|
||||
(#325677)
|
||||
- fix use after free in alsa-lib
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Aug 14 16:26:18 CEST 2007 - tiwai@suse.de
|
||||
|
||||
|
17
alsa.spec
17
alsa.spec
@ -18,10 +18,10 @@ Group: System/Libraries
|
||||
Requires: alsa-utils
|
||||
Recommends: alsa-plugins alsa-oss
|
||||
PreReq: %insserv_prereq %fillup_prereq
|
||||
Autoreqprov: on
|
||||
AutoReqProv: on
|
||||
Summary: Advanced Linux Sound Architecture
|
||||
Version: 1.0.14
|
||||
Release: 22
|
||||
Release: 29
|
||||
Source: ftp://ftp.alsa-project.org/pub/lib/alsa-lib-%{package_version}.tar.bz2
|
||||
Source8: 40-alsa.rules
|
||||
Source11: alsasound
|
||||
@ -36,7 +36,10 @@ Source30: all_notes_off
|
||||
Source31: all_notes_off.bin
|
||||
Source32: all_notes_off.mid
|
||||
Patch: alsa-lib-hg-fixes.diff
|
||||
URL: http://www.alsa-project.org/
|
||||
Patch1: alsa-lib-fix-use-after-free.diff
|
||||
Patch2: alsa-lib-fix-input-source-as-capture.diff
|
||||
Patch3: alsa-lib-fix-dmix-subdevice.diff
|
||||
Url: http://www.alsa-project.org/
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
%description
|
||||
@ -114,6 +117,9 @@ Authors:
|
||||
%prep
|
||||
%setup -q -n alsa-lib-%{package_version}
|
||||
%patch -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%{?suse_update_config:%{suse_update_config -f .}}
|
||||
|
||||
%build
|
||||
@ -255,6 +261,11 @@ exit 0
|
||||
%{_datadir}/alsa
|
||||
|
||||
%changelog
|
||||
* Mon Sep 17 2007 - tiwai@suse.de
|
||||
- fix the wrong subdevice number for dmix/dsnoop plugins (#325676)
|
||||
- fix the handling of "Input Source", to be as a capture element
|
||||
(#325677)
|
||||
- fix use after free in alsa-lib
|
||||
* Tue Aug 14 2007 - tiwai@suse.de
|
||||
- Add missing pcm_empty.c in doxygen configuration
|
||||
- seq_midi_event: fix parsing of F9/FD bytes
|
||||
|
Loading…
x
Reference in New Issue
Block a user