Accepting request 264171 from home:tiwai:branches:multimedia:libs
- Backport upstream fixes: A couple of USB-audio config addition/fix, dmix PCM stop fix, a memory leak fix, DSD format endianess fix, PCM timestamp fixes, etc. 0050-USB-Audio-Add-Scarlett-2i4-USB-to-S-PDIF-blacklist.patch 0051-snd_user_file-fix-memory-leak.patch 0052-pcm-dmix-Don-t-ignore-SND_TIMER_EVENT_MSTOP.patch 0053-snd_dlsym-only-do-versioning-checks-if-built-with-ve.patch 0054-dlmisc-Remove-unused-label.patch 0055-USB-audio-Add-five-more-cards-to-IEC958-blacklist.patch 0056-pcm-Fix-DSD-sample-format-endianess-and-add-big-endi.patch 0057-mixer-Fix-inclusion-of-config.h.patch 0058-mixer-Fix-unused-parameter-warnings.patch 0059-ucm-Fix-uninitialized-err-in-snd_use_case_set.patch 0060-pcm-Fix-assorted-tstamp_type-bugs-omissions.patch OBS-URL: https://build.opensuse.org/request/show/264171 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/alsa?expand=0&rev=174
This commit is contained in:
parent
e94b8f9718
commit
87f2283286
@ -0,0 +1,28 @@
|
|||||||
|
From ebd6afc9158c0afd7263a0ffa5474cf9e5f20c66 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Panu Matilainen <pmatilai@laiskiainen.org>
|
||||||
|
Date: Mon, 3 Nov 2014 17:42:44 +0200
|
||||||
|
Subject: [PATCH 50/60] USB-Audio: Add Scarlett 2i4 USB to S/PDIF blacklist
|
||||||
|
|
||||||
|
Like Scarlett 2i2, the 2i4 does not have any S/PDIF connections.
|
||||||
|
|
||||||
|
Signed-off-by: Panu Matilainen <pmatilai@laiskiainen.org>
|
||||||
|
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
||||||
|
---
|
||||||
|
src/conf/cards/USB-Audio.conf | 1 +
|
||||||
|
1 file changed, 1 insertion(+)
|
||||||
|
|
||||||
|
diff --git a/src/conf/cards/USB-Audio.conf b/src/conf/cards/USB-Audio.conf
|
||||||
|
index 77a48b9f5562..a6754d96b1aa 100644
|
||||||
|
--- a/src/conf/cards/USB-Audio.conf
|
||||||
|
+++ b/src/conf/cards/USB-Audio.conf
|
||||||
|
@@ -48,6 +48,7 @@ USB-Audio.pcm.iec958_device {
|
||||||
|
"Plantronics Wireless Audio" 999
|
||||||
|
"SB WoW Headset" 999
|
||||||
|
"Scarlett 2i2 USB" 999
|
||||||
|
+ "Scarlett 2i4 USB" 999
|
||||||
|
"Sennheiser USB headset" 999
|
||||||
|
"USB Device 0x46d:0x992" 999
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.1.3
|
||||||
|
|
43
0051-snd_user_file-fix-memory-leak.patch
Normal file
43
0051-snd_user_file-fix-memory-leak.patch
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
From c7bfcbb25548db39299488e285b510a174231076 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andreas Schwab <schwab@suse.de>
|
||||||
|
Date: Mon, 3 Nov 2014 17:22:28 +0100
|
||||||
|
Subject: [PATCH 51/60] snd_user_file: fix memory leak
|
||||||
|
|
||||||
|
Call wordfree if and only if wordfree returns zero or WRDE_NOSPACE
|
||||||
|
|
||||||
|
Signed-off-by: Andreas Schwab <schwab@suse.de>
|
||||||
|
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
||||||
|
---
|
||||||
|
src/userfile.c | 5 +++--
|
||||||
|
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/userfile.c b/src/userfile.c
|
||||||
|
index 3a738366f1ea..72779da4ebaf 100644
|
||||||
|
--- a/src/userfile.c
|
||||||
|
+++ b/src/userfile.c
|
||||||
|
@@ -44,19 +44,20 @@ int snd_user_file(const char *file, char **result)
|
||||||
|
err = wordexp(file, &we, WRDE_NOCMD);
|
||||||
|
switch (err) {
|
||||||
|
case WRDE_NOSPACE:
|
||||||
|
+ wordfree(&we);
|
||||||
|
return -ENOMEM;
|
||||||
|
case 0:
|
||||||
|
if (we.we_wordc == 1)
|
||||||
|
break;
|
||||||
|
+ wordfree(&we);
|
||||||
|
/* fall thru */
|
||||||
|
default:
|
||||||
|
- wordfree(&we);
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
*result = strdup(we.we_wordv[0]);
|
||||||
|
+ wordfree(&we);
|
||||||
|
if (*result == NULL)
|
||||||
|
return -ENOMEM;
|
||||||
|
- wordfree(&we);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
--
|
||||||
|
2.1.3
|
||||||
|
|
30
0052-pcm-dmix-Don-t-ignore-SND_TIMER_EVENT_MSTOP.patch
Normal file
30
0052-pcm-dmix-Don-t-ignore-SND_TIMER_EVENT_MSTOP.patch
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
From 5a066cb884815ab48924da8f70514d587400dd6a Mon Sep 17 00:00:00 2001
|
||||||
|
From: Takashi Iwai <tiwai@suse.de>
|
||||||
|
Date: Thu, 6 Nov 2014 12:12:02 +0100
|
||||||
|
Subject: [PATCH 52/60] pcm: dmix: Don't ignore SND_TIMER_EVENT_MSTOP
|
||||||
|
|
||||||
|
When a slave PCM gets an error like XRUN, it stops and notifies with
|
||||||
|
SND_TIMER_EVENT_MSTOP event. But the current code filters out this
|
||||||
|
type and eventually hang due to the empty timer queue. The fix is to
|
||||||
|
just add this event type to the filter bit mask.
|
||||||
|
|
||||||
|
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
||||||
|
---
|
||||||
|
src/pcm/pcm_direct.c | 1 +
|
||||||
|
1 file changed, 1 insertion(+)
|
||||||
|
|
||||||
|
diff --git a/src/pcm/pcm_direct.c b/src/pcm/pcm_direct.c
|
||||||
|
index 8e37bcba5e19..195fddf06cda 100644
|
||||||
|
--- a/src/pcm/pcm_direct.c
|
||||||
|
+++ b/src/pcm/pcm_direct.c
|
||||||
|
@@ -1148,6 +1148,7 @@ int snd_pcm_direct_initialize_poll_fd(snd_pcm_direct_t *dmix)
|
||||||
|
|
||||||
|
dmix->timer_events = (1<<SND_TIMER_EVENT_MSUSPEND) |
|
||||||
|
(1<<SND_TIMER_EVENT_MRESUME) |
|
||||||
|
+ (1<<SND_TIMER_EVENT_MSTOP) |
|
||||||
|
(1<<SND_TIMER_EVENT_STOP);
|
||||||
|
|
||||||
|
/*
|
||||||
|
--
|
||||||
|
2.1.3
|
||||||
|
|
@ -0,0 +1,57 @@
|
|||||||
|
From 11fdac949bebbe1cbb7a5faec52c95a416860b50 Mon Sep 17 00:00:00 2001
|
||||||
|
From: John Spencer <maillist-alsa@barfooze.de>
|
||||||
|
Date: Sat, 15 Nov 2014 13:41:00 +0100
|
||||||
|
Subject: [PATCH 53/60] snd_dlsym: only do versioning checks if built
|
||||||
|
--with-versioning
|
||||||
|
|
||||||
|
a combination of some of the following garbage collecting LD/CFLAGS
|
||||||
|
-Os -g0 -fdata-sections -ffunction-sections -s -Wl,--gc-sections
|
||||||
|
-fno-unwind-tables -fno-asynchronous-unwind-tables
|
||||||
|
causes the symbol versioning marker symbols to be removed from BSS
|
||||||
|
since they're otherwise unreferenced. this causes dlsym failing to
|
||||||
|
find them which results in runtime breakage:
|
||||||
|
|
||||||
|
$ alsamixer
|
||||||
|
ALSA lib dlmisc.c:142:(snd_dlsym_verify) unable to verify version for symbol snd_config_hook_load
|
||||||
|
ALSA lib conf.c:3328:(snd_config_hooks_call) symbol snd_config_hook_load is not defined inside (null)
|
||||||
|
ALSA lib conf.c:3788:(snd_config_update_r) hooks failed, removing configuration
|
||||||
|
cannot open mixer: No such device or address
|
||||||
|
|
||||||
|
correct DSO:
|
||||||
|
$ objdump -T libasound.so.2.strip | grep _snd_config_hook_load_dlsym_config_hook_001
|
||||||
|
001196bc g DO .bss 00000001 _snd_config_hook_load_dlsym_config_hook_001
|
||||||
|
|
||||||
|
incorrect DSO:
|
||||||
|
$ objdump -T libs/libasound.so.2 | grep _snd_config_hook_load_dlsym_config_hook_001
|
||||||
|
00000000 g DO *ABS* 00000001 _snd_config_hook_load_dlsym_config_hook_001
|
||||||
|
|
||||||
|
since alsa was built with --without-versioning, doing those versioning
|
||||||
|
checks at all is unnecessary and harmful and thus now disabled in this case.
|
||||||
|
|
||||||
|
Signed-off-by: John Spencer <maillist-alsa@barfooze.de>
|
||||||
|
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
||||||
|
---
|
||||||
|
src/dlmisc.c | 2 ++
|
||||||
|
1 file changed, 2 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/src/dlmisc.c b/src/dlmisc.c
|
||||||
|
index 4b8a02cd89f6..62f7047149ff 100644
|
||||||
|
--- a/src/dlmisc.c
|
||||||
|
+++ b/src/dlmisc.c
|
||||||
|
@@ -177,11 +177,13 @@ void *snd_dlsym(void *handle, const char *name, const char *version)
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_LIBDL
|
||||||
|
+#ifdef VERSIONED_SYMBOLS
|
||||||
|
if (version) {
|
||||||
|
err = snd_dlsym_verify(handle, name, version);
|
||||||
|
if (err < 0)
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
+#endif
|
||||||
|
return dlsym(handle, name);
|
||||||
|
#else
|
||||||
|
return NULL;
|
||||||
|
--
|
||||||
|
2.1.3
|
||||||
|
|
28
0054-dlmisc-Remove-unused-label.patch
Normal file
28
0054-dlmisc-Remove-unused-label.patch
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
From 1eecc3a548839a71dfda5c65c9dc9369d868f665 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Takashi Iwai <tiwai@suse.de>
|
||||||
|
Date: Sun, 16 Nov 2014 09:43:39 +0100
|
||||||
|
Subject: [PATCH 54/60] dlmisc: Remove unused label
|
||||||
|
|
||||||
|
Fix a compile warning
|
||||||
|
dlmisc.c:329:2: warning: label 'unlock' defined but not used [-Wunused-label]
|
||||||
|
|
||||||
|
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
||||||
|
---
|
||||||
|
src/dlmisc.c | 1 -
|
||||||
|
1 file changed, 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/dlmisc.c b/src/dlmisc.c
|
||||||
|
index 62f7047149ff..b36c48fc8ac5 100644
|
||||||
|
--- a/src/dlmisc.c
|
||||||
|
+++ b/src/dlmisc.c
|
||||||
|
@@ -326,7 +326,6 @@ void snd_dlobj_cache_cleanup(void)
|
||||||
|
free(c);
|
||||||
|
}
|
||||||
|
|
||||||
|
- unlock:
|
||||||
|
snd_dlobj_unlock();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
--
|
||||||
|
2.1.3
|
||||||
|
|
44
0055-USB-audio-Add-five-more-cards-to-IEC958-blacklist.patch
Normal file
44
0055-USB-audio-Add-five-more-cards-to-IEC958-blacklist.patch
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
From 984db83aa1ca60f67550d88ae3d0fd33a0c16109 Mon Sep 17 00:00:00 2001
|
||||||
|
From: David Henningsson <david.henningsson@canonical.com>
|
||||||
|
Date: Mon, 17 Nov 2014 11:29:34 +0100
|
||||||
|
Subject: [PATCH 55/60] USB-audio: Add five more cards to IEC958 blacklist
|
||||||
|
|
||||||
|
These devices do not have any IEC958 outputs, so prevent them from
|
||||||
|
being opened.
|
||||||
|
|
||||||
|
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
|
||||||
|
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
||||||
|
---
|
||||||
|
src/conf/cards/USB-Audio.conf | 5 +++++
|
||||||
|
1 file changed, 5 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/src/conf/cards/USB-Audio.conf b/src/conf/cards/USB-Audio.conf
|
||||||
|
index a6754d96b1aa..05e5d09fd2c2 100644
|
||||||
|
--- a/src/conf/cards/USB-Audio.conf
|
||||||
|
+++ b/src/conf/cards/USB-Audio.conf
|
||||||
|
@@ -38,10 +38,14 @@ USB-Audio.pcm.iec958_device {
|
||||||
|
# "NoiseBlaster 3000" 42
|
||||||
|
|
||||||
|
# The below don't have digital in/out, so prevent them from being opened.
|
||||||
|
+ "Andrea PureAudio USB-SA Headset" 999
|
||||||
|
"Blue Snowball" 999
|
||||||
|
"HP Digital Stereo Headset" 999
|
||||||
|
+ "GN 9330" 999
|
||||||
|
"Logitech Speaker Lapdesk N700" 999
|
||||||
|
+ "Logitech G35 Headset" 999
|
||||||
|
"Logitech USB Headset" 999
|
||||||
|
+ "Logitech USB Headset H540" 999
|
||||||
|
"Logitech Wireless Headset" 999
|
||||||
|
"Plantronics GameCom 780" 999
|
||||||
|
"Plantronics USB Headset" 999
|
||||||
|
@@ -50,6 +54,7 @@ USB-Audio.pcm.iec958_device {
|
||||||
|
"Scarlett 2i2 USB" 999
|
||||||
|
"Scarlett 2i4 USB" 999
|
||||||
|
"Sennheiser USB headset" 999
|
||||||
|
+ "SWTOR Gaming Headset by Razer" 999
|
||||||
|
"USB Device 0x46d:0x992" 999
|
||||||
|
}
|
||||||
|
|
||||||
|
--
|
||||||
|
2.1.3
|
||||||
|
|
166
0056-pcm-Fix-DSD-sample-format-endianess-and-add-big-endi.patch
Normal file
166
0056-pcm-Fix-DSD-sample-format-endianess-and-add-big-endi.patch
Normal file
@ -0,0 +1,166 @@
|
|||||||
|
From b14c49ab3d09f0e678209216a5e38934d904da3d Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jussi Laako <jussi@sonarnerd.net>
|
||||||
|
Date: Fri, 21 Nov 2014 16:04:47 +0200
|
||||||
|
Subject: [PATCH 56/60] pcm: Fix DSD sample format endianess and add big-endian
|
||||||
|
format
|
||||||
|
|
||||||
|
This patch adds big-endian DSD sample format and fixes return value of DSD
|
||||||
|
formats for snd_pcm_format_little_endian().
|
||||||
|
|
||||||
|
Signed-off-by: Jussi Laako <jussi@sonarnerd.net>
|
||||||
|
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
||||||
|
---
|
||||||
|
include/pcm.h | 6 +++++-
|
||||||
|
include/sound/asound.h | 4 +++-
|
||||||
|
src/pcm/pcm.c | 4 ++++
|
||||||
|
src/pcm/pcm_misc.c | 17 ++++++++++++++---
|
||||||
|
4 files changed, 26 insertions(+), 5 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/include/pcm.h b/include/pcm.h
|
||||||
|
index db88ad5ee41a..0655e7f43ef6 100644
|
||||||
|
--- a/include/pcm.h
|
||||||
|
+++ b/include/pcm.h
|
||||||
|
@@ -213,7 +213,11 @@ typedef enum _snd_pcm_format {
|
||||||
|
SND_PCM_FORMAT_DSD_U16_LE,
|
||||||
|
/* Direct Stream Digital (DSD) in 4-byte samples (x32) */
|
||||||
|
SND_PCM_FORMAT_DSD_U32_LE,
|
||||||
|
- SND_PCM_FORMAT_LAST = SND_PCM_FORMAT_DSD_U32_LE,
|
||||||
|
+ /* Direct Stream Digital (DSD) in 2-byte samples (x16) */
|
||||||
|
+ SND_PCM_FORMAT_DSD_U16_BE,
|
||||||
|
+ /* Direct Stream Digital (DSD) in 4-byte samples (x32) */
|
||||||
|
+ SND_PCM_FORMAT_DSD_U32_BE,
|
||||||
|
+ SND_PCM_FORMAT_LAST = SND_PCM_FORMAT_DSD_U32_BE,
|
||||||
|
|
||||||
|
#if __BYTE_ORDER == __LITTLE_ENDIAN
|
||||||
|
/** Signed 16 bit CPU endian */
|
||||||
|
diff --git a/include/sound/asound.h b/include/sound/asound.h
|
||||||
|
index 6ee586728df9..941d32f007dc 100644
|
||||||
|
--- a/include/sound/asound.h
|
||||||
|
+++ b/include/sound/asound.h
|
||||||
|
@@ -220,7 +220,9 @@ typedef int __bitwise snd_pcm_format_t;
|
||||||
|
#define SNDRV_PCM_FORMAT_DSD_U8 ((__force snd_pcm_format_t) 48) /* DSD, 1-byte samples DSD (x8) */
|
||||||
|
#define SNDRV_PCM_FORMAT_DSD_U16_LE ((__force snd_pcm_format_t) 49) /* DSD, 2-byte samples DSD (x16), little endian */
|
||||||
|
#define SNDRV_PCM_FORMAT_DSD_U32_LE ((__force snd_pcm_format_t) 50) /* DSD, 4-byte samples DSD (x32), little endian */
|
||||||
|
-#define SNDRV_PCM_FORMAT_LAST SNDRV_PCM_FORMAT_DSD_U32_LE
|
||||||
|
+#define SNDRV_PCM_FORMAT_DSD_U16_BE ((__force snd_pcm_format_t) 51) /* DSD, 2-byte samples DSD (x16), big endian */
|
||||||
|
+#define SNDRV_PCM_FORMAT_DSD_U32_BE ((__force snd_pcm_format_t) 52) /* DSD, 4-byte samples DSD (x32), big endian */
|
||||||
|
+#define SNDRV_PCM_FORMAT_LAST SNDRV_PCM_FORMAT_DSD_U32_BE
|
||||||
|
|
||||||
|
#ifdef SNDRV_LITTLE_ENDIAN
|
||||||
|
#define SNDRV_PCM_FORMAT_S16 SNDRV_PCM_FORMAT_S16_LE
|
||||||
|
diff --git a/src/pcm/pcm.c b/src/pcm/pcm.c
|
||||||
|
index 4a7be6c1a55f..39042566ae32 100644
|
||||||
|
--- a/src/pcm/pcm.c
|
||||||
|
+++ b/src/pcm/pcm.c
|
||||||
|
@@ -1566,6 +1566,8 @@ static const char *const snd_pcm_format_names[] = {
|
||||||
|
FORMAT(DSD_U8),
|
||||||
|
FORMAT(DSD_U16_LE),
|
||||||
|
FORMAT(DSD_U32_LE),
|
||||||
|
+ FORMAT(DSD_U16_BE),
|
||||||
|
+ FORMAT(DSD_U32_BE),
|
||||||
|
};
|
||||||
|
|
||||||
|
static const char *const snd_pcm_format_aliases[SND_PCM_FORMAT_LAST+1] = {
|
||||||
|
@@ -1626,6 +1628,8 @@ static const char *const snd_pcm_format_descriptions[] = {
|
||||||
|
FORMATD(DSD_U8, "Direct Stream Digital, 1-byte (x8), oldest bit in MSB"),
|
||||||
|
FORMATD(DSD_U16_LE, "Direct Stream Digital, 2-byte (x16), little endian, oldest bits in MSB"),
|
||||||
|
FORMATD(DSD_U32_LE, "Direct Stream Digital, 4-byte (x32), little endian, oldest bits in MSB"),
|
||||||
|
+ FORMATD(DSD_U16_BE, "Direct Stream Digital, 2-byte (x16), big endian, oldest bits in MSB"),
|
||||||
|
+ FORMATD(DSD_U32_BE, "Direct Stream Digital, 4-byte (x32), big endian, oldest bits in MSB"),
|
||||||
|
};
|
||||||
|
|
||||||
|
static const char *const snd_pcm_type_names[] = {
|
||||||
|
diff --git a/src/pcm/pcm_misc.c b/src/pcm/pcm_misc.c
|
||||||
|
index 92721796aa1f..5870f82c0b4c 100644
|
||||||
|
--- a/src/pcm/pcm_misc.c
|
||||||
|
+++ b/src/pcm/pcm_misc.c
|
||||||
|
@@ -65,6 +65,8 @@ int snd_pcm_format_signed(snd_pcm_format_t format)
|
||||||
|
case SNDRV_PCM_FORMAT_DSD_U8:
|
||||||
|
case SNDRV_PCM_FORMAT_DSD_U16_LE:
|
||||||
|
case SNDRV_PCM_FORMAT_DSD_U32_LE:
|
||||||
|
+ case SNDRV_PCM_FORMAT_DSD_U16_BE:
|
||||||
|
+ case SNDRV_PCM_FORMAT_DSD_U32_BE:
|
||||||
|
return 0;
|
||||||
|
default:
|
||||||
|
return -EINVAL;
|
||||||
|
@@ -137,6 +139,8 @@ int snd_pcm_format_little_endian(snd_pcm_format_t format)
|
||||||
|
case SNDRV_PCM_FORMAT_U24_3LE:
|
||||||
|
case SNDRV_PCM_FORMAT_U20_3LE:
|
||||||
|
case SNDRV_PCM_FORMAT_U18_3LE:
|
||||||
|
+ case SNDRV_PCM_FORMAT_DSD_U16_LE:
|
||||||
|
+ case SNDRV_PCM_FORMAT_DSD_U32_LE:
|
||||||
|
return 1;
|
||||||
|
case SNDRV_PCM_FORMAT_S16_BE:
|
||||||
|
case SNDRV_PCM_FORMAT_U16_BE:
|
||||||
|
@@ -153,9 +157,8 @@ int snd_pcm_format_little_endian(snd_pcm_format_t format)
|
||||||
|
case SNDRV_PCM_FORMAT_U24_3BE:
|
||||||
|
case SNDRV_PCM_FORMAT_U20_3BE:
|
||||||
|
case SNDRV_PCM_FORMAT_U18_3BE:
|
||||||
|
- case SNDRV_PCM_FORMAT_DSD_U8:
|
||||||
|
- case SNDRV_PCM_FORMAT_DSD_U16_LE:
|
||||||
|
- case SNDRV_PCM_FORMAT_DSD_U32_LE:
|
||||||
|
+ case SNDRV_PCM_FORMAT_DSD_U16_BE:
|
||||||
|
+ case SNDRV_PCM_FORMAT_DSD_U32_BE:
|
||||||
|
return 0;
|
||||||
|
default:
|
||||||
|
return -EINVAL;
|
||||||
|
@@ -208,6 +211,7 @@ int snd_pcm_format_width(snd_pcm_format_t format)
|
||||||
|
case SNDRV_PCM_FORMAT_U16_LE:
|
||||||
|
case SNDRV_PCM_FORMAT_U16_BE:
|
||||||
|
case SNDRV_PCM_FORMAT_DSD_U16_LE:
|
||||||
|
+ case SNDRV_PCM_FORMAT_DSD_U16_BE:
|
||||||
|
return 16;
|
||||||
|
case SNDRV_PCM_FORMAT_S18_3LE:
|
||||||
|
case SNDRV_PCM_FORMAT_S18_3BE:
|
||||||
|
@@ -235,6 +239,7 @@ int snd_pcm_format_width(snd_pcm_format_t format)
|
||||||
|
case SNDRV_PCM_FORMAT_FLOAT_LE:
|
||||||
|
case SNDRV_PCM_FORMAT_FLOAT_BE:
|
||||||
|
case SNDRV_PCM_FORMAT_DSD_U32_LE:
|
||||||
|
+ case SNDRV_PCM_FORMAT_DSD_U32_BE:
|
||||||
|
return 32;
|
||||||
|
case SNDRV_PCM_FORMAT_FLOAT64_LE:
|
||||||
|
case SNDRV_PCM_FORMAT_FLOAT64_BE:
|
||||||
|
@@ -269,6 +274,7 @@ int snd_pcm_format_physical_width(snd_pcm_format_t format)
|
||||||
|
case SNDRV_PCM_FORMAT_U16_LE:
|
||||||
|
case SNDRV_PCM_FORMAT_U16_BE:
|
||||||
|
case SNDRV_PCM_FORMAT_DSD_U16_LE:
|
||||||
|
+ case SNDRV_PCM_FORMAT_DSD_U16_BE:
|
||||||
|
return 16;
|
||||||
|
case SNDRV_PCM_FORMAT_S18_3LE:
|
||||||
|
case SNDRV_PCM_FORMAT_S18_3BE:
|
||||||
|
@@ -296,6 +302,7 @@ int snd_pcm_format_physical_width(snd_pcm_format_t format)
|
||||||
|
case SNDRV_PCM_FORMAT_IEC958_SUBFRAME_LE:
|
||||||
|
case SNDRV_PCM_FORMAT_IEC958_SUBFRAME_BE:
|
||||||
|
case SNDRV_PCM_FORMAT_DSD_U32_LE:
|
||||||
|
+ case SNDRV_PCM_FORMAT_DSD_U32_BE:
|
||||||
|
return 32;
|
||||||
|
case SNDRV_PCM_FORMAT_FLOAT64_LE:
|
||||||
|
case SNDRV_PCM_FORMAT_FLOAT64_BE:
|
||||||
|
@@ -328,6 +335,7 @@ ssize_t snd_pcm_format_size(snd_pcm_format_t format, size_t samples)
|
||||||
|
case SNDRV_PCM_FORMAT_U16_LE:
|
||||||
|
case SNDRV_PCM_FORMAT_U16_BE:
|
||||||
|
case SNDRV_PCM_FORMAT_DSD_U16_LE:
|
||||||
|
+ case SNDRV_PCM_FORMAT_DSD_U16_BE:
|
||||||
|
return samples * 2;
|
||||||
|
case SNDRV_PCM_FORMAT_S18_3LE:
|
||||||
|
case SNDRV_PCM_FORMAT_S18_3BE:
|
||||||
|
@@ -353,6 +361,7 @@ ssize_t snd_pcm_format_size(snd_pcm_format_t format, size_t samples)
|
||||||
|
case SNDRV_PCM_FORMAT_FLOAT_LE:
|
||||||
|
case SNDRV_PCM_FORMAT_FLOAT_BE:
|
||||||
|
case SNDRV_PCM_FORMAT_DSD_U32_LE:
|
||||||
|
+ case SNDRV_PCM_FORMAT_DSD_U32_BE:
|
||||||
|
return samples * 4;
|
||||||
|
case SNDRV_PCM_FORMAT_FLOAT64_LE:
|
||||||
|
case SNDRV_PCM_FORMAT_FLOAT64_BE:
|
||||||
|
@@ -400,6 +409,8 @@ u_int64_t snd_pcm_format_silence_64(snd_pcm_format_t format)
|
||||||
|
case SNDRV_PCM_FORMAT_DSD_U8:
|
||||||
|
case SNDRV_PCM_FORMAT_DSD_U16_LE:
|
||||||
|
case SNDRV_PCM_FORMAT_DSD_U32_LE:
|
||||||
|
+ case SNDRV_PCM_FORMAT_DSD_U16_BE:
|
||||||
|
+ case SNDRV_PCM_FORMAT_DSD_U32_BE:
|
||||||
|
return 0x6969696969696969ULL;
|
||||||
|
#ifdef SNDRV_LITTLE_ENDIAN
|
||||||
|
case SNDRV_PCM_FORMAT_U16_LE:
|
||||||
|
--
|
||||||
|
2.1.3
|
||||||
|
|
42
0057-mixer-Fix-inclusion-of-config.h.patch
Normal file
42
0057-mixer-Fix-inclusion-of-config.h.patch
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
From c0a708180fa22133940c4bc50fbc627801f188eb Mon Sep 17 00:00:00 2001
|
||||||
|
From: Takashi Iwai <tiwai@suse.de>
|
||||||
|
Date: Fri, 21 Nov 2014 15:20:48 +0100
|
||||||
|
Subject: [PATCH 57/60] mixer: Fix inclusion of config.h
|
||||||
|
|
||||||
|
config.h wasn't read or read too late in some files in src/mixer.
|
||||||
|
|
||||||
|
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
||||||
|
---
|
||||||
|
src/mixer/simple.c | 1 +
|
||||||
|
src/mixer/simple_none.c | 2 +-
|
||||||
|
2 files changed, 2 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/mixer/simple.c b/src/mixer/simple.c
|
||||||
|
index ec22a9c7d237..fd9ba93ee791 100644
|
||||||
|
--- a/src/mixer/simple.c
|
||||||
|
+++ b/src/mixer/simple.c
|
||||||
|
@@ -36,6 +36,7 @@
|
||||||
|
#include <fcntl.h>
|
||||||
|
#include <sys/ioctl.h>
|
||||||
|
#include <math.h>
|
||||||
|
+#include "config.h"
|
||||||
|
#include "mixer_local.h"
|
||||||
|
#include "mixer_simple.h"
|
||||||
|
|
||||||
|
diff --git a/src/mixer/simple_none.c b/src/mixer/simple_none.c
|
||||||
|
index 1c2774acbc35..4e556604d6c3 100644
|
||||||
|
--- a/src/mixer/simple_none.c
|
||||||
|
+++ b/src/mixer/simple_none.c
|
||||||
|
@@ -39,8 +39,8 @@
|
||||||
|
#include <math.h>
|
||||||
|
#include <limits.h>
|
||||||
|
#include <alsa/asoundlib.h>
|
||||||
|
-#include "mixer_simple.h"
|
||||||
|
#include "config.h"
|
||||||
|
+#include "mixer_simple.h"
|
||||||
|
|
||||||
|
#ifndef DOC_HIDDEN
|
||||||
|
|
||||||
|
--
|
||||||
|
2.1.3
|
||||||
|
|
40
0058-mixer-Fix-unused-parameter-warnings.patch
Normal file
40
0058-mixer-Fix-unused-parameter-warnings.patch
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
From b779f6f43204c43f231b77858ba023a16de54568 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Takashi Iwai <tiwai@suse.de>
|
||||||
|
Date: Fri, 21 Nov 2014 15:22:01 +0100
|
||||||
|
Subject: [PATCH 58/60] mixer: Fix unused parameter warnings
|
||||||
|
|
||||||
|
mixer_simple.h:35:64: warning: unused parameter 'mixer' [-Wunused-parameter]
|
||||||
|
static inline int snd_mixer_simple_basic_register(snd_mixer_t *mixer,
|
||||||
|
^
|
||||||
|
mixer_simple.h:36:40: warning: unused parameter 'options' [-Wunused-parameter]
|
||||||
|
struct snd_mixer_selem_regopt *options,
|
||||||
|
^
|
||||||
|
mixer_simple.h:37:29: warning: unused parameter 'classp' [-Wunused-parameter]
|
||||||
|
snd_mixer_class_t **classp)
|
||||||
|
^
|
||||||
|
|
||||||
|
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
||||||
|
---
|
||||||
|
src/mixer/mixer_simple.h | 6 +++---
|
||||||
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/mixer/mixer_simple.h b/src/mixer/mixer_simple.h
|
||||||
|
index 116eebd92f65..f6117da85b37 100644
|
||||||
|
--- a/src/mixer/mixer_simple.h
|
||||||
|
+++ b/src/mixer/mixer_simple.h
|
||||||
|
@@ -32,9 +32,9 @@ int snd_mixer_simple_none_register(snd_mixer_t *mixer, struct snd_mixer_selem_re
|
||||||
|
#ifdef HAVE_LIBDL
|
||||||
|
int snd_mixer_simple_basic_register(snd_mixer_t *mixer, struct snd_mixer_selem_regopt *options, snd_mixer_class_t **classp);
|
||||||
|
#else
|
||||||
|
-static inline int snd_mixer_simple_basic_register(snd_mixer_t *mixer,
|
||||||
|
- struct snd_mixer_selem_regopt *options,
|
||||||
|
- snd_mixer_class_t **classp)
|
||||||
|
+static inline int snd_mixer_simple_basic_register(snd_mixer_t *mixer ATTRIBUTE_UNUSED,
|
||||||
|
+ struct snd_mixer_selem_regopt *options ATTRIBUTE_UNUSED,
|
||||||
|
+ snd_mixer_class_t **classp ATTRIBUTE_UNUSED)
|
||||||
|
{
|
||||||
|
return -ENXIO;
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.1.3
|
||||||
|
|
42
0059-ucm-Fix-uninitialized-err-in-snd_use_case_set.patch
Normal file
42
0059-ucm-Fix-uninitialized-err-in-snd_use_case_set.patch
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
From 72c8b07b2a514261c2cb28558307b5fcb017b05e Mon Sep 17 00:00:00 2001
|
||||||
|
From: Takashi Iwai <tiwai@suse.de>
|
||||||
|
Date: Fri, 21 Nov 2014 15:25:30 +0100
|
||||||
|
Subject: [PATCH 59/60] ucm: Fix uninitialized err in snd_use_case_set()
|
||||||
|
|
||||||
|
The compiler warns like:
|
||||||
|
main.c:1664:9: warning: 'err' may be used uninitialized in this function [-Wmaybe-uninitialized]
|
||||||
|
|
||||||
|
and actually there are slight code paths that slip.
|
||||||
|
This patch adds the proper initializations to 0 to return the success
|
||||||
|
code in these code paths.
|
||||||
|
|
||||||
|
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
||||||
|
---
|
||||||
|
src/ucm/main.c | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/ucm/main.c b/src/ucm/main.c
|
||||||
|
index 049472827121..37ae4c84aa64 100644
|
||||||
|
--- a/src/ucm/main.c
|
||||||
|
+++ b/src/ucm/main.c
|
||||||
|
@@ -1443,7 +1443,7 @@ static int set_verb_user(snd_use_case_mgr_t *uc_mgr,
|
||||||
|
const char *verb_name)
|
||||||
|
{
|
||||||
|
struct use_case_verb *verb;
|
||||||
|
- int err;
|
||||||
|
+ int err = 0;
|
||||||
|
|
||||||
|
if (uc_mgr->active_verb &&
|
||||||
|
strcmp(uc_mgr->active_verb->name, verb_name) == 0)
|
||||||
|
@@ -1625,7 +1625,7 @@ int snd_use_case_set(snd_use_case_mgr_t *uc_mgr,
|
||||||
|
const char *value)
|
||||||
|
{
|
||||||
|
char *str, *str1;
|
||||||
|
- int err;
|
||||||
|
+ int err = 0;
|
||||||
|
|
||||||
|
pthread_mutex_lock(&uc_mgr->mutex);
|
||||||
|
if (strcmp(identifier, "_verb") == 0)
|
||||||
|
--
|
||||||
|
2.1.3
|
||||||
|
|
49
0060-pcm-Fix-assorted-tstamp_type-bugs-omissions.patch
Normal file
49
0060-pcm-Fix-assorted-tstamp_type-bugs-omissions.patch
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
From a649c4b1a0c728d5d27c8530ed729a41834d24d2 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Tim Cussins <timcussins@eml.cc>
|
||||||
|
Date: Tue, 25 Nov 2014 14:44:54 +0000
|
||||||
|
Subject: [PATCH 60/60] pcm: Fix assorted tstamp_type bugs/omissions.
|
||||||
|
|
||||||
|
Just a couple of quick fixes related to tstamp_type.
|
||||||
|
|
||||||
|
- snd_pcm_sw_params(): copy tstamp_type field
|
||||||
|
- snd_pcm_tstamp_type_name(): fix argument type
|
||||||
|
- snd_pcm_dump_sw_setup(): fix dumping of tstamp_type field
|
||||||
|
|
||||||
|
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
||||||
|
---
|
||||||
|
src/pcm/pcm.c | 5 +++--
|
||||||
|
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/pcm/pcm.c b/src/pcm/pcm.c
|
||||||
|
index 39042566ae32..baa47c73fa4d 100644
|
||||||
|
--- a/src/pcm/pcm.c
|
||||||
|
+++ b/src/pcm/pcm.c
|
||||||
|
@@ -897,6 +897,7 @@ int snd_pcm_sw_params(snd_pcm_t *pcm, snd_pcm_sw_params_t *params)
|
||||||
|
if (err < 0)
|
||||||
|
return err;
|
||||||
|
pcm->tstamp_mode = params->tstamp_mode;
|
||||||
|
+ pcm->tstamp_type = params->tstamp_type;
|
||||||
|
pcm->period_step = params->period_step;
|
||||||
|
pcm->avail_min = params->avail_min;
|
||||||
|
pcm->period_event = sw_get_period_event(params);
|
||||||
|
@@ -1843,7 +1844,7 @@ const char *snd_pcm_tstamp_mode_name(snd_pcm_tstamp_t mode)
|
||||||
|
* \param mode PCM tstamp type
|
||||||
|
* \return ascii name of PCM tstamp type setting
|
||||||
|
*/
|
||||||
|
-const char *snd_pcm_tstamp_type_name(snd_pcm_tstamp_t type)
|
||||||
|
+const char *snd_pcm_tstamp_type_name(snd_pcm_tstamp_type_t type)
|
||||||
|
{
|
||||||
|
if (type > SND_PCM_TSTAMP_TYPE_LAST)
|
||||||
|
return NULL;
|
||||||
|
@@ -1924,7 +1925,7 @@ int snd_pcm_dump_sw_setup(snd_pcm_t *pcm, snd_output_t *out)
|
||||||
|
return -EIO;
|
||||||
|
}
|
||||||
|
snd_output_printf(out, " tstamp_mode : %s\n", snd_pcm_tstamp_mode_name(pcm->tstamp_mode));
|
||||||
|
- snd_output_printf(out, " tstamp_type : %s\n", snd_pcm_tstamp_type_name(pcm->tstamp_mode));
|
||||||
|
+ snd_output_printf(out, " tstamp_type : %s\n", snd_pcm_tstamp_type_name(pcm->tstamp_type));
|
||||||
|
snd_output_printf(out, " period_step : %d\n", pcm->period_step);
|
||||||
|
snd_output_printf(out, " avail_min : %ld\n", pcm->avail_min);
|
||||||
|
snd_output_printf(out, " period_event : %i\n", pcm->period_event);
|
||||||
|
--
|
||||||
|
2.1.3
|
||||||
|
|
18
alsa.changes
18
alsa.changes
@ -1,3 +1,21 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Dec 5 16:49:42 CET 2014 - tiwai@suse.de
|
||||||
|
|
||||||
|
- Backport upstream fixes:
|
||||||
|
A couple of USB-audio config addition/fix, dmix PCM stop fix,
|
||||||
|
a memory leak fix, DSD format endianess fix, PCM timestamp fixes, etc.
|
||||||
|
0050-USB-Audio-Add-Scarlett-2i4-USB-to-S-PDIF-blacklist.patch
|
||||||
|
0051-snd_user_file-fix-memory-leak.patch
|
||||||
|
0052-pcm-dmix-Don-t-ignore-SND_TIMER_EVENT_MSTOP.patch
|
||||||
|
0053-snd_dlsym-only-do-versioning-checks-if-built-with-ve.patch
|
||||||
|
0054-dlmisc-Remove-unused-label.patch
|
||||||
|
0055-USB-audio-Add-five-more-cards-to-IEC958-blacklist.patch
|
||||||
|
0056-pcm-Fix-DSD-sample-format-endianess-and-add-big-endi.patch
|
||||||
|
0057-mixer-Fix-inclusion-of-config.h.patch
|
||||||
|
0058-mixer-Fix-unused-parameter-warnings.patch
|
||||||
|
0059-ucm-Fix-uninitialized-err-in-snd_use_case_set.patch
|
||||||
|
0060-pcm-Fix-assorted-tstamp_type-bugs-omissions.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sun Nov 16 18:10:00 UTC 2014 - Led <ledest@gmail.com>
|
Sun Nov 16 18:10:00 UTC 2014 - Led <ledest@gmail.com>
|
||||||
|
|
||||||
|
22
alsa.spec
22
alsa.spec
@ -97,6 +97,17 @@ Patch46: 0046-control-return-negative-value-in-case-of-error.patch
|
|||||||
Patch47: 0047-pcm-return-negative-value-in-case-of-error.patch
|
Patch47: 0047-pcm-return-negative-value-in-case-of-error.patch
|
||||||
Patch48: 0048-mixer-Fix-missing-hctl-handle-free-in-snd_mixer_atta.patch
|
Patch48: 0048-mixer-Fix-missing-hctl-handle-free-in-snd_mixer_atta.patch
|
||||||
Patch49: 0049-conf-ucm-PAZ00-add-Toshiba-AC100-Dynabook-AZ-new-con.patch
|
Patch49: 0049-conf-ucm-PAZ00-add-Toshiba-AC100-Dynabook-AZ-new-con.patch
|
||||||
|
Patch50: 0050-USB-Audio-Add-Scarlett-2i4-USB-to-S-PDIF-blacklist.patch
|
||||||
|
Patch51: 0051-snd_user_file-fix-memory-leak.patch
|
||||||
|
Patch52: 0052-pcm-dmix-Don-t-ignore-SND_TIMER_EVENT_MSTOP.patch
|
||||||
|
Patch53: 0053-snd_dlsym-only-do-versioning-checks-if-built-with-ve.patch
|
||||||
|
Patch54: 0054-dlmisc-Remove-unused-label.patch
|
||||||
|
Patch55: 0055-USB-audio-Add-five-more-cards-to-IEC958-blacklist.patch
|
||||||
|
Patch56: 0056-pcm-Fix-DSD-sample-format-endianess-and-add-big-endi.patch
|
||||||
|
Patch57: 0057-mixer-Fix-inclusion-of-config.h.patch
|
||||||
|
Patch58: 0058-mixer-Fix-unused-parameter-warnings.patch
|
||||||
|
Patch59: 0059-ucm-Fix-uninitialized-err-in-snd_use_case_set.patch
|
||||||
|
Patch60: 0060-pcm-Fix-assorted-tstamp_type-bugs-omissions.patch
|
||||||
# rest suse patches
|
# rest suse patches
|
||||||
Patch99: alsa-lib-doxygen-avoid-crash-for-11.3.diff
|
Patch99: alsa-lib-doxygen-avoid-crash-for-11.3.diff
|
||||||
BuildRequires: doxygen
|
BuildRequires: doxygen
|
||||||
@ -213,6 +224,17 @@ Architecture.
|
|||||||
%patch47 -p1
|
%patch47 -p1
|
||||||
%patch48 -p1
|
%patch48 -p1
|
||||||
%patch49 -p1
|
%patch49 -p1
|
||||||
|
%patch50 -p1
|
||||||
|
%patch51 -p1
|
||||||
|
%patch52 -p1
|
||||||
|
%patch53 -p1
|
||||||
|
%patch54 -p1
|
||||||
|
%patch55 -p1
|
||||||
|
%patch56 -p1
|
||||||
|
%patch57 -p1
|
||||||
|
%patch58 -p1
|
||||||
|
%patch59 -p1
|
||||||
|
%patch60 -p1
|
||||||
%if 0%{?suse_version} == 1130
|
%if 0%{?suse_version} == 1130
|
||||||
%patch99 -p1
|
%patch99 -p1
|
||||||
%endif
|
%endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user