Accepting request 225576 from multimedia:libs
- 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 (forwarded request 225572 from tiwai) OBS-URL: https://build.opensuse.org/request/show/225576 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/alsa?expand=0&rev=146
This commit is contained in:
commit
62a3c73783
52
0020-minor-malloc-changes.patch
Normal file
52
0020-minor-malloc-changes.patch
Normal file
@ -0,0 +1,52 @@
|
||||
From 670e228c693cbff9714856e5be93a88d137c5c30 Mon Sep 17 00:00:00 2001
|
||||
From: Olivier Langlois <olivier@trillion01.com>
|
||||
Date: Thu, 12 Dec 2013 23:47:20 -0500
|
||||
Subject: [PATCH] minor malloc changes
|
||||
|
||||
replace malloc + memset with calloc since calloc may skip the memset if
|
||||
returned memory comes directly from sbrk()
|
||||
|
||||
use malloc instead of malloc if first thing done with allocated memory is
|
||||
to flip all bits to 1.
|
||||
|
||||
Signed-off-by: Olivier Langlois <olivier@trillion01.com>
|
||||
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
||||
---
|
||||
src/alisp/alisp.c | 3 +--
|
||||
src/pcm/pcm_ladspa.c | 2 +-
|
||||
2 files changed, 2 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/alisp/alisp.c b/src/alisp/alisp.c
|
||||
index 1796c33c3faf..3c61bb1754c3 100644
|
||||
--- a/src/alisp/alisp.c
|
||||
+++ b/src/alisp/alisp.c
|
||||
@@ -3202,12 +3202,11 @@ int alsa_lisp(struct alisp_cfg *cfg, struct alisp_instance **_instance)
|
||||
struct alisp_object *p, *p1;
|
||||
int i, j, retval = 0;
|
||||
|
||||
- instance = (struct alisp_instance *)malloc(sizeof(struct alisp_instance));
|
||||
+ instance = (struct alisp_instance *)calloc(1, sizeof(struct alisp_instance));
|
||||
if (instance == NULL) {
|
||||
nomem();
|
||||
return -ENOMEM;
|
||||
}
|
||||
- memset(instance, 0, sizeof(struct alisp_instance));
|
||||
instance->verbose = cfg->verbose && cfg->vout;
|
||||
instance->warning = cfg->warning && cfg->wout;
|
||||
instance->debug = cfg->debug && cfg->dout;
|
||||
diff --git a/src/pcm/pcm_ladspa.c b/src/pcm/pcm_ladspa.c
|
||||
index 0a9c52e975e6..9ce5242e2359 100644
|
||||
--- a/src/pcm/pcm_ladspa.c
|
||||
+++ b/src/pcm/pcm_ladspa.c
|
||||
@@ -1326,7 +1326,7 @@ static int snd_pcm_ladspa_parse_bindings(snd_pcm_ladspa_plugin_t *lplug,
|
||||
count = (unsigned int)(channel + 1);
|
||||
}
|
||||
if (count > 0) {
|
||||
- array = (unsigned int *)calloc(count, sizeof(unsigned int));
|
||||
+ array = (unsigned int *)malloc(count * sizeof(unsigned int));
|
||||
if (! array)
|
||||
return -ENOMEM;
|
||||
memset(array, 0xff, count * sizeof(unsigned int));
|
||||
--
|
||||
1.9.0
|
||||
|
29
0021-alsa-lib-minor-typo-in-pcm-doc.patch
Normal file
29
0021-alsa-lib-minor-typo-in-pcm-doc.patch
Normal file
@ -0,0 +1,29 @@
|
||||
From 3baf1bee843d8f0559f1481f26e9b8235b5e85ee Mon Sep 17 00:00:00 2001
|
||||
From: Olivier Langlois <olivier@trillion01.com>
|
||||
Date: Sun, 5 Jan 2014 23:12:44 -0500
|
||||
Subject: [PATCH] alsa-lib: minor typo in pcm doc
|
||||
|
||||
Added a missing 'f' in the word 'diferent'
|
||||
|
||||
Signed-off-by: Olivier Langlois <olivier@trillion01.com>
|
||||
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
||||
---
|
||||
src/pcm/pcm.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/pcm/pcm.c b/src/pcm/pcm.c
|
||||
index c54fa06974fc..7e46014627c2 100644
|
||||
--- a/src/pcm/pcm.c
|
||||
+++ b/src/pcm/pcm.c
|
||||
@@ -105,7 +105,7 @@ The poll or select functions (see 'man 2 poll' or 'man 2 select' for further
|
||||
details) allows to receive requests/events from the device while
|
||||
an application is waiting on events from other sources (like keyboard, screen,
|
||||
network etc.), too. \ref snd_pcm_poll_descriptors can be used to get file
|
||||
-descriptors to poll or select on (note that wait direction might be diferent
|
||||
+descriptors to poll or select on (note that wait direction might be different
|
||||
than expected - do not use only returned file descriptors, but handle
|
||||
events member as well - see \ref snd_pcm_poll_descriptors function
|
||||
description for more details and \ref snd_pcm_poll_descriptors_revents for
|
||||
--
|
||||
1.9.0
|
||||
|
30
0022-control_hw-fix-potential-memory-leak.patch
Normal file
30
0022-control_hw-fix-potential-memory-leak.patch
Normal file
@ -0,0 +1,30 @@
|
||||
From 336dc58beba0ca7cf5650dc12ed3eb72d61ac6d3 Mon Sep 17 00:00:00 2001
|
||||
From: Ivan Sorokin <vanyacpp@gmail.com>
|
||||
Date: Wed, 22 Jan 2014 00:12:50 +0400
|
||||
Subject: [PATCH] control_hw: fix potential memory leak
|
||||
|
||||
Signed-off-by: Ivan Sorokin <vanyacpp@gmail.com>
|
||||
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
||||
---
|
||||
src/control/control_hw.c | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/control/control_hw.c b/src/control/control_hw.c
|
||||
index 148097facd90..dfc9dcd51e20 100644
|
||||
--- a/src/control/control_hw.c
|
||||
+++ b/src/control/control_hw.c
|
||||
@@ -240,8 +240,10 @@ static int snd_ctl_hw_elem_tlv(snd_ctl_t *handle, int op_flag,
|
||||
return -errno;
|
||||
}
|
||||
if (op_flag == 0) {
|
||||
- if (xtlv->tlv[1] + 2 * sizeof(unsigned int) > tlv_size)
|
||||
+ if (xtlv->tlv[1] + 2 * sizeof(unsigned int) > tlv_size) {
|
||||
+ free(xtlv);
|
||||
return -EFAULT;
|
||||
+ }
|
||||
memcpy(tlv, xtlv->tlv, xtlv->tlv[1] + 2 * sizeof(unsigned int));
|
||||
}
|
||||
free(xtlv);
|
||||
--
|
||||
1.9.0
|
||||
|
78
0023-pcm-initialize-pcm_dmix-monotonic-field.patch
Normal file
78
0023-pcm-initialize-pcm_dmix-monotonic-field.patch
Normal file
@ -0,0 +1,78 @@
|
||||
From e51cd448971c472d75dd700b0000988f6197b4da Mon Sep 17 00:00:00 2001
|
||||
From: Olivier Langlois <olivier@trillion01.com>
|
||||
Date: Wed, 22 Jan 2014 19:04:45 -0500
|
||||
Subject: [PATCH] pcm: initialize pcm_dmix monotonic field
|
||||
|
||||
not doing so, leaves the pcm object in an inconsistent state since
|
||||
'info' field is copied from the slave which is then used when
|
||||
snd_pcm_hw_params_is_monotonic() is called.
|
||||
|
||||
For instance, when using dmix with aplay and an underrun is occuring, the following
|
||||
info is returned:
|
||||
|
||||
underrun!!! (at least 1248687948.256 ms long)
|
||||
Status:
|
||||
state : XRUN
|
||||
trigger_time: 1390347762.628483000
|
||||
tstamp : 1390347766.184350000
|
||||
delay : -635
|
||||
avail : 15687
|
||||
avail_max : 15675
|
||||
|
||||
now is computed from CLOCK_MONOTONIC while pcm status tstamps are from gettimeofday().
|
||||
|
||||
After the fix, underruns are still occuring on my setup but at least the displayed info
|
||||
is correct:
|
||||
|
||||
underrun!!! (at least 7630.409 ms long)
|
||||
Status:
|
||||
state : XRUN
|
||||
trigger_time: 7652.739201431
|
||||
tstamp : 7660.369600636
|
||||
delay : -624
|
||||
avail : 15676
|
||||
avail_max : 15664
|
||||
|
||||
Signed-off-by: Olivier Langlois <olivier@trillion01.com>
|
||||
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
||||
---
|
||||
src/pcm/pcm_direct.c | 2 ++
|
||||
src/pcm/pcm_dmix.c | 2 +-
|
||||
2 files changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/pcm/pcm_direct.c b/src/pcm/pcm_direct.c
|
||||
index 899c250401df..5416cf71674c 100644
|
||||
--- a/src/pcm/pcm_direct.c
|
||||
+++ b/src/pcm/pcm_direct.c
|
||||
@@ -857,6 +857,7 @@ static void save_slave_setting(snd_pcm_direct_t *dmix, snd_pcm_t *spcm)
|
||||
COPY_SLAVE(buffer_time);
|
||||
COPY_SLAVE(sample_bits);
|
||||
COPY_SLAVE(frame_bits);
|
||||
+ COPY_SLAVE(monotonic);
|
||||
}
|
||||
|
||||
#undef COPY_SLAVE
|
||||
@@ -1220,6 +1221,7 @@ static void copy_slave_setting(snd_pcm_direct_t *dmix, snd_pcm_t *spcm)
|
||||
COPY_SLAVE(buffer_time);
|
||||
COPY_SLAVE(sample_bits);
|
||||
COPY_SLAVE(frame_bits);
|
||||
+ COPY_SLAVE(monotonic);
|
||||
|
||||
spcm->info &= ~SND_PCM_INFO_PAUSE;
|
||||
spcm->boundary = recalc_boundary_size(dmix->shmptr->s.boundary, spcm->buffer_size);
|
||||
diff --git a/src/pcm/pcm_dmix.c b/src/pcm/pcm_dmix.c
|
||||
index 2bd5d398d280..4aa6d4eab4a2 100644
|
||||
--- a/src/pcm/pcm_dmix.c
|
||||
+++ b/src/pcm/pcm_dmix.c
|
||||
@@ -1104,7 +1104,7 @@ int snd_pcm_dmix_open(snd_pcm_t **pcmp, const char *name,
|
||||
|
||||
pcm->poll_fd = dmix->poll_fd;
|
||||
pcm->poll_events = POLLIN; /* it's different than other plugins */
|
||||
-
|
||||
+ pcm->monotonic = spcm->monotonic;
|
||||
pcm->mmap_rw = 1;
|
||||
snd_pcm_set_hw_ptr(pcm, &dmix->hw_ptr, -1, 0);
|
||||
snd_pcm_set_appl_ptr(pcm, &dmix->appl_ptr, -1, 0);
|
||||
--
|
||||
1.9.0
|
||||
|
@ -0,0 +1,43 @@
|
||||
From 507cdc13187f5eeb222eeb43550cf6a67c3b29c9 Mon Sep 17 00:00:00 2001
|
||||
From: Takashi Iwai <tiwai@suse.de>
|
||||
Date: Thu, 23 Jan 2014 09:46:37 +0100
|
||||
Subject: [PATCH] pcm: initialize monotonic field for dshare and dsnoop, too
|
||||
|
||||
Just like the previous fix for dmix, we need update for dshare and
|
||||
dsnoop plugins.
|
||||
|
||||
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
||||
---
|
||||
src/pcm/pcm_dshare.c | 2 +-
|
||||
src/pcm/pcm_dsnoop.c | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/pcm/pcm_dshare.c b/src/pcm/pcm_dshare.c
|
||||
index 5b329510481e..f2d1103a6bfb 100644
|
||||
--- a/src/pcm/pcm_dshare.c
|
||||
+++ b/src/pcm/pcm_dshare.c
|
||||
@@ -792,7 +792,7 @@ int snd_pcm_dshare_open(snd_pcm_t **pcmp, const char *name,
|
||||
|
||||
pcm->poll_fd = dshare->poll_fd;
|
||||
pcm->poll_events = POLLIN; /* it's different than other plugins */
|
||||
-
|
||||
+ pcm->monotonic = spcm->monotonic;
|
||||
pcm->mmap_rw = 1;
|
||||
snd_pcm_set_hw_ptr(pcm, &dshare->hw_ptr, -1, 0);
|
||||
snd_pcm_set_appl_ptr(pcm, &dshare->appl_ptr, -1, 0);
|
||||
diff --git a/src/pcm/pcm_dsnoop.c b/src/pcm/pcm_dsnoop.c
|
||||
index 055e4f498343..76379140c133 100644
|
||||
--- a/src/pcm/pcm_dsnoop.c
|
||||
+++ b/src/pcm/pcm_dsnoop.c
|
||||
@@ -690,7 +690,7 @@ int snd_pcm_dsnoop_open(snd_pcm_t **pcmp, const char *name,
|
||||
|
||||
pcm->poll_fd = dsnoop->poll_fd;
|
||||
pcm->poll_events = POLLIN; /* it's different than other plugins */
|
||||
-
|
||||
+ pcm->monotonic = spcm->monotonic;
|
||||
pcm->mmap_rw = 1;
|
||||
snd_pcm_set_hw_ptr(pcm, &dsnoop->hw_ptr, -1, 0);
|
||||
snd_pcm_set_appl_ptr(pcm, &dsnoop->appl_ptr, -1, 0);
|
||||
--
|
||||
1.9.0
|
||||
|
46
0025-pcm-use-CLOCK_REALTIME-for-non-monotonic-ts.patch
Normal file
46
0025-pcm-use-CLOCK_REALTIME-for-non-monotonic-ts.patch
Normal file
@ -0,0 +1,46 @@
|
||||
From 66f07aa3b77e4013110f7b12640e204d0c15ac8d Mon Sep 17 00:00:00 2001
|
||||
From: Olivier Langlois <olivier@trillion01.com>
|
||||
Date: Thu, 23 Jan 2014 19:03:00 -0500
|
||||
Subject: [PATCH] pcm: use CLOCK_REALTIME for non-monotonic ts
|
||||
|
||||
gettimeofday() is the same than clock_gettime(CLOCK_REALTIME)
|
||||
except for the loss of precision and the double unnecessary
|
||||
conversion timespec <-> timeval.
|
||||
|
||||
Signed-off-by: Olivier Langlois <olivier@trillion01.com>
|
||||
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
||||
---
|
||||
src/pcm/pcm_local.h | 8 ++++++--
|
||||
1 file changed, 6 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/pcm/pcm_local.h b/src/pcm/pcm_local.h
|
||||
index e1c0baa871f6..8a6c7431cc40 100644
|
||||
--- a/src/pcm/pcm_local.h
|
||||
+++ b/src/pcm/pcm_local.h
|
||||
@@ -961,17 +961,21 @@ typedef union snd_tmp_double {
|
||||
/* get the current timestamp */
|
||||
static inline void gettimestamp(snd_htimestamp_t *tstamp, int monotonic)
|
||||
{
|
||||
-#if defined(HAVE_CLOCK_GETTIME) && defined(CLOCK_MONOTONIC)
|
||||
+#if defined(HAVE_CLOCK_GETTIME)
|
||||
+#if defined(CLOCK_MONOTONIC)
|
||||
if (monotonic) {
|
||||
clock_gettime(CLOCK_MONOTONIC, tstamp);
|
||||
} else {
|
||||
#endif
|
||||
+ clock_gettime(CLOCK_REALTIME, tstamp);
|
||||
+#else
|
||||
struct timeval tv;
|
||||
|
||||
gettimeofday(&tv, 0);
|
||||
tstamp->tv_sec = tv.tv_sec;
|
||||
tstamp->tv_nsec = tv.tv_usec * 1000L;
|
||||
-#if defined(HAVE_CLOCK_GETTIME) && defined(CLOCK_MONOTONIC)
|
||||
+#endif
|
||||
+#if defined(HAVE_CLOCK_GETTIME)
|
||||
}
|
||||
#endif
|
||||
}
|
||||
--
|
||||
1.9.0
|
||||
|
1257
0026-alsa-lib-heavy-pcm-atomics-cleanup.patch
Normal file
1257
0026-alsa-lib-heavy-pcm-atomics-cleanup.patch
Normal file
File diff suppressed because it is too large
Load Diff
119
0027-conf-Add-basic-infrastructure-for-2.1-surround-sound.patch
Normal file
119
0027-conf-Add-basic-infrastructure-for-2.1-surround-sound.patch
Normal file
@ -0,0 +1,119 @@
|
||||
From 57b5076c30b3453ee843912c0aeb3df8dbee3f68 Mon Sep 17 00:00:00 2001
|
||||
From: David Henningsson <david.henningsson@canonical.com>
|
||||
Date: Tue, 18 Feb 2014 16:41:48 +0100
|
||||
Subject: [PATCH] conf: Add basic infrastructure for 2.1 surround sound
|
||||
|
||||
For now, we do 2.1 over 5.1, because that's what ALSA allows per default.
|
||||
|
||||
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
|
||||
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
||||
---
|
||||
src/conf/alsa.conf | 3 +++
|
||||
src/conf/pcm/Makefile.am | 2 +-
|
||||
src/conf/pcm/surround21.conf | 62 ++++++++++++++++++++++++++++++++++++++++++++
|
||||
3 files changed, 66 insertions(+), 1 deletion(-)
|
||||
create mode 100644 src/conf/pcm/surround21.conf
|
||||
|
||||
diff --git a/src/conf/alsa.conf b/src/conf/alsa.conf
|
||||
index bc91df3b93a5..5c928e8afbcd 100644
|
||||
--- a/src/conf/alsa.conf
|
||||
+++ b/src/conf/alsa.conf
|
||||
@@ -90,6 +90,8 @@ defaults.pcm.center_lfe.card defaults.pcm.card
|
||||
defaults.pcm.center_lfe.device defaults.pcm.device
|
||||
defaults.pcm.side.card defaults.pcm.card
|
||||
defaults.pcm.side.device defaults.pcm.device
|
||||
+defaults.pcm.surround21.card defaults.pcm.card
|
||||
+defaults.pcm.surround21.device defaults.pcm.device
|
||||
defaults.pcm.surround40.card defaults.pcm.card
|
||||
defaults.pcm.surround40.device defaults.pcm.device
|
||||
defaults.pcm.surround41.card defaults.pcm.card
|
||||
@@ -131,6 +133,7 @@ pcm.front cards.pcm.front
|
||||
pcm.rear cards.pcm.rear
|
||||
pcm.center_lfe cards.pcm.center_lfe
|
||||
pcm.side cards.pcm.side
|
||||
+pcm.surround21 cards.pcm.surround21
|
||||
pcm.surround40 cards.pcm.surround40
|
||||
pcm.surround41 cards.pcm.surround41
|
||||
pcm.surround50 cards.pcm.surround50
|
||||
diff --git a/src/conf/pcm/Makefile.am b/src/conf/pcm/Makefile.am
|
||||
index cc3286e6ddf0..c548660d1696 100644
|
||||
--- a/src/conf/pcm/Makefile.am
|
||||
+++ b/src/conf/pcm/Makefile.am
|
||||
@@ -1,5 +1,5 @@
|
||||
cfg_files = default.conf front.conf rear.conf center_lfe.conf side.conf\
|
||||
- surround40.conf surround41.conf \
|
||||
+ surround21.conf surround40.conf surround41.conf \
|
||||
surround50.conf surround51.conf \
|
||||
surround71.conf iec958.conf hdmi.conf modem.conf \
|
||||
dmix.conf dsnoop.conf \
|
||||
diff --git a/src/conf/pcm/surround21.conf b/src/conf/pcm/surround21.conf
|
||||
new file mode 100644
|
||||
index 000000000000..be29020f24c7
|
||||
--- /dev/null
|
||||
+++ b/src/conf/pcm/surround21.conf
|
||||
@@ -0,0 +1,62 @@
|
||||
+#
|
||||
+# Hardware output from 2.1 speakers.
|
||||
+# Samples must be positioned:
|
||||
+# chn0 - front left
|
||||
+# chn1 - front right
|
||||
+# chn2 - LFE
|
||||
+#
|
||||
+
|
||||
+pcm.!surround21 {
|
||||
+ @args [ CARD DEV ]
|
||||
+ @args.CARD {
|
||||
+ type string
|
||||
+ default {
|
||||
+ @func getenv
|
||||
+ vars [
|
||||
+ ALSA_SURROUND21_CARD
|
||||
+ ALSA_PCM_CARD
|
||||
+ ALSA_CARD
|
||||
+ ]
|
||||
+ default {
|
||||
+ @func refer
|
||||
+ name defaults.pcm.surround21.card
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ @args.DEV {
|
||||
+ type integer
|
||||
+ default {
|
||||
+ @func igetenv
|
||||
+ vars [
|
||||
+ ALSA_SURROUND21_DEVICE
|
||||
+ ]
|
||||
+ default {
|
||||
+ @func refer
|
||||
+ name defaults.pcm.surround21.device
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ type route
|
||||
+ slave.pcm {
|
||||
+ @func refer
|
||||
+ name {
|
||||
+ @func concat
|
||||
+ strings [
|
||||
+ "cards."
|
||||
+ {
|
||||
+ @func card_driver
|
||||
+ card $CARD
|
||||
+ }
|
||||
+ ".pcm.surround51." $DEV ":CARD=" $CARD
|
||||
+ ]
|
||||
+ }
|
||||
+ }
|
||||
+ slave.channels 6
|
||||
+ ttable.0.0 1
|
||||
+ ttable.1.1 1
|
||||
+ ttable.2.5 1
|
||||
+ hint {
|
||||
+ description "2.1 Surround output to Front and Subwoofer speakers"
|
||||
+ device $DEV
|
||||
+ }
|
||||
+}
|
||||
--
|
||||
1.9.0
|
||||
|
381
0028-conf-Add-surround-2.1-support-to-all-cards.patch
Normal file
381
0028-conf-Add-surround-2.1-support-to-all-cards.patch
Normal file
@ -0,0 +1,381 @@
|
||||
From 1af088e39b75a0a0897c7036487b143e983cd423 Mon Sep 17 00:00:00 2001
|
||||
From: David Henningsson <david.henningsson@canonical.com>
|
||||
Date: Tue, 18 Feb 2014 16:41:49 +0100
|
||||
Subject: [PATCH] conf: Add surround 2.1 support to all cards
|
||||
|
||||
All cards that support 4.1 surround now also support 2.1 surround,
|
||||
because they both have surround 5.1 as slave.
|
||||
|
||||
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
|
||||
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
||||
---
|
||||
src/conf/cards/ATIIXP-SPDMA.conf | 1 +
|
||||
src/conf/cards/ATIIXP.conf | 1 +
|
||||
src/conf/cards/Audigy.conf | 1 +
|
||||
src/conf/cards/Audigy2.conf | 1 +
|
||||
src/conf/cards/Aureon51.conf | 1 +
|
||||
src/conf/cards/Aureon71.conf | 1 +
|
||||
src/conf/cards/CA0106.conf | 1 +
|
||||
src/conf/cards/CMI8738-MC6.conf | 1 +
|
||||
src/conf/cards/CMI8738-MC8.conf | 1 +
|
||||
src/conf/cards/CMI8788.conf | 2 +-
|
||||
src/conf/cards/CS46xx.conf | 1 +
|
||||
src/conf/cards/EMU10K1.conf | 1 +
|
||||
src/conf/cards/EMU10K1X.conf | 1 +
|
||||
src/conf/cards/FM801.conf | 1 +
|
||||
src/conf/cards/FireWave.conf | 1 +
|
||||
src/conf/cards/HDA-Intel.conf | 1 +
|
||||
src/conf/cards/ICE1712.conf | 1 +
|
||||
src/conf/cards/ICE1724.conf | 1 +
|
||||
src/conf/cards/ICH.conf | 1 +
|
||||
src/conf/cards/ICH4.conf | 1 +
|
||||
src/conf/cards/Loopback.conf | 1 +
|
||||
src/conf/cards/NFORCE.conf | 1 +
|
||||
src/conf/cards/SB-XFi.conf | 1 +
|
||||
src/conf/cards/SI7018.conf | 1 +
|
||||
src/conf/cards/USB-Audio.conf | 1 +
|
||||
src/conf/cards/VIA8233.conf | 1 +
|
||||
src/conf/cards/VIA8233A.conf | 1 +
|
||||
src/conf/cards/VIA8237.conf | 1 +
|
||||
28 files changed, 28 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/conf/cards/ATIIXP-SPDMA.conf b/src/conf/cards/ATIIXP-SPDMA.conf
|
||||
index 5c80815ddaf6..42540d6817c0 100644
|
||||
--- a/src/conf/cards/ATIIXP-SPDMA.conf
|
||||
+++ b/src/conf/cards/ATIIXP-SPDMA.conf
|
||||
@@ -77,6 +77,7 @@ ATIIXP-SPDMA.pcm.surround40.0 {
|
||||
}
|
||||
}
|
||||
|
||||
+<confdir:pcm/surround21.conf>
|
||||
<confdir:pcm/surround41.conf>
|
||||
<confdir:pcm/surround50.conf>
|
||||
<confdir:pcm/surround51.conf>
|
||||
diff --git a/src/conf/cards/ATIIXP.conf b/src/conf/cards/ATIIXP.conf
|
||||
index 38d802345bfb..c4d33ef34a68 100644
|
||||
--- a/src/conf/cards/ATIIXP.conf
|
||||
+++ b/src/conf/cards/ATIIXP.conf
|
||||
@@ -77,6 +77,7 @@ ATIIXP.pcm.surround40.0 {
|
||||
}
|
||||
}
|
||||
|
||||
+<confdir:pcm/surround21.conf>
|
||||
<confdir:pcm/surround41.conf>
|
||||
<confdir:pcm/surround50.conf>
|
||||
<confdir:pcm/surround51.conf>
|
||||
diff --git a/src/conf/cards/Audigy.conf b/src/conf/cards/Audigy.conf
|
||||
index 4fe387327633..1c92496653e0 100644
|
||||
--- a/src/conf/cards/Audigy.conf
|
||||
+++ b/src/conf/cards/Audigy.conf
|
||||
@@ -143,6 +143,7 @@ Audigy.pcm.center_lfe.0 {
|
||||
}
|
||||
}
|
||||
|
||||
+<confdir:pcm/surround21.conf>
|
||||
<confdir:pcm/surround40.conf>
|
||||
<confdir:pcm/surround41.conf>
|
||||
<confdir:pcm/surround50.conf>
|
||||
diff --git a/src/conf/cards/Audigy2.conf b/src/conf/cards/Audigy2.conf
|
||||
index db45776e54c4..cbec78358882 100644
|
||||
--- a/src/conf/cards/Audigy2.conf
|
||||
+++ b/src/conf/cards/Audigy2.conf
|
||||
@@ -195,6 +195,7 @@ Audigy2.pcm.side.0 {
|
||||
}
|
||||
}
|
||||
|
||||
+<confdir:pcm/surround21.conf>
|
||||
<confdir:pcm/surround40.conf>
|
||||
<confdir:pcm/surround41.conf>
|
||||
<confdir:pcm/surround50.conf>
|
||||
diff --git a/src/conf/cards/Aureon51.conf b/src/conf/cards/Aureon51.conf
|
||||
index 24b4d949174b..07be4a77aa12 100644
|
||||
--- a/src/conf/cards/Aureon51.conf
|
||||
+++ b/src/conf/cards/Aureon51.conf
|
||||
@@ -86,6 +86,7 @@ Aureon51.pcm.surround40.0 {
|
||||
channels 4
|
||||
}
|
||||
|
||||
+<confdir:pcm/surround21.conf>
|
||||
<confdir:pcm/surround41.conf>
|
||||
<confdir:pcm/surround50.conf>
|
||||
<confdir:pcm/surround51.conf>
|
||||
diff --git a/src/conf/cards/Aureon71.conf b/src/conf/cards/Aureon71.conf
|
||||
index 1479c25cce21..a43ce2cee5fa 100644
|
||||
--- a/src/conf/cards/Aureon71.conf
|
||||
+++ b/src/conf/cards/Aureon71.conf
|
||||
@@ -86,6 +86,7 @@ Aureon71.pcm.surround40.0 {
|
||||
channels 4
|
||||
}
|
||||
|
||||
+<confdir:pcm/surround21.conf>
|
||||
<confdir:pcm/surround41.conf>
|
||||
<confdir:pcm/surround50.conf>
|
||||
<confdir:pcm/surround51.conf>
|
||||
diff --git a/src/conf/cards/CA0106.conf b/src/conf/cards/CA0106.conf
|
||||
index 9d21770f84ad..2f0eaf0afdc8 100644
|
||||
--- a/src/conf/cards/CA0106.conf
|
||||
+++ b/src/conf/cards/CA0106.conf
|
||||
@@ -108,6 +108,7 @@ CA0106.pcm.surround40.0 {
|
||||
]
|
||||
}
|
||||
|
||||
+<confdir:pcm/surround21.conf>
|
||||
<confdir:pcm/surround41.conf>
|
||||
<confdir:pcm/surround50.conf>
|
||||
<confdir:pcm/surround51.conf>
|
||||
diff --git a/src/conf/cards/CMI8738-MC6.conf b/src/conf/cards/CMI8738-MC6.conf
|
||||
index 171c772809ab..edc67d44d96a 100644
|
||||
--- a/src/conf/cards/CMI8738-MC6.conf
|
||||
+++ b/src/conf/cards/CMI8738-MC6.conf
|
||||
@@ -77,6 +77,7 @@ CMI8738-MC6.pcm.surround40.0 {
|
||||
}
|
||||
}
|
||||
|
||||
+<confdir:pcm/surround21.conf>
|
||||
<confdir:pcm/surround41.conf>
|
||||
<confdir:pcm/surround50.conf>
|
||||
<confdir:pcm/surround51.conf>
|
||||
diff --git a/src/conf/cards/CMI8738-MC8.conf b/src/conf/cards/CMI8738-MC8.conf
|
||||
index a5bf6cb4889a..ddff75304bc3 100644
|
||||
--- a/src/conf/cards/CMI8738-MC8.conf
|
||||
+++ b/src/conf/cards/CMI8738-MC8.conf
|
||||
@@ -105,6 +105,7 @@ CMI8738-MC8.pcm.surround40.0 {
|
||||
}
|
||||
|
||||
|
||||
+<confdir:pcm/surround21.conf>
|
||||
<confdir:pcm/surround41.conf>
|
||||
<confdir:pcm/surround50.conf>
|
||||
<confdir:pcm/surround51.conf>
|
||||
diff --git a/src/conf/cards/CMI8788.conf b/src/conf/cards/CMI8788.conf
|
||||
index 0ca71e9d28de..edcb0c9ccc36 100644
|
||||
--- a/src/conf/cards/CMI8788.conf
|
||||
+++ b/src/conf/cards/CMI8788.conf
|
||||
@@ -48,7 +48,7 @@ CMI8788.pcm.surround40.0 {
|
||||
channels 4
|
||||
}
|
||||
|
||||
-
|
||||
+<confdir:pcm/surround21.conf>
|
||||
<confdir:pcm/surround41.conf>
|
||||
<confdir:pcm/surround50.conf>
|
||||
<confdir:pcm/surround51.conf>
|
||||
diff --git a/src/conf/cards/CS46xx.conf b/src/conf/cards/CS46xx.conf
|
||||
index 1983142548fd..b71c30aad514 100644
|
||||
--- a/src/conf/cards/CS46xx.conf
|
||||
+++ b/src/conf/cards/CS46xx.conf
|
||||
@@ -112,6 +112,7 @@ CS46xx.pcm.surround40.0 {
|
||||
]
|
||||
}
|
||||
|
||||
+<confdir:pcm/surround21.conf>
|
||||
<confdir:pcm/surround41.conf>
|
||||
<confdir:pcm/surround50.conf>
|
||||
<confdir:pcm/surround51.conf>
|
||||
diff --git a/src/conf/cards/EMU10K1.conf b/src/conf/cards/EMU10K1.conf
|
||||
index d51f6dc02fac..ef193fe0c460 100644
|
||||
--- a/src/conf/cards/EMU10K1.conf
|
||||
+++ b/src/conf/cards/EMU10K1.conf
|
||||
@@ -217,6 +217,7 @@ EMU10K1.pcm.surround40.0 {
|
||||
]
|
||||
}
|
||||
|
||||
+<confdir:pcm/surround21.conf>
|
||||
<confdir:pcm/surround41.conf>
|
||||
<confdir:pcm/surround50.conf>
|
||||
<confdir:pcm/surround51.conf>
|
||||
diff --git a/src/conf/cards/EMU10K1X.conf b/src/conf/cards/EMU10K1X.conf
|
||||
index b5fc708c4cb2..f742863679cb 100644
|
||||
--- a/src/conf/cards/EMU10K1X.conf
|
||||
+++ b/src/conf/cards/EMU10K1X.conf
|
||||
@@ -96,6 +96,7 @@ EMU10K1X.pcm.surround40.0 {
|
||||
]
|
||||
}
|
||||
|
||||
+<confdir:pcm/surround21.conf>
|
||||
<confdir:pcm/surround41.conf>
|
||||
<confdir:pcm/surround50.conf>
|
||||
<confdir:pcm/surround51.conf>
|
||||
diff --git a/src/conf/cards/FM801.conf b/src/conf/cards/FM801.conf
|
||||
index 997b2184f38c..0ddf799cd029 100644
|
||||
--- a/src/conf/cards/FM801.conf
|
||||
+++ b/src/conf/cards/FM801.conf
|
||||
@@ -40,6 +40,7 @@ FM801.pcm.default {
|
||||
|
||||
FM801.pcm.surround40.0 "cards.FM801.pcm.front.0"
|
||||
|
||||
+<confdir:pcm/surround21.conf>
|
||||
<confdir:pcm/surround41.conf>
|
||||
<confdir:pcm/surround50.conf>
|
||||
<confdir:pcm/surround51.conf>
|
||||
diff --git a/src/conf/cards/FireWave.conf b/src/conf/cards/FireWave.conf
|
||||
index 63fb23d96bc0..fcfc83ccfb19 100644
|
||||
--- a/src/conf/cards/FireWave.conf
|
||||
+++ b/src/conf/cards/FireWave.conf
|
||||
@@ -25,6 +25,7 @@ FireWave.pcm.front.0 {
|
||||
card $CARD
|
||||
}
|
||||
|
||||
+<confdir:pcm/surround21.conf>
|
||||
<confdir:pcm/surround41.conf>
|
||||
<confdir:pcm/surround50.conf>
|
||||
<confdir:pcm/surround51.conf>
|
||||
diff --git a/src/conf/cards/HDA-Intel.conf b/src/conf/cards/HDA-Intel.conf
|
||||
index 7976b6c52ee9..fa9f6946376f 100644
|
||||
--- a/src/conf/cards/HDA-Intel.conf
|
||||
+++ b/src/conf/cards/HDA-Intel.conf
|
||||
@@ -71,6 +71,7 @@ HDA-Intel.pcm.default {
|
||||
hint.device 0
|
||||
}
|
||||
|
||||
+<confdir:pcm/surround21.conf>
|
||||
<confdir:pcm/surround40.conf>
|
||||
<confdir:pcm/surround41.conf>
|
||||
<confdir:pcm/surround50.conf>
|
||||
diff --git a/src/conf/cards/ICE1712.conf b/src/conf/cards/ICE1712.conf
|
||||
index f5b8add6322c..398fa7ad5307 100644
|
||||
--- a/src/conf/cards/ICE1712.conf
|
||||
+++ b/src/conf/cards/ICE1712.conf
|
||||
@@ -74,6 +74,7 @@ ICE1712.pcm.surround40.0 {
|
||||
slave.channels 10
|
||||
}
|
||||
|
||||
+<confdir:pcm/surround21.conf>
|
||||
<confdir:pcm/surround41.conf>
|
||||
<confdir:pcm/surround50.conf>
|
||||
<confdir:pcm/surround51.conf>
|
||||
diff --git a/src/conf/cards/ICE1724.conf b/src/conf/cards/ICE1724.conf
|
||||
index e806b36d92a1..61cac0132f07 100644
|
||||
--- a/src/conf/cards/ICE1724.conf
|
||||
+++ b/src/conf/cards/ICE1724.conf
|
||||
@@ -95,6 +95,7 @@ ICE1724.pcm.surround40.0 {
|
||||
}
|
||||
}
|
||||
|
||||
+<confdir:pcm/surround21.conf>
|
||||
<confdir:pcm/surround41.conf>
|
||||
<confdir:pcm/surround50.conf>
|
||||
<confdir:pcm/surround51.conf>
|
||||
diff --git a/src/conf/cards/ICH.conf b/src/conf/cards/ICH.conf
|
||||
index 47ffef96531c..6fc9a5a236c1 100644
|
||||
--- a/src/conf/cards/ICH.conf
|
||||
+++ b/src/conf/cards/ICH.conf
|
||||
@@ -98,6 +98,7 @@ ICH.pcm.surround40.0 {
|
||||
}
|
||||
}
|
||||
|
||||
+<confdir:pcm/surround21.conf>
|
||||
<confdir:pcm/surround41.conf>
|
||||
<confdir:pcm/surround50.conf>
|
||||
<confdir:pcm/surround51.conf>
|
||||
diff --git a/src/conf/cards/ICH4.conf b/src/conf/cards/ICH4.conf
|
||||
index 1bf5605bfd7f..64ec883d9c73 100644
|
||||
--- a/src/conf/cards/ICH4.conf
|
||||
+++ b/src/conf/cards/ICH4.conf
|
||||
@@ -98,6 +98,7 @@ ICH4.pcm.surround40.0 {
|
||||
}
|
||||
}
|
||||
|
||||
+<confdir:pcm/surround21.conf>
|
||||
<confdir:pcm/surround41.conf>
|
||||
<confdir:pcm/surround50.conf>
|
||||
<confdir:pcm/surround51.conf>
|
||||
diff --git a/src/conf/cards/Loopback.conf b/src/conf/cards/Loopback.conf
|
||||
index 5365fa1bec52..974aa7535340 100644
|
||||
--- a/src/conf/cards/Loopback.conf
|
||||
+++ b/src/conf/cards/Loopback.conf
|
||||
@@ -63,6 +63,7 @@ Loopback.pcm.default {
|
||||
hint.device 0
|
||||
}
|
||||
|
||||
+<confdir:pcm/surround21.conf>
|
||||
<confdir:pcm/surround40.conf>
|
||||
<confdir:pcm/surround41.conf>
|
||||
<confdir:pcm/surround50.conf>
|
||||
diff --git a/src/conf/cards/NFORCE.conf b/src/conf/cards/NFORCE.conf
|
||||
index 6ebefe3da29e..64d15479291b 100644
|
||||
--- a/src/conf/cards/NFORCE.conf
|
||||
+++ b/src/conf/cards/NFORCE.conf
|
||||
@@ -98,6 +98,7 @@ NFORCE.pcm.surround40.0 {
|
||||
}
|
||||
}
|
||||
|
||||
+<confdir:pcm/surround21.conf>
|
||||
<confdir:pcm/surround41.conf>
|
||||
<confdir:pcm/surround50.conf>
|
||||
<confdir:pcm/surround51.conf>
|
||||
diff --git a/src/conf/cards/SB-XFi.conf b/src/conf/cards/SB-XFi.conf
|
||||
index 38d0027fb4f2..eb2218bfdcc7 100644
|
||||
--- a/src/conf/cards/SB-XFi.conf
|
||||
+++ b/src/conf/cards/SB-XFi.conf
|
||||
@@ -53,6 +53,7 @@ SB-XFi.pcm.side.0 {
|
||||
hint.device 3
|
||||
}
|
||||
|
||||
+<confdir:pcm/surround21.conf>
|
||||
<confdir:pcm/surround40.conf>
|
||||
<confdir:pcm/surround41.conf>
|
||||
<confdir:pcm/surround50.conf>
|
||||
diff --git a/src/conf/cards/SI7018.conf b/src/conf/cards/SI7018.conf
|
||||
index 7417bd5bf2e4..02b8fc877ff3 100644
|
||||
--- a/src/conf/cards/SI7018.conf
|
||||
+++ b/src/conf/cards/SI7018.conf
|
||||
@@ -78,6 +78,7 @@ SI7018.pcm.surround40.0 {
|
||||
]
|
||||
}
|
||||
|
||||
+<confdir:pcm/surround21.conf>
|
||||
<confdir:pcm/surround41.conf>
|
||||
<confdir:pcm/surround50.conf>
|
||||
<confdir:pcm/surround51.conf>
|
||||
diff --git a/src/conf/cards/USB-Audio.conf b/src/conf/cards/USB-Audio.conf
|
||||
index 8a6d9cac6ead..ce3ae019f7f6 100644
|
||||
--- a/src/conf/cards/USB-Audio.conf
|
||||
+++ b/src/conf/cards/USB-Audio.conf
|
||||
@@ -314,6 +314,7 @@ USB-Audio.pcm.surround40_two_stereo_devices {
|
||||
}
|
||||
}
|
||||
|
||||
+<confdir:pcm/surround21.conf>
|
||||
<confdir:pcm/surround41.conf>
|
||||
<confdir:pcm/surround50.conf>
|
||||
<confdir:pcm/surround51.conf>
|
||||
diff --git a/src/conf/cards/VIA8233.conf b/src/conf/cards/VIA8233.conf
|
||||
index 668bfd9e421b..9ad321f713a9 100644
|
||||
--- a/src/conf/cards/VIA8233.conf
|
||||
+++ b/src/conf/cards/VIA8233.conf
|
||||
@@ -86,6 +86,7 @@ VIA8233.pcm.surround40.0 {
|
||||
}
|
||||
}
|
||||
|
||||
+<confdir:pcm/surround21.conf>
|
||||
<confdir:pcm/surround41.conf>
|
||||
<confdir:pcm/surround50.conf>
|
||||
<confdir:pcm/surround51.conf>
|
||||
diff --git a/src/conf/cards/VIA8233A.conf b/src/conf/cards/VIA8233A.conf
|
||||
index 97d2a7daf335..679fccf3d06f 100644
|
||||
--- a/src/conf/cards/VIA8233A.conf
|
||||
+++ b/src/conf/cards/VIA8233A.conf
|
||||
@@ -84,6 +84,7 @@ VIA8233A.pcm.surround40.0 {
|
||||
}
|
||||
}
|
||||
|
||||
+<confdir:pcm/surround21.conf>
|
||||
<confdir:pcm/surround41.conf>
|
||||
<confdir:pcm/surround50.conf>
|
||||
<confdir:pcm/surround51.conf>
|
||||
diff --git a/src/conf/cards/VIA8237.conf b/src/conf/cards/VIA8237.conf
|
||||
index 404e19075cbd..29d8e00f6601 100644
|
||||
--- a/src/conf/cards/VIA8237.conf
|
||||
+++ b/src/conf/cards/VIA8237.conf
|
||||
@@ -79,6 +79,7 @@ VIA8237.pcm.surround40.0 {
|
||||
}
|
||||
}
|
||||
|
||||
+<confdir:pcm/surround21.conf>
|
||||
<confdir:pcm/surround41.conf>
|
||||
<confdir:pcm/surround50.conf>
|
||||
<confdir:pcm/surround51.conf>
|
||||
--
|
||||
1.9.0
|
||||
|
150
0029-Portability-fix-look-for-sys-endian.h-as-well-as-end.patch
Normal file
150
0029-Portability-fix-look-for-sys-endian.h-as-well-as-end.patch
Normal file
@ -0,0 +1,150 @@
|
||||
From 7a6e8ca348c4c2640cbc337914d1376333fdbc17 Mon Sep 17 00:00:00 2001
|
||||
From: Patrick Welche <prlw1@cam.ac.uk>
|
||||
Date: Sun, 23 Feb 2014 11:12:48 +0000
|
||||
Subject: [PATCH] Portability fix: look for sys/endian.h as well as endian.h
|
||||
|
||||
- define __BYTE_ORDER and friends.
|
||||
- adjust asoundlib.h accordingly.
|
||||
|
||||
Signed-off-by: Patrick Welche <prlw1@cam.ac.uk>
|
||||
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
||||
---
|
||||
configure.in | 33 +++++++++++++++++++++++++++++++--
|
||||
include/asoundlib-head.h | 13 -------------
|
||||
include/local.h | 18 +++++++++++++++++-
|
||||
src/pcm/pcm_file.c | 1 -
|
||||
4 files changed, 48 insertions(+), 17 deletions(-)
|
||||
|
||||
diff --git a/configure.in b/configure.in
|
||||
index bb56eb653ccc..9463b5ad4766 100644
|
||||
--- a/configure.in
|
||||
+++ b/configure.in
|
||||
@@ -309,8 +309,8 @@ fi
|
||||
|
||||
AC_SUBST(ALSA_DEPLIBS)
|
||||
|
||||
-dnl Check for wordexp.h
|
||||
-AC_CHECK_HEADERS([wordexp.h])
|
||||
+dnl Check for headers
|
||||
+AC_CHECK_HEADERS([wordexp.h endian.h sys/endian.h])
|
||||
|
||||
dnl Check for resmgr support...
|
||||
AC_MSG_CHECKING(for resmgr support)
|
||||
@@ -660,6 +660,35 @@ AC_OUTPUT(Makefile doc/Makefile doc/pictures/Makefile doc/doxygen.cfg \
|
||||
dnl Create asoundlib.h dynamically according to configure options
|
||||
echo "Creating asoundlib.h..."
|
||||
cp "$srcdir"/include/asoundlib-head.h include/asoundlib.h
|
||||
+test "$ac_cv_header_endian_h" = "yes" && echo "#include <endian.h>" >> include/asoundlib.h
|
||||
+if test "$ac_cv_header_sys_endian_h" = "yes"; then
|
||||
+cat >> include/asoundlib.h <<EOF
|
||||
+#include <sys/endian.h>
|
||||
+#ifndef __BYTE_ORDER
|
||||
+#define __BYTE_ORDER BYTE_ORDER
|
||||
+#endif
|
||||
+#ifndef __LITTLE_ENDIAN
|
||||
+#define __LITTLE_ENDIAN LITTLE_ENDIAN
|
||||
+#endif
|
||||
+#ifndef __BIG_ENDIAN
|
||||
+#define __BIG_ENDIAN BIG_ENDIAN
|
||||
+#endif
|
||||
+EOF
|
||||
+fi
|
||||
+cat >> include/asoundlib.h <<EOF
|
||||
+
|
||||
+#ifndef __GNUC__
|
||||
+#define __inline__ inline
|
||||
+#endif
|
||||
+
|
||||
+#include <alsa/asoundef.h>
|
||||
+#include <alsa/version.h>
|
||||
+#include <alsa/global.h>
|
||||
+#include <alsa/input.h>
|
||||
+#include <alsa/output.h>
|
||||
+#include <alsa/error.h>
|
||||
+#include <alsa/conf.h>
|
||||
+EOF
|
||||
test "$build_pcm" = "yes" && echo "#include <alsa/pcm.h>" >> include/asoundlib.h
|
||||
test "$build_rawmidi" = "yes" && echo "#include <alsa/rawmidi.h>" >> include/asoundlib.h
|
||||
test "$build_pcm" = "yes" && echo "#include <alsa/timer.h>" >> include/asoundlib.h
|
||||
diff --git a/include/asoundlib-head.h b/include/asoundlib-head.h
|
||||
index 71b5c29f61c4..1ec611e56b8e 100644
|
||||
--- a/include/asoundlib-head.h
|
||||
+++ b/include/asoundlib-head.h
|
||||
@@ -35,19 +35,6 @@
|
||||
#include <string.h>
|
||||
#include <fcntl.h>
|
||||
#include <assert.h>
|
||||
-#include <endian.h>
|
||||
#include <sys/poll.h>
|
||||
#include <errno.h>
|
||||
#include <stdarg.h>
|
||||
-
|
||||
-#ifndef __GNUC__
|
||||
-#define __inline__ inline
|
||||
-#endif
|
||||
-
|
||||
-#include <alsa/asoundef.h>
|
||||
-#include <alsa/version.h>
|
||||
-#include <alsa/global.h>
|
||||
-#include <alsa/input.h>
|
||||
-#include <alsa/output.h>
|
||||
-#include <alsa/error.h>
|
||||
-#include <alsa/conf.h>
|
||||
diff --git a/include/local.h b/include/local.h
|
||||
index 9464efa49642..2fe9a273f0b0 100644
|
||||
--- a/include/local.h
|
||||
+++ b/include/local.h
|
||||
@@ -22,13 +22,30 @@
|
||||
#ifndef __LOCAL_H
|
||||
#define __LOCAL_H
|
||||
|
||||
+#include "config.h"
|
||||
+
|
||||
#include <unistd.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <fcntl.h>
|
||||
#include <assert.h>
|
||||
+#ifdef HAVE_ENDIAN_H
|
||||
#include <endian.h>
|
||||
+#elif defined(HAVE_SYS_ENDIAN_H)
|
||||
+#include <sys/endian.h>
|
||||
+#ifndef __BYTE_ORDER
|
||||
+#define __BYTE_ORDER BYTE_ORDER
|
||||
+#endif
|
||||
+#ifndef __LITTLE_ENDIAN
|
||||
+#define __LITTLE_ENDIAN LITTLE_ENDIAN
|
||||
+#endif
|
||||
+#ifndef __BIG_ENDIAN
|
||||
+#define __BIG_ENDIAN BIG_ENDIAN
|
||||
+#endif
|
||||
+#else
|
||||
+#error Header defining endianness not defined
|
||||
+#endif
|
||||
#include <stdarg.h>
|
||||
#include <sys/poll.h>
|
||||
#include <sys/types.h>
|
||||
@@ -36,7 +53,6 @@
|
||||
#include <linux/types.h>
|
||||
#include <linux/ioctl.h>
|
||||
|
||||
-#include "config.h"
|
||||
#ifdef SUPPORT_RESMGR
|
||||
#include <resmgr.h>
|
||||
#endif
|
||||
diff --git a/src/pcm/pcm_file.c b/src/pcm/pcm_file.c
|
||||
index 712302598a9f..b1f23304633f 100644
|
||||
--- a/src/pcm/pcm_file.c
|
||||
+++ b/src/pcm/pcm_file.c
|
||||
@@ -26,7 +26,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
-#include <endian.h>
|
||||
#include <byteswap.h>
|
||||
#include <ctype.h>
|
||||
#include <string.h>
|
||||
--
|
||||
1.9.0
|
||||
|
1665
0030-autotools-update-style.patch
Normal file
1665
0030-autotools-update-style.patch
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,45 @@
|
||||
From 2da7b0c2c194a457de9d9a1a9b93c47e2dad1507 Mon Sep 17 00:00:00 2001
|
||||
From: Maarten Baert <maarten-baert@hotmail.com>
|
||||
Date: Wed, 26 Feb 2014 14:23:45 +0100
|
||||
Subject: [PATCH] pcm: Insert linear-to-float conversion when rate or channel
|
||||
count is incorrect
|
||||
|
||||
This fixes a bug where snd_pcm_plug_insert_plugins fails when both
|
||||
client and slave use format float, but the rate or channel count does
|
||||
not match. I also removed some redundant code.
|
||||
|
||||
Signed-off-by: Maarten Baert <maarten-baert@hotmail.com>
|
||||
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
||||
---
|
||||
src/pcm/pcm_plug.c | 14 ++++++--------
|
||||
1 file changed, 6 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/src/pcm/pcm_plug.c b/src/pcm/pcm_plug.c
|
||||
index fa84eaacaedc..ede9c1525a74 100644
|
||||
--- a/src/pcm/pcm_plug.c
|
||||
+++ b/src/pcm/pcm_plug.c
|
||||
@@ -522,15 +522,13 @@ static int snd_pcm_plug_change_format(snd_pcm_t *pcm, snd_pcm_t **new, snd_pcm_p
|
||||
}
|
||||
#ifdef BUILD_PCM_PLUGIN_LFLOAT
|
||||
} else if (snd_pcm_format_float(slv->format)) {
|
||||
- /* Conversion is done in another plugin */
|
||||
- if (clt->format == slv->format &&
|
||||
- clt->rate == slv->rate &&
|
||||
- clt->channels == slv->channels)
|
||||
- return 0;
|
||||
- cfmt = clt->format;
|
||||
- if (snd_pcm_format_linear(clt->format))
|
||||
+ if (snd_pcm_format_linear(clt->format)) {
|
||||
+ cfmt = clt->format;
|
||||
f = snd_pcm_lfloat_open;
|
||||
- else
|
||||
+ } else if (clt->rate != slv->rate || clt->channels != slv->channels) {
|
||||
+ cfmt = SND_PCM_FORMAT_S16;
|
||||
+ f = snd_pcm_lfloat_open;
|
||||
+ } else
|
||||
return -EINVAL;
|
||||
#endif
|
||||
#ifdef BUILD_PCM_NONLINEAR
|
||||
--
|
||||
1.9.0
|
||||
|
@ -0,0 +1,68 @@
|
||||
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
|
||||
|
475
0033-pcm-route-Select-slave-chmap-based-on-ttable-informa.patch
Normal file
475
0033-pcm-route-Select-slave-chmap-based-on-ttable-informa.patch
Normal file
@ -0,0 +1,475 @@
|
||||
From 5c4cd46810cef8850b037fca9e38ffd43b0bff22 Mon Sep 17 00:00:00 2001
|
||||
From: David Henningsson <david.henningsson@canonical.com>
|
||||
Date: Fri, 28 Feb 2014 08:57:06 +0100
|
||||
Subject: [PATCH] pcm: route: Select slave chmap based on ttable information
|
||||
|
||||
It means we need to initialize this order:
|
||||
|
||||
1) Read the ttable to figure out which channels are present
|
||||
2) Open slave pcm and find a matching chmap
|
||||
3) Determine size of ttable (this can now depend on the chmap)
|
||||
4) Read ttable coefficients
|
||||
5) At prepare time, select the matching chmap
|
||||
|
||||
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
|
||||
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
||||
---
|
||||
src/pcm/pcm_route.c | 319 +++++++++++++++++++++++++++++++++++++++++++++-------
|
||||
1 file changed, 276 insertions(+), 43 deletions(-)
|
||||
|
||||
diff --git a/src/pcm/pcm_route.c b/src/pcm/pcm_route.c
|
||||
index 56318d47bcbf..ab17fa78be2c 100644
|
||||
--- a/src/pcm/pcm_route.c
|
||||
+++ b/src/pcm/pcm_route.c
|
||||
@@ -103,6 +103,7 @@ typedef struct {
|
||||
snd_pcm_format_t sformat;
|
||||
int schannels;
|
||||
snd_pcm_route_params_t params;
|
||||
+ snd_pcm_chmap_t *chmap;
|
||||
} snd_pcm_route_t;
|
||||
|
||||
#endif /* DOC_HIDDEN */
|
||||
@@ -518,6 +519,7 @@ static int snd_pcm_route_close(snd_pcm_t *pcm)
|
||||
}
|
||||
free(params->dsts);
|
||||
}
|
||||
+ free(route->chmap);
|
||||
return snd_pcm_generic_close(pcm);
|
||||
}
|
||||
|
||||
@@ -789,21 +791,187 @@ 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)
|
||||
+/*
|
||||
+ * Converts a string to an array of channel indices:
|
||||
+ * - Given a number, the result is an array with one element,
|
||||
+ * containing that number
|
||||
+ * - Given a channel name (e g "FL") and a chmap,
|
||||
+ * it will look this up in the chmap and return all matches
|
||||
+ * - Given a channel name and no chmap, the result is an array with one element,
|
||||
+ containing alsa standard channel map. Note that this might be a negative
|
||||
+ number in case of "UNKNOWN", "NA" or "MONO".
|
||||
+ * Return value is number of matches written.
|
||||
+ */
|
||||
+static int strtochannel(const char *id, snd_pcm_chmap_t *chmap,
|
||||
+ long *channel, int channel_size)
|
||||
{
|
||||
- int err;
|
||||
int ch;
|
||||
- err = safe_strtol(id, channel);
|
||||
- if (err >= 0)
|
||||
- return err;
|
||||
+ if (safe_strtol(id, channel) >= 0)
|
||||
+ return 1;
|
||||
|
||||
ch = (int) snd_pcm_chmap_from_string(id);
|
||||
if (ch == -1)
|
||||
return -EINVAL;
|
||||
|
||||
- /* For now, assume standard channel mapping */
|
||||
- *channel = ch - SND_CHMAP_FL;
|
||||
+ if (chmap) {
|
||||
+ int i, r = 0;
|
||||
+ /* Start with highest channel to simplify implementation of
|
||||
+ determine ttable size */
|
||||
+ for (i = chmap->channels - 1; i >= 0; i--) {
|
||||
+ if ((int) chmap->pos[i] != ch)
|
||||
+ continue;
|
||||
+ if (r >= channel_size)
|
||||
+ continue;
|
||||
+ channel[r++] = i;
|
||||
+ }
|
||||
+ return r;
|
||||
+ }
|
||||
+ else {
|
||||
+ /* Assume ALSA standard channel mapping */
|
||||
+ *channel = ch - SND_CHMAP_FL;
|
||||
+ return 1;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+#define MAX_CHMAP_CHANNELS 256
|
||||
+
|
||||
+static int determine_chmap(snd_config_t *tt, snd_pcm_chmap_t **tt_chmap)
|
||||
+{
|
||||
+ snd_config_iterator_t i, inext;
|
||||
+ snd_pcm_chmap_t *chmap;
|
||||
+
|
||||
+ assert(tt && tt_chmap);
|
||||
+ chmap = malloc(sizeof(snd_pcm_chmap_t) +
|
||||
+ MAX_CHMAP_CHANNELS * sizeof(unsigned int));
|
||||
+
|
||||
+ chmap->channels = 0;
|
||||
+ snd_config_for_each(i, inext, tt) {
|
||||
+ const char *id;
|
||||
+ snd_config_iterator_t j, jnext;
|
||||
+ snd_config_t *in = snd_config_iterator_entry(i);
|
||||
+
|
||||
+ if (!snd_config_get_id(in, &id) < 0)
|
||||
+ continue;
|
||||
+ if (snd_config_get_type(in) != SND_CONFIG_TYPE_COMPOUND)
|
||||
+ goto err;
|
||||
+ snd_config_for_each(j, jnext, in) {
|
||||
+ int ch, k, found;
|
||||
+ long schannel;
|
||||
+ snd_config_t *jnode = snd_config_iterator_entry(j);
|
||||
+ if (snd_config_get_id(jnode, &id) < 0)
|
||||
+ continue;
|
||||
+ if (safe_strtol(id, &schannel) >= 0)
|
||||
+ continue;
|
||||
+ ch = (int) snd_pcm_chmap_from_string(id);
|
||||
+ if (ch == -1)
|
||||
+ goto err;
|
||||
+
|
||||
+ found = 0;
|
||||
+ for (k = 0; k < (int) chmap->channels; k++)
|
||||
+ if (ch == (int) chmap->pos[k]) {
|
||||
+ found = 1;
|
||||
+ break;
|
||||
+ }
|
||||
+ if (found)
|
||||
+ continue;
|
||||
+
|
||||
+ if (chmap->channels >= MAX_CHMAP_CHANNELS) {
|
||||
+ SNDERR("Too many channels in ttable chmap");
|
||||
+ goto err;
|
||||
+ }
|
||||
+ chmap->pos[chmap->channels++] = ch;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+ *tt_chmap = chmap;
|
||||
return 0;
|
||||
+
|
||||
+err:
|
||||
+ *tt_chmap = NULL;
|
||||
+ free(chmap);
|
||||
+ return -EINVAL;
|
||||
+}
|
||||
+
|
||||
+static int find_matching_chmap(snd_pcm_t *spcm, snd_pcm_chmap_t *tt_chmap,
|
||||
+ snd_pcm_chmap_t **found_chmap, int *schannels)
|
||||
+{
|
||||
+ snd_pcm_chmap_query_t** chmaps = snd_pcm_query_chmaps(spcm);
|
||||
+ int i;
|
||||
+
|
||||
+ *found_chmap = NULL;
|
||||
+
|
||||
+ if (chmaps == NULL)
|
||||
+ return 0; /* chmap API not supported for this slave */
|
||||
+
|
||||
+ for (i = 0; chmaps[i]; i++) {
|
||||
+ unsigned int j, k;
|
||||
+ int match = 1;
|
||||
+ snd_pcm_chmap_t *c = &chmaps[i]->map;
|
||||
+ if (*schannels >= 0 && (int) c->channels != *schannels)
|
||||
+ continue;
|
||||
+
|
||||
+ for (j = 0; j < tt_chmap->channels; j++) {
|
||||
+ int found = 0;
|
||||
+ unsigned int ch = tt_chmap->pos[j];
|
||||
+ for (k = 0; k < c->channels; k++)
|
||||
+ if (c->pos[k] == ch) {
|
||||
+ found = 1;
|
||||
+ break;
|
||||
+ }
|
||||
+ if (!found) {
|
||||
+ match = 0;
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (match) {
|
||||
+ int size = sizeof(snd_pcm_chmap_t) + c->channels * sizeof(unsigned int);
|
||||
+ *found_chmap = malloc(size);
|
||||
+ if (!*found_chmap) {
|
||||
+ snd_pcm_free_chmaps(chmaps);
|
||||
+ return -ENOMEM;
|
||||
+ }
|
||||
+ memcpy(*found_chmap, c, size);
|
||||
+ *schannels = c->channels;
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ snd_pcm_free_chmaps(chmaps);
|
||||
+
|
||||
+ if (*found_chmap == NULL) {
|
||||
+ SNDERR("Found no matching channel map");
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+static int route_chmap_init(snd_pcm_t *pcm)
|
||||
+{
|
||||
+ int set_map = 0;
|
||||
+ snd_pcm_chmap_t *current;
|
||||
+ snd_pcm_route_t *route = pcm->private_data;
|
||||
+ if (!route->chmap)
|
||||
+ return 0;
|
||||
+ if (snd_pcm_state(pcm) != SND_PCM_STATE_PREPARED)
|
||||
+ return 0;
|
||||
+
|
||||
+ /* Check if we really need to set the chmap or not.
|
||||
+ This is important in case set_chmap is not implemented. */
|
||||
+ current = snd_pcm_get_chmap(route->plug.gen.slave);
|
||||
+ if (!current)
|
||||
+ return -ENOSYS;
|
||||
+ if (current->channels != route->chmap->channels)
|
||||
+ set_map = 1;
|
||||
+ else
|
||||
+ set_map = memcmp(current->pos, route->chmap->pos,
|
||||
+ current->channels);
|
||||
+ free(current);
|
||||
+ if (!set_map)
|
||||
+ return 0;
|
||||
+
|
||||
+ return snd_pcm_set_chmap(route->plug.gen.slave, route->chmap);
|
||||
}
|
||||
|
||||
|
||||
@@ -939,6 +1107,7 @@ int snd_pcm_route_open(snd_pcm_t **pcmp, const char *name,
|
||||
route->plug.undo_write = snd_pcm_plugin_undo_write_generic;
|
||||
route->plug.gen.slave = slave;
|
||||
route->plug.gen.close_slave = close_slave;
|
||||
+ route->plug.init = route_chmap_init;
|
||||
|
||||
err = snd_pcm_new(&pcm, SND_PCM_TYPE_ROUTE, name, slave->stream, slave->mode);
|
||||
if (err < 0) {
|
||||
@@ -963,16 +1132,10 @@ int snd_pcm_route_open(snd_pcm_t **pcmp, const char *name,
|
||||
return 0;
|
||||
}
|
||||
|
||||
-/**
|
||||
- * \brief Determine route matrix sizes
|
||||
- * \param tt Configuration root describing route matrix
|
||||
- * \param tt_csize Returned client size in elements
|
||||
- * \param tt_ssize Returned slave size in elements
|
||||
- * \retval zero on success otherwise a negative error code
|
||||
- */
|
||||
-int snd_pcm_route_determine_ttable(snd_config_t *tt,
|
||||
- unsigned int *tt_csize,
|
||||
- unsigned int *tt_ssize)
|
||||
+static int _snd_pcm_route_determine_ttable(snd_config_t *tt,
|
||||
+ unsigned int *tt_csize,
|
||||
+ unsigned int *tt_ssize,
|
||||
+ snd_pcm_chmap_t *chmap)
|
||||
{
|
||||
snd_config_iterator_t i, inext;
|
||||
long csize = 0, ssize = 0;
|
||||
@@ -1001,7 +1164,7 @@ int snd_pcm_route_determine_ttable(snd_config_t *tt,
|
||||
const char *id;
|
||||
if (snd_config_get_id(jnode, &id) < 0)
|
||||
continue;
|
||||
- err = strtochannel(id, &schannel);
|
||||
+ err = strtochannel(id, chmap, &schannel, 1);
|
||||
if (err < 0) {
|
||||
SNDERR("Invalid slave channel: %s", id);
|
||||
return -EINVAL;
|
||||
@@ -1020,6 +1183,20 @@ int snd_pcm_route_determine_ttable(snd_config_t *tt,
|
||||
}
|
||||
|
||||
/**
|
||||
+ * \brief Determine route matrix sizes
|
||||
+ * \param tt Configuration root describing route matrix
|
||||
+ * \param tt_csize Returned client size in elements
|
||||
+ * \param tt_ssize Returned slave size in elements
|
||||
+ * \retval zero on success otherwise a negative error code
|
||||
+ */
|
||||
+int snd_pcm_route_determine_ttable(snd_config_t *tt,
|
||||
+ unsigned int *tt_csize,
|
||||
+ unsigned int *tt_ssize)
|
||||
+{
|
||||
+ return _snd_pcm_route_determine_ttable(tt, tt_csize, tt_ssize, NULL);
|
||||
+}
|
||||
+
|
||||
+/**
|
||||
* \brief Load route matrix
|
||||
* \param tt Configuration root describing route matrix
|
||||
* \param ttable Returned route matrix
|
||||
@@ -1030,10 +1207,10 @@ int snd_pcm_route_determine_ttable(snd_config_t *tt,
|
||||
* \param schannels Slave channels
|
||||
* \retval zero on success otherwise a negative error code
|
||||
*/
|
||||
-int snd_pcm_route_load_ttable(snd_config_t *tt, snd_pcm_route_ttable_entry_t *ttable,
|
||||
- unsigned int tt_csize, unsigned int tt_ssize,
|
||||
- unsigned int *tt_cused, unsigned int *tt_sused,
|
||||
- int schannels)
|
||||
+static int _snd_pcm_route_load_ttable(snd_config_t *tt, snd_pcm_route_ttable_entry_t *ttable,
|
||||
+ unsigned int tt_csize, unsigned int tt_ssize,
|
||||
+ unsigned int *tt_cused, unsigned int *tt_sused,
|
||||
+ int schannels, snd_pcm_chmap_t *chmap)
|
||||
{
|
||||
int cused = -1;
|
||||
int sused = -1;
|
||||
@@ -1060,17 +1237,18 @@ int snd_pcm_route_load_ttable(snd_config_t *tt, snd_pcm_route_ttable_entry_t *tt
|
||||
snd_config_for_each(j, jnext, in) {
|
||||
snd_config_t *jnode = snd_config_iterator_entry(j);
|
||||
double value;
|
||||
- long schannel;
|
||||
+ int ss;
|
||||
+ long *scha = alloca(tt_ssize * sizeof(long));
|
||||
const char *id;
|
||||
if (snd_config_get_id(jnode, &id) < 0)
|
||||
continue;
|
||||
- err = strtochannel(id, &schannel);
|
||||
- if (err < 0 ||
|
||||
- schannel < 0 || (unsigned int) schannel > tt_ssize ||
|
||||
- (schannels > 0 && schannel >= schannels)) {
|
||||
+
|
||||
+ ss = strtochannel(id, chmap, scha, tt_ssize);
|
||||
+ if (ss < 0) {
|
||||
SNDERR("Invalid slave channel: %s", id);
|
||||
return -EINVAL;
|
||||
}
|
||||
+
|
||||
err = snd_config_get_real(jnode, &value);
|
||||
if (err < 0) {
|
||||
long v;
|
||||
@@ -1081,9 +1259,18 @@ int snd_pcm_route_load_ttable(snd_config_t *tt, snd_pcm_route_ttable_entry_t *tt
|
||||
}
|
||||
value = v;
|
||||
}
|
||||
- ttable[cchannel * tt_ssize + schannel] = value;
|
||||
- if (schannel > sused)
|
||||
- sused = schannel;
|
||||
+
|
||||
+ for (k = 0; (int) k < ss; k++) {
|
||||
+ long schannel = scha[k];
|
||||
+ if (schannel < 0 || (unsigned int) schannel > tt_ssize ||
|
||||
+ (schannels > 0 && schannel >= schannels)) {
|
||||
+ SNDERR("Invalid slave channel: %s", id);
|
||||
+ return -EINVAL;
|
||||
+ }
|
||||
+ ttable[cchannel * tt_ssize + schannel] = value;
|
||||
+ if (schannel > sused)
|
||||
+ sused = schannel;
|
||||
+ }
|
||||
}
|
||||
if (cchannel > cused)
|
||||
cused = cchannel;
|
||||
@@ -1093,6 +1280,26 @@ int snd_pcm_route_load_ttable(snd_config_t *tt, snd_pcm_route_ttable_entry_t *tt
|
||||
return 0;
|
||||
}
|
||||
|
||||
+/**
|
||||
+ * \brief Load route matrix
|
||||
+ * \param tt Configuration root describing route matrix
|
||||
+ * \param ttable Returned route matrix
|
||||
+ * \param tt_csize Client size in elements
|
||||
+ * \param tt_ssize Slave size in elements
|
||||
+ * \param tt_cused Used client elements
|
||||
+ * \param tt_sused Used slave elements
|
||||
+ * \param schannels Slave channels
|
||||
+ * \retval zero on success otherwise a negative error code
|
||||
+ */
|
||||
+int snd_pcm_route_load_ttable(snd_config_t *tt, snd_pcm_route_ttable_entry_t *ttable,
|
||||
+ unsigned int tt_csize, unsigned int tt_ssize,
|
||||
+ unsigned int *tt_cused, unsigned int *tt_sused,
|
||||
+ int schannels)
|
||||
+{
|
||||
+ return _snd_pcm_route_load_ttable(tt, ttable, tt_csize, tt_ssize,
|
||||
+ tt_cused, tt_sused, schannels, NULL);
|
||||
+}
|
||||
+
|
||||
/*! \page pcm_plugins
|
||||
|
||||
\section pcm_plugins_route Plugin: Route & Volume
|
||||
@@ -1100,6 +1307,9 @@ int snd_pcm_route_load_ttable(snd_config_t *tt, snd_pcm_route_ttable_entry_t *tt
|
||||
This plugin converts channels and applies volume during the conversion.
|
||||
The format and rate must match for both of them.
|
||||
|
||||
+SCHANNEL can be a channel name instead of a number (e g FL, LFE).
|
||||
+If so, a matching channel map will be selected for the slave.
|
||||
+
|
||||
\code
|
||||
pcm.name {
|
||||
type route # Route & Volume conversion PCM
|
||||
@@ -1150,6 +1360,7 @@ int _snd_pcm_route_open(snd_pcm_t **pcmp, const char *name,
|
||||
int err;
|
||||
snd_pcm_t *spcm;
|
||||
snd_config_t *slave = NULL, *sconf;
|
||||
+ snd_pcm_chmap_t *tt_chmap, *chmap;
|
||||
snd_pcm_format_t sformat = SND_PCM_FORMAT_UNKNOWN;
|
||||
int schannels = -1;
|
||||
snd_config_t *tt = NULL;
|
||||
@@ -1198,37 +1409,59 @@ int _snd_pcm_route_open(snd_pcm_t **pcmp, const char *name,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
- err = snd_pcm_route_determine_ttable(tt, &csize, &ssize);
|
||||
+ err = determine_chmap(tt, &tt_chmap);
|
||||
if (err < 0) {
|
||||
- snd_config_delete(sconf);
|
||||
+ free(ttable);
|
||||
return err;
|
||||
}
|
||||
- ttable = malloc(csize * ssize * sizeof(snd_pcm_route_ttable_entry_t));
|
||||
- if (ttable == NULL) {
|
||||
- snd_config_delete(sconf);
|
||||
- return -ENOMEM;
|
||||
- }
|
||||
- err = snd_pcm_route_load_ttable(tt, ttable, csize, ssize,
|
||||
- &cused, &sused, schannels);
|
||||
+
|
||||
+ err = snd_pcm_open_slave(&spcm, root, sconf, stream, mode, conf);
|
||||
+ snd_config_delete(sconf);
|
||||
if (err < 0) {
|
||||
+ free(tt_chmap);
|
||||
free(ttable);
|
||||
- snd_config_delete(sconf);
|
||||
return err;
|
||||
}
|
||||
|
||||
- err = snd_pcm_open_slave(&spcm, root, sconf, stream, mode, conf);
|
||||
- snd_config_delete(sconf);
|
||||
+ if (tt_chmap) {
|
||||
+ err = find_matching_chmap(spcm, tt_chmap, &chmap, &schannels);
|
||||
+ free(tt_chmap);
|
||||
+ if (err < 0)
|
||||
+ return err;
|
||||
+ }
|
||||
+
|
||||
+ err = _snd_pcm_route_determine_ttable(tt, &csize, &ssize, chmap);
|
||||
+ if (err < 0) {
|
||||
+ free(chmap);
|
||||
+ snd_pcm_close(spcm);
|
||||
+ return err;
|
||||
+ }
|
||||
+ ttable = malloc(csize * ssize * sizeof(snd_pcm_route_ttable_entry_t));
|
||||
+ if (ttable == NULL) {
|
||||
+ free(chmap);
|
||||
+ snd_pcm_close(spcm);
|
||||
+ return -ENOMEM;
|
||||
+ }
|
||||
+ err = _snd_pcm_route_load_ttable(tt, ttable, csize, ssize,
|
||||
+ &cused, &sused, schannels, chmap);
|
||||
if (err < 0) {
|
||||
+ free(chmap);
|
||||
free(ttable);
|
||||
+ snd_pcm_close(spcm);
|
||||
return err;
|
||||
}
|
||||
+
|
||||
err = snd_pcm_route_open(pcmp, name, sformat, schannels,
|
||||
ttable, ssize,
|
||||
cused, sused,
|
||||
spcm, 1);
|
||||
free(ttable);
|
||||
- if (err < 0)
|
||||
+ if (err < 0) {
|
||||
+ free(chmap);
|
||||
snd_pcm_close(spcm);
|
||||
+ }
|
||||
+ ((snd_pcm_route_t*) (*pcmp)->private_data)->chmap = chmap;
|
||||
+
|
||||
return err;
|
||||
}
|
||||
#ifndef DOC_HIDDEN
|
||||
--
|
||||
1.9.0
|
||||
|
@ -0,0 +1,42 @@
|
||||
From 48f1b308cc66152eb6db66742dd0d08d888cda8d Mon Sep 17 00:00:00 2001
|
||||
From: David Henningsson <david.henningsson@canonical.com>
|
||||
Date: Fri, 28 Feb 2014 08:57:07 +0100
|
||||
Subject: [PATCH] conf: Allow 2.1 surround to use different number of channels
|
||||
|
||||
This way, cards that support LFE on four channels (e g laptop with
|
||||
internal subwoofer) can do that, and other cards on a six channel setup
|
||||
can use that as well.
|
||||
|
||||
Well, note that there is still a reference to "pcm.surround51" left here.
|
||||
In practice, for HDA Intel sound cards this does not matter as both
|
||||
surround51 and surround40 reference the same definition.
|
||||
(And that's the only card I currently know of that actually does
|
||||
surround2.1 over four channels.)
|
||||
|
||||
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
|
||||
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
||||
---
|
||||
src/conf/pcm/surround21.conf | 7 +++----
|
||||
1 file changed, 3 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/conf/pcm/surround21.conf b/src/conf/pcm/surround21.conf
|
||||
index be29020f24c7..7f4676b3f714 100644
|
||||
--- a/src/conf/pcm/surround21.conf
|
||||
+++ b/src/conf/pcm/surround21.conf
|
||||
@@ -51,10 +51,9 @@ pcm.!surround21 {
|
||||
]
|
||||
}
|
||||
}
|
||||
- slave.channels 6
|
||||
- ttable.0.0 1
|
||||
- ttable.1.1 1
|
||||
- ttable.2.5 1
|
||||
+ ttable.0.FL 1
|
||||
+ ttable.1.FR 1
|
||||
+ ttable.2.LFE 1
|
||||
hint {
|
||||
description "2.1 Surround output to Front and Subwoofer speakers"
|
||||
device $DEV
|
||||
--
|
||||
1.9.0
|
||||
|
31
0035-pcm-Wrap-hw_ptr-to-boundary-in-pcm_ioplug.patch
Normal file
31
0035-pcm-Wrap-hw_ptr-to-boundary-in-pcm_ioplug.patch
Normal file
@ -0,0 +1,31 @@
|
||||
From 688004a6acf7d1d568a660546816a092b6cc32ed Mon Sep 17 00:00:00 2001
|
||||
From: "MONTANARO Luciano (MM)" <luciano.montanaro@magnetimarelli.com>
|
||||
Date: Tue, 4 Mar 2014 12:51:36 +0100
|
||||
Subject: [PATCH] pcm: Wrap hw_ptr to boundary in pcm_ioplug
|
||||
|
||||
The function snd_pcm_ioplug_hw_ptr_update() always increased the hw_ptr
|
||||
by delta, without wrapping it to the boundary. This would lead to
|
||||
problems when after many hours, the hw_ptr would overflow.
|
||||
|
||||
Signed-off-by: Luciano Montanaro <luciano.montanaro@magnetimarelli.com>
|
||||
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
||||
---
|
||||
src/pcm/pcm_ioplug.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/pcm/pcm_ioplug.c b/src/pcm/pcm_ioplug.c
|
||||
index a90c844598bd..c1c3a9835d47 100644
|
||||
--- a/src/pcm/pcm_ioplug.c
|
||||
+++ b/src/pcm/pcm_ioplug.c
|
||||
@@ -60,7 +60,7 @@ static void snd_pcm_ioplug_hw_ptr_update(snd_pcm_t *pcm)
|
||||
delta = hw - io->last_hw;
|
||||
else
|
||||
delta = pcm->buffer_size + hw - io->last_hw;
|
||||
- io->data->hw_ptr += delta;
|
||||
+ snd_pcm_mmap_hw_forward(io->data->pcm, delta);
|
||||
io->last_hw = hw;
|
||||
} else
|
||||
io->data->state = SNDRV_PCM_STATE_XRUN;
|
||||
--
|
||||
1.9.0
|
||||
|
@ -0,0 +1,25 @@
|
||||
From cbcc78031b676413265719113c7109481fa0242d Mon Sep 17 00:00:00 2001
|
||||
From: Takashi Iwai <tiwai@suse.de>
|
||||
Date: Tue, 11 Mar 2014 10:59:21 +0100
|
||||
Subject: [PATCH] src/conf/cards: Add missing entry for Loopback.conf
|
||||
|
||||
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
||||
---
|
||||
src/conf/cards/Makefile.am | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/src/conf/cards/Makefile.am b/src/conf/cards/Makefile.am
|
||||
index ee7991be28e8..008d399fdc34 100644
|
||||
--- a/src/conf/cards/Makefile.am
|
||||
+++ b/src/conf/cards/Makefile.am
|
||||
@@ -35,6 +35,7 @@ cfg_files = aliases.conf \
|
||||
ICH.conf \
|
||||
ICH4.conf \
|
||||
ICH-MODEM.conf \
|
||||
+ Loopback.conf \
|
||||
Maestro3.conf \
|
||||
NFORCE.conf \
|
||||
PC-Speaker.conf \
|
||||
--
|
||||
1.9.0
|
||||
|
74
Loopback.conf
Normal file
74
Loopback.conf
Normal file
@ -0,0 +1,74 @@
|
||||
#
|
||||
# Configuration for the Intel HD audio (ICH6/ICH7)
|
||||
#
|
||||
|
||||
<confdir:pcm/front.conf>
|
||||
|
||||
Loopback.pcm.front.0 {
|
||||
@args [ CARD ]
|
||||
@args.CARD {
|
||||
type string
|
||||
}
|
||||
type softvol
|
||||
slave.pcm {
|
||||
type hw
|
||||
card $CARD
|
||||
}
|
||||
control {
|
||||
name "PCM Playback Volume"
|
||||
card $CARD
|
||||
}
|
||||
}
|
||||
|
||||
# default with dmix+softvol & dsnoop
|
||||
Loopback.pcm.default {
|
||||
@args [ CARD ]
|
||||
@args.CARD {
|
||||
type string
|
||||
}
|
||||
type asym
|
||||
playback.pcm {
|
||||
type plug
|
||||
slave.pcm {
|
||||
type softvol
|
||||
slave.pcm {
|
||||
@func concat
|
||||
strings [ "dmix:" $CARD ]
|
||||
}
|
||||
control {
|
||||
name "PCM Playback Volume"
|
||||
card $CARD
|
||||
}
|
||||
}
|
||||
}
|
||||
capture.pcm {
|
||||
type plug
|
||||
slave.pcm {
|
||||
type softvol
|
||||
slave.pcm {
|
||||
@func concat
|
||||
strings [ "dsnoop:" $CARD ]
|
||||
}
|
||||
control {
|
||||
name "Digital Capture Volume"
|
||||
card $CARD
|
||||
}
|
||||
min_dB -30.0
|
||||
max_dB 30.0
|
||||
resolution 121
|
||||
}
|
||||
# to avoid possible phase inversions with digital mics
|
||||
route_policy copy
|
||||
}
|
||||
hint.device 0
|
||||
}
|
||||
|
||||
<confdir:pcm/surround40.conf>
|
||||
<confdir:pcm/surround41.conf>
|
||||
<confdir:pcm/surround50.conf>
|
||||
<confdir:pcm/surround51.conf>
|
||||
<confdir:pcm/surround71.conf>
|
||||
|
||||
Loopback.pcm.surround40.0 cards.Loopback.pcm.front.0
|
||||
Loopback.pcm.surround51.0 cards.Loopback.pcm.front.0
|
||||
Loopback.pcm.surround71.0 cards.Loopback.pcm.front.0
|
56
alsa-info.sh
56
alsa-info.sh
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
SCRIPT_VERSION=0.4.61
|
||||
SCRIPT_VERSION=0.4.63
|
||||
CHANGELOG="http://www.alsa-project.org/alsa-info.sh.changelog"
|
||||
|
||||
#################################################################################
|
||||
@ -227,7 +227,7 @@ withsysfs() {
|
||||
echo "!!-----------" >> $FILE
|
||||
echo "" >> $FILE
|
||||
fi
|
||||
for f in init_pin_configs driver_pin_configs user_pin_configs init_verbs; do
|
||||
for f in init_pin_configs driver_pin_configs user_pin_configs init_verbs hints; do
|
||||
echo "$i/$f:" >> $FILE
|
||||
cat $i/$f >> $FILE
|
||||
echo >> $FILE
|
||||
@ -246,7 +246,7 @@ withdmesg() {
|
||||
echo "!!ALSA/HDA dmesg" >> $FILE
|
||||
echo "!!--------------" >> $FILE
|
||||
echo "" >> $FILE
|
||||
dmesg | grep -C1 -E 'ALSA|HDA|HDMI|sound|hda.codec|hda.intel' >> $FILE
|
||||
dmesg | grep -C1 -E 'ALSA|HDA|HDMI|snd[_-]|sound|hda.codec|hda.intel' >> $FILE
|
||||
echo "" >> $FILE
|
||||
echo "" >> $FILE
|
||||
}
|
||||
@ -370,7 +370,7 @@ information about your ALSA installation and sound related hardware.
|
||||
|
||||
See '$0 --help' for command line options.
|
||||
"
|
||||
if [[ -n "$DIALOG" ]]; then
|
||||
if [ -n "$DIALOG" ]; then
|
||||
dialog --backtitle "$BGTITLE" \
|
||||
--title "ALSA-Info script v $SCRIPT_VERSION" \
|
||||
--msgbox "$greeting_message" 20 80
|
||||
@ -392,10 +392,11 @@ trap cleanup 0
|
||||
|
||||
if [ "$PROCEED" = "yes" ]; then
|
||||
|
||||
if [[ -z "$LSPCI" ]]
|
||||
then
|
||||
echo "This script requires lspci. Please install it, and re-run this script."
|
||||
exit 0
|
||||
if [ -z "$LSPCI" ]; then
|
||||
if [ -d /sys/bus/pci ]; then
|
||||
echo "This script requires lspci. Please install it, and re-run this script."
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
|
||||
#Fetch the info and store in temp files/variables
|
||||
@ -404,12 +405,10 @@ KERNEL_VERSION=`uname -r`
|
||||
KERNEL_PROCESSOR=`uname -p`
|
||||
KERNEL_MACHINE=`uname -m`
|
||||
KERNEL_OS=`uname -o`
|
||||
[[ `uname -v |grep SMP` ]] && KERNEL_SMP="Yes" || KERNEL_SMP="No"
|
||||
[[ `uname -v | grep SMP` ]] && KERNEL_SMP="Yes" || KERNEL_SMP="No"
|
||||
ALSA_DRIVER_VERSION=`cat /proc/asound/version |head -n1|awk {'print $7'} |sed 's/\.$//'`
|
||||
get_alsa_library_version
|
||||
ALSA_UTILS_VERSION=`amixer -v |awk {'print $3'}`
|
||||
VENDOR_ID=`lspci -vn |grep 040[1-3] | awk -F':' '{print $3}'|awk {'print substr($0, 2);}' >$TEMPDIR/vendor_id.tmp`
|
||||
DEVICE_ID=`lspci -vn |grep 040[1-3] | awk -F':' '{print $4}'|awk {'print $1'} >$TEMPDIR/device_id.tmp`
|
||||
LAST_CARD=$((`grep "]: " /proc/asound/cards | wc -l` - 1 ))
|
||||
|
||||
ESDINST=$(which esd 2>/dev/null| sed 's|^[^/]*||' 2>/dev/null)
|
||||
@ -435,7 +434,9 @@ fi
|
||||
|
||||
cat /proc/asound/modules 2>/dev/null|awk {'print $2'}>$TEMPDIR/alsamodules.tmp
|
||||
cat /proc/asound/cards >$TEMPDIR/alsacards.tmp
|
||||
if [[ ! -z "$LSPCI" ]]; then
|
||||
lspci |grep -i "multi\|audio">$TEMPDIR/lspci.tmp
|
||||
fi
|
||||
|
||||
#Check for HDA-Intel cards codec#*
|
||||
cat /proc/asound/card*/codec\#* > $TEMPDIR/alsa-hda-intel.tmp 2> /dev/null
|
||||
@ -548,6 +549,8 @@ echo "" >> $FILE
|
||||
cat $TEMPDIR/alsacards.tmp >> $FILE
|
||||
echo "" >> $FILE
|
||||
echo "" >> $FILE
|
||||
|
||||
if [[ ! -z "$LSPCI" ]]; then
|
||||
echo "!!PCI Soundcards installed in the system" >> $FILE
|
||||
echo "!!--------------------------------------" >> $FILE
|
||||
echo "" >> $FILE
|
||||
@ -560,6 +563,7 @@ echo "" >> $FILE
|
||||
lspci -vvn |grep -A1 040[1-3] >> $FILE
|
||||
echo "" >> $FILE
|
||||
echo "" >> $FILE
|
||||
fi
|
||||
|
||||
if [ "$SNDOPTIONS" ]
|
||||
then
|
||||
@ -587,8 +591,7 @@ done
|
||||
echo "" >> $FILE
|
||||
fi
|
||||
|
||||
if [ -s "$TEMPDIR/alsa-hda-intel.tmp" ]
|
||||
then
|
||||
if [ -s "$TEMPDIR/alsa-hda-intel.tmp" ]; then
|
||||
echo "!!HDA-Intel Codec information" >> $FILE
|
||||
echo "!!---------------------------" >> $FILE
|
||||
echo "--startcollapse--" >> $FILE
|
||||
@ -599,8 +602,7 @@ then
|
||||
echo "" >> $FILE
|
||||
fi
|
||||
|
||||
if [ -s "$TEMPDIR/alsa-ac97.tmp" ]
|
||||
then
|
||||
if [ -s "$TEMPDIR/alsa-ac97.tmp" ]; then
|
||||
echo "!!AC97 Codec information" >> $FILE
|
||||
echo "!!----------------------" >> $FILE
|
||||
echo "--startcollapse--" >> $FILE
|
||||
@ -613,8 +615,7 @@ then
|
||||
echo "" >> $FILE
|
||||
fi
|
||||
|
||||
if [ -s "$TEMPDIR/alsa-usbmixer.tmp" ]
|
||||
then
|
||||
if [ -s "$TEMPDIR/alsa-usbmixer.tmp" ]; then
|
||||
echo "!!USB Mixer information" >> $FILE
|
||||
echo "!!---------------------" >> $FILE
|
||||
echo "--startcollapse--" >> $FILE
|
||||
@ -626,8 +627,7 @@ then
|
||||
fi
|
||||
|
||||
#If no command line options are specified, then run as though --with-all was specified
|
||||
if [[ -z "$1" ]]
|
||||
then
|
||||
if [ -z "$1" ]; then
|
||||
update
|
||||
withall
|
||||
pbcheck
|
||||
@ -636,8 +636,7 @@ fi
|
||||
fi # proceed
|
||||
|
||||
#loop through command line arguments, until none are left.
|
||||
if [[ -n "$1" ]]
|
||||
then
|
||||
if [ -n "$1" ]; then
|
||||
until [ -z "$1" ]
|
||||
do
|
||||
case "$1" in
|
||||
@ -767,7 +766,7 @@ if [ "$PROCEED" = "no" ]; then
|
||||
fi
|
||||
|
||||
if [ "$UPLOAD" = "ask" ]; then
|
||||
if [[ -n "$DIALOG" ]]; then
|
||||
if [ -n "$DIALOG" ]; then
|
||||
dialog --backtitle "$BGTITLE" --title "Information collected" --yes-label " UPLOAD / SHARE " --no-label " SAVE LOCALLY " --defaultno --yesno "\n\nAutomatically upload ALSA information to $WWWSERVICE?" 10 80
|
||||
DIALOG_EXIT_CODE=$?
|
||||
if [ $DIALOG_EXIT_CODE != 0 ]; then
|
||||
@ -882,27 +881,26 @@ echo ""
|
||||
fi #dialog
|
||||
|
||||
#See if tput is available, and use it if it is.
|
||||
if [[ -n "$TPUT" ]]
|
||||
then
|
||||
if [ -n "$TPUT" ]; then
|
||||
if [[ -z $PASTEBIN ]]; then
|
||||
FINAL_URL=`tput setaf 1; grep "SUCCESS:" $TEMPDIR/wget.tmp | cut -d ' ' -f 2 ; tput sgr0`
|
||||
else
|
||||
FINAL_URL=`tput setaf 1; grep "SUCCESS:" $TEMPDIR/wget.tmp |sed -n 's/.*\:\([0-9]\+\).*/http:\/\/pastebin.ca\/\1/p';tput sgr0`
|
||||
FINAL_URL=`tput setaf 1; grep "SUCCESS:" $TEMPDIR/wget.tmp | sed -n 's/.*\:\([0-9]\+\).*/http:\/\/pastebin.ca\/\1/p';tput sgr0`
|
||||
fi
|
||||
else
|
||||
if [[ -z $PASTEBIN ]]; then
|
||||
FINAL_URL=`grep "SUCCESS:" $TEMPDIR/wget.tmp | cut -d ' ' -f 2`
|
||||
else
|
||||
FINAL_URL=`grep "SUCCESS:" $TEMPDIR/wget.tmp |sed -n 's/.*\:\([0-9]\+\).*/http:\/\/pastebin.ca\/\1/p'`
|
||||
FINAL_URL=`grep "SUCCESS:" $TEMPDIR/wget.tmp | sed -n 's/.*\:\([0-9]\+\).*/http:\/\/pastebin.ca\/\1/p'`
|
||||
fi
|
||||
fi
|
||||
|
||||
#Output the URL of the uploaded file.
|
||||
# Output the URL of the uploaded file.
|
||||
echo "Your ALSA information is located at $FINAL_URL"
|
||||
echo "Please inform the person helping you."
|
||||
echo ""
|
||||
|
||||
#We couldnt find a suitable wget, so tell the user to upload manually.
|
||||
# We couldnt find a suitable wget, so tell the user to upload manually.
|
||||
else
|
||||
mv -f $FILE $NFILE || exit 1
|
||||
KEEP_OUTPUT="yes"
|
||||
@ -935,5 +933,3 @@ else
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
|
27
alsa.changes
27
alsa.changes
@ -1,3 +1,30 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Mar 11 10:47:01 CET 2014 - tiwai@suse.de
|
||||
|
||||
- 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
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Feb 24 16:37:33 CET 2014 - tiwai@suse.de
|
||||
|
||||
|
202
alsa.spec
202
alsa.spec
@ -16,29 +16,20 @@
|
||||
#
|
||||
|
||||
|
||||
Name: alsa
|
||||
BuildRequires: doxygen
|
||||
BuildRequires: libtool
|
||||
%if %suse_version > 1200
|
||||
BuildRequires: libudev-devel
|
||||
%else
|
||||
BuildRequires: udev
|
||||
%endif
|
||||
BuildRequires: pkg-config
|
||||
%define package_version 1.0.27.2
|
||||
Requires: alsa-utils
|
||||
Recommends: alsa-plugins alsa-oss
|
||||
PreReq: %insserv_prereq %fillup_prereq
|
||||
# bug437293
|
||||
%ifarch ppc64
|
||||
Obsoletes: alsa-64bit
|
||||
%if 0%{?suse_version} > 1200
|
||||
%define _udevdir %(pkg-config --variable=udevdir udev)
|
||||
%else
|
||||
%define _udevdir /lib/udev
|
||||
%endif
|
||||
Name: alsa
|
||||
Version: 1.0.27.2
|
||||
Release: 0
|
||||
#
|
||||
Summary: Advanced Linux Sound Architecture
|
||||
License: LGPL-2.1+
|
||||
Group: System/Libraries
|
||||
Version: 1.0.27.2
|
||||
Release: 0
|
||||
Url: http://www.alsa-project.org/
|
||||
Source: ftp://ftp.alsa-project.org/pub/lib/alsa-lib-%{package_version}.tar.bz2
|
||||
Source2: baselibs.conf
|
||||
Source8: 40-alsa.rules
|
||||
@ -58,6 +49,7 @@ Source33: alsa-info.sh
|
||||
Source34: alsa-init.sh
|
||||
Source40: 50-alsa.conf
|
||||
Source41: install-snd-module
|
||||
Source50: Loopback.conf
|
||||
# Patch: alsa-lib-git-fixes.diff
|
||||
# upstream fixes
|
||||
Patch1: 0001-local.h-use-__kernel_off_t-from-linux-types.h.patch
|
||||
@ -79,14 +71,43 @@ Patch16: 0016-pcm_file-fixed-memory-leak.patch
|
||||
Patch17: 0017-pcm_file-don-t-touch-infile-on-playback-and-output-f.patch
|
||||
Patch18: 0018-pcm_file-document-new-argument-to-snd_pcm_file_open.patch
|
||||
Patch19: 0019-dmix-Don-t-use-assert-and-abort.patch
|
||||
Patch20: 0020-minor-malloc-changes.patch
|
||||
Patch21: 0021-alsa-lib-minor-typo-in-pcm-doc.patch
|
||||
Patch22: 0022-control_hw-fix-potential-memory-leak.patch
|
||||
Patch23: 0023-pcm-initialize-pcm_dmix-monotonic-field.patch
|
||||
Patch24: 0024-pcm-initialize-monotonic-field-for-dshare-and-dsnoop.patch
|
||||
Patch25: 0025-pcm-use-CLOCK_REALTIME-for-non-monotonic-ts.patch
|
||||
Patch26: 0026-alsa-lib-heavy-pcm-atomics-cleanup.patch
|
||||
Patch27: 0027-conf-Add-basic-infrastructure-for-2.1-surround-sound.patch
|
||||
Patch28: 0028-conf-Add-surround-2.1-support-to-all-cards.patch
|
||||
Patch29: 0029-Portability-fix-look-for-sys-endian.h-as-well-as-end.patch
|
||||
Patch30: 0030-autotools-update-style.patch
|
||||
Patch31: 0031-pcm-Insert-linear-to-float-conversion-when-rate-or-c.patch
|
||||
Patch32: 0032-pcm-route-Allow-chmap-syntax-for-slave-channels-in-t.patch
|
||||
Patch33: 0033-pcm-route-Select-slave-chmap-based-on-ttable-informa.patch
|
||||
Patch34: 0034-conf-Allow-2.1-surround-to-use-different-number-of-c.patch
|
||||
Patch35: 0035-pcm-Wrap-hw_ptr-to-boundary-in-pcm_ioplug.patch
|
||||
Patch36: 0036-src-conf-cards-Add-missing-entry-for-Loopback.conf.patch
|
||||
# rest suse patches
|
||||
Patch99: alsa-lib-doxygen-avoid-crash-for-11.3.diff
|
||||
Url: http://www.alsa-project.org/
|
||||
BuildRequires: doxygen
|
||||
BuildRequires: libtool
|
||||
BuildRequires: pkg-config
|
||||
Requires: alsa-utils
|
||||
# FIXME: use proper Requires(pre/post/preun/...)
|
||||
PreReq: %fillup_prereq
|
||||
PreReq: %insserv_prereq
|
||||
Recommends: alsa-oss
|
||||
Recommends: alsa-plugins
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%if %suse_version > 1200
|
||||
%define _udevdir %(pkg-config --variable=udevdir udev)
|
||||
%if 0%{?suse_version} > 1200
|
||||
BuildRequires: libudev-devel
|
||||
%else
|
||||
%define _udevdir /lib/udev
|
||||
BuildRequires: udev
|
||||
%endif
|
||||
# bug437293
|
||||
%ifarch ppc64
|
||||
Obsoletes: alsa-64bit
|
||||
%endif
|
||||
|
||||
%description
|
||||
@ -114,7 +135,7 @@ to develop applications that require these.
|
||||
Summary: Additional Package Documentation
|
||||
License: GPL-2.0+
|
||||
Group: Documentation/Other
|
||||
%if %suse_version > 1110
|
||||
%if 0%{?suse_version} > 1110
|
||||
BuildArch: noarch
|
||||
%endif
|
||||
|
||||
@ -134,6 +155,7 @@ Architecture.
|
||||
|
||||
%prep
|
||||
%setup -q -n alsa-lib-%{package_version}
|
||||
cp %{SOURCE50} src/conf/cards
|
||||
# %patch -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
@ -154,12 +176,29 @@ Architecture.
|
||||
%patch17 -p1
|
||||
%patch18 -p1
|
||||
%patch19 -p1
|
||||
%if %suse_version == 1130
|
||||
%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
|
||||
%patch36 -p1
|
||||
%if 0%{?suse_version} == 1130
|
||||
%patch99 -p1
|
||||
%endif
|
||||
# hack to fix build on older distros
|
||||
%if %suse_version < 1100
|
||||
%ifarch %ix86
|
||||
%if 0%{?suse_version} < 1100
|
||||
%ifarch %{ix86}
|
||||
test -f $RPM_SOURCE_DIR/baselibs.conf && \
|
||||
sed -i -e'/recommends.*alsa-oss/d' $RPM_SOURCE_DIR/baselibs.conf
|
||||
%endif
|
||||
@ -177,88 +216,88 @@ autoreconf -fi
|
||||
--disable-python
|
||||
make V=1 %{?_smp_mflags}
|
||||
# run doxygen
|
||||
make -C doc doc
|
||||
make -C doc doc %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
# install shared library
|
||||
%makeinstall
|
||||
make DESTDIR=%{buildroot} install %{?_smp_mflags}
|
||||
# clean up unneeded files
|
||||
rm -f $RPM_BUILD_ROOT%{_libdir}/*.*a
|
||||
rm -f $RPM_BUILD_ROOT%{_libdir}/alsa-lib/smixer/*.*a
|
||||
rm -f $RPM_BUILD_ROOT%{_bindir}/aserver
|
||||
rm -f %{buildroot}%{_libdir}/*.*a
|
||||
rm -f %{buildroot}%{_libdir}/alsa-lib/smixer/*.*a
|
||||
rm -f %{buildroot}%{_bindir}/aserver
|
||||
#
|
||||
# install helper scripts
|
||||
mkdir -p $RPM_BUILD_ROOT%{_bindir}
|
||||
mkdir -p $RPM_BUILD_ROOT%{_sbindir}
|
||||
install -c -m 0755 %{SOURCE16} $RPM_BUILD_ROOT%{_bindir}
|
||||
install -c -m 0755 %{SOURCE34} $RPM_BUILD_ROOT%{_sbindir}/alsa-init
|
||||
%if %suse_version < 1140
|
||||
sed -i -e 's@/var/lib/alsa/asound.state@/etc/asound.state@g' $RPM_BUILD_ROOT%{_bindir}/set_default_volume
|
||||
sed -i -e 's@/var/lib/alsa/asound.state@/etc/asound.state@g' $RPM_BUILD_ROOT%{_sbindir}/alsa-init
|
||||
mkdir -p %{buildroot}%{_bindir}
|
||||
mkdir -p %{buildroot}%{_sbindir}
|
||||
install -c -m 0755 %{SOURCE16} %{buildroot}%{_bindir}
|
||||
install -c -m 0755 %{SOURCE34} %{buildroot}%{_sbindir}/alsa-init
|
||||
%if 0%{?suse_version} < 1140
|
||||
sed -i -e 's@%{_localstatedir}/lib/alsa/asound.state@%{_sysconfdir}/asound.state@g' %{buildroot}%{_bindir}/set_default_volume
|
||||
sed -i -e 's@%{_localstatedir}/lib/alsa/asound.state@%{_sysconfdir}/asound.state@g' %{buildroot}%{_sbindir}/alsa-init
|
||||
%endif
|
||||
# install test wave file
|
||||
mkdir -p $RPM_BUILD_ROOT%{_datadir}/sounds/alsa
|
||||
install -c -m 0644 %{SOURCE17} $RPM_BUILD_ROOT%{_datadir}/sounds/alsa/test.wav
|
||||
mkdir -p %{buildroot}%{_datadir}/sounds/alsa
|
||||
install -c -m 0644 %{SOURCE17} %{buildroot}%{_datadir}/sounds/alsa/test.wav
|
||||
# install all_notes_off stuff
|
||||
install -c -m 0755 %{SOURCE30} $RPM_BUILD_ROOT%{_bindir}
|
||||
mkdir -p $RPM_BUILD_ROOT/usr/lib
|
||||
install -c -m 0644 %{SOURCE31} $RPM_BUILD_ROOT/usr/lib
|
||||
install -c -m 0644 %{SOURCE32} $RPM_BUILD_ROOT/usr/lib
|
||||
%if %suse_version <= 1310
|
||||
install -c -m 0755 %{SOURCE30} %{buildroot}%{_bindir}
|
||||
mkdir -p %{buildroot}%{_prefix}/lib
|
||||
install -c -m 0644 %{SOURCE31} %{buildroot}%{_prefix}/lib
|
||||
install -c -m 0644 %{SOURCE32} %{buildroot}%{_prefix}/lib
|
||||
%if 0%{?suse_version} <= 1310
|
||||
#
|
||||
# install init scripts
|
||||
#
|
||||
mkdir -p $RPM_BUILD_ROOT/etc/init.d
|
||||
install -c -m 0755 %{SOURCE11} $RPM_BUILD_ROOT/etc/init.d
|
||||
install -c -m 0755 %{SOURCE13} $RPM_BUILD_ROOT/etc/init.d
|
||||
%if %suse_version < 1140
|
||||
sed -i -e 's@/var/lib/alsa/asound.state@/etc/asound.state@g' $RPM_BUILD_ROOT/etc/init.d/alsasound
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/init.d
|
||||
install -c -m 0755 %{SOURCE11} %{buildroot}%{_sysconfdir}/init.d
|
||||
install -c -m 0755 %{SOURCE13} %{buildroot}%{_sysconfdir}/init.d
|
||||
%if 0%{?suse_version} < 1140
|
||||
sed -i -e 's@%{_localstatedir}/lib/alsa/asound.state@%{_sysconfdir}/asound.state@g' %{buildroot}%{_initddir}/alsasound
|
||||
%endif
|
||||
rm -f $RPM_BUILD_ROOT%{_sbindir}/rcalsasound
|
||||
ln -s ../../etc/init.d/alsasound $RPM_BUILD_ROOT%{_sbindir}/rcalsasound
|
||||
rm -f $RPM_BUILD_ROOT%{_sbindir}/rcjoystick
|
||||
ln -s ../../etc/init.d/joystick $RPM_BUILD_ROOT%{_sbindir}/rcjoystick
|
||||
rm -f %{buildroot}%{_sbindir}/rcalsasound
|
||||
ln -s ../..%{_initddir}/alsasound %{buildroot}%{_sbindir}/rcalsasound
|
||||
rm -f %{buildroot}%{_sbindir}/rcjoystick
|
||||
ln -s ../..%{_initddir}/joystick %{buildroot}%{_sbindir}/rcjoystick
|
||||
%endif
|
||||
#
|
||||
# udev rules (only for non-systemd)
|
||||
#
|
||||
mkdir -p $RPM_BUILD_ROOT%{_udevdir}/rules.d
|
||||
%if %suse_version < 1140
|
||||
install -c -m 0644 %{S:8} $RPM_BUILD_ROOT%{_udevdir}/rules.d
|
||||
mkdir -p %{buildroot}%{_udevdir}/rules.d
|
||||
%if 0%{?suse_version} < 1140
|
||||
install -c -m 0644 %{SOURCE8} %{buildroot}%{_udevdir}/rules.d
|
||||
%endif
|
||||
install -c -m 0644 %{S:9} $RPM_BUILD_ROOT%{_udevdir}/rules.d
|
||||
install -c -m 0644 %{SOURCE9} %{buildroot}%{_udevdir}/rules.d
|
||||
#
|
||||
# modprobe config and the module install script for loading OSS-emulation
|
||||
# and sequencer modules automatically
|
||||
%if %suse_version > 1220
|
||||
mkdir -p $RPM_BUILD_ROOT/etc/modprobe.d
|
||||
install -c -m 0644 %{S:40} $RPM_BUILD_ROOT/etc/modprobe.d
|
||||
mkdir -p $RPM_BUILD_ROOT/sbin
|
||||
install -c -m 0755 %{S:41} $RPM_BUILD_ROOT/sbin
|
||||
%if 0%{?suse_version} > 1220
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/modprobe.d
|
||||
install -c -m 0644 %{SOURCE40} %{buildroot}%{_sysconfdir}/modprobe.d
|
||||
mkdir -p %{buildroot}/sbin
|
||||
install -c -m 0755 %{SOURCE41} %{buildroot}/sbin
|
||||
%endif
|
||||
#
|
||||
# install template to update rc.config and sysconfig files:
|
||||
# (updating the actual files is done in the %post-script)
|
||||
#
|
||||
mkdir -p -m 755 $RPM_BUILD_ROOT/var/adm/fillup-templates
|
||||
mkdir -p -m 755 $RPM_BUILD_ROOT/etc/sysconfig
|
||||
install -m 644 $RPM_SOURCE_DIR/sysconfig.sound $RPM_BUILD_ROOT/var/adm/fillup-templates
|
||||
%if %suse_version <= 1310
|
||||
install -m 644 $RPM_SOURCE_DIR/sysconfig.joystick $RPM_BUILD_ROOT/var/adm/fillup-templates
|
||||
mkdir -p -m 755 %{buildroot}%{_localstatedir}/adm/fillup-templates
|
||||
mkdir -p -m 755 %{buildroot}%{_sysconfdir}/sysconfig
|
||||
install -m 644 $RPM_SOURCE_DIR/sysconfig.sound %{buildroot}%{_localstatedir}/adm/fillup-templates
|
||||
%if 0%{?suse_version} <= 1310
|
||||
install -m 644 $RPM_SOURCE_DIR/sysconfig.joystick %{buildroot}%{_localstatedir}/adm/fillup-templates
|
||||
%endif
|
||||
#
|
||||
# documents
|
||||
#
|
||||
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}
|
||||
cp $RPM_SOURCE_DIR/README* $RPM_BUILD_ROOT%{_docdir}/%{name}
|
||||
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}/alsa-lib
|
||||
cp COPYING ChangeLog INSTALL TODO MEMORY-LEAK $RPM_BUILD_ROOT%{_docdir}/%{name}/alsa-lib
|
||||
cp doc/asoundrc.txt $RPM_BUILD_ROOT%{_docdir}/%{name}/alsa-lib
|
||||
mkdir -p %{buildroot}%{_docdir}/%{name}
|
||||
cp $RPM_SOURCE_DIR/README* %{buildroot}%{_docdir}/%{name}
|
||||
mkdir -p %{buildroot}%{_docdir}/%{name}/alsa-lib
|
||||
cp COPYING ChangeLog INSTALL TODO MEMORY-LEAK %{buildroot}%{_docdir}/%{name}/alsa-lib
|
||||
cp doc/asoundrc.txt %{buildroot}%{_docdir}/%{name}/alsa-lib
|
||||
# install alsa-info.sh to sbindir
|
||||
install -c -m 0755 %{SOURCE33} $RPM_BUILD_ROOT%{_sbindir}
|
||||
install -c -m 0755 %{SOURCE33} %{buildroot}%{_sbindir}
|
||||
|
||||
%post
|
||||
%if %suse_version > 1310
|
||||
%if 0%{?suse_version} > 1310
|
||||
%{fillup_only -n sound}
|
||||
%else
|
||||
%{fillup_and_insserv -ny sound alsasound}
|
||||
@ -266,7 +305,8 @@ install -c -m 0755 %{SOURCE33} $RPM_BUILD_ROOT%{_sbindir}
|
||||
%endif
|
||||
exit 0
|
||||
|
||||
%if %suse_version <= 1310
|
||||
%if 0%{?suse_version} <= 1310
|
||||
|
||||
%preun
|
||||
%stop_on_removal alsasound joystick
|
||||
exit 0
|
||||
@ -284,18 +324,18 @@ exit 0
|
||||
%files
|
||||
%defattr(-, root, root)
|
||||
%doc %{_docdir}/%{name}
|
||||
%if %suse_version <= 1310
|
||||
/etc/init.d/*
|
||||
%if 0%{?suse_version} <= 1310
|
||||
%{_initddir}/*
|
||||
%endif
|
||||
%if %suse_version > 1220
|
||||
/etc/modprobe.d
|
||||
%if 0%{?suse_version} > 1220
|
||||
%{_sysconfdir}/modprobe.d
|
||||
/sbin/*
|
||||
%endif
|
||||
%{_sbindir}/*
|
||||
%{_bindir}/*
|
||||
/usr/lib/all_notes_off.*
|
||||
%{_prefix}/lib/all_notes_off.*
|
||||
%{_datadir}/sounds/alsa
|
||||
/var/adm/fillup-templates/*
|
||||
%{_localstatedir}/adm/fillup-templates/*
|
||||
%{_udevdir}/rules.d/*
|
||||
|
||||
%files devel
|
||||
|
Loading…
x
Reference in New Issue
Block a user