Accepting request 101524 from home:tiwai:branches:multimedia:libs

- Updated to alsa-lib version 1.0.25; including all previous fixes

OBS-URL: https://build.opensuse.org/request/show/101524
OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/alsa?expand=0&rev=99
This commit is contained in:
Takashi Iwai 2012-01-25 15:53:30 +00:00 committed by Git OBS Bridge
parent b6dc429edf
commit 64b25d20d0
38 changed files with 20 additions and 2381 deletions

View File

@ -1,36 +0,0 @@
From 886adf664b958aa28ccc6b06c552764069293f83 Mon Sep 17 00:00:00 2001
From: Raymond Yau <superquad.vortex2@gmail.com>
Date: Sat, 26 Feb 2011 09:24:43 +0800
Subject: [PATCH 01/23] Fix alsa-lib to regard 3D control - Depth as Playback
Controls
This allow those mixer or recording application to find those controls which
are really used for capturing.
Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
src/mixer/simple_none.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/src/mixer/simple_none.c b/src/mixer/simple_none.c
index 426f2d7..395e4d6 100644
--- a/src/mixer/simple_none.c
+++ b/src/mixer/simple_none.c
@@ -937,7 +937,12 @@ static int base_len(const char *name, selem_ctl_type_t *type)
*type = CTL_CAPTURE_ROUTE;
return strlen(name);
}
-
+ if (strstr(name, "3D Control") > 0) {
+ if (strstr(name, "Depth") > 0) {
+ *type = CTL_PLAYBACK_VOLUME;
+ return strlen(name);
+ }
+ }
return 0;
}
--
1.7.5.3

View File

@ -1,122 +0,0 @@
From 8650c02ae21b620fbe8d5e90bf5639e5a4a3f401 Mon Sep 17 00:00:00 2001
From: Clemens Ladisch <clemens@ladisch.de>
Date: Tue, 15 Mar 2011 08:02:59 +0100
Subject: [PATCH 02/23] alsa-lib: add LaCie Firewire Speakers/Griffin FireWave
Surround driver
Add configuration files for the "default"/"front"/"surround51" devices
of the FireWire driver.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
---
src/conf/cards/FWSpeakers.conf | 26 ++++++++++++++++++++
src/conf/cards/FireWave.conf | 50 ++++++++++++++++++++++++++++++++++++++++
src/conf/cards/Makefile.am | 2 +
3 files changed, 78 insertions(+), 0 deletions(-)
create mode 100644 src/conf/cards/FWSpeakers.conf
create mode 100644 src/conf/cards/FireWave.conf
diff --git a/src/conf/cards/FWSpeakers.conf b/src/conf/cards/FWSpeakers.conf
new file mode 100644
index 0000000..cd6fa60
--- /dev/null
+++ b/src/conf/cards/FWSpeakers.conf
@@ -0,0 +1,26 @@
+#
+# Configuration for the LaCie Firewire speakers
+#
+
+FWSpeakers.pcm.default {
+ @args [ CARD ]
+ @args.CARD {
+ type string
+ }
+ type plug
+ slave.pcm {
+ @func concat
+ strings [ "dmix:" $CARD ",FORMAT=S32" ]
+ }
+}
+
+<confdir:pcm/front.conf>
+
+FWSpeakers.pcm.front.0 {
+ @args [ CARD ]
+ @args.CARD {
+ type string
+ }
+ type hw
+ card $CARD
+}
diff --git a/src/conf/cards/FireWave.conf b/src/conf/cards/FireWave.conf
new file mode 100644
index 0000000..63fb23d
--- /dev/null
+++ b/src/conf/cards/FireWave.conf
@@ -0,0 +1,50 @@
+#
+# Configuration for the Griffin FireWave Surround
+#
+
+FireWave.pcm.default {
+ @args [ CARD ]
+ @args.CARD {
+ type string
+ }
+ type plug
+ slave.pcm {
+ @func concat
+ strings [ "dmix:" $CARD ",FORMAT=S32" ]
+ }
+}
+
+<confdir:pcm/front.conf>
+
+FireWave.pcm.front.0 {
+ @args [ CARD ]
+ @args.CARD {
+ type string
+ }
+ type hw
+ card $CARD
+}
+
+<confdir:pcm/surround41.conf>
+<confdir:pcm/surround50.conf>
+<confdir:pcm/surround51.conf>
+
+FireWave.pcm.surround51.0 {
+ @args [ CARD ]
+ @args.CARD {
+ type string
+ }
+ type route
+ ttable [
+ [ 1 0 0 0 0 0 ]
+ [ 0 1 0 0 0 0 ]
+ [ 0 0 0 0 1 0 ]
+ [ 0 0 0 0 0 1 ]
+ [ 0 0 1 0 0 0 ]
+ [ 0 0 0 1 0 0 ]
+ ]
+ slave.pcm {
+ type hw
+ card $CARD
+ }
+}
diff --git a/src/conf/cards/Makefile.am b/src/conf/cards/Makefile.am
index 9da78f0..b7190e7 100644
--- a/src/conf/cards/Makefile.am
+++ b/src/conf/cards/Makefile.am
@@ -25,6 +25,8 @@ cfg_files = aliases.conf \
ENS1371.conf \
ES1968.conf \
FM801.conf \
+ FWSpeakers.conf \
+ FireWave.conf \
GUS.conf \
HDA-Intel.conf \
ICE1712.conf \
--
1.7.5.3

View File

