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

- Backport upstream fixes:
  0001-local.h-use-__kernel_off_t-from-linux-types.h.patch
  0002-conf-cards-add-Audio-Advantage-Micro-II.patch
  0003-pcm-Fix-a-wrong-value-shown-in-the-error-message-in-.patch
  0004-UCM-Document-some-standard-values.patch
  0005-hdspm.h-Update-LTC-ioctl-to-use-struct-hdspm_ltc.patch
  0006-Update-iatomic.h-functions-definitions-for-mips.patch

OBS-URL: https://build.opensuse.org/request/show/197613
OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/alsa?expand=0&rev=139
This commit is contained in:
Dominique Leuenberger 2013-09-07 13:56:54 +00:00 committed by Git OBS Bridge
parent 7f7e22d3a9
commit 6ec9e6d8a0
8 changed files with 287 additions and 0 deletions

View File

@ -0,0 +1,41 @@
From b3b53a1bec47aaa2baef724cc9e79adadd603caf Mon Sep 17 00:00:00 2001
From: Jaroslav Kysela <perex@perex.cz>
Date: Tue, 23 Jul 2013 14:50:41 +0200
Subject: [PATCH 1/6] local.h: use __kernel_off_t from <linux/types.h>
Also, make the empty definitions __user and __force conditional.
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
---
include/local.h | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/include/local.h b/include/local.h
index 53cb647..f0db188 100644
--- a/include/local.h
+++ b/include/local.h
@@ -32,6 +32,7 @@
#include <stdarg.h>
#include <sys/poll.h>
#include <errno.h>
+#include <linux/types.h>
#include <linux/ioctl.h>
#include "config.h"
@@ -114,9 +115,12 @@
#define snd_ctl_tlv sndrv_ctl_tlv
/* kill and replace kernel-specific types */
+#ifndef __user
#define __user
+#endif
+#ifndef __force
#define __force
-#define __kernel_off_t off_t
+#endif
#include <sound/asound.h>
--
1.8.4

View File

@ -0,0 +1,64 @@
From 994ab14b401b2873c5f927215bbb86fe6f6335fc Mon Sep 17 00:00:00 2001
From: Przemek Rudy <prudy1@o2.pl>
Date: Tue, 30 Jul 2013 22:31:44 +0200
Subject: [PATCH 2/6] conf/cards: add Audio Advantage Micro II
With related kernel chnages add extended suport for:
- AES bits controls (via device suffix AESn= or tools like iecset)
- SPDIF switch control, turning on/off the optical transmitter (via alsamixer tool)
Signed-off-by: Przemek Rudy <prudy1@o2.pl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
src/conf/cards/USB-Audio.conf | 35 +++++++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)
diff --git a/src/conf/cards/USB-Audio.conf b/src/conf/cards/USB-Audio.conf
index 0d93175..8a6d9ca 100644
--- a/src/conf/cards/USB-Audio.conf
+++ b/src/conf/cards/USB-Audio.conf
@@ -101,6 +101,41 @@ USB-Audio."Audiophile USB (tm)".pcm.iec958 {
}
}
+# For this card we can (and must to get IEC61937) set AES bits
+USB-Audio."MicroII".pcm.iec958 "cards.USB-Audio.Audio Advantage MicroII.pcm.iec958"
+USB-Audio."Audio Advantage MicroII".pcm.iec958 {
+ @args [ CARD AES0 AES1 AES2 AES3 ]
+ @args.CARD { type string }
+ @args.AES0 { type integer }
+ @args.AES1 { type integer }
+ @args.AES2 { type integer }
+ @args.AES3 { type integer }
+
+ type hooks
+ slave.pcm {
+ type hw
+ card $CARD
+ }
+
+ hooks.0 {
+ type ctl_elems
+ hook_args [
+ {
+ interface PCM
+ name "IEC958 Playback Default"
+ preserve true
+ optional true
+ value [ $AES0 $AES1 $AES2 $AES3 ]
+ }
+ {
+ name "IEC958 Playback Switch"
+ lock true
+ preserve true
+ value 1
+ }
+ ]
+ }
+}
################################################################################
--
1.8.4

