Accepting request 343195 from multimedia:libs

1

OBS-URL: https://build.opensuse.org/request/show/343195
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/alsa-utils?expand=0&rev=102
This commit is contained in:
Dominique Leuenberger 2015-11-12 18:37:58 +00:00 committed by Git OBS Bridge
commit 652242fb69
19 changed files with 241 additions and 997 deletions

View File

@ -1,36 +0,0 @@
From 1a19ec15385033b59ebfffec954034680575a003 Mon Sep 17 00:00:00 2001
From: Peter Meerwald <p.meerwald@bct-electronic.com>
Date: Tue, 3 Mar 2015 18:39:52 +0100
Subject: [PATCH 1/3] amixer: Don't set only the first item in sset_enum()
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
amixer/amixer.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/amixer/amixer.c b/amixer/amixer.c
index ed60e7c3a960..36c92eb99bc9 100644
--- a/amixer/amixer.c
+++ b/amixer/amixer.c
@@ -1278,7 +1278,7 @@ static int get_enum_item_index(snd_mixer_elem_t *elem, char **ptrp)
static int sset_enum(snd_mixer_elem_t *elem, unsigned int argc, char **argv)
{
- unsigned int idx, chn = 0;
+ unsigned int idx, item = 0;
int check_flag = ignore_error ? 0 : -1;
for (idx = 1; idx < argc; idx++) {
@@ -1287,7 +1287,7 @@ static int sset_enum(snd_mixer_elem_t *elem, unsigned int argc, char **argv)
int ival = get_enum_item_index(elem, &ptr);
if (ival < 0)
return check_flag;
- if (snd_mixer_selem_set_enum_item(elem, chn, ival) >= 0)
+ if (snd_mixer_selem_set_enum_item(elem, item++, ival) >= 0)
check_flag = 1;
/* skip separators */
while (*ptr == ',' || isspace(*ptr))
--
2.3.5

View File

@ -0,0 +1,135 @@
From 3bf8e79c3bfee3ca14277aad3d9c406dfc053bbf Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Mon, 9 Nov 2015 14:04:11 +0100
Subject: [PATCH 1/2] bat: Avoid local signal.h file
The local header file named as "signal.h" causes mysterious compile
error when built with an old glibc.
signal.h:27: error: conflicting types for 'sin_generator_init'
./signal.h:27: error: previous declaration of 'sin_generator_init' was here
signal.h:28: error: conflicting types for 'sin_generator_next_sample'
./signal.h:28: error: previous declaration of 'sin_generator_next_sample' was here
....
This turned out to be the conflict of signal.h; namely, pthread.h that
is included before our local signal.h also includes "pthread.h".
Since our local "signal.h" has a higher priority, it gets loaded
instead of the expected pthread's one. Then we load it again, and it
screws up.
Although it's basically a bug of pthread, it's anyway not good to have
a header file conflicting with the standard header file. So, let's
name it more explicitly as specific to BAT, bat-signal.h, for avoiding
such a conflict.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
bat/Makefile.am | 2 +-
bat/alsa.c | 2 +-
bat/bat-signal.h | 30 ++++++++++++++++++++++++++++++
bat/signal.h | 30 ------------------------------
4 files changed, 32 insertions(+), 32 deletions(-)
create mode 100644 bat/bat-signal.h
delete mode 100644 bat/signal.h
diff --git a/bat/Makefile.am b/bat/Makefile.am
index 842ae6bb8fc7..f0dc5abbbe46 100644
--- a/bat/Makefile.am
+++ b/bat/Makefile.am
@@ -13,7 +13,7 @@ bat_SOURCES = \
noinst_HEADERS = \
common.h \
- signal.h \
+ bat-signal.h \
alsa.h \
convert.h \
analyze.h
diff --git a/bat/alsa.c b/bat/alsa.c
index 582c60482975..d31a633cf857 100644
--- a/bat/alsa.c
+++ b/bat/alsa.c
@@ -27,7 +27,7 @@
#include "common.h"
#include "alsa.h"
-#include "signal.h"
+#include "bat-signal.h"
struct pcm_container {
snd_pcm_t *handle;
diff --git a/bat/bat-signal.h b/bat/bat-signal.h
new file mode 100644
index 000000000000..a2955176e820
--- /dev/null
+++ b/bat/bat-signal.h
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2015 Caleb Crome
+ * Copyright (C) 2013-2015 Intel Corporation
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ */
+
+/*
+ * Here's a generic sine wave generator that will work indefinitely
+ * for any frequency.
+ *
+ * Note: the state & phasor are stored as doubles (and updated as
+ * doubles) because after a million samples the magnitude drifts a
+ * bit. If we really need floats, it can be done with periodic
+ * renormalization of the state_real+state_imag magnitudes.
+ */
+
+int sin_generator_init(struct sin_generator *, float, float, float);
+float sin_generator_next_sample(struct sin_generator *);
+void sin_generator_vfill(struct sin_generator *, float *, int);
+int generate_sine_wave(struct bat *, int, void *);
diff --git a/bat/signal.h b/bat/signal.h
deleted file mode 100644
index a2955176e820..000000000000
--- a/bat/signal.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright (C) 2015 Caleb Crome
- * Copyright (C) 2013-2015 Intel Corporation
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- */
-
-/*
- * Here's a generic sine wave generator that will work indefinitely
- * for any frequency.
- *
- * Note: the state & phasor are stored as doubles (and updated as
- * doubles) because after a million samples the magnitude drifts a
- * bit. If we really need floats, it can be done with periodic
- * renormalization of the state_real+state_imag magnitudes.
- */
-
-int sin_generator_init(struct sin_generator *, float, float, float);
-float sin_generator_next_sample(struct sin_generator *);
-void sin_generator_vfill(struct sin_generator *, float *, int);
-int generate_sine_wave(struct bat *, int, void *);
--
2.6.2

View File

@ -1,58 +0,0 @@
From f3abdeea00ef7cc07cb44aa43701a278b9c4692f Mon Sep 17 00:00:00 2001
From: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Date: Thu, 9 Apr 2015 01:30:56 +0900
Subject: [PATCH 2/3] amixer: expand local storage for item name according to
kernel code
According to kernel code (snd_ctl_elem_init_enum_names() in
sound/core/control.c), the maximum length of item name is 63 characters
(+ 1 terminator = 64 bytes). But current amixer implementation
uses 40 bytes. This causes name truncation and fail to operation.
This commit fixes this bug by expanding the length of local variables.
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
amixer/amixer.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/amixer/amixer.c b/amixer/amixer.c
index 36c92eb99bc9..db1849333da3 100644
--- a/amixer/amixer.c
+++ b/amixer/amixer.c
@@ -812,7 +812,11 @@ static int show_selem(snd_mixer_t *handle, snd_mixer_selem_id_t *id, const char
if (snd_mixer_selem_is_enumerated(elem)) {
int i, items;
unsigned int idx;
- char itemname[40];
+ /*
+ * See snd_ctl_elem_init_enum_names() in
+ * sound/core/control.c.
+ */
+ char itemname[64];
items = snd_mixer_selem_get_enum_items(elem);
printf(" Items:");
for (i = 0; i < items; i++) {
@@ -1255,7 +1259,9 @@ static int get_enum_item_index(snd_mixer_elem_t *elem, char **ptrp)
{
char *ptr = *ptrp;
int items, i, len;
- char name[40];
+
+ /* See snd_ctl_elem_init_enum_names() in sound/core/control.c. */
+ char name[64];
items = snd_mixer_selem_get_enum_items(elem);
if (items <= 0)
@@ -1264,6 +1270,7 @@ static int get_enum_item_index(snd_mixer_elem_t *elem, char **ptrp)
for (i = 0; i < items; i++) {
if (snd_mixer_selem_get_enum_item_name(elem, i, sizeof(name)-1, name) < 0)
continue;
+
len = strlen(name);
if (! strncmp(name, ptr, len)) {
if (! ptr[len] || ptr[len] == ',' || ptr[len] == '\n') {
--
2.3.5

View File

@ -0,0 +1,53 @@
From ed0cce1b6061aade0077982cb5d22fa68ddffd2f Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Mon, 9 Nov 2015 14:09:50 +0100
Subject: [PATCH 2/2] bat: Don't pass incompatible function pointers to
pthread_cleanup_push()
pthread_cleanup_push() takes a function pointer for void (void *).
Although it may work in most cases, we shouldn't pass an incompatible
function pointer there, as some old gcc complains:
alsa.c:560: warning: initialization from incompatible pointer type
alsa.c:562: warning: initialization from incompatible pointer type
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
bat/alsa.c | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/bat/alsa.c b/bat/alsa.c
index d31a633cf857..5eaa25b61456 100644
--- a/bat/alsa.c
+++ b/bat/alsa.c
@@ -505,6 +505,16 @@ static int read_from_pcm_loop(FILE *fp, int count,
return 0;
}
+static void pcm_cleanup(void *p)
+{
+ snd_pcm_close(p);
+}
+
+static void file_cleanup(void *p)
+{
+ fclose(p);
+}
+
/**
* Record
*/
@@ -557,9 +567,9 @@ void *record_alsa(struct bat *bat)
pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, NULL);
- pthread_cleanup_push(snd_pcm_close, sndpcm.handle);
+ pthread_cleanup_push(pcm_cleanup, sndpcm.handle);
pthread_cleanup_push(free, sndpcm.buffer);
- pthread_cleanup_push(fclose, fp);
+ pthread_cleanup_push(file_cleanup, fp);
err = write_wav_header(fp, &wav, bat);
if (err != 0) {
--
2.6.2

View File

@ -1,53 +0,0 @@
From 8188c2466a7d2179aba4e243ff2b85363961f9f1 Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Mon, 27 Apr 2015 21:27:05 +0200
Subject: [PATCH 3/3] alsa-info: Don't try update when wget isn't available
... otherwise it overwrites a zero size file. Also add a check of
zero size file in the update procedure, too.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
alsa-info/alsa-info.sh | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/alsa-info/alsa-info.sh b/alsa-info/alsa-info.sh
index acd849588141..0bc4cd0612fb 100755
--- a/alsa-info/alsa-info.sh
+++ b/alsa-info/alsa-info.sh
@@ -35,6 +35,8 @@ BGTITLE="ALSA-Info v $SCRIPT_VERSION"
PASTEBINKEY="C9cRIO8m/9y8Cs0nVs0FraRx7U0pHsuc"
#Define some simple functions
+WGET=$(which wget 2>/dev/null| sed 's|^[^/]*||' 2>/dev/null)
+
pbcheck(){
[[ $UPLOAD = "no" ]] && return
@@ -46,10 +48,12 @@ pbcheck(){
}
update() {
+ test -z "$WGET" -o ! -x "$WGET" && return
+
SHFILE=`mktemp -t alsa-info.XXXXXXXXXX` || exit 1
wget -O $SHFILE "http://www.alsa-project.org/alsa-info.sh" >/dev/null 2>&1
REMOTE_VERSION=`grep SCRIPT_VERSION $SHFILE |head -n1 |sed 's/.*=//'`
- if [ "$REMOTE_VERSION" != "$SCRIPT_VERSION" ]; then
+ if [ -s "$SHFILE" -a "$REMOTE_VERSION" != "$SCRIPT_VERSION" ]; then
if [[ -n $DIALOG ]]
then
OVERWRITE=
@@ -831,8 +835,7 @@ if [ "$UPLOAD" = "no" ]; then
fi # UPLOAD
#Test that wget is installed, and supports --post-file. Upload $FILE if it does, and prompt user to upload file if it doesnt.
-if
-WGET=$(which wget 2>/dev/null| sed 's|^[^/]*||' 2>/dev/null); [[ -n "${WGET}" ]] && [[ -x "${WGET}" ]] && [[ `wget --help |grep post-file` ]]
+if [[ -n "${WGET}" ]] && [[ -x "${WGET}" ]] && [[ `wget --help |grep post-file` ]]
then
if [[ -n $DIALOG ]]
--
2.3.5

View File

@ -1,29 +0,0 @@
From 9aa5c271f4eb2e3481b4a5076eb025242215ad7f Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Wed, 29 Apr 2015 18:01:07 +0200
Subject: [PATCH] aplay: Fix type for signal flag
A flag used in signal handlers has to be a special atomic type,
volatile sig_atomic_t.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
aplay/aplay.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/aplay/aplay.c b/aplay/aplay.c
index e58e1bcbdd7e..dfa1a0a95867 100644
--- a/aplay/aplay.c
+++ b/aplay/aplay.c
@@ -107,7 +107,7 @@ static snd_pcm_stream_t stream = SND_PCM_STREAM_PLAYBACK;
static int mmap_flag = 0;
static int interleaved = 1;
static int nonblock = 0;
-static int in_aborting = 0;
+static volatile sig_atomic_t in_aborting = 0;
static u_char *audiobuf = NULL;
static snd_pcm_uframes_t chunk_size = 0;
static unsigned period_time = 0;
--
2.4.5

View File

@ -1,35 +0,0 @@
From 46b60827568ca4aad15eeacbc9dcf8597986ca8e Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Wed, 29 Apr 2015 18:01:58 +0200
Subject: [PATCH] aplay: Fix uninterruptible aplay
When aplay is invoked to play from stdin, it can't be terminated by
normal signals like SIGTERM or SIGINT. It's because our signal
handler tries to trap as much as possible while the stalling point is
not in the PCM loop but rather the file I/O.
For fixing this, leave our signal handler once when a signal is
received and snd_pcm_abort() is called. At the next hit, it shall be
handled normally.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
aplay/aplay.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/aplay/aplay.c b/aplay/aplay.c
index dfa1a0a95867..459f7dd6f667 100644
--- a/aplay/aplay.c
+++ b/aplay/aplay.c
@@ -399,7 +399,7 @@ static void signal_handler(int sig)
handle = NULL;
prg_exit(EXIT_FAILURE);
}
- signal(sig, signal_handler);
+ signal(sig, SIG_DFL);
}
/* call on SIGUSR1 signal. */
--
2.4.5

View File

@ -1,35 +0,0 @@
From 13c826941445a66ece203a09e6739c979ac5900c Mon Sep 17 00:00:00 2001
From: Tobias Stoeckmann <tobias@stoeckmann.org>
Date: Sat, 11 Jul 2015 13:23:57 +0200
Subject: [PATCH] alsactl: terminate readlink result string
readlink does not guarantee that its result string is nul-terminated.
Instead, increase the buffer by one byte to make sure that we can
add '\0' at the end.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
alsactl/init_sysfs.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/alsactl/init_sysfs.c b/alsactl/init_sysfs.c
index 0cbada2e169b..5c789b61b0e5 100644
--- a/alsactl/init_sysfs.c
+++ b/alsactl/init_sysfs.c
@@ -108,11 +108,11 @@ static char *sysfs_attr_get_value(const char *devpath, const char *attr_name)
if (S_ISLNK(statbuf.st_mode)) {
/* links return the last element of the target path */
- char link_target[PATH_SIZE];
+ char link_target[PATH_SIZE + 1];
int len;
const char *pos;
- len = readlink(path_full, link_target, sizeof(link_target));
+ len = readlink(path_full, link_target, sizeof(link_target) - 1);
if (len > 0) {
link_target[len] = '\0';
pos = strrchr(link_target, '/');
--
2.4.5

View File

@ -1,164 +0,0 @@
From 791ae1c18016707ee046b430cf3cf0412276c744 Mon Sep 17 00:00:00 2001
From: Julian Scheel <julian@jusst.de>
Date: Tue, 30 Jun 2015 08:57:49 +0200
Subject: [PATCH] speaker-test: Add option to specify signal scale
Allow generated signals (sine and noise) to have a specified signal scale
instead of using hardcoded limits of 80%. This can be handy for debugging, ie
when analysing clipping issues with audio drivers.
Signed-off-by: Julian Scheel <julian@jusst.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
speaker-test/speaker-test.c | 30 ++++++++++++++++++------------
1 file changed, 18 insertions(+), 12 deletions(-)
diff --git a/speaker-test/speaker-test.c b/speaker-test/speaker-test.c
index ccf2671725a3..25970af1c9bc 100644
--- a/speaker-test/speaker-test.c
+++ b/speaker-test/speaker-test.c
@@ -100,6 +100,7 @@ static unsigned int period_time = 0; /* period time in us */
static unsigned int nperiods = 4; /* number of periods */
static double freq = 440.0; /* sinusoidal wave frequency in Hz */
static int test_type = TEST_PINK_NOISE; /* Test type. 1 = noise, 2 = sine wave */
+static float generator_scale = 0.8; /* Scale to use for sine volume */
static pink_noise_t pink;
static snd_pcm_uframes_t buffer_size;
static snd_pcm_uframes_t period_size;
@@ -306,7 +307,7 @@ static void generate_sine(uint8_t *frames, int channel, int count, double *_phas
switch (format) {
case SND_PCM_FORMAT_S8:
if (chn==channel) {
- res = (sin((phase * 2 * M_PI) / max_phase - M_PI)) * 0x03fffffff; /* Don't use MAX volume */
+ res = (sin((phase * 2 * M_PI) / max_phase - M_PI)) * generator_scale * 0x7fffffff;
ires = res;
*samp8++ = ires >> 24;
} else {
@@ -315,7 +316,7 @@ static void generate_sine(uint8_t *frames, int channel, int count, double *_phas
break;
case SND_PCM_FORMAT_S16_LE:
if (chn==channel) {
- res = (sin((phase * 2 * M_PI) / max_phase - M_PI)) * 0x03fffffff; /* Don't use MAX volume */
+ res = (sin((phase * 2 * M_PI) / max_phase - M_PI)) * generator_scale * 0x7fffffff;
ires = res;
*samp16++ = LE_SHORT(ires >> 16);
} else {
@@ -324,7 +325,7 @@ static void generate_sine(uint8_t *frames, int channel, int count, double *_phas
break;
case SND_PCM_FORMAT_S16_BE:
if (chn==channel) {
- res = (sin((phase * 2 * M_PI) / max_phase - M_PI)) * 0x03fffffff; /* Don't use MAX volume */
+ res = (sin((phase * 2 * M_PI) / max_phase - M_PI)) * generator_scale * 0x7fffffff;
ires = res;
*samp16++ = BE_SHORT(ires >> 16);
} else {
@@ -333,7 +334,7 @@ static void generate_sine(uint8_t *frames, int channel, int count, double *_phas
break;
case SND_PCM_FORMAT_FLOAT_LE:
if (chn==channel) {
- res = (sin((phase * 2 * M_PI) / max_phase - M_PI)) * 0.75 ; /* Don't use MAX volume */
+ res = (sin((phase * 2 * M_PI) / max_phase - M_PI)) * generator_scale;
fres = res;
*samp_f++ = fres;
} else {
@@ -342,7 +343,7 @@ static void generate_sine(uint8_t *frames, int channel, int count, double *_phas
break;
case SND_PCM_FORMAT_S32_LE:
if (chn==channel) {
- res = (sin((phase * 2 * M_PI) / max_phase - M_PI)) * 0x03fffffff; /* Don't use MAX volume */
+ res = (sin((phase * 2 * M_PI) / max_phase - M_PI)) * generator_scale * 0x7fffffff;
ires = res;
*samp32++ = LE_INT(ires);
} else {
@@ -351,7 +352,7 @@ static void generate_sine(uint8_t *frames, int channel, int count, double *_phas
break;
case SND_PCM_FORMAT_S32_BE:
if (chn==channel) {
- res = (sin((phase * 2 * M_PI) / max_phase - M_PI)) * 0x03fffffff; /* Don't use MAX volume */
+ res = (sin((phase * 2 * M_PI) / max_phase - M_PI)) * generator_scale * 0x7fffffff;
ires = res;
*samp32++ = BE_INT(ires);
} else {
@@ -389,7 +390,7 @@ static void generate_pink_noise( uint8_t *frames, int channel, int count) {
switch (format) {
case SND_PCM_FORMAT_S8:
if (chn==channel) {
- res = generate_pink_noise_sample(&pink) * 0x03fffffff; /* Don't use MAX volume */
+ res = generate_pink_noise_sample(&pink) * generator_scale * 0x07fffffff;
ires = res;
*samp8++ = ires >> 24;
} else {
@@ -398,7 +399,7 @@ static void generate_pink_noise( uint8_t *frames, int channel, int count) {
break;
case SND_PCM_FORMAT_S16_LE:
if (chn==channel) {
- res = generate_pink_noise_sample(&pink) * 0x03fffffff; /* Don't use MAX volume */
+ res = generate_pink_noise_sample(&pink) * generator_scale * 0x07fffffff;
ires = res;
*samp16++ = LE_SHORT(ires >> 16);
} else {
@@ -407,7 +408,7 @@ static void generate_pink_noise( uint8_t *frames, int channel, int count) {
break;
case SND_PCM_FORMAT_S16_BE:
if (chn==channel) {
- res = generate_pink_noise_sample(&pink) * 0x03fffffff; /* Don't use MAX volume */
+ res = generate_pink_noise_sample(&pink) * generator_scale * 0x07fffffff;
ires = res;
*samp16++ = BE_SHORT(ires >> 16);
} else {
@@ -416,7 +417,7 @@ static void generate_pink_noise( uint8_t *frames, int channel, int count) {
break;
case SND_PCM_FORMAT_S32_LE:
if (chn==channel) {
- res = generate_pink_noise_sample(&pink) * 0x03fffffff; /* Don't use MAX volume */
+ res = generate_pink_noise_sample(&pink) * generator_scale * 0x07fffffff;
ires = res;
*samp32++ = LE_INT(ires);
} else {
@@ -425,7 +426,7 @@ static void generate_pink_noise( uint8_t *frames, int channel, int count) {
break;
case SND_PCM_FORMAT_S32_BE:
if (chn==channel) {
- res = generate_pink_noise_sample(&pink) * 0x03fffffff; /* Don't use MAX volume */
+ res = generate_pink_noise_sample(&pink) * generator_scale * 0x07fffffff;
ires = res;
*samp32++ = BE_INT(ires);
} else {
@@ -1017,6 +1018,7 @@ static void help(void)
"-W,--wavdir Specify the directory containing WAV files\n"
"-m,--chmap Specify the channel map to override\n"
"-X,--force-frequency force frequencies outside the 30-8000hz range\n"
+ "-S,--scale Scale of generated test tones in percent (default=80)\n"
"\n"));
printf(_("Recognized sample formats are:"));
for (fmt = supported_formats; *fmt >= 0; fmt++) {
@@ -1060,6 +1062,7 @@ int main(int argc, char *argv[]) {
{"wavdir", 1, NULL, 'W'},
{"debug", 0, NULL, 'd'},
{"force-frequency", 0, NULL, 'X'},
+ {"scale", 1, NULL, 'S'},
#ifdef CONFIG_SUPPORT_CHMAP
{"chmap", 1, NULL, 'm'},
#endif
@@ -1081,7 +1084,7 @@ int main(int argc, char *argv[]) {
while (1) {
int c;
- if ((c = getopt_long(argc, argv, "hD:r:c:f:F:b:p:P:t:l:s:w:W:d:X"
+ if ((c = getopt_long(argc, argv, "hD:r:c:f:F:b:p:P:t:l:s:w:W:d:XS:"
#ifdef CONFIG_SUPPORT_CHMAP
"m:"
#endif
@@ -1182,6 +1185,9 @@ int main(int argc, char *argv[]) {
chmap = optarg;
break;
#endif
+ case 'S':
+ generator_scale = atoi(optarg) / 100.0;
+ break;
default:
fprintf(stderr, _("Unknown option '%c'\n"), c);
exit(EXIT_FAILURE);
--
2.5.0

View File

@ -1,206 +0,0 @@
From 665d980aa5b779575fbb9eac394ef5c2d03e091e Mon Sep 17 00:00:00 2001
From: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Date: Tue, 4 Aug 2015 16:23:03 +0100
Subject: [PATCH] topology: Add command line topology tool to build topology
binaries
Add a command line tool that will parse topology text files and convert to the binary
topology data as used by the kernel.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
Makefile.am | 3 ++
configure.ac | 5 ++-
topology/Makefile.am | 10 +++++
topology/topology.c | 117 +++++++++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 134 insertions(+), 1 deletion(-)
create mode 100644 topology/Makefile.am
create mode 100644 topology/topology.c
diff --git a/Makefile.am b/Makefile.am
index 5bbe588a8d84..613f62dc359a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -25,6 +25,9 @@ endif
if HAVE_UCM
SUBDIRS += alsaucm
endif
+if HAVE_TOPOLOGY
+SUBDIRS += topology
+endif
EXTRA_DIST= TODO gitcompile
AUTOMAKE_OPTIONS=foreign
diff --git a/configure.ac b/configure.ac
index f09aa5484d1d..4c279a952eef 100644
--- a/configure.ac
+++ b/configure.ac
@@ -50,6 +50,8 @@ AC_CHECK_HEADERS([alsa/seq.h], [have_seq="yes"], [have_seq="no"],
[#include <alsa/asoundlib.h>])
AC_CHECK_HEADERS([alsa/use-case.h], [have_ucm="yes"], [have_ucm="no"],
[#include <alsa/asoundlib.h>])
+AC_CHECK_HEADERS([alsa/topology.h], [have_topology="yes"], [have_topology="no"],
+ [#include <alsa/asoundlib.h>])
AC_CHECK_HEADERS([samplerate.h], [have_samplerate="yes"], [have_samplerate="no"],
[#include <samplerate.h>])
@@ -58,6 +60,7 @@ AM_CONDITIONAL(HAVE_MIXER, test "$have_mixer" = "yes")
AM_CONDITIONAL(HAVE_RAWMIDI, test "$have_rawmidi" = "yes")
AM_CONDITIONAL(HAVE_SEQ, test "$have_seq" = "yes")
AM_CONDITIONAL(HAVE_UCM, test "$have_ucm" = "yes")
+AM_CONDITIONAL(HAVE_TOPOLOGY, test "$have_topology" = "yes")
AM_CONDITIONAL(HAVE_SAMPLERATE, test "$have_samplerate" = "yes")
dnl Check for librt
@@ -358,7 +361,7 @@ AC_OUTPUT(Makefile alsactl/Makefile alsactl/init/Makefile \
m4/Makefile po/Makefile.in \
alsaconf/alsaconf alsaconf/Makefile \
alsaconf/po/Makefile \
- alsaucm/Makefile \
+ alsaucm/Makefile topology/Makefile \
aplay/Makefile include/Makefile iecset/Makefile utils/Makefile \
utils/alsa-utils.spec seq/Makefile seq/aconnect/Makefile \
seq/aplaymidi/Makefile seq/aseqdump/Makefile seq/aseqnet/Makefile \
diff --git a/topology/Makefile.am b/topology/Makefile.am
new file mode 100644
index 000000000000..c370b149f632
--- /dev/null
+++ b/topology/Makefile.am
@@ -0,0 +1,10 @@
+bin_PROGRAMS = \
+ alsatplg
+
+alsatplg_SOURCES = topology.c
+
+AM_CPPFLAGS = \
+ -Wall -I$(top_srcdir)/include
+
+alsatplg_LDADD = -lasound
+
diff --git a/topology/topology.c b/topology/topology.c
new file mode 100644
index 000000000000..33c327662166
--- /dev/null
+++ b/topology/topology.c
@@ -0,0 +1,117 @@
+/*
+ Copyright(c) 2014-2015 Intel Corporation
+ Copyright(c) 2010-2011 Texas Instruments Incorporated,
+ All rights reserved.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of version 2 of the GNU General Public License as
+ published by the Free Software Foundation.
+
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
+ The full GNU General Public License is included in this distribution
+ in the file called LICENSE.GPL.
+*/
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <stdint.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <errno.h>
+#include <string.h>
+#include <sys/stat.h>
+#include <dlfcn.h>
+#include <getopt.h>
+#include <assert.h>
+
+#include <alsa/asoundlib.h>
+#include <alsa/topology.h>
+#include "gettext.h"
+
+static snd_output_t *log;
+
+static void usage(char *name)
+{
+ printf(
+_("Usage: %s [OPTIONS]...\n"
+"\n"
+"-h, --help help\n"
+"-c, --compile=FILE compile file\n"
+"-v, --verbose=LEVEL set verbosity level (0...1)\n"
+"-o, --output=FILE set output file\n"
+), name);
+}
+
+int main(int argc, char *argv[])
+{
+ snd_tplg_t *snd_tplg;
+ static const char short_options[] = "hc:v:o:";
+ static const struct option long_options[] = {
+ {"help", 0, 0, 'h'},
+ {"verbose", 0, 0, 'v'},
+ {"compile", 0, 0, 'c'},
+ {"output", 0, 0, 'o'},
+ {0, 0, 0, 0},
+ };
+ char *source_file = NULL, *output_file = NULL;
+ int c, err, verbose = 0, option_index;
+
+#ifdef ENABLE_NLS
+ setlocale(LC_ALL, "");
+ textdomain(PACKAGE);
+#endif
+
+ err = snd_output_stdio_attach(&log, stderr, 0);
+ assert(err >= 0);
+
+ while ((c = getopt_long(argc, argv, short_options, long_options, &option_index)) != -1) {
+ switch (c) {
+ case 'h':
+ usage(argv[0]);
+ return 0;
+ case 'v':
+ verbose = atoi(optarg);
+ break;
+ case 'c':
+ source_file = optarg;
+ break;
+ case 'o':
+ output_file = optarg;
+ break;
+ default:
+ fprintf(stderr, _("Try `%s --help' for more information.\n"), argv[0]);
+ return 1;
+ }
+ }
+
+ if (source_file == NULL || output_file == NULL) {
+ usage(argv[0]);
+ return 1;
+ }
+
+ snd_tplg = snd_tplg_new();
+ if (snd_tplg == NULL) {
+ fprintf(stderr, _("failed to create new topology context\n"));
+ return 1;
+ }
+
+ snd_tplg_verbose(snd_tplg, verbose);
+
+ err = snd_tplg_build_file(snd_tplg, source_file, output_file);
+ if (err < 0) {
+ fprintf(stderr, _("failed to compile context %s\n"), source_file);
+ snd_tplg_free(snd_tplg);
+ return 1;
+ }
+
+ snd_tplg_free(snd_tplg);
+ return 0;
+}
+
--
2.5.0

View File

@ -1,50 +0,0 @@
From 0e864e1a3aaf79d451556064eb09052530a0a085 Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Mon, 10 Aug 2015 14:42:24 +0200
Subject: [PATCH] alsactl: Add path condition to alsa-store and alsa-restore
services
With alsa-restore.service and alsa-store.service, systemd invokes
alsactl at boot and shutdown times. When this is invoked on a system
without sound cards, it results in an ugly error message from alsact
/usr/sbin/alsactl: save_state:1590: No soundcards found...
return code is "19"
Add ConditionPathExistsGlob checks of /dev/snd/control* devices for
avoiding unnecessary invocations of alsactl on such a system.
Bugzilla: https://bugzilla.suse.com/show_bug.cgi?id=940950
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
alsactl/alsa-restore.service.in | 1 +
alsactl/alsa-store.service.in | 1 +
2 files changed, 2 insertions(+)
diff --git a/alsactl/alsa-restore.service.in b/alsactl/alsa-restore.service.in
index 245a439798fc..d1a74d637457 100644
--- a/alsactl/alsa-restore.service.in
+++ b/alsactl/alsa-restore.service.in
@@ -6,6 +6,7 @@
[Unit]
Description=Restore Sound Card State
ConditionPathExists=!@daemonswitch@
+ConditionPathExistsGlob=/dev/snd/control*
DefaultDependencies=no
After=alsa-state.service
Before=shutdown.target
diff --git a/alsactl/alsa-store.service.in b/alsactl/alsa-store.service.in
index f1a56bb9dbb5..c89cfff04f35 100644
--- a/alsactl/alsa-store.service.in
+++ b/alsactl/alsa-store.service.in
@@ -6,6 +6,7 @@
[Unit]
Description=Store Sound Card State
ConditionPathExists=!@daemonswitch@
+ConditionPathExistsGlob=/dev/snd/control*
DefaultDependencies=no
Before=shutdown.target
--
2.5.0

View File

@ -1,58 +0,0 @@
From 4482cc7cfe97fd69b38687816a6450b0fcc9ba59 Mon Sep 17 00:00:00 2001
From: Ken Benoit <kbenoit@redhat.com>
Date: Thu, 17 Sep 2015 15:06:38 -0400
Subject: [PATCH] speaker-test: fix option ordering
The -c and -s options needed to be provided in a specific order for the -s option to work correctly.
This pulls the speaker option check outside of the option parsing so that all the options have been parsed before checking to see if the parameter to -s is correct.
Signed-off-by: Ken Benoit <kbenoit@redhat.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
---
speaker-test/speaker-test.c | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/speaker-test/speaker-test.c b/speaker-test/speaker-test.c
index 25970af1c9bc..5b9cbeca632d 100644
--- a/speaker-test/speaker-test.c
+++ b/speaker-test/speaker-test.c
@@ -1041,6 +1041,7 @@ int main(int argc, char *argv[]) {
double time1,time2,time3;
unsigned int n, nloops;
struct timeval tv1,tv2;
+ int speakeroptset = 0;
#ifdef CONFIG_SUPPORT_CHMAP
const char *chmap = NULL;
#endif
@@ -1162,11 +1163,7 @@ int main(int argc, char *argv[]) {
case 's':
speaker = atoi(optarg);
speaker = speaker < 1 ? 0 : speaker;
- speaker = speaker > channels ? 0 : speaker;
- if (speaker==0) {
- fprintf(stderr, _("Invalid parameter for -s option.\n"));
- exit(EXIT_FAILURE);
- }
+ speakeroptset = 1;
break;
case 'w':
given_test_wav_file = optarg;
@@ -1200,6 +1197,14 @@ int main(int argc, char *argv[]) {
exit(EXIT_SUCCESS);
}
+ if (speakeroptset) {
+ speaker = speaker > channels ? 0 : speaker;
+ if (speaker==0) {
+ fprintf(stderr, _("Invalid parameter for -s option.\n"));
+ exit(EXIT_FAILURE);
+ }
+ }
+
if (!force_frequency) {
freq = freq < 30.0 ? 30.0 : freq;
freq = freq > 8000.0 ? 8000.0 : freq;
--
2.5.3

View File

@ -1,50 +0,0 @@
From 5f0fc49a3ab9e9a66eb7a74582829c21556506a1 Mon Sep 17 00:00:00 2001
From: Alexander Volkov <a.volkov@rusbitech.ru>
Date: Mon, 21 Sep 2015 16:05:57 +0300
Subject: [PATCH] arecord: Remove only regular files
arecord removes a file before writing into it. It's not
appropriate in some cases. For example, if you a pass
a symlink to a file, then the symlink will be removed
while the user expects to record into the symlink's target.
Another case is recording into the device file. Some
modems provide a tty device file as a voice device.
And it's not possible to write into it under root with
arecord, because it removes the device file.
So check the type of a file before writing into it and
remove only regular files.
Signed-off-by: Alexander Volkov <a.volkov@rusbitech.ru>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
aplay/aplay.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/aplay/aplay.c b/aplay/aplay.c
index 459f7dd6f667..1b2cdfc527ca 100644
--- a/aplay/aplay.c
+++ b/aplay/aplay.c
@@ -2929,6 +2929,7 @@ static void capture(char *orig_name)
char *name = orig_name; /* current filename */
char namebuf[PATH_MAX+1];
off64_t count, rest; /* number of bytes to capture */
+ struct stat statbuf;
/* get number of bytes to capture */
count = calc_count();
@@ -2973,7 +2974,10 @@ static void capture(char *orig_name)
}
/* open a new file */
- remove(name);
+ if (!lstat(name, &statbuf)) {
+ if (S_ISREG(statbuf.st_mode))
+ remove(name);
+ }
fd = safe_open(name);
if (fd < 0) {
perror(name);
--
2.5.3

View File

@ -1,53 +0,0 @@
From cd1bb5f4a72c7364b2756db357d752a73baefc9b Mon Sep 17 00:00:00 2001
From: Ricard Wanderlof <ricard.wanderlof@axis.com>
Date: Tue, 15 Sep 2015 13:10:00 +0200
Subject: [PATCH] aplay: fix VU meter for S24_LE etc formats
When recording or playing back audio in a format where the number of
significant bits is less than the physical width (e.g. S24_LE), the VU
meter code needs to consider the number of significant bits in the samples
rather than the physical sample width (e.g. 24 vs 32 bits). Otherwise the
resulting VU meter display will be far too low and it will just indicate
0% all the time.
Tested with a device supporting the S24_LE format.
Signed-off-by: Ricard Wanderlof <ricardw@axis.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
aplay/aplay.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/aplay/aplay.c b/aplay/aplay.c
index 1b2cdfc527ca..7eacee3ca274 100644
--- a/aplay/aplay.c
+++ b/aplay/aplay.c
@@ -124,7 +124,7 @@ static int fatal_errors = 0;
static int verbose = 0;
static int vumeter = VUMETER_NONE;
static int buffer_pos = 0;
-static size_t bits_per_sample, bits_per_frame;
+static size_t significant_bits_per_sample, bits_per_sample, bits_per_frame;
static size_t chunk_bytes;
static int test_position = 0;
static int test_coef = 8;
@@ -1344,6 +1344,7 @@ static void set_params(void)
snd_pcm_dump(handle, log);
bits_per_sample = snd_pcm_format_physical_width(hwparams.format);
+ significant_bits_per_sample = snd_pcm_format_width(hwparams.format);
bits_per_frame = bits_per_sample * hwparams.channels;
chunk_bytes = chunk_size * bits_per_frame / 8;
audiobuf = realloc(audiobuf, chunk_bytes);
@@ -1745,7 +1746,7 @@ static void compute_max_peak(u_char *data, size_t count)
}
return;
}
- max = 1 << (bits_per_sample-1);
+ max = 1 << (significant_bits_per_sample-1);
if (max <= 0)
max = 0x7fffffff;
--
2.5.3

View File

@ -1,137 +0,0 @@
From 7d6673cc1388729a906a33a87cc9817d44e043ad Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Tue, 29 Sep 2015 17:26:34 +0200
Subject: [PATCH] alsactl: Manage both save and restore in a single unit
With RemainAfterExit=true, we can manage both save and restore of the
card state in a single unit file. This will fix also the case where
systemd reloads the service; with two individual units, it will
restore the previous state before saving, and may lead to inconsistent
state suddenly.
Also fix alsa-state.service as well to make both start and stop
working in a simpler way.
Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=929619
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
alsactl/Makefile.am | 14 ++------------
alsactl/alsa-restore.service.in | 7 +++----
alsactl/alsa-state.service.in | 3 ---
alsactl/alsa-store.service.in | 16 ----------------
4 files changed, 5 insertions(+), 35 deletions(-)
delete mode 100644 alsactl/alsa-store.service.in
diff --git a/alsactl/Makefile.am b/alsactl/Makefile.am
index 47f06e906ced..cac8094687de 100644
--- a/alsactl/Makefile.am
+++ b/alsactl/Makefile.am
@@ -25,20 +25,15 @@ if HAVE_SYSTEMD
systemdsystemunit_DATA = \
alsa-state.service \
- alsa-restore.service \
- alsa-store.service
+ alsa-restore.service
install-data-hook:
$(MKDIR_P) -m 0755 \
- $(DESTDIR)$(systemdsystemunitdir)/basic.target.wants \
- $(DESTDIR)$(systemdsystemunitdir)/shutdown.target.wants
+ $(DESTDIR)$(systemdsystemunitdir)/basic.target.wants
( cd $(DESTDIR)$(systemdsystemunitdir)/basic.target.wants && \
rm -f alsa-state.service alsa-restore.service && \
$(LN_S) ../alsa-state.service alsa-state.service && \
$(LN_S) ../alsa-restore.service alsa-restore.service)
- ( cd $(DESTDIR)$(systemdsystemunitdir)/shutdown.target.wants && \
- rm -f alsa-store.service && \
- $(LN_S) ../alsa-store.service alsa-store.service )
endif
@@ -54,22 +49,17 @@ alsa-state.service: alsa-state.service.in
alsa-restore.service: alsa-restore.service.in
$(edit)
-alsa-store.service: alsa-store.service.in
- $(edit)
-
90-alsa-restore.rules: 90-alsa-restore.rules.in
$(edit)
EXTRA_DIST += \
alsa-state.service.in \
alsa-restore.service.in \
- alsa-store.service.in \
90-alsa-restore.rules.in
CLEANFILES = \
alsa-state.service \
alsa-restore.service \
- alsa-store.service \
90-alsa-restore.rules
%.7: %.xml
diff --git a/alsactl/alsa-restore.service.in b/alsactl/alsa-restore.service.in
index d1a74d637457..2884098c26f0 100644
--- a/alsactl/alsa-restore.service.in
+++ b/alsactl/alsa-restore.service.in
@@ -4,15 +4,14 @@
#
[Unit]
-Description=Restore Sound Card State
+Description=Save/Restore Sound Card State
ConditionPathExists=!@daemonswitch@
ConditionPathExistsGlob=/dev/snd/control*
-DefaultDependencies=no
After=alsa-state.service
-Before=shutdown.target
-Conflicts=shutdown.target
[Service]
Type=oneshot
+RemainAfterExit=true
ExecStart=-@sbindir@/alsactl restore
+ExecStop=-@sbindir@/alsactl store
StandardOutput=syslog
diff --git a/alsactl/alsa-state.service.in b/alsactl/alsa-state.service.in
index 56c12c104565..f1321d63a0ca 100644
--- a/alsactl/alsa-state.service.in
+++ b/alsactl/alsa-state.service.in
@@ -6,10 +6,7 @@
[Unit]
Description=Manage Sound Card State (restore and store)
ConditionPathExists=@daemonswitch@
-DefaultDependencies=no
After=sysinit.target
-Before=shutdown.target
-Conflicts=shutdown.target
[Service]
Type=simple
diff --git a/alsactl/alsa-store.service.in b/alsactl/alsa-store.service.in
deleted file mode 100644
index c89cfff04f35..000000000000
--- a/alsactl/alsa-store.service.in
+++ /dev/null
@@ -1,16 +0,0 @@
-#
-# Note that two different ALSA card state management schemes exist and they
-# can be switched using a file exist check - /etc/alsa/state-daemon.conf .
-#
-
-[Unit]
-Description=Store Sound Card State
-ConditionPathExists=!@daemonswitch@
-ConditionPathExistsGlob=/dev/snd/control*
-DefaultDependencies=no
-Before=shutdown.target
-
-[Service]
-Type=oneshot
-ExecStart=@sbindir@/alsactl store
-StandardOutput=syslog
--
2.5.3

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:5160058f3e14483ced5de919dd473f93932059454530a9b7ef97dcabd6833e9b
size 1154497

3
alsa-utils-1.1.0.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3b1c3135b76e14532d3dd23fb15759ddd7daf9ffbc183f7a9a0a3a86374748f1
size 1181085

View File

@ -1,3 +1,28 @@
-------------------------------------------------------------------
Mon Nov 9 11:45:30 CET 2015 - tiwai@suse.de
- Update to alsa-utils 1.1.0:
including all previous fixes, update of topology tool, addition
of BAT (Basic Audio Tool)
- Split bat subpackage containing BAT
- Fix build of bat with old gcc & glibc on SLE11
0001-bat-Avoid-local-signal.h-file.patch
0002-bat-Don-t-pass-incompatible-function-pointers-to-pth.patch
- Dropped patches:
0001-amixer-Don-t-set-only-the-first-item-in-sset_enum.patch
0002-amixer-expand-local-storage-for-item-name-according-.patch
0003-alsa-info-Don-t-try-update-when-wget-isn-t-available.patch
0004-aplay-Fix-type-for-signal-flag.patch
0005-aplay-Fix-uninterruptible-aplay.patch
0006-alsactl-terminate-readlink-result-string.patch
0007-speaker-test-Add-option-to-specify-signal-scale.patch
0008-topology-Add-command-line-topology-tool-to-build-top.patch
0009-alsactl-Add-path-condition-to-alsa-store-and-alsa-re.patch
0010-speaker-test-fix-option-ordering.patch
0011-arecord-Remove-only-regular-files.patch
0012-aplay-fix-VU-meter-for-S24_LE-etc-formats.patch
0013-alsactl-Manage-both-save-and-restore-in-a-single-uni.patch
-------------------------------------------------------------------
Tue Sep 29 17:30:30 CEST 2015 - tiwai@suse.de

View File

@ -16,7 +16,7 @@
#
%define package_version 1.0.29
%define package_version 1.1.0
#
%if 0%{?suse_version} > 1130
%define use_systemd 1
@ -35,7 +35,7 @@ BuildRequires: systemd
%define _udevdir /lib/udev
%endif
Name: alsa-utils
Version: 1.0.29
Version: 1.1.0
Release: 0
Summary: Advanced Linux Sound Architecture Utilities
License: GPL-2.0+
@ -44,24 +44,12 @@ Url: http://www.alsa-project.org/
Source: ftp://ftp.alsa-project.org/pub/utils/alsa-utils-%{package_version}.tar.bz2
Source1: 01beep.conf
# Patch: alsa-utils-git-fixes.diff
# upstream fix patches
Patch1: 0001-amixer-Don-t-set-only-the-first-item-in-sset_enum.patch
Patch2: 0002-amixer-expand-local-storage-for-item-name-according-.patch
Patch3: 0003-alsa-info-Don-t-try-update-when-wget-isn-t-available.patch
Patch4: 0004-aplay-Fix-type-for-signal-flag.patch
Patch5: 0005-aplay-Fix-uninterruptible-aplay.patch
Patch6: 0006-alsactl-terminate-readlink-result-string.patch
Patch7: 0007-speaker-test-Add-option-to-specify-signal-scale.patch
Patch8: 0008-topology-Add-command-line-topology-tool-to-build-top.patch
Patch9: 0009-alsactl-Add-path-condition-to-alsa-store-and-alsa-re.patch
Patch10: 0010-speaker-test-fix-option-ordering.patch
Patch11: 0011-arecord-Remove-only-regular-files.patch
Patch12: 0012-aplay-fix-VU-meter-for-S24_LE-etc-formats.patch
Patch13: 0013-alsactl-Manage-both-save-and-restore-in-a-single-uni.patch
#
Patch1: 0001-bat-Avoid-local-signal.h-file.patch
Patch2: 0002-bat-Don-t-pass-incompatible-function-pointers-to-pth.patch
Patch99: alsa-utils-gettext-version-removal.diff
BuildRequires: alsa-devel
BuildRequires: automake
BuildRequires: fftw3-devel
BuildRequires: libsamplerate-devel
BuildRequires: ncurses-devel
BuildRequires: pkgconfig
@ -79,6 +67,17 @@ BuildRequires: pkgconfig(udev)
This package contains utility programs supporting ALSA, Advanced Linux
Sound Architecture.
%package -n bat
Summary: Command-line sound tester for ALSA sound card driver
Group: Productivity/Multimedia/Sound/Utilities
Requires: alsa-utils = %{version}
%description -n bat
BAT (Basic Audio Tester) is a simple command-line utility intended
to help automate audio driver and sound server testing with little human
interaction. BAT can be used to test audio quality, stress test features
and test audio before and after PM state changes.
%prep
%setup -q -n %{name}-%{package_version}
# fix stupid automake's automatic action
@ -87,17 +86,6 @@ sed -i -e's/EXTRA_DIST= config.rpath /EXTRA_DIST=/' Makefile.am
# patch -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1
%patch11 -p1
%patch12 -p1
%patch13 -p1
#
%if 0%{?suse_version} < 1020
%patch99 -p1
@ -143,9 +131,11 @@ mkdir -p %{buildroot}%{_localstatedir}/lib/alsa
%doc COPYING ChangeLog INSTALL README TODO
%doc seq/aconnect/README*
%doc seq/aseqnet/README*
%doc %{_mandir}/man*/*
%doc %{_mandir}/fr
%{_mandir}/man*/*
%{_mandir}/fr
%{_bindir}/*
%exclude %{_bindir}/bat
%exclude %{_mandir}/man*/bat.*
%{_sbindir}/*
%{_datadir}/sounds/alsa
%{_datadir}/alsa
@ -159,4 +149,9 @@ mkdir -p %{buildroot}%{_localstatedir}/lib/alsa
%{_localstatedir}/lib/alsa
%endif
%files -n bat
%defattr(-, root, root)
%{_bindir}/bat
%{_mandir}/man*/bat.*
%changelog