forked from pool/alsa-utils
Accepting request 179268 from home:tiwai:branches:multimedia:libs
- Backport upstream fixes wrt chmap handling: 0006-amixer-Print-TLV-of-channel-map-controls.patch 0007-speaker-test-Fix-wrong-wave-file-played-back-in-chma.patch - Backport upstream fixes wrt amixer: 0004-amixer-Fix-the-hctl-elem-search-bug.patch 0005-amixer-fix-print_dB-for-0.99-.-0.01-range.patch OBS-URL: https://build.opensuse.org/request/show/179268 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/alsa-utils?expand=0&rev=83
This commit is contained in:
parent
d177d844c6
commit
09505b7b5a
25
0004-amixer-Fix-the-hctl-elem-search-bug.patch
Normal file
25
0004-amixer-Fix-the-hctl-elem-search-bug.patch
Normal file
@ -0,0 +1,25 @@
|
||||
From d61924fd247c2cf0280391e076c439c9427732aa Mon Sep 17 00:00:00 2001
|
||||
From: Jaroslav Kysela <perex@perex.cz>
|
||||
Date: Mon, 27 May 2013 16:40:26 +0200
|
||||
Subject: [PATCH] amixer: Fix the hctl elem search bug
|
||||
|
||||
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
||||
---
|
||||
amixer/amixer.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/amixer/amixer.c b/amixer/amixer.c
|
||||
index 2f1521b..92b0f83 100644
|
||||
--- a/amixer/amixer.c
|
||||
+++ b/amixer/amixer.c
|
||||
@@ -1105,6 +1105,7 @@ static int cset(int argc, char *argv[], int roflag, int keep_handle)
|
||||
}
|
||||
return err;
|
||||
}
|
||||
+ snd_ctl_elem_info_get_id(info, id); /* FIXME: Remove it when hctl find works ok !!! */
|
||||
if (!roflag) {
|
||||
snd_ctl_elem_value_set_id(control, id);
|
||||
if ((err = snd_ctl_elem_read(handle, control)) < 0) {
|
||||
--
|
||||
1.8.2.3
|
||||
|
34
0005-amixer-fix-print_dB-for-0.99-.-0.01-range.patch
Normal file
34
0005-amixer-fix-print_dB-for-0.99-.-0.01-range.patch
Normal file
@ -0,0 +1,34 @@
|
||||
From c80a38dbf53531d57c9bd4ccdc05553bd7fb79a1 Mon Sep 17 00:00:00 2001
|
||||
From: Jaroslav Kysela <perex@perex.cz>
|
||||
Date: Tue, 28 May 2013 08:43:30 +0200
|
||||
Subject: [PATCH] amixer: fix print_dB for -0.99 .. -0.01 range
|
||||
|
||||
The first number is 0 when input dB (hundreds) is in range -99 .. -1 .
|
||||
The printed number was positive in this case. This patch fixes this issue.
|
||||
|
||||
Reported-by: Tom Becker <GTBecker@RighTime.com>
|
||||
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
||||
---
|
||||
amixer/amixer.c | 6 +++++-
|
||||
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/amixer/amixer.c b/amixer/amixer.c
|
||||
index 92b0f83..fe83b49 100644
|
||||
--- a/amixer/amixer.c
|
||||
+++ b/amixer/amixer.c
|
||||
@@ -431,7 +431,11 @@ static void print_spaces(unsigned int spaces)
|
||||
|
||||
static void print_dB(long dB)
|
||||
{
|
||||
- printf("%li.%02lidB", dB / 100, (dB < 0 ? -dB : dB) % 100);
|
||||
+ if (dB < 0) {
|
||||
+ printf("-%li.%02lidB", -dB / 100, -dB % 100);
|
||||
+ } else {
|
||||
+ printf("%li.%02lidB", dB / 100, dB % 100);
|
||||
+ }
|
||||
}
|
||||
|
||||
static void decode_tlv(unsigned int spaces, unsigned int *tlv, unsigned int tlv_size)
|
||||
--
|
||||
1.8.2.3
|
||||
|
56
0006-amixer-Print-TLV-of-channel-map-controls.patch
Normal file
56
0006-amixer-Print-TLV-of-channel-map-controls.patch
Normal file
@ -0,0 +1,56 @@
|
||||
From 9fe90a020ccd2662120b498e9a5cdd4ea1b959ba Mon Sep 17 00:00:00 2001
|
||||
From: David Henningsson <david.henningsson@canonical.com>
|
||||
Date: Fri, 14 Jun 2013 11:41:01 +0200
|
||||
Subject: [PATCH] amixer: Print TLV of channel map controls
|
||||
|
||||
Previously these were written as "unk-25..." which wasn't very user friendly.
|
||||
|
||||
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
|
||||
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
||||
---
|
||||
amixer/amixer.c | 22 ++++++++++++++++++++++
|
||||
1 file changed, 22 insertions(+)
|
||||
|
||||
diff --git a/amixer/amixer.c b/amixer/amixer.c
|
||||
index fe83b49..7727943 100644
|
||||
--- a/amixer/amixer.c
|
||||
+++ b/amixer/amixer.c
|
||||
@@ -443,6 +443,7 @@ static void decode_tlv(unsigned int spaces, unsigned int *tlv, unsigned int tlv_
|
||||
unsigned int type = tlv[0];
|
||||
unsigned int size;
|
||||
unsigned int idx = 0;
|
||||
+ const char *chmap_type = NULL;
|
||||
|
||||
if (tlv_size < 2 * sizeof(unsigned int)) {
|
||||
printf("TLV size error!\n");
|
||||
@@ -541,6 +542,27 @@ static void decode_tlv(unsigned int spaces, unsigned int *tlv, unsigned int tlv_
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
+#ifdef SND_CTL_TLVT_CHMAP_FIXED
|
||||
+ case SND_CTL_TLVT_CHMAP_FIXED:
|
||||
+ chmap_type = "fixed";
|
||||
+ /* Fall through */
|
||||
+ case SND_CTL_TLVT_CHMAP_VAR:
|
||||
+ if (!chmap_type)
|
||||
+ chmap_type = "variable";
|
||||
+ /* Fall through */
|
||||
+ case SND_CTL_TLVT_CHMAP_PAIRED:
|
||||
+ if (!chmap_type)
|
||||
+ chmap_type = "paired";
|
||||
+ printf("chmap-%s=", chmap_type);
|
||||
+
|
||||
+ while (size > 0) {
|
||||
+ printf("%s", snd_pcm_chmap_name(tlv[idx++]));
|
||||
+ size -= sizeof(unsigned int);
|
||||
+ if (size > 0)
|
||||
+ printf(",");
|
||||
+ }
|
||||
+ break;
|
||||
+#endif
|
||||
default:
|
||||
printf("unk-%i-", type);
|
||||
while (size > 0) {
|
||||
--
|
||||
1.8.3
|
||||
|
@ -0,0 +1,49 @@
|
||||
From 7ac9508c4e20097290b322c661f550e7c24bfa44 Mon Sep 17 00:00:00 2001
|
||||
From: David Henningsson <david.henningsson@canonical.com>
|
||||
Date: Mon, 10 Jun 2013 16:42:48 +0200
|
||||
Subject: [PATCH] speaker-test: Fix wrong wave file played back in chmap setup
|
||||
|
||||
When explicitly specifying channel maps, we need to use that when
|
||||
loading wave files so the correct file is played back.
|
||||
|
||||
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
|
||||
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
||||
---
|
||||
speaker-test/speaker-test.c | 14 +++++++++++---
|
||||
1 file changed, 11 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/speaker-test/speaker-test.c b/speaker-test/speaker-test.c
|
||||
index a41b5bd..d35065f 100644
|
||||
--- a/speaker-test/speaker-test.c
|
||||
+++ b/speaker-test/speaker-test.c
|
||||
@@ -771,8 +771,16 @@ static int setup_wav_file(int chn)
|
||||
|
||||
if (given_test_wav_file)
|
||||
return check_wav_file(chn, given_test_wav_file);
|
||||
- else
|
||||
- return check_wav_file(chn, wavs[chn]);
|
||||
+
|
||||
+#ifdef CONFIG_SUPPORT_CHMAP
|
||||
+ if (channel_map_set && chn < channel_map->channels) {
|
||||
+ int channel = channel_map->pos[chn] - SND_CHMAP_FL;
|
||||
+ if (channel >= 0 && channel < MAX_CHANNELS)
|
||||
+ return check_wav_file(chn, wavs[channel]);
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
+ return check_wav_file(chn, wavs[chn]);
|
||||
}
|
||||
|
||||
static int read_wav(uint16_t *buf, int channel, int offset, int bufsize)
|
||||
@@ -1179,7 +1187,7 @@ int main(int argc, char *argv[]) {
|
||||
|
||||
if (test_type == TEST_WAV) {
|
||||
for (chn = 0; chn < channels; chn++) {
|
||||
- if (setup_wav_file(chn) < 0)
|
||||
+ if (setup_wav_file(get_speaker_channel(chn)) < 0)
|
||||
prg_exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
--
|
||||
1.8.3
|
||||
|
@ -1,3 +1,17 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Jun 17 10:14:18 CEST 2013 - tiwai@suse.de
|
||||
|
||||
- Backport upstream fixes wrt chmap handling:
|
||||
0006-amixer-Print-TLV-of-channel-map-controls.patch
|
||||
0007-speaker-test-Fix-wrong-wave-file-played-back-in-chma.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed May 29 11:03:43 CEST 2013 - tiwai@suse.de
|
||||
|
||||
- Backport upstream fixes wrt amixer:
|
||||
0004-amixer-Fix-the-hctl-elem-search-bug.patch
|
||||
0005-amixer-fix-print_dB-for-0.99-.-0.01-range.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon May 27 09:42:39 CEST 2013 - tiwai@suse.de
|
||||
|
||||
|
@ -63,6 +63,10 @@ Source99: ca0106
|
||||
Patch1: 0001-Require-alsa-lib-1.0.27.patch
|
||||
Patch2: 0002-alsactl-init-ca0106-file-was-omitted.patch
|
||||
Patch3: 0003-alsactl-return-back-the-udevrules_DATA-rule-for-90-a.patch
|
||||
Patch4: 0004-amixer-Fix-the-hctl-elem-search-bug.patch
|
||||
Patch5: 0005-amixer-fix-print_dB-for-0.99-.-0.01-range.patch
|
||||
Patch6: 0006-amixer-Print-TLV-of-channel-map-controls.patch
|
||||
Patch7: 0007-speaker-test-Fix-wrong-wave-file-played-back-in-chma.patch
|
||||
#
|
||||
Patch99: alsa-utils-gettext-version-removal.diff
|
||||
Url: http://www.alsa-project.org/
|
||||
@ -81,6 +85,10 @@ sed -i -e's/EXTRA_DIST= config.rpath /EXTRA_DIST=/' Makefile.am
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
%patch5 -p1
|
||||
%patch6 -p1
|
||||
%patch7 -p1
|
||||
cp %{S:99} alsactl/init
|
||||
#
|
||||
%if %suse_version < 1020
|
||||
|
Loading…
Reference in New Issue
Block a user