View File

@ -0,0 +1,27 @@
From d469ebe2efe514ce10511dfdff852063030d658d Mon Sep 17 00:00:00 2001
From: Laurentiu Nicola <grayshade@gmail.com>
Date: Thu, 8 Aug 2013 12:29:09 +0200
Subject: [PATCH 3/6] pcm: Fix a wrong value shown in the error message in rate
plugin
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
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 ca4d416..c54fa06 100644
--- a/src/pcm/pcm.c
+++ b/src/pcm/pcm.c
@@ -7932,7 +7932,7 @@ int snd_pcm_set_params(snd_pcm_t *pcm,
return err;
}
if (rrate != rate) {
- SNDERR("Rate doesn't match (requested %iHz, get %iHz)", rate, err);
+ SNDERR("Rate doesn't match (requested %iHz, get %iHz)", rate, rrate);
return -EINVAL;
}
/* set the buffer time */
--
1.8.4

View File

@ -0,0 +1,35 @@
From 36bc5770409901b0e3a1b1cb5a027cdb71ff47f5 Mon Sep 17 00:00:00 2001
From: Arun Raghavan <arun.raghavan@collabora.co.uk>
Date: Wed, 7 Aug 2013 23:26:31 +0530
Subject: [PATCH 4/6] UCM: Document some standard values
Playback/CaptureChannels has been around for a bit. Playback/CaptureRate
is new and is intended to be used to specify the sample rate at which
the Playback/CapturePCM should be opened.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
include/use-case.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/include/use-case.h b/include/use-case.h
index 93b3456..4e13249 100644
--- a/include/use-case.h
+++ b/include/use-case.h
@@ -259,9 +259,13 @@ int snd_use_case_get_list(snd_use_case_mgr_t *uc_mgr,
* TQ - Tone Quality
* PlaybackPCM - full PCM playback device name
* CapturePCM - full PCM capture device name
+ * PlaybackRate - playback device sample rate
+ * PlaybackChannels - playback device channel count
* PlaybackCTL - playback control device name
* PlaybackVolume - playback control volume ID string
* PlaybackSwitch - playback control switch ID string
+ * CaptureRate - capture device sample rate
+ * CaptureChannels - capture device channel count
* CaptureCTL - capture control device name
* CaptureVolume - capture control volume ID string
* CaptureSwitch - capture control switch ID string
--
1.8.4

View File

@ -0,0 +1,33 @@
From 4b169b05b48f4ea0196879b62b8c3fa5b050e806 Mon Sep 17 00:00:00 2001
From: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Date: Mon, 19 Aug 2013 17:31:37 +0200
Subject: [PATCH 5/6] hdspm.h: Update LTC ioctl to use struct hdspm_ltc
Use struct hdspm_ltc to query the LTC, using a mixer struct was just
plain wrong.
Due to the wrong struct, this ioctl was never working, so we're free to
fix it without breaking userspace compatibility.
Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
include/sound/hdspm.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/sound/hdspm.h b/include/sound/hdspm.h
index 1774ff5..fe9c5f6 100644
--- a/include/sound/hdspm.h
+++ b/include/sound/hdspm.h
@@ -111,7 +111,7 @@ struct hdspm_ltc {
enum hdspm_ltc_input_format input_format;
};
-#define SNDRV_HDSPM_IOCTL_GET_LTC _IOR('H', 0x46, struct hdspm_mixer_ioctl)
+#define SNDRV_HDSPM_IOCTL_GET_LTC _IOR('H', 0x46, struct hdspm_ltc)
/**
* The status data reflects the device's current state
--
1.8.4

View File

@ -0,0 +1,64 @@
From f21f48a70f8437a671b58fcab75e54222a9eea16 Mon Sep 17 00:00:00 2001
From: Kai Kang <jiashuo.kang at gmail.com>
Date: Thu, 15 Aug 2013 17:17:19 +0800
Subject: [PATCH 6/6] Update iatomic.h functions definitions for mips
Functions atomic_add(s) and atomic_sub(s) are defined with 'extern
__inline__' that may cause compile fails when cross compile for mips.
The error message looks like:
| pcm/.libs/libpcm.a(pcm_meter.o): In function `snd_pcm_meter_update_scope':
| .../alsa-lib-1.0.27.2/src/pcm/pcm_meter.c:139: undefined reference to `atomic_sub'
Replace the 'extern __inline__' with 'static __inline__' to fix this
issue.
Signed-off-by: Kai Kang <jiashuo.kang at gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
include/iatomic.h | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/include/iatomic.h b/include/iatomic.h
index 5711fe8..2393297 100644
--- a/include/iatomic.h
+++ b/include/iatomic.h
@@ -720,7 +720,7 @@ typedef struct { volatile int counter; } atomic_t;
* Atomically adds @i to @v. Note that the guaranteed useful range
* of an atomic_t is only 24 bits.
*/
-extern __inline__ void atomic_add(int i, atomic_t * v)
+static __inline__ void atomic_add(int i, atomic_t * v)
{
unsigned long temp;
@@ -744,7 +744,7 @@ extern __inline__ void atomic_add(int i, atomic_t * v)
* Atomically subtracts @i from @v. Note that the guaranteed
* useful range of an atomic_t is only 24 bits.
*/
-extern __inline__ void atomic_sub(int i, atomic_t * v)
+static __inline__ void atomic_sub(int i, atomic_t * v)
{
unsigned long temp;
@@ -763,7 +763,7 @@ extern __inline__ void atomic_sub(int i, atomic_t * v)
/*
* Same as above, but return the result value
*/
-extern __inline__ int atomic_add_return(int i, atomic_t * v)
+static __inline__ int atomic_add_return(int i, atomic_t * v)
{
unsigned long temp, result;
@@ -784,7 +784,7 @@ extern __inline__ int atomic_add_return(int i, atomic_t * v)
return result;
}
-extern __inline__ int atomic_sub_return(int i, atomic_t * v)
+static __inline__ int atomic_sub_return(int i, atomic_t * v)
{
unsigned long temp, result;
--
1.8.4

View File

@ -1,3 +1,14 @@
-------------------------------------------------------------------
Fri Sep 6 10:03:55 CEST 2013 - tiwai@suse.de
- Backport upstream fixes:
0001-local.h-use-__kernel_off_t-from-linux-types.h.patch
0002-conf-cards-add-Audio-Advantage-Micro-II.patch
0003-pcm-Fix-a-wrong-value-shown-in-the-error-message-in-.patch
0004-UCM-Document-some-standard-values.patch
0005-hdspm.h-Update-LTC-ioctl-to-use-struct-hdspm_ltc.patch
0006-Update-iatomic.h-functions-definitions-for-mips.patch
-------------------------------------------------------------------
Tue Jul 9 16:52:37 CEST 2013 - tiwai@suse.de

View File

@ -54,6 +54,12 @@ Source40: 50-alsa.conf
Source41: install-snd-module
# Patch: alsa-lib-git-fixes.diff
# upstream fixes
Patch1: 0001-local.h-use-__kernel_off_t-from-linux-types.h.patch
Patch2: 0002-conf-cards-add-Audio-Advantage-Micro-II.patch
Patch3: 0003-pcm-Fix-a-wrong-value-shown-in-the-error-message-in-.patch
Patch4: 0004-UCM-Document-some-standard-values.patch
Patch5: 0005-hdspm.h-Update-LTC-ioctl-to-use-struct-hdspm_ltc.patch
Patch6: 0006-Update-iatomic.h-functions-definitions-for-mips.patch
# rest suse patches
Patch99: alsa-lib-doxygen-avoid-crash-for-11.3.diff
Url: http://www.alsa-project.org/
@ -105,6 +111,12 @@ Architecture.
%prep
%setup -q -n alsa-lib-%{package_version}
# %patch -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%if %suse_version == 1130
%patch99 -p1
%endif