From 6ec9e6d8a0e0066b71ec7bd526cb6595ce2bec0be8682a9fc7748d2fddf4d643 Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Sat, 7 Sep 2013 13:56:54 +0000 Subject: [PATCH] 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 --- ...se-__kernel_off_t-from-linux-types.h.patch | 41 ++++++++++++ ...f-cards-add-Audio-Advantage-Micro-II.patch | 64 +++++++++++++++++++ ...value-shown-in-the-error-message-in-.patch | 27 ++++++++ 0004-UCM-Document-some-standard-values.patch | 35 ++++++++++ ...te-LTC-ioctl-to-use-struct-hdspm_ltc.patch | 33 ++++++++++ ...mic.h-functions-definitions-for-mips.patch | 64 +++++++++++++++++++ alsa.changes | 11 ++++ alsa.spec | 12 ++++ 8 files changed, 287 insertions(+) create mode 100644 0001-local.h-use-__kernel_off_t-from-linux-types.h.patch create mode 100644 0002-conf-cards-add-Audio-Advantage-Micro-II.patch create mode 100644 0003-pcm-Fix-a-wrong-value-shown-in-the-error-message-in-.patch create mode 100644 0004-UCM-Document-some-standard-values.patch create mode 100644 0005-hdspm.h-Update-LTC-ioctl-to-use-struct-hdspm_ltc.patch create mode 100644 0006-Update-iatomic.h-functions-definitions-for-mips.patch diff --git a/0001-local.h-use-__kernel_off_t-from-linux-types.h.patch b/0001-local.h-use-__kernel_off_t-from-linux-types.h.patch new file mode 100644 index 0000000..f6923a6 --- /dev/null +++ b/0001-local.h-use-__kernel_off_t-from-linux-types.h.patch @@ -0,0 +1,41 @@ +From b3b53a1bec47aaa2baef724cc9e79adadd603caf Mon Sep 17 00:00:00 2001 +From: Jaroslav Kysela +Date: Tue, 23 Jul 2013 14:50:41 +0200 +Subject: [PATCH 1/6] local.h: use __kernel_off_t from + +Also, make the empty definitions __user and __force conditional. + +Signed-off-by: Jaroslav Kysela +--- + 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 + #include + #include ++#include + #include + + #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 + +-- +1.8.4 + diff --git a/0002-conf-cards-add-Audio-Advantage-Micro-II.patch b/0002-conf-cards-add-Audio-Advantage-Micro-II.patch new file mode 100644 index 0000000..aa53f8e --- /dev/null +++ b/0002-conf-cards-add-Audio-Advantage-Micro-II.patch @@ -0,0 +1,64 @@ +From 994ab14b401b2873c5f927215bbb86fe6f6335fc Mon Sep 17 00:00:00 2001 +From: Przemek Rudy +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 +Signed-off-by: Takashi Iwai +--- + 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 + diff --git a/0003-pcm-Fix-a-wrong-value-shown-in-the-error-message-in-.patch b/0003-pcm-Fix-a-wrong-value-shown-in-the-error-message-in-.patch new file mode 100644 index 0000000..a6516c1 --- /dev/null +++ b/0003-pcm-Fix-a-wrong-value-shown-in-the-error-message-in-.patch @@ -0,0 +1,27 @@ +From d469ebe2efe514ce10511dfdff852063030d658d Mon Sep 17 00:00:00 2001 +From: Laurentiu Nicola +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 +--- + 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 + diff --git a/0004-UCM-Document-some-standard-values.patch b/0004-UCM-Document-some-standard-values.patch new file mode 100644 index 0000000..4eb46c9 --- /dev/null +++ b/0004-UCM-Document-some-standard-values.patch @@ -0,0 +1,35 @@ +From 36bc5770409901b0e3a1b1cb5a027cdb71ff47f5 Mon Sep 17 00:00:00 2001 +From: Arun Raghavan +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 +--- + 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 + diff --git a/0005-hdspm.h-Update-LTC-ioctl-to-use-struct-hdspm_ltc.patch b/0005-hdspm.h-Update-LTC-ioctl-to-use-struct-hdspm_ltc.patch new file mode 100644 index 0000000..f3f2a2f --- /dev/null +++ b/0005-hdspm.h-Update-LTC-ioctl-to-use-struct-hdspm_ltc.patch @@ -0,0 +1,33 @@ +From 4b169b05b48f4ea0196879b62b8c3fa5b050e806 Mon Sep 17 00:00:00 2001 +From: Adrian Knoth +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 +Signed-off-by: Takashi Iwai +--- + 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 + diff --git a/0006-Update-iatomic.h-functions-definitions-for-mips.patch b/0006-Update-iatomic.h-functions-definitions-for-mips.patch new file mode 100644 index 0000000..19fc8b9 --- /dev/null +++ b/0006-Update-iatomic.h-functions-definitions-for-mips.patch @@ -0,0 +1,64 @@ +From f21f48a70f8437a671b58fcab75e54222a9eea16 Mon Sep 17 00:00:00 2001 +From: Kai Kang +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 +Signed-off-by: Takashi Iwai +--- + 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 + diff --git a/alsa.changes b/alsa.changes index 2c563c6..c90cf96 100644 --- a/alsa.changes +++ b/alsa.changes @@ -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 diff --git a/alsa.spec b/alsa.spec index b385811..b134a5c 100644 --- a/alsa.spec +++ b/alsa.spec @@ -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