@ -1,61 +0,0 @@
From ae0a44c628423d8eaec64d119511815d6884ab6b Mon Sep 17 00:00:00 2001
From: Margarita Olaya <magi@slimlogic.co.uk>
Date: Fri, 18 Mar 2011 11:26:22 -0600
Subject: [PATCH 03/23] alsa-lib: ucm: allow values to be read from devices
This allows devices value to be read using the get_value().
Also fix a little formatting.
Signed-off-by: Margarita Olaya Cabrera <magi@slimlogic.co.uk>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
src/ucm/main.c | 21 ++++++++++++++-------
1 files changed, 14 insertions(+), 7 deletions(-)
diff --git a/src/ucm/main.c b/src/ucm/main.c
index 42fd373..88f8bf6 100644
--- a/src/ucm/main.c
+++ b/src/ucm/main.c
@@ -1059,24 +1059,31 @@ static int get_value3(const char **value,
* \param uc_mgr Use case manager
* \param identifier Value identifier (string)
* \param value Returned value string
- * \param modifier modifier name (string)
+ * \param item Modifier or Device name (string)
* \return Zero on success (value is filled), otherwise a negative error code
*/
static int get_value(snd_use_case_mgr_t *uc_mgr,
- const char *identifier,
- const char **value,
- const char *modifier)
+ const char *identifier,
+ const char **value,
+ const char *item)
{
- struct use_case_modifier *mod;
+ struct use_case_modifier *mod;
+ struct use_case_device *dev;
int err;
- if (modifier != NULL) {
- mod = find_modifier(uc_mgr, modifier);
+ if (item != NULL) {
+ mod = find_modifier(uc_mgr, item);
if (mod != NULL) {
err = get_value1(value, &mod->value_list, identifier);
if (err >= 0 || err != -ENOENT)
return err;
}
+ dev = find_device(uc_mgr->active_verb, item);
+ if (dev != NULL) {
+ err = get_value1(value, &dev->value_list, identifier);
+ if (err >= 0 || err != -ENOENT)
+ return err;
+ }
}
err = get_value1(value, &uc_mgr->active_verb->value_list, identifier);
if (err >= 0 || err != -ENOENT)
--
1.7.5.3

View File

@ -1,114 +0,0 @@
From 60397387eff7d8492df59d7a63a303f98e61b391 Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <perex@perex.cz>
Date: Sat, 19 Mar 2011 00:54:43 +0100
Subject: [PATCH 04/23] UCM: comment fixes and fix myvalue initialization fix
in add_values()
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
---
include/use-case.h | 49 +++++++++++++++++++++++++++++--------------------
src/ucm/main.c | 1 +
2 files changed, 30 insertions(+), 20 deletions(-)
diff --git a/include/use-case.h b/include/use-case.h
index f577628..cb3176e 100644
--- a/include/use-case.h
+++ b/include/use-case.h
@@ -80,9 +80,10 @@ extern "C" {
*
* o Query the supported use case verbs, devices and modifiers for the machine.
* o Set and Get use case verbs, devices and modifiers for the machine.
- * o Get the ALSA PCM playback and capture device PCMs for use case verb and
+ * o Get the ALSA PCM playback and capture device PCMs for use case verb,
+ * use case device and modifier.
+ * o Get the TQ parameter for each use case verb, use case device and
* modifier.
- * o Get the TQ parameter for each use case verb and modifier.
* o Get the ALSA master playback and capture volume/switch kcontrols
* for each use case.
*/
@@ -111,7 +112,7 @@ extern "C" {
* Use Case Device.
*
* Physical system devices the render and capture audio. Devices can be OR'ed
- * together to support audio on similtanious devices.
+ * together to support audio on simultaneous devices.
*/
#define SND_USE_CASE_DEV_NONE "None"
#define SND_USE_CASE_DEV_SPEAKER "Speaker"
@@ -135,13 +136,13 @@ extern "C" {
* e.g. to record a voice call :-
* 1. Set verb to SND_USE_CASE_VERB_VOICECALL (for voice call)
* 2. Set modifier SND_USE_CASE_MOD_CAPTURE_VOICE when capture required.
- * 3. Call snd_use_case_get("_pcm_/_cdevice") to get ALSA source PCM name
+ * 3. Call snd_use_case_get("CapturePCM") to get ALSA source PCM name
* with captured voice pcm data.
*
* e.g. to play a ring tone when listenin to MP3 Music :-
* 1. Set verb to SND_USE_CASE_VERB_HIFI (for MP3 playback)
* 2. Set modifier to SND_USE_CASE_MOD_PLAY_TONE when incoming call happens.
- * 3. Call snd_use_case_get("_pcm_/_pdevice") to get ALSA PCM sink name for
+ * 3. Call snd_use_case_get("PlaybackPCM") to get ALSA PCM sink name for
* ringtone pcm data.
*/
#define SND_USE_CASE_MOD_CAPTURE_VOICE "Capture Voice"
@@ -221,21 +222,29 @@ int snd_use_case_get_list(snd_use_case_mgr_t *uc_mgr,
* deallocate this string.
*
* Known identifiers:
- * NULL - return current card
- * _verb - return current verb
- * TQ[/<modifier>] - Tone Quality [for given modifier]
- * PlaybackPCM[/<modifier>] - full PCM playback device name
- * CapturePCM[/<modifier>] - full PCM capture device name
- * PlaybackCTL[/<modifier>] - playback control device name
- * PlaybackVolume[/<modifier>] - playback control volume ID string
- * PlaybackSwitch[/<modifier>] - playback control switch ID string
- * CaptureCTL[/<modifier>] - capture control device name
- * CaptureVolume[/<modifier>] - capture control volume ID string
- * CaptureSwitch[/<modifier>] - capture control switch ID string
- * PlaybackMixer[/<modifier>] - name of playback mixer
- * PlaybackMixerID[/<modifier>] - mixer playback ID
- * CaptureMixer[/<modifier>] - name of capture mixer
- * CaptureMixerID[/<modifier>] - mixer capture ID
+ * NULL - return current card
+ * _verb - return current verb
+ *
+ * <NAME>[/<modifier>|</device>]
+ * - value identifier <NAME> for
+ * given modifier or device
+ * - Examples: "PlaybackPCM/Play Music",
+ * "CapturePCM/SPDIF"
+ *
+ * Recommended names for values:
+ * TQ - Tone Quality
+ * PlaybackPCM - full PCM playback device name
+ * CapturePCM - full PCM capture device name
+ * PlaybackCTL - playback control device name
+ * PlaybackVolume - playback control volume ID string
+ * PlaybackSwitch - playback control switch ID string
+ * CaptureCTL - capture control device name
+ * CaptureVolume - capture control volume ID string
+ * CaptureSwitch - capture control switch ID string
+ * PlaybackMixer - name of playback mixer
+ * PlaybackMixerID - mixer playback ID
+ * CaptureMixer - name of capture mixer
+ * CaptureMixerID - mixer capture ID
*/
int snd_use_case_get(snd_use_case_mgr_t *uc_mgr,
const char *identifier,
diff --git a/src/ucm/main.c b/src/ucm/main.c
index 88f8bf6..5de8170 100644
--- a/src/ucm/main.c
+++ b/src/ucm/main.c
@@ -858,6 +858,7 @@ static int add_values(struct list_head *list,
val = malloc(sizeof(struct myvalue));
if (val == NULL)
return -ENOMEM;
+ val->value = v->data;
list_add_tail(&val->list, list);
}
}
--
1.7.5.3

View File

@ -1,40 +0,0 @@
From f2912f5099e401cebacd33bd9da3d8318856e143 Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <perex@perex.cz>
Date: Sat, 19 Mar 2011 01:09:41 +0100
Subject: [PATCH 05/23] UCM: Fix empty get_list - initialize returned pointer
to NULL
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
---
src/ucm/main.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/ucm/main.c b/src/ucm/main.c
index 5de8170..9b450f6 100644
--- a/src/ucm/main.c
+++ b/src/ucm/main.c
@@ -75,8 +75,10 @@ static int alloc_str_list(struct list_head *list, int mult, char **result[])
int cnt;
cnt = list_count(list) * mult;
- if (cnt == 0)
+ if (cnt == 0) {
+ *result = NULL;
return cnt;
+ }
res = calloc(mult, cnt * sizeof(char *));
if (res == NULL)
return -ENOMEM;
@@ -912,8 +914,8 @@ static int get_value_list(snd_use_case_mgr_t *uc_mgr,
goto __fail;
}
err = alloc_str_list(&mylist, 1, &res);
- *list = (const char **)res;
if (err >= 0) {
+ *list = (const char **)res;
list_for_each(pos, &mylist) {
val = list_entry(pos, struct myvalue, list);
*res = strdup(val->value);
--
1.7.5.3

View File

@ -1,72 +0,0 @@
From d3906a93072171e5b5f4000d4a228af4eb8fa253 Mon Sep 17 00:00:00 2001
From: David Henningsson <david.henningsson@canonical.com>
Date: Mon, 28 Mar 2011 10:19:16 +0200
Subject: [PATCH 06/23] Conf: Fix channels of ICE1712 to 10/12
The ICE1712 kernel driver accepts 10 playback channels and
12 recording channels only. Therefore fix this channel count
in alsa-lib.
BugLink: http://bugs.launchpad.net/bugs/178442
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
---
src/conf/cards/ICE1712.conf | 28 ++++++++++++++++++++++------
1 files changed, 22 insertions(+), 6 deletions(-)
diff --git a/src/conf/cards/ICE1712.conf b/src/conf/cards/ICE1712.conf
index 01e50d2..f5b8add 100644
--- a/src/conf/cards/ICE1712.conf
+++ b/src/conf/cards/ICE1712.conf
@@ -32,12 +32,26 @@ ICE1712.pcm.front.0 {
@args.CARD {
type string
}
- type route
- ttable.0.0 1
- ttable.1.1 1
- slave.pcm {
- type hw
- card $CARD
+ type asym
+ playback.pcm {
+ type route
+ ttable.0.0 1
+ ttable.1.1 1
+ slave.pcm {
+ type hw
+ card $CARD
+ }
+ slave.channels 10
+ }
+ capture.pcm {
+ type route
+ ttable.0.0 1
+ ttable.1.1 1
+ slave.pcm {
+ type hw
+ card $CARD
+ }
+ slave.channels 12
}
}
@@ -57,6 +71,7 @@ ICE1712.pcm.surround40.0 {
type hw
card $CARD
}
+ slave.channels 10
}
<confdir:pcm/surround41.conf>
@@ -79,6 +94,7 @@ ICE1712.pcm.surround51.0 {
type hw
card $CARD
}
+ slave.channels 10
}
<confdir:pcm/iec958.conf>
--
1.7.5.3

View File

@ -1,85 +0,0 @@
From e419f63960a0c30c0263525b2db084b36c962d59 Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <perex@perex.cz>
Date: Mon, 28 Mar 2011 11:04:19 +0200
Subject: [PATCH 07/23] UCM: Fix LGPL licence ("how to receive" part referred
GPL instead LGPL)
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
---
src/ucm/main.c | 6 +++---
src/ucm/parser.c | 6 +++---
src/ucm/ucm_local.h | 6 +++---
src/ucm/utils.c | 6 +++---
4 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/src/ucm/main.c b/src/ucm/main.c
index 9b450f6..86f29e3 100644
--- a/src/ucm/main.c
+++ b/src/ucm/main.c
@@ -9,9 +9,9 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Support for the verb/device/modifier core logic and API,
* command line tool and file parser was kindly sponsored by
diff --git a/src/ucm/parser.c b/src/ucm/parser.c
index e8d2461..38fdba0 100644
--- a/src/ucm/parser.c
+++ b/src/ucm/parser.c
@@ -9,9 +9,9 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Support for the verb/device/modifier core logic and API,
* command line tool and file parser was kindly sponsored by
diff --git a/src/ucm/ucm_local.h b/src/ucm/ucm_local.h
index 1b00ea2..2ceceaa 100644
--- a/src/ucm/ucm_local.h
+++ b/src/ucm/ucm_local.h
@@ -9,9 +9,9 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Support for the verb/device/modifier core logic and API,
* command line tool and file parser was kindly sponsored by
diff --git a/src/ucm/utils.c b/src/ucm/utils.c
index 2def0b8..85549e1 100644
--- a/src/ucm/utils.c
+++ b/src/ucm/utils.c
@@ -9,9 +9,9 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Support for the verb/device/modifier core logic and API,
* command line tool and file parser was kindly sponsored by
--
1.7.5.3

View File

@ -1,38 +0,0 @@
From cd20fe3f4d93c06500f5a6afb70c61e51762a2a6 Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <perex@perex.cz>
Date: Wed, 30 Mar 2011 17:30:09 +0200
Subject: [PATCH 08/23] configure: Fail when the user attempts to compile
shared and static libs
There are some issues with libtool breaking the possibility to build both
types of libraries in one shot. Compile libraries separately.
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
---
configure.in | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/configure.in b/configure.in
index e33e629..7ee0ccc 100644
--- a/configure.in
+++ b/configure.in
@@ -71,6 +71,16 @@ AC_SUBST(LIBTOOL_VERSION_INFO)
test "x$prefix" = xNONE && prefix=$ac_default_prefix
+dnl Do not build static and shared libraries together
+if test "$enable_static" = "$enable_shared" -a "$enable_static" = "yes"; then
+cat <<EOF
+ Please, do not try to compile static and shared libraries together.
+ See INSTALL file for more details (do not use --enable-shared=yes with
+ --enable-static=yes).
+EOF
+ exit 1
+fi
+
dnl ALSA configuration directory
AC_ARG_WITH(configdir,
AS_HELP_STRING([--with-configdir=dir],
--
1.7.5.3

View File

@ -1,37 +0,0 @@
From 83059ee52570856ac41330ab70e5d7383a846cbb Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Wed, 6 Apr 2011 08:34:56 +0200
Subject: [PATCH 09/23] Mark Heaphone {Center|LFE} control of emu10k1 conf as
optional
The controls referred in center_lfe definition in EMU10K1.conf should be
marked as optional since some boards don't have these.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
src/conf/cards/EMU10K1.conf | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/conf/cards/EMU10K1.conf b/src/conf/cards/EMU10K1.conf
index 7a7ebf5..956e163 100644
--- a/src/conf/cards/EMU10K1.conf
+++ b/src/conf/cards/EMU10K1.conf
@@ -108,6 +108,7 @@ EMU10K1.pcm.center_lfe.0 {
index 1
preserve true
# lock true
+ optional true
value true
}
{
@@ -115,6 +116,7 @@ EMU10K1.pcm.center_lfe.0 {
index 1
preserve true
# lock true
+ optional true
value true
}
# if you have a creative's digital receiver, you can get surround/center/lfe
--
1.7.5.3

View File

@ -1,31 +0,0 @@
From 780f30ab1a104e4f2a72f4c7cc2ed3ed0e3725e8 Mon Sep 17 00:00:00 2001
From: David Henningsson <david.henningsson@canonical.com>
Date: Tue, 19 Apr 2011 08:05:08 +0200
Subject: [PATCH 10/23] Fix typo in comment in surround71.conf
BugLink: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=591318
Reported-by: Ariel <asdebian@dsgml.com>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
---
src/conf/pcm/surround71.conf | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/conf/pcm/surround71.conf b/src/conf/pcm/surround71.conf
index eb2360b..076a97d 100644
--- a/src/conf/pcm/surround71.conf
+++ b/src/conf/pcm/surround71.conf
@@ -7,8 +7,8 @@
# chn3 - rear right
# chn4 - center
# chn5 - lfe
-# chn7 - side left
-# chn8 - side right
+# chn6 - side left
+# chn7 - side right
#
pcm.!surround71 {
--
1.7.5.3

View File

@ -1,57 +0,0 @@
From 7ed19bbc9a0150f1b3973de46aa4dfac6b9ed211 Mon Sep 17 00:00:00 2001
From: Raymond Yau <superquad.vortex2@gmail.com>
Date: Wed, 20 Apr 2011 16:18:50 +0800
Subject: [PATCH 11/23] test/latency: print error message when 2 periods per
buffer not supported
Print error message when playback/capture does not support 2 periods
per buffer.
Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
test/latency.c | 18 +++++++++++++++---
1 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/test/latency.c b/test/latency.c
index 03d65a2..e9bc6d8 100644
--- a/test/latency.c
+++ b/test/latency.c
@@ -175,6 +175,7 @@ int setparams(snd_pcm_t *phandle, snd_pcm_t *chandle, int *bufsize)
snd_pcm_sw_params_t *p_swparams, *c_swparams;
snd_pcm_uframes_t p_size, c_size, p_psize, c_psize;
unsigned int p_time, c_time;
+ unsigned int val;
snd_pcm_hw_params_alloca(&p_params);
snd_pcm_hw_params_alloca(&c_params);
@@ -226,12 +227,23 @@ int setparams(snd_pcm_t *phandle, snd_pcm_t *chandle, int *bufsize)
goto __again;
snd_pcm_hw_params_get_buffer_size(p_params, &p_size);
- if (p_psize * 2 < p_size)
+ if (p_psize * 2 < p_size) {
+ snd_pcm_hw_params_get_periods_min(p_params, &val, NULL);
+ if (val > 2) {
+ printf("playback device does not support 2 periods per buffer\n");
+ exit(0);
+ }
goto __again;
+ }
snd_pcm_hw_params_get_buffer_size(c_params, &c_size);
- if (c_psize * 2 < c_size)
+ if (c_psize * 2 < c_size) {
+ snd_pcm_hw_params_get_periods_min(c_params, &val, NULL);
+ if (val > 2 ) {
+ printf("capture device does not support 2 periods per buffer\n");
+ exit(0);
+ }
goto __again;
-
+ }
if ((err = setparams_set(phandle, p_params, p_swparams, "playback")) < 0) {
printf("Unable to set sw parameters for playback stream: %s\n", snd_strerror(err));
exit(0);
--
1.7.5.3

View File

@ -1,111 +0,0 @@
From 16f716eadd61be80b28839396105c020e401294c Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Wed, 20 Apr 2011 14:32:06 +0200
Subject: [PATCH 12/23] EMU10K1.conf: Don't lock hook controls
Locking the controls in hooks causes a BUSY error when multiple
streams are opened, typically in PulseAudio. Better not to touch
the locking in hooks in such a case.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
src/conf/cards/EMU10K1.conf | 20 ++++++++++----------
1 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/src/conf/cards/EMU10K1.conf b/src/conf/cards/EMU10K1.conf
index 956e163..b537864 100644
--- a/src/conf/cards/EMU10K1.conf
+++ b/src/conf/cards/EMU10K1.conf
@@ -21,7 +21,7 @@ EMU10K1.pcm.front.0 {
interface PCM
name "EMU10K1 PCM Send Volume"
index { @func private_pcm_subdevice }
- lock true
+ # lock true
optional true
value [ 255 255 0 0 255 0 0 0 0 255 0 0 ]
}
@@ -29,7 +29,7 @@ EMU10K1.pcm.front.0 {
# for compatibility with older drivers
name "EMU10K1 PCM Send Volume"
index { @func private_pcm_subdevice }
- lock true
+ # lock true
optional true
value [ 255 255 0 0 255 0 0 0 0 255 0 0 ]
}
@@ -37,7 +37,7 @@ EMU10K1.pcm.front.0 {
interface PCM
name "EMU10K1 PCM Send Routing"
index { @func private_pcm_subdevice }
- lock true
+ # lock true
optional true
value [ 8 9 0 0 8 9 0 0 8 9 0 0 ]
}
@@ -45,7 +45,7 @@ EMU10K1.pcm.front.0 {
# for compatibility with older drivers
name "EMU10K1 PCM Send Routing"
index { @func private_pcm_subdevice }
- lock true
+ # lock true
optional true
value [ 8 9 0 0 8 9 0 0 8 9 0 0 ]
}
@@ -72,7 +72,7 @@ EMU10K1.pcm.rear.0 {
interface PCM
name "EMU10K1 PCM Send Volume"
index { @func private_pcm_subdevice }
- lock true
+ # lock true
optional true
value [ 0 0 255 255 0 0 255 0 0 0 0 255 ]
}
@@ -80,7 +80,7 @@ EMU10K1.pcm.rear.0 {
# for compatibility with older drivers
name "EMU10K1 PCM Send Volume"
index { @func private_pcm_subdevice }
- lock true
+ # lock true
optional true
value [ 0 0 255 255 0 0 255 0 0 0 0 255 ]
}
@@ -133,7 +133,7 @@ EMU10K1.pcm.center_lfe.0 {
interface PCM
name "EMU10K1 PCM Send Volume"
index { @func private_pcm_subdevice }
- lock true
+ # lock true
optional true
value [ 255 255 0 0 255 0 0 0 0 255 0 0 ]
}
@@ -141,7 +141,7 @@ EMU10K1.pcm.center_lfe.0 {
# for compatibility with older drivers
name "EMU10K1 PCM Send Volume"
index { @func private_pcm_subdevice }
- lock true
+ # lock true
optional true
value [ 255 255 0 0 255 0 0 0 0 255 0 0 ]
}
@@ -149,7 +149,7 @@ EMU10K1.pcm.center_lfe.0 {
interface PCM
name "EMU10K1 PCM Send Routing"
index { @func private_pcm_subdevice }
- lock true
+ # lock true
optional true
value [ 6 7 0 0 6 7 0 0 6 7 0 0 ]
}
@@ -157,7 +157,7 @@ EMU10K1.pcm.center_lfe.0 {
# for compatibility with older drivers
name "EMU10K1 PCM Send Routing"
index { @func private_pcm_subdevice }
- lock true
+ # lock true
optional true
value [ 6 7 0 0 6 7 0 0 6 7 0 0 ]
}
--
1.7.5.3

View File

@ -1,46 +0,0 @@
From 6bb36928b114e27dcfeeddceabc3241e0fe1d921 Mon Sep 17 00:00:00 2001
From: Raymond Yau <superquad.vortex2@gmail.com>
Date: Sun, 24 Apr 2011 11:56:44 +0800
Subject: [PATCH 13/23] HDA-Intel.conf - Fix low mic volume due to pulseaudio
using "front" device for playback and capture
Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
src/conf/cards/HDA-Intel.conf | 19 +++++++++++++------
1 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/src/conf/cards/HDA-Intel.conf b/src/conf/cards/HDA-Intel.conf
index f7eecb4..bc82dbf 100644
--- a/src/conf/cards/HDA-Intel.conf
+++ b/src/conf/cards/HDA-Intel.conf
@@ -9,13 +9,20 @@ HDA-Intel.pcm.front.0 {
@args.CARD {
type string
}
- type softvol
- slave.pcm {
- type hw
- card $CARD
+ type asym
+ playback.pcm {
+ type softvol
+ slave.pcm {
+ type hw
+ card $CARD
+ }
+ control {
+ name "PCM Playback Volume"
+ card $CARD
+ }
}
- control {
- name "PCM Playback Volume"
+ capture.pcm {
+ type hw
card $CARD
}
}
--
1.7.5.3

View File

@ -1,120 +0,0 @@
From 808ce5deb3550e522a0c3087f1c851bdf87d3464 Mon Sep 17 00:00:00 2001
From: Sudarshan Bisht <sudarshan.bisht@nokia.com>
Date: Tue, 12 Apr 2011 13:09:45 +0300
Subject: [PATCH 14/23] alsa-lib: fixed coverity reported issues under
"FORWARD_NULL" checker.
Coverity Static Analysis helps developers find hard-to-spot,
yet potentially crash-causing defects early in the development phase,
reducing the cost,time, and risk of software errors.
This patch has fix for situations where variable can be NULL
but not been checked beforehand
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
modules/mixer/simple/sbasedl.c | 2 +-
src/conf.c | 1 +
src/hwdep/hwdep.c | 1 +
src/pcm/pcm_hooks.c | 1 +
src/pcm/pcm_simple.c | 2 +-
src/rawmidi/rawmidi.c | 1 +
src/rawmidi/rawmidi_virt.c | 8 +++++---
7 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/modules/mixer/simple/sbasedl.c b/modules/mixer/simple/sbasedl.c
index 0137586..494802f 100644
--- a/modules/mixer/simple/sbasedl.c
+++ b/modules/mixer/simple/sbasedl.c
@@ -99,7 +99,7 @@ int mixer_simple_basic_dlopen(snd_mixer_class_t *class,
__error:
if (initflag)
free(priv);
- if (h == NULL)
+ if (h)
snd_dlclose(h);
free(xlib);
return -ENXIO;
diff --git a/src/conf.c b/src/conf.c
index 8939d62..ddefff6 100644
--- a/src/conf.c
+++ b/src/conf.c
@@ -3268,6 +3268,7 @@ static int snd_config_hooks_call(snd_config_t *root, snd_config_t *config, snd_c
snd_config_iterator_t i, next;
if (snd_config_get_type(func_conf) != SND_CONFIG_TYPE_COMPOUND) {
SNDERR("Invalid type for func %s definition", str);
+ err = -EINVAL;
goto _err;
}
snd_config_for_each(i, next, func_conf) {
diff --git a/src/hwdep/hwdep.c b/src/hwdep/hwdep.c
index b882b35..5dc791c 100644
--- a/src/hwdep/hwdep.c
+++ b/src/hwdep/hwdep.c
@@ -78,6 +78,7 @@ static int snd_hwdep_open_conf(snd_hwdep_t **hwdep,
if (err >= 0) {
if (snd_config_get_type(type_conf) != SND_CONFIG_TYPE_COMPOUND) {
SNDERR("Invalid type for HWDEP type %s definition", str);
+ err = -EINVAL;
goto _err;
}
snd_config_for_each(i, next, type_conf) {
diff --git a/src/pcm/pcm_hooks.c b/src/pcm/pcm_hooks.c
index 3a99d55..404d51e 100644
--- a/src/pcm/pcm_hooks.c
+++ b/src/pcm/pcm_hooks.c
@@ -385,6 +385,7 @@ static int snd_pcm_hook_add_conf(snd_pcm_t *pcm, snd_config_t *root, snd_config_
if (err >= 0) {
if (snd_config_get_type(type) != SND_CONFIG_TYPE_COMPOUND) {
SNDERR("Invalid type for PCM type %s definition", str);
+ err = -EINVAL;
goto _err;
}
snd_config_for_each(i, next, type) {
diff --git a/src/pcm/pcm_simple.c b/src/pcm/pcm_simple.c
index 975f699..f943ec0 100644
--- a/src/pcm/pcm_simple.c
+++ b/src/pcm/pcm_simple.c
@@ -89,7 +89,7 @@ static int set_hw_params(snd_pcm_t *pcm,
return err;
if (periods == 1)
return -EINVAL;
- if (*period_time == 0) {
+ if (period_time) {
err = INTERNAL(snd_pcm_hw_params_get_period_time)(hw_params, period_time, NULL);
if (err < 0)
return err;
diff --git a/src/rawmidi/rawmidi.c b/src/rawmidi/rawmidi.c
index b28488a..0bd6b96 100644
--- a/src/rawmidi/rawmidi.c
+++ b/src/rawmidi/rawmidi.c
@@ -201,6 +201,7 @@ static int snd_rawmidi_open_conf(snd_rawmidi_t **inputp, snd_rawmidi_t **outputp
if (err >= 0) {
if (snd_config_get_type(type_conf) != SND_CONFIG_TYPE_COMPOUND) {
SNDERR("Invalid type for RAWMIDI type %s definition", str);
+ err = -EINVAL;
goto _err;
}
snd_config_for_each(i, next, type_conf) {
diff --git a/src/rawmidi/rawmidi_virt.c b/src/rawmidi/rawmidi_virt.c
index 52b8984..e5b17e4 100644
--- a/src/rawmidi/rawmidi_virt.c
+++ b/src/rawmidi/rawmidi_virt.c
@@ -383,9 +383,11 @@ int snd_rawmidi_virtual_open(snd_rawmidi_t **inputp, snd_rawmidi_t **outputp,
_err:
if (seq_handle)
snd_seq_close(seq_handle);
- if (virt->midi_event)
- snd_midi_event_free(virt->midi_event);
- free(virt);
+ if (virt) {
+ if (virt->midi_event)
+ snd_midi_event_free(virt->midi_event);
+ free(virt);
+ }
if (inputp)
free(*inputp);
if (outputp)
--
1.7.5.3

View File

@ -1,37 +0,0 @@
From 75194776a79ddd23b764138dc7c3a2e224b439a0 Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Wed, 4 May 2011 09:14:29 +0200
Subject: [PATCH 15/23] Fix compile warnings
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
strstr() returns a char pointer
simple_none.c: In function base_len:
simple_none.c:940:33: warning: ordered comparison of pointer with integer zero
simple_none.c:941:29: warning: ordered comparison of pointer with integer zero
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
src/mixer/simple_none.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/mixer/simple_none.c b/src/mixer/simple_none.c
index 395e4d6..b11e9e8 100644
--- a/src/mixer/simple_none.c
+++ b/src/mixer/simple_none.c
@@ -937,8 +937,8 @@ static int base_len(const char *name, selem_ctl_type_t *type)
*type = CTL_CAPTURE_ROUTE;
return strlen(name);
}
- if (strstr(name, "3D Control") > 0) {
- if (strstr(name, "Depth") > 0) {
+ if (strstr(name, "3D Control")) {
+ if (strstr(name, "Depth")) {
*type = CTL_PLAYBACK_VOLUME;
return strlen(name);
}
--
1.7.5.3

View File

@ -1,41 +0,0 @@
From 6bef13e251200a36dc818f0b40a4a414a93f7553 Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Wed, 4 May 2011 09:19:09 +0200
Subject: [PATCH 16/23] Fix printf for size_t
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Need to use z prefix for size_t type.
midiloop.c: In function main:
midiloop.c:172:2: warning: format %i expects type int, but argument 2 has type size_t
....
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
test/midiloop.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/test/midiloop.c b/test/midiloop.c
index 31fbcd3..ee2e563 100644
--- a/test/midiloop.c
+++ b/test/midiloop.c
@@ -169,10 +169,10 @@ int main(int argc, char** argv)
err = snd_rawmidi_status(handle_out, ostat);
if (err < 0)
fprintf(stderr, "output stream status error: %d\n", err);
- printf("input.status.avail = %i\n", snd_rawmidi_status_get_avail(istat));
- printf("input.status.xruns = %i\n", snd_rawmidi_status_get_xruns(istat));
- printf("output.status.avail = %i\n", snd_rawmidi_status_get_avail(ostat));
- printf("output.status.xruns = %i\n", snd_rawmidi_status_get_xruns(ostat));
+ printf("input.status.avail = %zi\n", snd_rawmidi_status_get_avail(istat));
+ printf("input.status.xruns = %zi\n", snd_rawmidi_status_get_xruns(istat));
+ printf("output.status.avail = %zi\n", snd_rawmidi_status_get_avail(ostat));
+ printf("output.status.xruns = %zi\n", snd_rawmidi_status_get_xruns(ostat));
diff = timediff(end, start);
printf("Time diff: %Liusec (%Li bytes/sec)\n", diff, ((long long)opos * 1000000) / diff);
--
1.7.5.3

View File

@ -1,45 +0,0 @@
From 516569bbba7eb0e03f2892a67d8559c4d0bcd17a Mon Sep 17 00:00:00 2001
From: Baek Chang <breakchange@gmail.com>
Date: Tue, 3 May 2011 10:52:34 -0700
Subject: [PATCH 18/23] UCM: fix memory leak when executing cset commands
fix memory leak when executing cset commands.
snd_ctl_elem's are allocated, but never free'ed
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
src/ucm/main.c | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/src/ucm/main.c b/src/ucm/main.c
index 86f29e3..f8ceeeb 100644
--- a/src/ucm/main.c
+++ b/src/ucm/main.c
@@ -173,7 +173,8 @@ static int execute_cset(snd_ctl_t *ctl, char *cset)
pos = strrchr(cset, ' ');
if (pos == NULL) {
uc_error("undefined value for cset >%s<", cset);
- return -EINVAL;
+ err = -EINVAL;
+ goto __fail;
}
*pos = '\0';
err = snd_ctl_ascii_elem_id_parse(id, cset);
@@ -196,6 +197,14 @@ static int execute_cset(snd_ctl_t *ctl, char *cset)
err = 0;
__fail:
*pos = ' ';
+
+ if (id != NULL)
+ free(id);
+ if (value != NULL)
+ free(value);
+ if (info != NULL)
+ free(info);
+
return err;
}
--
1.7.5.3

View File

@ -1,31 +0,0 @@
From 922ff0da833e726054df2fc87abdc201fbc5e21b Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Mon, 9 May 2011 14:11:22 +0200
Subject: [PATCH 19/23] Specficy subdevice 0 for front/surround* of
HDA-Intel.conf
The subdevice 0 is used for multi-channel outputs.
This fixes the detection of multi-channel devices of VIA codecs
by PulseAudio.
Reported-by: Raymond Yau <superquad.vortex2@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
src/conf/cards/HDA-Intel.conf | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/src/conf/cards/HDA-Intel.conf b/src/conf/cards/HDA-Intel.conf
index bc82dbf..d4f2667 100644
--- a/src/conf/cards/HDA-Intel.conf
+++ b/src/conf/cards/HDA-Intel.conf
@@ -15,6 +15,7 @@ HDA-Intel.pcm.front.0 {
slave.pcm {
type hw
card $CARD
+ subdevice 0
}
control {
name "PCM Playback Volume"
--
1.7.5.3

View File

@ -1,322 +0,0 @@
From ea020c3b2e678f2a29df468ec7da09f9d5785194 Mon Sep 17 00:00:00 2001
From: Raymond Yau <superquad.vortex2@gmail.com>
Date: Fri, 13 May 2011 10:40:28 +0800
Subject: [PATCH 20/23] emu10k1.conf - Fix no sound problem when using SB
Live! Platinum
Add asym to front, rear and center_lfe to prevent route change after
removed the lock.
After removed the lock, when application using "hw", "front", "rear",
"surround40" and "surround51", the route of the front channel is
changed (lost right channel or both channels) when other application
using "front", "rear" or "center_lfe" to record
Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
src/conf/cards/EMU10K1.conf | 267 ++++++++++++++++++++++--------------------
1 files changed, 140 insertions(+), 127 deletions(-)
diff --git a/src/conf/cards/EMU10K1.conf b/src/conf/cards/EMU10K1.conf
index b537864..706da0a 100644
--- a/src/conf/cards/EMU10K1.conf
+++ b/src/conf/cards/EMU10K1.conf
@@ -9,48 +9,55 @@ EMU10K1.pcm.front.0 {
@args.CARD {
type string
}
- type hooks
- slave.pcm {
+ type asym
+ playback.pcm {
+ type hooks
+ slave.pcm {
+ type hw
+ card $CARD
+ }
+ hooks.0 {
+ type ctl_elems
+ hook_args [
+ {
+ interface PCM
+ name "EMU10K1 PCM Send Volume"
+ index { @func private_pcm_subdevice }
+ # lock true
+ optional true
+ value [ 255 255 0 0 255 0 0 0 0 255 0 0 ]
+ }
+ {
+ # for compatibility with older drivers
+ name "EMU10K1 PCM Send Volume"
+ index { @func private_pcm_subdevice }
+ # lock true
+ optional true
+ value [ 255 255 0 0 255 0 0 0 0 255 0 0 ]
+ }
+ {
+ interface PCM
+ name "EMU10K1 PCM Send Routing"
+ index { @func private_pcm_subdevice }
+ # lock true
+ optional true
+ value [ 8 9 0 0 8 9 0 0 8 9 0 0 ]
+ }
+ {
+ # for compatibility with older drivers
+ name "EMU10K1 PCM Send Routing"
+ index { @func private_pcm_subdevice }
+ # lock true
+ optional true
+ value [ 8 9 0 0 8 9 0 0 8 9 0 0 ]
+ }
+ ]
+ }
+ }
+ capture.pcm {
type hw
card $CARD
}
- hooks.0 {
- type ctl_elems
- hook_args [
- {
- interface PCM
- name "EMU10K1 PCM Send Volume"
- index { @func private_pcm_subdevice }
- # lock true
- optional true
- value [ 255 255 0 0 255 0 0 0 0 255 0 0 ]
- }
- {
- # for compatibility with older drivers
- name "EMU10K1 PCM Send Volume"
- index { @func private_pcm_subdevice }
- # lock true
- optional true
- value [ 255 255 0 0 255 0 0 0 0 255 0 0 ]
- }
- {
- interface PCM
- name "EMU10K1 PCM Send Routing"
- index { @func private_pcm_subdevice }
- # lock true
- optional true
- value [ 8 9 0 0 8 9 0 0 8 9 0 0 ]
- }
- {
- # for compatibility with older drivers
- name "EMU10K1 PCM Send Routing"
- index { @func private_pcm_subdevice }
- # lock true
- optional true
- value [ 8 9 0 0 8 9 0 0 8 9 0 0 ]
- }
- ]
- }
}
<confdir:pcm/rear.conf>
@@ -60,31 +67,34 @@ EMU10K1.pcm.rear.0 {
@args.CARD {
type string
}
- type hooks
- slave.pcm {
- type hw
- card $CARD
- }
- hooks.0 {
- type ctl_elems
- hook_args [
- {
- interface PCM
- name "EMU10K1 PCM Send Volume"
- index { @func private_pcm_subdevice }
- # lock true
- optional true
- value [ 0 0 255 255 0 0 255 0 0 0 0 255 ]
- }
- {
- # for compatibility with older drivers
- name "EMU10K1 PCM Send Volume"
- index { @func private_pcm_subdevice }
- # lock true
- optional true
- value [ 0 0 255 255 0 0 255 0 0 0 0 255 ]
- }
- ]
+ type asym
+ playback.pcm {
+ type hooks
+ slave.pcm {
+ type hw
+ card $CARD
+ }
+ hooks.0 {
+ type ctl_elems
+ hook_args [
+ {
+ interface PCM
+ name "EMU10K1 PCM Send Volume"
+ index { @func private_pcm_subdevice }
+ # lock true
+ optional true
+ value [ 0 0 255 255 0 0 255 0 0 0 0 255 ]
+ }
+ {
+ # for compatibility with older drivers
+ name "EMU10K1 PCM Send Volume"
+ index { @func private_pcm_subdevice }
+ # lock true
+ optional true
+ value [ 0 0 255 255 0 0 255 0 0 0 0 255 ]
+ }
+ ]
+ }
}
}
@@ -95,73 +105,76 @@ EMU10K1.pcm.center_lfe.0 {
@args.CARD {
type string
}
- type hooks
- slave.pcm {
- type hw
- card $CARD
- }
- hooks.0 {
- type ctl_elems
- hook_args [
- {
- name "Headphone Center Playback Switch"
- index 1
- preserve true
- # lock true
- optional true
- value true
- }
- {
- name "Headphone LFE Playback Switch"
- index 1
- preserve true
- # lock true
- optional true
- value true
- }
+ type asym
+ playback.pcm {
+ type hooks
+ slave.pcm {
+ type hw
+ card $CARD
+ }
+ hooks.0 {
+ type ctl_elems
+ hook_args [
+ {
+ name "Headphone Center Playback Switch"
+ index 1
+ preserve true
+ # lock true
+ optional true
+ value true
+ }
+ {
+ name "Headphone LFE Playback Switch"
+ index 1
+ preserve true
+ # lock true
+ optional true
+ value true
+ }
# if you have a creative's digital receiver, you can get surround/center/lfe
# output through the digital jack. so, the following is commented out.
# pay attention in case of analog output from the shared center/digital
# jack!
-# {
-# name "SB Live Analog/Digital Output Jack"
-# preserve true
-# lock true
-# value 0
-# }
- {
- interface PCM
- name "EMU10K1 PCM Send Volume"
- index { @func private_pcm_subdevice }
- # lock true
- optional true
- value [ 255 255 0 0 255 0 0 0 0 255 0 0 ]
- }
- {
- # for compatibility with older drivers
- name "EMU10K1 PCM Send Volume"
- index { @func private_pcm_subdevice }
- # lock true
- optional true
- value [ 255 255 0 0 255 0 0 0 0 255 0 0 ]
- }
- {
- interface PCM
- name "EMU10K1 PCM Send Routing"
- index { @func private_pcm_subdevice }
- # lock true
- optional true
- value [ 6 7 0 0 6 7 0 0 6 7 0 0 ]
- }
- {
- # for compatibility with older drivers
- name "EMU10K1 PCM Send Routing"
- index { @func private_pcm_subdevice }
- # lock true
- optional true
- value [ 6 7 0 0 6 7 0 0 6 7 0 0 ]
- }
- ]
+# {
+# name "SB Live Analog/Digital Output Jack"
+# preserve true
+# lock true
+# value 0
+# }
+ {
+ interface PCM
+ name "EMU10K1 PCM Send Volume"
+ index { @func private_pcm_subdevice }
+ # lock true
+ optional true
+ value [ 255 255 0 0 255 0 0 0 0 255 0 0 ]
+ }
+ {
+ # for compatibility with older drivers
+ name "EMU10K1 PCM Send Volume"
+ index { @func private_pcm_subdevice }
+ # lock true
+ optional true
+ value [ 255 255 0 0 255 0 0 0 0 255 0 0 ]
+ }
+ {
+ interface PCM
+ name "EMU10K1 PCM Send Routing"
+ index { @func private_pcm_subdevice }
+ # lock true
+ optional true
+ value [ 6 7 0 0 6 7 0 0 6 7 0 0 ]
+ }
+ {
+ # for compatibility with older drivers
+ name "EMU10K1 PCM Send Routing"
+ index { @func private_pcm_subdevice }
+ # lock true
+ optional true
+ value [ 6 7 0 0 6 7 0 0 6 7 0 0 ]
+ }
+ ]
+ }
}
}
--
1.7.5.3

View File

@ -1,38 +0,0 @@
From 1720d30ad82ebb8b5f52fc08c6c610e51203fa89 Mon Sep 17 00:00:00 2001
From: Alexander Stein <a.stein@systec-electronic.com>
Date: Thu, 19 May 2011 15:16:36 +0200
Subject: [PATCH 21/23] ctlparse: Respect softfloat configure option
If we want softlfoat we can't use ceil which uses libm.
Signed-off-by: Alexander Stein <a.stein@systec-electronic.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
src/control/ctlparse.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/src/control/ctlparse.c b/src/control/ctlparse.c
index a929816..a16f96a 100644
--- a/src/control/ctlparse.c
+++ b/src/control/ctlparse.c
@@ -33,8 +33,17 @@
/* Function to convert from percentage to volume. val = percentage */
+#ifdef HAVE_SOFT_FLOAT
+static inline long int convert_prange1(long val, long min, long max)
+{
+ long temp = val * (max - min);
+ return temp / 100 + min + ((temp % 100) == 0 ? 0 : 1);
+}
+#else
+
#define convert_prange1(val, min, max) \
ceil((val) * ((max) - (min)) * 0.01 + (min))
+#endif
#define check_range(val, min, max) \
((val < min) ? (min) : ((val > max) ? (max) : (val)))
--
1.7.5.3

View File

@ -1,30 +0,0 @@
From 0a2fd2d38677c48443a1c9b1aba8c432c3b6bd96 Mon Sep 17 00:00:00 2001
From: Stephen Warren <swarren@nvidia.com>
Date: Thu, 2 Jun 2011 16:44:38 -0600
Subject: [PATCH 22/23] UCM: Fix typo in error message
parse_name_is_safe disallows dots in the name, so not is the correct
word to use
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
---
src/ucm/parser.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/ucm/parser.c b/src/ucm/parser.c
index 38fdba0..f7de9bd 100644
--- a/src/ucm/parser.c
+++ b/src/ucm/parser.c
@@ -62,7 +62,7 @@ int parse_string(snd_config_t *n, char **res)
int parse_is_name_safe(char *name)
{
if (strchr(name, '.')) {
- uc_error("char '.' now allowed in '%s'", name);
+ uc_error("char '.' not allowed in '%s'", name);
return 0;
}
return 1;
--
1.7.5.3

View File

@ -1,35 +0,0 @@
From 0a4b1ee746c1cfbfdfe586ce5f97b047fcad09f8 Mon Sep 17 00:00:00 2001
From: Stephen Warren <swarren@nvidia.com>
Date: Thu, 2 Jun 2011 16:44:39 -0600
Subject: [PATCH 23/23] UCM: Fix deadlock following failed get _verb
When querying the current verb without a verb set, snd_use_case_get bails
out early without unlocking uc_mgr->mutex. This causes subsequent API calls
to hang. Instead, s/return/goto __end/.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
---
src/ucm/main.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/ucm/main.c b/src/ucm/main.c
index f8ceeeb..fb4aa91 100644
--- a/src/ucm/main.c
+++ b/src/ucm/main.c
@@ -1132,8 +1132,10 @@ int snd_use_case_get(snd_use_case_mgr_t *uc_mgr,
}
err = 0;
} else if (strcmp(identifier, "_verb") == 0) {
- if (uc_mgr->active_verb == NULL)
- return -ENOENT;
+ if (uc_mgr->active_verb == NULL) {
+ err = -ENOENT;
+ goto __end;
+ }
*value = strdup(uc_mgr->active_verb->name);
if (*value == NULL) {
err = -ENOMEM;
--
1.7.5.3

View File

@ -1,50 +0,0 @@
From e6f990e5c9be5cac6f36924d20a75d0f69d27297 Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Tue, 26 Jul 2011 13:05:53 +0200
Subject: [PATCH 1/2] Define "sysdefault" PCM and control
When "default" PCM and control definitions are overwritten by others
like PulseAudio setup, the original system-default defition is lost.
This is a problem when PA is temporarily (or intentionally) disabled
and user wants to use the default dmix.
This patch adds a new standard definition for the system-default,
"sysdefault". This can be used for fallbacks.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
src/conf/alsa.conf | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/src/conf/alsa.conf b/src/conf/alsa.conf
index 1889f01..a33c24e 100644
--- a/src/conf/alsa.conf
+++ b/src/conf/alsa.conf
@@ -119,6 +119,7 @@ defaults.timer.subdevice 0
pcm.cards cards.pcm
pcm.default cards.pcm.default
+pcm.sysdefault cards.pcm.default
pcm.front cards.pcm.front
pcm.rear cards.pcm.rear
pcm.center_lfe cards.pcm.center_lfe
@@ -321,7 +322,7 @@ pcm.null {
# Control interface
#
-ctl.default {
+ctl.sysdefault {
type hw
card {
@func getenv
@@ -335,6 +336,7 @@ ctl.default {
}
}
}
+ctl.default ctl.sysdefault
ctl.hw {
@args [ CARD ]
--
1.7.6

View File

@ -1,116 +0,0 @@
From acb423d937111d682706169bcdcb58c70fdfa84d Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Tue, 26 Jul 2011 13:10:24 +0200
Subject: [PATCH 2/2] Add snd_{ctl|pcm}_open_fallback() functions
This patch adds new API functions, snd_ctl_open_fallback() and
snd_pcm_open_fallback(). These are just like snd_*_open_lconf() but
used to open a fallback PCM/control. The difference is that it replaces
the name string with the given original name, so that hctl and other
upper-layers will recognize it as an alias.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
include/control.h | 1 +
include/pcm.h | 3 +++
src/control/control.c | 22 ++++++++++++++++++++++
src/pcm/pcm.c | 24 ++++++++++++++++++++++++
4 files changed, 50 insertions(+), 0 deletions(-)
diff --git a/include/control.h b/include/control.h
index e8f38bb..f265e34 100644
--- a/include/control.h
+++ b/include/control.h
@@ -224,6 +224,7 @@ char *snd_device_name_get_hint(const void *hint, const char *id);
int snd_ctl_open(snd_ctl_t **ctl, const char *name, int mode);
int snd_ctl_open_lconf(snd_ctl_t **ctl, const char *name, int mode, snd_config_t *lconf);
+int snd_ctl_open_fallback(snd_ctl_t **ctl, snd_config_t *root, const char *name, const char *orig_name, int mode);
int snd_ctl_close(snd_ctl_t *ctl);
int snd_ctl_nonblock(snd_ctl_t *ctl, int nonblock);
int snd_async_add_ctl_handler(snd_async_handler_t **handler, snd_ctl_t *ctl,
diff --git a/include/pcm.h b/include/pcm.h
index 7243ffb..be355a9 100644
--- a/include/pcm.h
+++ b/include/pcm.h
@@ -410,6 +410,9 @@ int snd_pcm_open(snd_pcm_t **pcm, const char *name,
int snd_pcm_open_lconf(snd_pcm_t **pcm, const char *name,
snd_pcm_stream_t stream, int mode,
snd_config_t *lconf);
+int snd_pcm_open_fallback(snd_pcm_t **pcm, snd_config_t *root,
+ const char *name, const char *orig_name,
+ snd_pcm_stream_t stream, int mode);
int snd_pcm_close(snd_pcm_t *pcm);
const char *snd_pcm_name(snd_pcm_t *pcm);
diff --git a/src/control/control.c b/src/control/control.c
index 19e9389..cd17c6f 100644
--- a/src/control/control.c
+++ b/src/control/control.c
@@ -919,6 +919,28 @@ int snd_ctl_open_lconf(snd_ctl_t **ctlp, const char *name,
return snd_ctl_open_noupdate(ctlp, lconf, name, mode);
}
+/**
+ * \brief Opens a fallback CTL
+ * \param ctlp Returned CTL handle
+ * \param root Configuration root
+ * \param name ASCII identifier of the CTL handle used as fallback
+ * \param orig_name The original ASCII name
+ * \param mode Open mode (see #SND_CTL_NONBLOCK, #SND_CTL_ASYNC)
+ * \return 0 on success otherwise a negative error code
+ */
+int snd_ctl_open_fallback(snd_ctl_t **ctlp, snd_config_t *root,
+ const char *name, const char *orig_name, int mode)
+{
+ int err;
+ assert(ctlp && name && root);
+ err = snd_ctl_open_noupdate(ctlp, root, name, mode);
+ if (err >= 0) {
+ free((*ctlp)->name);
+ (*ctlp)->name = orig_name ? strdup(orig_name) : NULL;
+ }
+ return err;
+}
+
#ifndef DOC_HIDDEN
#define TYPE(v) [SND_CTL_ELEM_TYPE_##v] = #v
#define IFACE(v) [SND_CTL_ELEM_IFACE_##v] = #v
diff --git a/src/pcm/pcm.c b/src/pcm/pcm.c
index 02dea0d..12f8cd0 100644
--- a/src/pcm/pcm.c
+++ b/src/pcm/pcm.c
@@ -2259,6 +2259,30 @@ int snd_pcm_open_lconf(snd_pcm_t **pcmp, const char *name,
return snd_pcm_open_noupdate(pcmp, lconf, name, stream, mode, 0);
}
+/**
+ * \brief Opens a fallback PCM
+ * \param pcmp Returned PCM handle
+ * \param root Configuration root
+ * \param name ASCII identifier of the PCM handle
+ * \param orig_name The original ASCII name
+ * \param stream Wanted stream
+ * \param mode Open mode (see #SND_PCM_NONBLOCK, #SND_PCM_ASYNC)
+ * \return 0 on success otherwise a negative error code
+ */
+int snd_pcm_open_fallback(snd_pcm_t **pcmp, snd_config_t *root,
+ const char *name, const char *orig_name,
+ snd_pcm_stream_t stream, int mode)
+{
+ int err;
+ assert(pcmp && name && root);
+ err = snd_pcm_open_noupdate(pcmp, root, name, stream, mode, 0);
+ if (err >= 0) {
+ free((*pcmp)->name);
+ (*pcmp)->name = orig_name ? strdup(orig_name) : NULL;
+ }
+ return err;
+}
+
#ifndef DOC_HIDDEN
int snd_pcm_new(snd_pcm_t **pcmp, snd_pcm_type_t type, const char *name,
snd_pcm_stream_t stream, int mode)
--
1.7.6

View File

@ -1,29 +0,0 @@
From e31aaac5308216f89039cdfa016fe396f49e8fe7 Mon Sep 17 00:00:00 2001
From: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Date: Thu, 28 Jul 2011 23:24:25 +0200
Subject: [PATCH] Add RME RPM to HDSP_IO_Type.
The hdsp.c driver supports the RME RPM devices, but we also need this
information in alsa-lib for tools like hdsploader and hdspmixer.
Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
include/sound/hdsp.h | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/include/sound/hdsp.h b/include/sound/hdsp.h
index 0fc9e98..5adaf7b 100644
--- a/include/sound/hdsp.h
+++ b/include/sound/hdsp.h
@@ -28,6 +28,7 @@ typedef enum {
Multiface,
H9652,
H9632,
+ RPM,
Undefined,
} HDSP_IO_Type;
--
1.7.6.1

View File

@ -1,31 +0,0 @@
From 29880e8c66cfdc584e01aa549037f76b081b5019 Mon Sep 17 00:00:00 2001
From: Lu Guanqun <guanqun.lu@intel.com>
Date: Fri, 19 Aug 2011 16:05:25 +0800
Subject: [PATCH 1/3] ucm: fix seg fault in execute_cset()
When there's no space in 'cset', 'pos' gets NULL, dereferencing 'pos' gets a
seg fault. We need to be more robust.
Signed-off-by: Lu Guanqun <guanqun.lu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
src/ucm/main.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/src/ucm/main.c b/src/ucm/main.c
index 8e9a85d..9ecbe43 100644
--- a/src/ucm/main.c
+++ b/src/ucm/main.c
@@ -196,7 +196,8 @@ static int execute_cset(snd_ctl_t *ctl, char *cset)
goto __fail;
err = 0;
__fail:
- *pos = ' ';
+ if (pos != NULL)
+ *pos = ' ';
if (id != NULL)
free(id);
--
1.7.6.1

View File

@ -1,27 +0,0 @@
From a97aa7f065ed4a7fc1879921a58c40954dc34316 Mon Sep 17 00:00:00 2001
From: Lu Guanqun <guanqun.lu@intel.com>
Date: Fri, 19 Aug 2011 16:05:30 +0800
Subject: [PATCH 2/3] ucm: tivial code style fix
Signed-off-by: Lu Guanqun <guanqun.lu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
src/ucm/main.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/ucm/main.c b/src/ucm/main.c
index 9ecbe43..76ca151 100644
--- a/src/ucm/main.c
+++ b/src/ucm/main.c
@@ -173,7 +173,7 @@ static int execute_cset(snd_ctl_t *ctl, char *cset)
pos = strrchr(cset, ' ');
if (pos == NULL) {
uc_error("undefined value for cset >%s<", cset);
- err = -EINVAL;
+ err = -EINVAL;
goto __fail;
}
*pos = '\0';
--
1.7.6.1

View File

@ -1,55 +0,0 @@
From 26e80c2e32bd3a088b56a6ea4e30d5b8ccce9112 Mon Sep 17 00:00:00 2001
From: Lu Guanqun <guanqun.lu@intel.com>
Date: Mon, 22 Aug 2011 13:35:32 +0800
Subject: [PATCH 3/3] ucm: add another sequence 'msleep'
Thus, we have two sleep statements:
msleep <milliseconds>
usleep <microseconds>
Signed-off-by: Lu Guanqun <guanqun.lu@intel.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
src/ucm/parser.c | 11 +++++++++++
src/ucm/ucm_local.h | 2 +-
2 files changed, 12 insertions(+), 1 deletions(-)
diff --git a/src/ucm/parser.c b/src/ucm/parser.c
index 23b67bc..b93d832 100644
--- a/src/ucm/parser.c
+++ b/src/ucm/parser.c
@@ -316,6 +316,17 @@ static int parse_sequence(snd_use_case_mgr_t *uc_mgr ATTRIBUTE_UNUSED,
continue;
}
+ if (strcmp(cmd, "msleep") == 0) {
+ curr->type = SEQUENCE_ELEMENT_TYPE_SLEEP;
+ err = snd_config_get_integer(n, &curr->data.sleep);
+ if (err < 0) {
+ uc_error("error: msleep requires integer!");
+ return err;
+ }
+ curr->data.sleep *= 1000L;
+ continue;
+ }
+
if (strcmp(cmd, "exec") == 0) {
curr->type = SEQUENCE_ELEMENT_TYPE_EXEC;
err = parse_string(n, &curr->data.exec);
diff --git a/src/ucm/ucm_local.h b/src/ucm/ucm_local.h
index 0522bf5..03d3ace 100644
--- a/src/ucm/ucm_local.h
+++ b/src/ucm/ucm_local.h
@@ -57,7 +57,7 @@ struct sequence_element {
struct list_head list;
unsigned int type;
union {
- long sleep; /* Sleep time in msecs if sleep element, else 0 */
+ long sleep; /* Sleep time in microseconds if sleep element, else 0 */
char *cdev;
char *cset;
char *exec;
--
1.7.6.1

View File

@ -1,201 +0,0 @@
From 7924500688fdfeac71e5968e5f5875726a8dce14 Mon Sep 17 00:00:00 2001
From: Colin Guthrie <colin@mageia.org>
Date: Fri, 16 Sep 2011 10:04:26 +0100
Subject: [PATCH] conf: Allow for a directory to be given as a config file.
When this is done, *.conf files can be placed in that directory and they
will be processed by as if they were included directly.
A directory (typically /usr/share/alsa/alsa.conf.d/) has been
added into the distribution.
v2: Used existing conf syntax rather than processing via autotools
v3: Split file loading into separate function and made error handling
more consistent.
Signed-off-by: Colin Guthrie <colin@mageia.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
configure.in | 3 +-
src/conf.c | 78 ++++++++++++++++++++++++++++++++-----
src/conf/Makefile.am | 2 +-
src/conf/alsa.conf | 7 +++
src/conf/alsa.conf.d/Makefile.am | 8 ++++
src/conf/alsa.conf.d/README | 2 +
6 files changed, 87 insertions(+), 13 deletions(-)
create mode 100644 src/conf/alsa.conf.d/Makefile.am
create mode 100644 src/conf/alsa.conf.d/README
diff --git a/configure.in b/configure.in
index 7ee0ccc..13e38b8 100644
--- a/configure.in
+++ b/configure.in
@@ -616,7 +616,8 @@ AC_OUTPUT(Makefile doc/Makefile doc/pictures/Makefile doc/doxygen.cfg \
src/pcm/Makefile src/pcm/scopes/Makefile \
src/rawmidi/Makefile src/timer/Makefile \
src/hwdep/Makefile src/seq/Makefile src/ucm/Makefile \
- src/compat/Makefile src/alisp/Makefile src/conf/Makefile \
+ src/compat/Makefile src/alisp/Makefile \
+ src/conf/Makefile src/conf/alsa.conf.d/Makefile \
src/conf/cards/Makefile \
src/conf/pcm/Makefile \
modules/Makefile modules/mixer/Makefile modules/mixer/simple/Makefile \
diff --git a/src/conf.c b/src/conf.c
index ddefff6..5b1b5a6 100644
--- a/src/conf.c
+++ b/src/conf.c
@@ -417,6 +417,7 @@ beginning:</P>
#include <stdarg.h>
#include <limits.h>
#include <sys/stat.h>
+#include <dirent.h>
#include <locale.h>
#include "local.h"
#ifdef HAVE_LIBPTHREAD
@@ -3373,6 +3374,42 @@ static int snd_config_hooks(snd_config_t *config, snd_config_t *private_data)
return err;
}
+static int config_filename_filter(const struct dirent *dirent)
+{
+ size_t flen;
+
+ if (dirent == NULL)
+ return 0;
+ if (dirent->d_type == DT_DIR)
+ return 0;
+
+ flen = strlen(dirent->d_name);
+ if (flen <= 5)
+ return 0;
+
+ if (strncmp(&dirent->d_name[flen-5], ".conf", 5) == 0)
+ return 1;
+
+ return 0;
+}
+
+static int config_file_open(snd_config_t *root, const char *filename)
+{
+ snd_input_t *in;
+ int err;
+
+ err = snd_input_stdio_open(&in, filename, "r");
+ if (err >= 0) {
+ err = snd_config_load(root, in);
+ snd_input_close(in);
+ if (err < 0)
+ SNDERR("%s may be old or corrupted: consider to remove or fix it", filename);
+ } else
+ SNDERR("cannot access file %s", filename);
+
+ return err;
+}
+
/**
* \brief Loads and parses the given configurations files.
* \param[in] root Handle to the root configuration node.
@@ -3457,20 +3494,39 @@ int snd_config_hook_load(snd_config_t *root, snd_config_t *config, snd_config_t
}
} while (hit);
for (idx = 0; idx < fi_count; idx++) {
- snd_input_t *in;
+ struct stat st;
if (!errors && access(fi[idx].name, R_OK) < 0)
continue;
- err = snd_input_stdio_open(&in, fi[idx].name, "r");
- if (err >= 0) {
- err = snd_config_load(root, in);
- snd_input_close(in);
- if (err < 0) {
- SNDERR("%s may be old or corrupted: consider to remove or fix it", fi[idx].name);
- goto _err;
- }
- } else {
- SNDERR("cannot access file %s", fi[idx].name);
+ if (stat(fi[idx].name, &st) < 0) {
+ SNDERR("cannot stat file/directory %s", fi[idx].name);
+ continue;
}
+ if (S_ISDIR(st.st_mode)) {
+ struct dirent **namelist;
+ int n;
+
+ n = scandir(fi[idx].name, &namelist, config_filename_filter, versionsort);
+ if (n > 0) {
+ int j;
+ err = 0;
+ for (j = 0; j < n; ++j) {
+ if (err >= 0) {
+ int sl = strlen(fi[idx].name) + strlen(namelist[j]->d_name) + 2;
+ char *filename = malloc(sl);
+ snprintf(filename, sl, "%s/%s", fi[idx].name, namelist[j]->d_name);
+ filename[sl-1] = '\0';
+
+ err = config_file_open(root, filename);
+ free(filename);
+ }
+ free(namelist[j]);
+ }
+ free(namelist);
+ if (err < 0)
+ goto _err;
+ }
+ } else if (config_file_open(root, fi[idx].name) < 0)
+ goto _err;
}
*dst = NULL;
err = 0;
diff --git a/src/conf/Makefile.am b/src/conf/Makefile.am
index 2e5d0bf..456454f 100644
--- a/src/conf/Makefile.am
+++ b/src/conf/Makefile.am
@@ -1,4 +1,4 @@
-SUBDIRS=cards pcm
+SUBDIRS=cards pcm alsa.conf.d
cfg_files = alsa.conf
if BUILD_ALISP
diff --git a/src/conf/alsa.conf b/src/conf/alsa.conf
index a33c24e..bc91df3 100644
--- a/src/conf/alsa.conf
+++ b/src/conf/alsa.conf
@@ -8,6 +8,13 @@
{
func load
files [
+ {
+ @func concat
+ strings [
+ { @func datadir }
+ "/alsa.conf.d/"
+ ]
+ }
"/etc/asound.conf"
"~/.asoundrc"
]
diff --git a/src/conf/alsa.conf.d/Makefile.am b/src/conf/alsa.conf.d/Makefile.am
new file mode 100644
index 0000000..c91661e
--- /dev/null
+++ b/src/conf/alsa.conf.d/Makefile.am
@@ -0,0 +1,8 @@
+alsaconfigdir = @ALSA_CONFIG_DIR@
+alsadir = $(alsaconfigdir)/alsa.conf.d
+cfg_files = README
+
+alsa_DATA = $(cfg_files)
+
+EXTRA_DIST = \
+ $(cfg_files)
diff --git a/src/conf/alsa.conf.d/README b/src/conf/alsa.conf.d/README
new file mode 100644
index 0000000..9997884
--- /dev/null
+++ b/src/conf/alsa.conf.d/README
@@ -0,0 +1,2 @@
+You can place files named *.conf in this folder and they will be processed
+when initialising alsa-lib.
--
1.7.6.1

View File

@ -1,52 +0,0 @@
From 6dab1a91cbbd40d2f52a0c5a1bd961a1db7bb319 Mon Sep 17 00:00:00 2001
From: Clemens Ladisch <clemens@ladisch.de>
Date: Wed, 21 Sep 2011 08:30:20 +0200
Subject: [PATCH 1/5] pcm: recalculate all rules after changing hw_params
flags
The rules engine avoids recalculating rules that do not depend on
any changed parameter, but there is no mechanism to record changed
flags. So when we change a flag, we have to ensure that all rules
depending on that flag are recalculated; the only method to do this
is to force recalculation of all rules.
So far, there have been no kernel drivers with rules depending
on flags, but rules to disable hardware SRCs by setting
SND_PCM_HW_PARAMS_NORESAMPLE are being introduced now.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
---
src/pcm/pcm.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/src/pcm/pcm.c b/src/pcm/pcm.c
index 12f8cd0..bc5c6e4 100644
--- a/src/pcm/pcm.c
+++ b/src/pcm/pcm.c
@@ -4200,6 +4200,7 @@ int snd_pcm_hw_params_set_rate_resample(snd_pcm_t *pcm, snd_pcm_hw_params_t *par
params->flags |= SND_PCM_HW_PARAMS_NORESAMPLE;
else
params->flags &= ~SND_PCM_HW_PARAMS_NORESAMPLE;
+ params->rmask = ~0;
return snd_pcm_hw_refine(pcm, params);
}
@@ -4231,6 +4232,7 @@ int snd_pcm_hw_params_set_export_buffer(snd_pcm_t *pcm, snd_pcm_hw_params_t *par
params->flags |= SND_PCM_HW_PARAMS_EXPORT_BUFFER;
else
params->flags &= ~SND_PCM_HW_PARAMS_EXPORT_BUFFER;
+ params->rmask = ~0;
return snd_pcm_hw_refine(pcm, params);
}
@@ -4280,6 +4282,7 @@ int snd_pcm_hw_params_set_period_wakeup(snd_pcm_t *pcm, snd_pcm_hw_params_t *par
params->flags |= SND_PCM_HW_PARAMS_NO_PERIOD_WAKEUP;
} else
params->flags &= ~SND_PCM_HW_PARAMS_NO_PERIOD_WAKEUP;
+ params->rmask = ~0;
return snd_pcm_hw_refine(pcm, params);
}
--
1.7.6.1

View File

@ -1,52 +0,0 @@
From 2a7f653b7f3bea6c8f0895f1921c2d706f40684f Mon Sep 17 00:00:00 2001
From: Julia Lawall <julia@diku.dk>
Date: Sun, 18 Sep 2011 22:04:34 +0200
Subject: [PATCH 2/5] src/pcm/pcm_rate.c: add missing free
Something that is allocated using calloc is not freed on one
or more error paths.
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Suman Saha <sumsaha@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
src/pcm/pcm_rate.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/src/pcm/pcm_rate.c b/src/pcm/pcm_rate.c
index 70e30e5..eb35e4a 100644
--- a/src/pcm/pcm_rate.c
+++ b/src/pcm/pcm_rate.c
@@ -1392,11 +1392,13 @@ int snd_pcm_rate_open(snd_pcm_t **pcmp, const char *name,
} else {
SNDERR("Invalid type for rate converter");
snd_pcm_close(pcm);
+ free(rate);
return -EINVAL;
}
if (err < 0) {
SNDERR("Cannot find rate converter");
snd_pcm_close(pcm);
+ free(rate);
return -ENOENT;
}
#else
@@ -1405,6 +1407,7 @@ int snd_pcm_rate_open(snd_pcm_t **pcmp, const char *name,
err = open_func(SND_PCM_RATE_PLUGIN_VERSION, &rate->obj, &rate->ops);
if (err < 0) {
snd_pcm_close(pcm);
+ free(rate);
return err;
}
#endif
@@ -1413,6 +1416,7 @@ int snd_pcm_rate_open(snd_pcm_t **pcmp, const char *name,
! rate->ops.input_frames || ! rate->ops.output_frames) {
SNDERR("Inproper rate plugin %s initialization", type);
snd_pcm_close(pcm);
+ free(rate);
return err;
}
--
1.7.6.1

View File

@ -1,70 +0,0 @@
From 03aa1a57c99460489815bf301e554c4d0a638bf6 Mon Sep 17 00:00:00 2001
From: Julia Lawall <julia@diku.dk>
Date: Sun, 18 Sep 2011 22:04:36 +0200
Subject: [PATCH 3/5] src/pcm/pcm_ladspa.c: add missing free
Something that is allocated using calloc is not freed on some
error paths.
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Suman Saha <sumsaha@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
src/pcm/pcm_ladspa.c | 16 ++++++++++++----
1 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/src/pcm/pcm_ladspa.c b/src/pcm/pcm_ladspa.c
index c413c10..84ebaa5 100644
--- a/src/pcm/pcm_ladspa.c
+++ b/src/pcm/pcm_ladspa.c
@@ -750,8 +750,10 @@ static int snd_pcm_ladspa_allocate_memory(snd_pcm_t *pcm, snd_pcm_ladspa_t *lads
if (instance->input.data == NULL ||
instance->input.m_data == NULL ||
instance->output.data == NULL ||
- instance->output.m_data == NULL)
+ instance->output.m_data == NULL) {
+ free(pchannels);
return -ENOMEM;
+ }
for (idx = 0; idx < instance->input.channels.size; idx++) {
chn = instance->output.channels.array[idx];
if (pchannels[chn] == NULL && chn < ichannels) {
@@ -761,8 +763,10 @@ static int snd_pcm_ladspa_allocate_memory(snd_pcm_t *pcm, snd_pcm_ladspa_t *lads
instance->input.data[idx] = pchannels[chn];
if (instance->input.data[idx] == NULL) {
instance->input.data[idx] = snd_pcm_ladspa_allocate_zero(ladspa, 0);
- if (instance->input.data[idx] == NULL)
+ if (instance->input.data[idx] == NULL) {
+ free(pchannels);
return -ENOMEM;
+ }
}
}
for (idx = 0; idx < instance->output.channels.size; idx++) {
@@ -770,8 +774,10 @@ static int snd_pcm_ladspa_allocate_memory(snd_pcm_t *pcm, snd_pcm_ladspa_t *lads
/* FIXME/OPTIMIZE: check if we can remove double alloc */
/* if LADSPA plugin has no broken inplace */
instance->output.data[idx] = malloc(sizeof(LADSPA_Data) * ladspa->allocated);
- if (instance->output.data[idx] == NULL)
+ if (instance->output.data[idx] == NULL) {
+ free(pchannels);
return -ENOMEM;
+ }
pchannels[chn] = instance->output.m_data[idx] = instance->output.data[idx];
}
}
@@ -793,8 +799,10 @@ static int snd_pcm_ladspa_allocate_memory(snd_pcm_t *pcm, snd_pcm_ladspa_t *lads
instance->output.data[idx] = NULL;
} else {
instance->output.data[idx] = snd_pcm_ladspa_allocate_zero(ladspa, 1);
- if (instance->output.data[idx] == NULL)
+ if (instance->output.data[idx] == NULL) {
+ free(pchannels);
return -ENOMEM;
+ }
}
}
}
--
1.7.6.1

View File

@ -1,30 +0,0 @@
From c36f8c87ffb978d8cabbc4e5c489f14b6b276365 Mon Sep 17 00:00:00 2001
From: Julia Lawall <julia@diku.dk>
Date: Sun, 18 Sep 2011 22:04:37 +0200
Subject: [PATCH 4/5] src/pcm/pcm_multi.c: add missing free
Something that is allocated using calloc is not freed on an error path.
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Suman Saha <sumsaha@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
src/pcm/pcm_multi.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/pcm/pcm_multi.c b/src/pcm/pcm_multi.c
index 68f2d68..6b39c7a 100644
--- a/src/pcm/pcm_multi.c
+++ b/src/pcm/pcm_multi.c
@@ -886,6 +886,8 @@ int snd_pcm_multi_open(snd_pcm_t **pcmp, const char *name,
err = snd_pcm_new(&pcm, SND_PCM_TYPE_MULTI, name, stream,
multi->slaves[0].pcm->mode);
if (err < 0) {
+ free(multi->slaves);
+ free(multi->channels);
free(multi);
return err;
}
--
1.7.6.1

View File

@ -1,37 +0,0 @@
From fef6e6fd580073e0c0696105f808145561990b75 Mon Sep 17 00:00:00 2001
From: Julia Lawall <julia@diku.dk>
Date: Thu, 22 Sep 2011 13:59:31 +0200
Subject: [PATCH 5/5] src/pcm/pcm_mmap.c: add missing free
The mmap_channels and running_areas fields are allocated using calloc, but
are not freed on an error path.
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Suman Saha <sumsaha@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
src/pcm/pcm_mmap.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/src/pcm/pcm_mmap.c b/src/pcm/pcm_mmap.c
index 4621fe6..6b44050 100644
--- a/src/pcm/pcm_mmap.c
+++ b/src/pcm/pcm_mmap.c
@@ -320,8 +320,13 @@ int snd_pcm_mmap(snd_pcm_t *pcm)
snd_pcm_channel_info_t *i = &pcm->mmap_channels[c];
i->channel = c;
err = snd_pcm_channel_info(pcm, i);
- if (err < 0)
+ if (err < 0) {
+ free(pcm->mmap_channels);
+ free(pcm->running_areas);
+ pcm->mmap_channels = NULL;
+ pcm->running_areas = NULL;
return err;
+ }
}
for (c = 0; c < pcm->channels; ++c) {
snd_pcm_channel_info_t *i = &pcm->mmap_channels[c];
--
1.7.6.1

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a32f7c21015b6c71f9a80ff70a2b6a50e4ff4d5c77c744ff0793dea7ba7a2517
size 832555

3
alsa-lib-1.0.25.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:5a1a805cf04106316d549ec650116ce6711a162e107ba8b3c551866680e286e6
size 838403

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Wed Jan 25 11:10:29 CET 2012 - tiwai@suse.de
- Updated to alsa-lib version 1.0.25; including all previous fixes
-------------------------------------------------------------------
Fri Sep 30 20:07:40 UTC 2011 - coolo@suse.com

View File

@ -1,7 +1,7 @@
#
# spec file for package alsa
#
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -16,12 +16,11 @@
#
Name: alsa
BuildRequires: doxygen libtool pkg-config
%define package_version 1.0.24.1
License: LGPLv2.1+
Group: System/Libraries
BuildRequires: doxygen
BuildRequires: libtool
BuildRequires: pkg-config
%define package_version 1.0.25
Requires: alsa-utils
Recommends: alsa-plugins alsa-oss
PreReq: %insserv_prereq %fillup_prereq
@ -31,8 +30,10 @@ Obsoletes: alsa-64bit
%endif
#
Summary: Advanced Linux Sound Architecture
Version: 1.0.24.1
Release: 18
License: LGPL-2.1+
Group: System/Libraries
Version: 1.0.25
Release: 0
Source: ftp://ftp.alsa-project.org/pub/lib/alsa-lib-%{package_version}.tar.bz2
Source2: baselibs.conf
Source8: 40-alsa.rules
@ -50,40 +51,6 @@ Source32: all_notes_off.mid
Source33: alsa-info.sh
Source34: alsa-init.sh
# Patch: alsa-lib-git-fixes.diff
Patch1: 0001-Fix-alsa-lib-to-regard-3D-control-Depth-as-Playback-.patch
Patch2: 0002-alsa-lib-add-LaCie-Firewire-Speakers-Griffin-FireWav.patch
Patch3: 0003-alsa-lib-ucm-allow-values-to-be-read-from-devices.patch
Patch4: 0004-UCM-comment-fixes-and-fix-myvalue-initialization-fix.patch
Patch5: 0005-UCM-Fix-empty-get_list-initialize-returned-pointer-t.patch
Patch6: 0006-Conf-Fix-channels-of-ICE1712-to-10-12.patch
Patch7: 0007-UCM-Fix-LGPL-licence-how-to-receive-part-referred-GP.patch
Patch8: 0008-configure-Fail-when-the-user-attempts-to-compile-sha.patch
Patch9: 0009-Mark-Heaphone-Center-LFE-control-of-emu10k1-conf-as-.patch
Patch10: 0010-Fix-typo-in-comment-in-surround71.conf.patch
Patch11: 0011-test-latency-print-error-message-when-2-periods-per-.patch
Patch12: 0012-EMU10K1.conf-Don-t-lock-hook-controls.patch
Patch13: 0013-HDA-Intel.conf-Fix-low-mic-volume-due-to-pulseaudio-.patch
Patch14: 0014-alsa-lib-fixed-coverity-reported-issues-under-FORWAR.patch
Patch15: 0015-Fix-compile-warnings.patch
Patch16: 0016-Fix-printf-for-size_t.patch
Patch18: 0018-UCM-fix-memory-leak-when-executing-cset-commands.patch
Patch19: 0019-Specficy-subdevice-0-for-front-surround-of-HDA-Intel.patch
Patch20: 0020-emu10k1.conf-Fix-no-sound-problem-when-using-SB-Live.patch
Patch21: 0021-ctlparse-Respect-softfloat-configure-option.patch
Patch22: 0022-UCM-Fix-typo-in-error-message.patch
Patch23: 0023-UCM-Fix-deadlock-following-failed-get-_verb.patch
Patch24: 0024-Define-sysdefault-PCM-and-control.patch
Patch25: 0025-Add-snd_-ctl-pcm-_open_fallback-functions.patch
Patch26: 0026-Add-RME-RPM-to-HDSP_IO_Type.patch
Patch27: 0027-ucm-fix-seg-fault-in-execute_cset.patch
Patch28: 0028-ucm-tivial-code-style-fix.patch
Patch29: 0029-ucm-add-another-sequence-msleep.patch
Patch30: 0030-conf-Allow-for-a-directory-to-be-given-as-a-config-f.patch
Patch31: 0031-pcm-recalculate-all-rules-after-changing-hw_params-f.patch
Patch32: 0032-src-pcm-pcm_rate.c-add-missing-free.patch
Patch33: 0033-src-pcm-pcm_ladspa.c-add-missing-free.patch
Patch34: 0034-src-pcm-pcm_multi.c-add-missing-free.patch
Patch35: 0035-src-pcm-pcm_mmap.c-add-missing-free.patch
Patch99: alsa-lib-doxygen-avoid-crash-for-11.3.diff
Url: http://www.alsa-project.org/
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@ -97,8 +64,8 @@ on your Linux box. To set it up, run yast2 or alsaconf.
%package devel
Summary: Include Files and Libraries mandatory for Development
License: LGPL-2.1+
Group: Development/Libraries/C and C++
License: LGPLv2.1+
Requires: glibc-devel, libasound2 = %{version}
Obsoletes: alsadev
Provides: alsadev alsa-lib-devel
@ -109,8 +76,8 @@ to develop applications that require these.
%package docs
Summary: Additional Package Documentation
License: GPL-2.0+
Group: Documentation/Other
License: GPLv2+
%if %suse_version > 1110
BuildArch: noarch
%endif
@ -121,9 +88,9 @@ this package's base documentation.
%package -n libasound2
Summary: Advanced Linux Sound Architecture Library
License: LGPL-2.1+
Group: System/Libraries
Provides: alsa-lib
License: LGPLv2.1+
%description -n libasound2
This package contains the library for ALSA, Advanced Linux Sound
@ -132,40 +99,6 @@ Architecture.
%prep
%setup -q -n alsa-lib-%{package_version}
# %patch -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1
%patch11 -p1
%patch12 -p1
%patch13 -p1
%patch14 -p1
%patch15 -p1
%patch16 -p1
%patch18 -p1
%patch19 -p1
%patch20 -p1
%patch21 -p1
%patch22 -p1
%patch23 -p1
%patch24 -p1
%patch25 -p1
%patch26 -p1
%patch27 -p1
%patch28 -p1
%patch29 -p1
%patch30 -p1
%patch31 -p1
%patch32 -p1
%patch33 -p1
%patch34 -p1
%patch35 -p1
%if %suse_version == 1130
%patch99 -p1
%endif