- Update alsa-info.sh to match dmesg with snd_ - Run spec-cleaner - Add missing Loopback.conf manually - Upstream fixes: minor clean ups, 2.1 PCM channel config support, portability improvements, PCM float format conversion fix, fix for ioplug 32bit hwptr wrap, etc. 0020-minor-malloc-changes.patch 0021-alsa-lib-minor-typo-in-pcm-doc.patch 0022-control_hw-fix-potential-memory-leak.patch 0023-pcm-initialize-pcm_dmix-monotonic-field.patch 0024-pcm-initialize-monotonic-field-for-dshare-and-dsnoop.patch 0025-pcm-use-CLOCK_REALTIME-for-non-monotonic-ts.patch 0026-alsa-lib-heavy-pcm-atomics-cleanup.patch 0027-conf-Add-basic-infrastructure-for-2.1-surround-sound.patch 0028-conf-Add-surround-2.1-support-to-all-cards.patch 0029-Portability-fix-look-for-sys-endian.h-as-well-as-end.patch 0030-autotools-update-style.patch 0031-pcm-Insert-linear-to-float-conversion-when-rate-or-c.patch 0032-pcm-route-Allow-chmap-syntax-for-slave-channels-in-t.patch 0033-pcm-route-Select-slave-chmap-based-on-ttable-informa.patch 0034-conf-Allow-2.1-surround-to-use-different-number-of-c.patch 0035-pcm-Wrap-hw_ptr-to-boundary-in-pcm_ioplug.patch 0036-src-conf-cards-Add-missing-entry-for-Loopback.conf.patch OBS-URL: https://build.opensuse.org/request/show/225572 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/alsa?expand=0&rev=152
69 lines
2.0 KiB
Diff
69 lines
2.0 KiB
Diff
From 8ad8d22216f818872a764ef5dafcaae1adeee211 Mon Sep 17 00:00:00 2001
|
|
From: David Henningsson <david.henningsson@canonical.com>
|
|
Date: Fri, 28 Feb 2014 08:57:05 +0100
|
|
Subject: [PATCH] pcm: route: Allow chmap syntax for slave channels in ttable
|
|
|
|
Instead of writing e g "0" and "1", one can now write "FL" and "FR" instead.
|
|
|
|
E g:
|
|
ttable.0.FL 1
|
|
ttable.1.FR 1
|
|
ttable.2.LFE 1
|
|
|
|
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
|
|
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
---
|
|
src/pcm/pcm_route.c | 22 ++++++++++++++++++++--
|
|
1 file changed, 20 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/src/pcm/pcm_route.c b/src/pcm/pcm_route.c
|
|
index 2beedf68c3e0..56318d47bcbf 100644
|
|
--- a/src/pcm/pcm_route.c
|
|
+++ b/src/pcm/pcm_route.c
|
|
@@ -789,6 +789,24 @@ static void snd_pcm_route_dump(snd_pcm_t *pcm, snd_output_t *out)
|
|
snd_pcm_dump(route->plug.gen.slave, out);
|
|
}
|
|
|
|
+static int strtochannel(const char *id, long *channel)
|
|
+{
|
|
+ int err;
|
|
+ int ch;
|
|
+ err = safe_strtol(id, channel);
|
|
+ if (err >= 0)
|
|
+ return err;
|
|
+
|
|
+ ch = (int) snd_pcm_chmap_from_string(id);
|
|
+ if (ch == -1)
|
|
+ return -EINVAL;
|
|
+
|
|
+ /* For now, assume standard channel mapping */
|
|
+ *channel = ch - SND_CHMAP_FL;
|
|
+ return 0;
|
|
+}
|
|
+
|
|
+
|
|
static const snd_pcm_ops_t snd_pcm_route_ops = {
|
|
.close = snd_pcm_route_close,
|
|
.info = snd_pcm_generic_info,
|
|
@@ -983,7 +1001,7 @@ int snd_pcm_route_determine_ttable(snd_config_t *tt,
|
|
const char *id;
|
|
if (snd_config_get_id(jnode, &id) < 0)
|
|
continue;
|
|
- err = safe_strtol(id, &schannel);
|
|
+ err = strtochannel(id, &schannel);
|
|
if (err < 0) {
|
|
SNDERR("Invalid slave channel: %s", id);
|
|
return -EINVAL;
|
|
@@ -1046,7 +1064,7 @@ int snd_pcm_route_load_ttable(snd_config_t *tt, snd_pcm_route_ttable_entry_t *tt
|
|
const char *id;
|
|
if (snd_config_get_id(jnode, &id) < 0)
|
|
continue;
|
|
- err = safe_strtol(id, &schannel);
|
|
+ err = strtochannel(id, &schannel);
|
|
if (err < 0 ||
|
|
schannel < 0 || (unsigned int) schannel > tt_ssize ||
|
|
(schannels > 0 && schannel >= schannels)) {
|
|
--
|
|
1.9.0
|
|
|