forked from pool/alsa-utils
Accepting request 382596 from home:tiwai:branches:multimedia:libs
- Update to alsa-utils 1.1.1: including previous fixes, more enhancements / fixes of alsabat, fix in aplay for parsing parameter values - Delete obsoleted patches: 0001-bat-Avoid-local-signal.h-file.patch 0002-bat-Don-t-pass-incompatible-function-pointers-to-pth.patch 0003-alsa-info.sh-add-man-page.patch 0004-amixer-skip-showing-asoc-tlv-byte-controls.patch 0005-alsabat-rename-to-avoid-naming-conflict.patch OBS-URL: https://build.opensuse.org/request/show/382596 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/alsa-utils?expand=0&rev=130
This commit is contained in:
parent
73b5217264
commit
06ee278381
@ -1,135 +0,0 @@
|
|||||||
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
|
|
||||||
|
|
@ -1,53 +0,0 @@
|
|||||||
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
|
|
||||||
|
|
@ -1,90 +0,0 @@
|
|||||||
From d633469c9d55d8ec77c33eab04e0cd9ae0c10f6e Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jaroslav Kysela <perex@perex.cz>
|
|
||||||
Date: Wed, 13 Jan 2016 09:46:31 +0100
|
|
||||||
Subject: [PATCH] alsa-info.sh: add man page
|
|
||||||
|
|
||||||
---
|
|
||||||
alsa-info/Makefile.am | 1 +
|
|
||||||
alsa-info/alsa-info.sh.1 | 62 ++++++++++++++++++++++++++++++++++++++++++++++++
|
|
||||||
2 files changed, 63 insertions(+)
|
|
||||||
create mode 100644 alsa-info/alsa-info.sh.1
|
|
||||||
|
|
||||||
diff --git a/alsa-info/Makefile.am b/alsa-info/Makefile.am
|
|
||||||
index 356f1a9ae94b..c786361dc68c 100644
|
|
||||||
--- a/alsa-info/Makefile.am
|
|
||||||
+++ b/alsa-info/Makefile.am
|
|
||||||
@@ -1,2 +1,3 @@
|
|
||||||
EXTRA_DIST = alsa-info.sh
|
|
||||||
sbin_SCRIPTS = alsa-info.sh
|
|
||||||
+man_MANS = alsa-info.sh.1
|
|
||||||
diff --git a/alsa-info/alsa-info.sh.1 b/alsa-info/alsa-info.sh.1
|
|
||||||
new file mode 100644
|
|
||||||
index 000000000000..7168b3e061be
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/alsa-info/alsa-info.sh.1
|
|
||||||
@@ -0,0 +1,62 @@
|
|
||||||
+.TH ALSA-INFO.SH 1 "13 January 2016"
|
|
||||||
+.SH NAME
|
|
||||||
+alsa-info.sh \- command\-line utility to gather information about
|
|
||||||
+the ALSA subsystem
|
|
||||||
+.SH SYNOPSIS
|
|
||||||
+\fBalsa-info.sh\fP [\fIoptions\fP]
|
|
||||||
+
|
|
||||||
+.SH DESCRIPTION
|
|
||||||
+\fBalsa-info.sh\fP is a command\-line utility gathering information
|
|
||||||
+about the ALSA subsystem. It is used mostly for debugging purposes.
|
|
||||||
+
|
|
||||||
+.SH OPTIONS
|
|
||||||
+.TP
|
|
||||||
+\fI\-\-upload\fP
|
|
||||||
+Upload contents to the server (www.alsa-project.org or pastebin.ca).
|
|
||||||
+.TP
|
|
||||||
+\fI\-\-no-upload\fP
|
|
||||||
+Do not upload contents to the remote server.
|
|
||||||
+.TP
|
|
||||||
+\fI\-\-stdout\fP
|
|
||||||
+Print information to standard output.
|
|
||||||
+.TP
|
|
||||||
+\fI\-\-output FILE\fP
|
|
||||||
+Specify file for output in no-upload mode.
|
|
||||||
+.TP
|
|
||||||
+\fI\-\-debug\fP
|
|
||||||
+Run utility as normal, but will not delete file (usually
|
|
||||||
+/tmp/alsa-info.txt).
|
|
||||||
+.TP
|
|
||||||
+\fI\-\-with-aplay\fP
|
|
||||||
+Includes output from \fIaplay -l\fP.
|
|
||||||
+.TP
|
|
||||||
+\fI\-\-with-amixer\fP
|
|
||||||
+Includes output from \fIamixer\fP.
|
|
||||||
+.TP
|
|
||||||
+\fI\-\-with-alsactl\fP
|
|
||||||
+Includes output from \fIalsactl\fP.
|
|
||||||
+.TP
|
|
||||||
+\fI\-\-with-configs\fP
|
|
||||||
+Includes output from ~/.asoundrc and /etc/asound.conf if they exist.
|
|
||||||
+.TP
|
|
||||||
+\fI\-\-update\fP
|
|
||||||
+Check server for updates.
|
|
||||||
+.TP
|
|
||||||
+\fI\-\-about\fP
|
|
||||||
+Print information about authors.
|
|
||||||
+
|
|
||||||
+.SH EXAMPLES
|
|
||||||
+
|
|
||||||
+.TP
|
|
||||||
+\fBalsa-info.sh \-\-no-upload\fR
|
|
||||||
+Will gather all information and show the output file.
|
|
||||||
+
|
|
||||||
+.SH SEE ALSO
|
|
||||||
+\fB
|
|
||||||
+aplay(1)
|
|
||||||
+amixer(1)
|
|
||||||
+alsactl(1)
|
|
||||||
+\fP
|
|
||||||
+
|
|
||||||
+.SH AUTHOR
|
|
||||||
+\fBalsa-info.sh\fP was created by the ALSA team, see \fI\-\-about\fP .
|
|
||||||
--
|
|
||||||
2.7.0
|
|
||||||
|
|
@ -1,41 +0,0 @@
|
|||||||
From 18d5f52a61d0df7cf28456e264d7ab72c15984fb Mon Sep 17 00:00:00 2001
|
|
||||||
From: Vinod Koul <vinod.koul@intel.com>
|
|
||||||
Date: Thu, 28 Jan 2016 14:02:18 +0530
|
|
||||||
Subject: [PATCH] amixer: skip showing asoc tlv byte controls
|
|
||||||
|
|
||||||
ASoC TLV Byte controls are very large size controls so we should add new
|
|
||||||
options for these. So skip dumping contents for these.
|
|
||||||
|
|
||||||
$amixer -c0 cget numid=16
|
|
||||||
numid=16,iface=MIXER,name='mdl params'
|
|
||||||
; type=BYTES,access=-----RW-,values=30336
|
|
||||||
; ASoC TLV Byte control, skipping bytes dump
|
|
||||||
|
|
||||||
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
|
|
||||||
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
||||||
---
|
|
||||||
amixer/amixer.c | 8 ++++++++
|
|
||||||
1 file changed, 8 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/amixer/amixer.c b/amixer/amixer.c
|
|
||||||
index db1849333da3..f9b09cb54276 100644
|
|
||||||
--- a/amixer/amixer.c
|
|
||||||
+++ b/amixer/amixer.c
|
|
||||||
@@ -682,6 +682,14 @@ static int show_control(const char *space, snd_hctl_elem_t *elem,
|
|
||||||
__skip_read:
|
|
||||||
if (!snd_ctl_elem_info_is_tlv_readable(info))
|
|
||||||
goto __skip_tlv;
|
|
||||||
+ /* skip ASoC ext bytes controls that may have huge binary TLV data */
|
|
||||||
+ if (type == SND_CTL_ELEM_TYPE_BYTES &&
|
|
||||||
+ !snd_ctl_elem_info_is_readable(info) &&
|
|
||||||
+ !snd_ctl_elem_info_is_writable(info)) {
|
|
||||||
+ printf("%s; ASoC TLV Byte control, skipping bytes dump\n", space);
|
|
||||||
+ goto __skip_tlv;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
tlv = malloc(4096);
|
|
||||||
if ((err = snd_hctl_elem_tlv_read(elem, tlv, 4096)) < 0) {
|
|
||||||
error("Control %s element TLV read error: %s\n", card, snd_strerror(err));
|
|
||||||
--
|
|
||||||
2.7.0
|
|
||||||
|
|
@ -1,391 +0,0 @@
|
|||||||
From 9fa7f6fd0645f822793f8c51d3c3e090716108eb Mon Sep 17 00:00:00 2001
|
|
||||||
From: "Lu, Han" <han.lu@intel.com>
|
|
||||||
Date: Wed, 3 Feb 2016 14:20:33 +0800
|
|
||||||
Subject: [PATCH] alsabat: rename to avoid naming conflict
|
|
||||||
|
|
||||||
alsa-utils as well as bareos-bat (as well a some Bacula packages)
|
|
||||||
all contain a program called /usr/bin/bat, which causes conflicts on
|
|
||||||
various distributions ("basic audio tester" vs "bareos administration
|
|
||||||
tool"("bacula administration tool")).
|
|
||||||
Rename to avoid conflict.
|
|
||||||
|
|
||||||
Signed-off-by: Lu, Han <han.lu@intel.com>
|
|
||||||
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
|
||||||
---
|
|
||||||
bat/Makefile.am | 10 ++--
|
|
||||||
bat/alsabat.1 | 159 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
|
||||||
bat/bat.1 | 158 -------------------------------------------------------
|
|
||||||
bat/bat.c | 2 +-
|
|
||||||
4 files changed, 165 insertions(+), 164 deletions(-)
|
|
||||||
create mode 100644 bat/alsabat.1
|
|
||||||
delete mode 100644 bat/bat.1
|
|
||||||
|
|
||||||
diff --git a/bat/Makefile.am b/bat/Makefile.am
|
|
||||||
index f0dc5abbbe46..8dfafa99e179 100644
|
|
||||||
--- a/bat/Makefile.am
|
|
||||||
+++ b/bat/Makefile.am
|
|
||||||
@@ -1,9 +1,9 @@
|
|
||||||
-bin_PROGRAMS = bat
|
|
||||||
-man_MANS = bat.1
|
|
||||||
+bin_PROGRAMS = alsabat
|
|
||||||
+man_MANS = alsabat.1
|
|
||||||
|
|
||||||
-EXTRA_DIST = bat.1
|
|
||||||
+EXTRA_DIST = alsabat.1
|
|
||||||
|
|
||||||
-bat_SOURCES = \
|
|
||||||
+alsabat_SOURCES = \
|
|
||||||
bat.c \
|
|
||||||
common.c \
|
|
||||||
analyze.c \
|
|
||||||
@@ -21,4 +21,4 @@ noinst_HEADERS = \
|
|
||||||
AM_CPPFLAGS = \
|
|
||||||
-Wall -I$(top_srcdir)/include
|
|
||||||
|
|
||||||
-bat_LDADD = @FFTW_LIB@
|
|
||||||
+alsabat_LDADD = @FFTW_LIB@
|
|
||||||
diff --git a/bat/alsabat.1 b/bat/alsabat.1
|
|
||||||
new file mode 100644
|
|
||||||
index 000000000000..8d0b9c0b9c0e
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/bat/alsabat.1
|
|
||||||
@@ -0,0 +1,159 @@
|
|
||||||
+.TH ALSABAT 1 "20th October 2015"
|
|
||||||
+.SH NAME
|
|
||||||
+alsabat \- command\-line sound tester for ALSA sound card driver
|
|
||||||
+
|
|
||||||
+.SH SYNOPSIS
|
|
||||||
+\fBalsabat\fP [\fIflags\fP]
|
|
||||||
+
|
|
||||||
+.SH DESCRIPTION
|
|
||||||
+\fBALSABAT(ALSA Basic Audio Tester)\fP is a simple command\-line utility
|
|
||||||
+intended to help automate audio driver and sound server testing with little
|
|
||||||
+human interaction. ALSABAT can be used to test audio quality, stress test
|
|
||||||
+features and test audio before and after PM state changes.
|
|
||||||
+
|
|
||||||
+ALSABAT's design is relatively simple. ALSABAT plays an audio stream and
|
|
||||||
+captures the same stream in either a digital or analog loop back. It then
|
|
||||||
+compares the captured stream using a FFT to the original to determine if
|
|
||||||
+the test case passes or fails.
|
|
||||||
+
|
|
||||||
+ALSABAT can either run wholly on the target machine being tested (standalone
|
|
||||||
+mode) or can run as a client/server mode where by alsabat client runs on the
|
|
||||||
+target and runs as a server on a separate tester machine. The client/server
|
|
||||||
+mode still requires some manual interaction for synchronization, but this
|
|
||||||
+is actively being developed for future releases.
|
|
||||||
+
|
|
||||||
+The hardware testing configuration may require the use of an analog cable
|
|
||||||
+connecting target to tester machines or a cable to create an analog
|
|
||||||
+loopback if no loopback mode is not available on the sound hardware that
|
|
||||||
+is being tested.
|
|
||||||
+An analog loopback cable can be used to connect the "line in" to "line out"
|
|
||||||
+jacks to create a loopback. If only headphone and mic jacks (or combo jack)
|
|
||||||
+are available then the following simple circuit can be used to create an
|
|
||||||
+analog loopback :-
|
|
||||||
+
|
|
||||||
+https://source.android.com/devices/audio/loopback.html
|
|
||||||
+
|
|
||||||
+.SH OPTIONS
|
|
||||||
+.TP
|
|
||||||
+\fI\-h, \-\-help\fP
|
|
||||||
+Help: show syntax.
|
|
||||||
+.TP
|
|
||||||
+\fI\-D\fP
|
|
||||||
+Select sound card to be tested by name.
|
|
||||||
+.TP
|
|
||||||
+\fI\-P\fP
|
|
||||||
+Select the playback PCM device.
|
|
||||||
+.TP
|
|
||||||
+\fI\-C\fP
|
|
||||||
+Select the capture PCM device.
|
|
||||||
+.TP
|
|
||||||
+\fI\-f\fP
|
|
||||||
+Sample format
|
|
||||||
+.br
|
|
||||||
+Recognized sample formats are: U8 S16_LE S24_3LE S32_LE
|
|
||||||
+.br
|
|
||||||
+Some of these may not be available on selected hardware
|
|
||||||
+.br
|
|
||||||
+The available format shortcuts are:
|
|
||||||
+.nf
|
|
||||||
+\-f cd (16 bit little endian, 44100, stereo) [\-f S16_LE \-c2 \-r44100]
|
|
||||||
+\-f dat (16 bit little endian, 48000, stereo) [\-f S16_LE \-c2 \-r48000]
|
|
||||||
+.fi
|
|
||||||
+If no format is given S16_LE is used.
|
|
||||||
+.TP
|
|
||||||
+\fI\-c\fP
|
|
||||||
+The number of channels. The default is one channel.
|
|
||||||
+Valid values at the moment are 1 or 2.
|
|
||||||
+.TP
|
|
||||||
+\fI\-r\fP
|
|
||||||
+Sampling rate in Hertz. The default rate is 44100 Hertz.
|
|
||||||
+Valid values depends on hardware support.
|
|
||||||
+.TP
|
|
||||||
+\fI\-n\fP
|
|
||||||
+Duration of generated signal.
|
|
||||||
+The value could be either of the two forms:
|
|
||||||
+.br
|
|
||||||
+1. Decimal integer, means number of frames;
|
|
||||||
+.br
|
|
||||||
+2. Floating point with suffix 's', means number of seconds.
|
|
||||||
+.br
|
|
||||||
+The default is 2 seconds.
|
|
||||||
+.TP
|
|
||||||
+\fI\-k\fP
|
|
||||||
+Sigma k value for analysis.
|
|
||||||
+.br
|
|
||||||
+The analysis function reads data from WAV file, run FFT against the data
|
|
||||||
+to get magnitude of frequency vectors, and then calculates the average
|
|
||||||
+value and standard deviation of frequency vectors. After that, we define
|
|
||||||
+a threshold:
|
|
||||||
+.br
|
|
||||||
+threshold = k * standard_deviation + mean_value
|
|
||||||
+.br
|
|
||||||
+Frequencies with amplitude larger than threshold will be recognized as a
|
|
||||||
+peak, and the frequency with largest peak value will be recognized as a
|
|
||||||
+detected frequency.
|
|
||||||
+.br
|
|
||||||
+ALSABAT then compares the detected frequency to target frequency, to
|
|
||||||
+decide if the detecting passes or fails.
|
|
||||||
+.br
|
|
||||||
+The default value is 3.0.
|
|
||||||
+.TP
|
|
||||||
+\fI\-F\fP
|
|
||||||
+Target frequency for signal generation and analysis, in Hertz.
|
|
||||||
+The default is 997.0 Hertz.
|
|
||||||
+Valid range is (DC_THRESHOLD, 40% * Sampling rate).
|
|
||||||
+.TP
|
|
||||||
+\fI\-p\fP
|
|
||||||
+Total number of periods to play or capture.
|
|
||||||
+.TP
|
|
||||||
+\fI\-\-log=#\fP
|
|
||||||
+Write stderr and stdout output to this log file.
|
|
||||||
+.TP
|
|
||||||
+\fI\-\-file=#\fP
|
|
||||||
+Input WAV file for playback.
|
|
||||||
+.TP
|
|
||||||
+\fI\-\-saveplay=#\fP
|
|
||||||
+Target WAV file to save capture test content.
|
|
||||||
+.TP
|
|
||||||
+\fI\-\-local\fP
|
|
||||||
+Internal loopback mode.
|
|
||||||
+Playback, capture and analysis internal to ALSABAT only. This is intended
|
|
||||||
+for developers to test new ALSABAT features as no audio is routed outside
|
|
||||||
+of ALSABAT.
|
|
||||||
+
|
|
||||||
+.SH EXAMPLES
|
|
||||||
+
|
|
||||||
+.TP
|
|
||||||
+\fBalsabat \-P plughw:0,0 \-C plughw:0,0 \-c 2 \-f S32_LE \-F 250\fR
|
|
||||||
+Generate and play a sine wave of 250 Hertz with 2 channel and S32_LE format,
|
|
||||||
+and then capture and analyze.
|
|
||||||
+
|
|
||||||
+.TP
|
|
||||||
+\fBalsabat \-P plughw:0,0 \-C plughw:0,0 \-\-file 500Hz.wav\fR
|
|
||||||
+Play the RIFF WAV file "500Hz.wav" which contains 500 Hertz waveform LPCM
|
|
||||||
+data, and then capture and analyze.
|
|
||||||
+
|
|
||||||
+.SH RETURN VALUE
|
|
||||||
+.br
|
|
||||||
+On success, returns 0.
|
|
||||||
+.br
|
|
||||||
+If no peak be detected, returns -1001;
|
|
||||||
+.br
|
|
||||||
+If only DC be detected, returns -1002;
|
|
||||||
+.br
|
|
||||||
+If peak frequency does not match with the target frequency, returns -1003.
|
|
||||||
+
|
|
||||||
+.SH SEE ALSO
|
|
||||||
+\fB
|
|
||||||
+aplay(1)
|
|
||||||
+\fP
|
|
||||||
+
|
|
||||||
+.SH BUGS
|
|
||||||
+Currently only support RIFF WAV format with PCM data. Please report any bugs to
|
|
||||||
+the alsa-devel mailing list.
|
|
||||||
+
|
|
||||||
+.SH AUTHOR
|
|
||||||
+\fBalsabat\fP is by Liam Girdwood <liam.r.girdwood@linux.intel.com>, Bernard
|
|
||||||
+Gautier <bernard.gautier@intel.com> and Han Lu <han.lu@intel.com>.
|
|
||||||
+This document is by Liam Girdwood <liam.r.girdwood@linux.intel.com> and Han Lu
|
|
||||||
+<han.lu@intel.com>.
|
|
||||||
diff --git a/bat/bat.1 b/bat/bat.1
|
|
||||||
deleted file mode 100644
|
|
||||||
index e00fc272acdc..000000000000
|
|
||||||
--- a/bat/bat.1
|
|
||||||
+++ /dev/null
|
|
||||||
@@ -1,158 +0,0 @@
|
|
||||||
-.TH BAT 1 "20th October 2015"
|
|
||||||
-.SH NAME
|
|
||||||
-bat \- command\-line sound tester for ALSA sound card driver
|
|
||||||
-
|
|
||||||
-.SH SYNOPSIS
|
|
||||||
-\fBbat\fP [\fIflags\fP]
|
|
||||||
-
|
|
||||||
-.SH DESCRIPTION
|
|
||||||
-\fBBAT(Basic Audio Tester)\fP 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.
|
|
||||||
-
|
|
||||||
-BAT's design is relatively simple. BAT plays an audio stream and captures
|
|
||||||
-the same stream in either a digital or analog loop back. It then compares
|
|
||||||
-the captured stream using a FFT to the original to determine if the test
|
|
||||||
-case passes or fails.
|
|
||||||
-
|
|
||||||
-BAT can either run wholly on the target machine being tested (standalone
|
|
||||||
-mode) or can run as a client/server mode where by bat client runs on the
|
|
||||||
-target and runs as a server on a separate tester machine. The client/server
|
|
||||||
-mode still requires some manual interaction for synchronization, but this
|
|
||||||
-is actively being developed for future releases.
|
|
||||||
-
|
|
||||||
-The hardware testing configuration may require the use of an analog cable
|
|
||||||
-connecting target to tester machines or a cable to create an analog
|
|
||||||
-loopback if no loopback mode is not available on the sound hardware that
|
|
||||||
-is being tested.
|
|
||||||
-An analog loopback cable can be used to connect the "line in" to "line out"
|
|
||||||
-jacks to create a loopback. If only headphone and mic jacks (or combo jack)
|
|
||||||
-are available then the following simple circuit can be used to create an
|
|
||||||
-analog loopback :-
|
|
||||||
-
|
|
||||||
-https://source.android.com/devices/audio/loopback.html
|
|
||||||
-
|
|
||||||
-.SH OPTIONS
|
|
||||||
-.TP
|
|
||||||
-\fI\-h, \-\-help\fP
|
|
||||||
-Help: show syntax.
|
|
||||||
-.TP
|
|
||||||
-\fI\-D\fP
|
|
||||||
-Select sound card to be tested by name.
|
|
||||||
-.TP
|
|
||||||
-\fI\-P\fP
|
|
||||||
-Select the playback PCM device.
|
|
||||||
-.TP
|
|
||||||
-\fI\-C\fP
|
|
||||||
-Select the capture PCM device.
|
|
||||||
-.TP
|
|
||||||
-\fI\-f\fP
|
|
||||||
-Sample format
|
|
||||||
-.br
|
|
||||||
-Recognized sample formats are: U8 S16_LE S24_3LE S32_LE
|
|
||||||
-.br
|
|
||||||
-Some of these may not be available on selected hardware
|
|
||||||
-.br
|
|
||||||
-The available format shortcuts are:
|
|
||||||
-.nf
|
|
||||||
-\-f cd (16 bit little endian, 44100, stereo) [\-f S16_LE \-c2 \-r44100]
|
|
||||||
-\-f dat (16 bit little endian, 48000, stereo) [\-f S16_LE \-c2 \-r48000]
|
|
||||||
-.fi
|
|
||||||
-If no format is given S16_LE is used.
|
|
||||||
-.TP
|
|
||||||
-\fI\-c\fP
|
|
||||||
-The number of channels. The default is one channel.
|
|
||||||
-Valid values at the moment are 1 or 2.
|
|
||||||
-.TP
|
|
||||||
-\fI\-r\fP
|
|
||||||
-Sampling rate in Hertz. The default rate is 44100 Hertz.
|
|
||||||
-Valid values depends on hardware support.
|
|
||||||
-.TP
|
|
||||||
-\fI\-n\fP
|
|
||||||
-Duration of generated signal.
|
|
||||||
-The value could be either of the two forms:
|
|
||||||
-.br
|
|
||||||
-1. Decimal integer, means number of frames;
|
|
||||||
-.br
|
|
||||||
-2. Floating point with suffix 's', means number of seconds.
|
|
||||||
-.br
|
|
||||||
-The default is 2 seconds.
|
|
||||||
-.TP
|
|
||||||
-\fI\-k\fP
|
|
||||||
-Sigma k value for analysis.
|
|
||||||
-.br
|
|
||||||
-The analysis function reads data from WAV file, run FFT against the data
|
|
||||||
-to get magnitude of frequency vectors, and then calculates the average
|
|
||||||
-value and standard deviation of frequency vectors. After that, we define
|
|
||||||
-a threshold:
|
|
||||||
-.br
|
|
||||||
-threshold = k * standard_deviation + mean_value
|
|
||||||
-.br
|
|
||||||
-Frequencies with amplitude larger than threshold will be recognized as a
|
|
||||||
-peak, and the frequency with largest peak value will be recognized as a
|
|
||||||
-detected frequency.
|
|
||||||
-.br
|
|
||||||
-BAT then compares the detected frequency to target frequency, to decide
|
|
||||||
-if the detecting passes or fails.
|
|
||||||
-.br
|
|
||||||
-The default value is 3.0.
|
|
||||||
-.TP
|
|
||||||
-\fI\-F\fP
|
|
||||||
-Target frequency for signal generation and analysis, in Hertz.
|
|
||||||
-The default is 997.0 Hertz.
|
|
||||||
-Valid range is (DC_THRESHOLD, 40% * Sampling rate).
|
|
||||||
-.TP
|
|
||||||
-\fI\-p\fP
|
|
||||||
-Total number of periods to play or capture.
|
|
||||||
-.TP
|
|
||||||
-\fI\-\-log=#\fP
|
|
||||||
-Write stderr and stdout output to this log file.
|
|
||||||
-.TP
|
|
||||||
-\fI\-\-file=#\fP
|
|
||||||
-Input WAV file for playback.
|
|
||||||
-.TP
|
|
||||||
-\fI\-\-saveplay=#\fP
|
|
||||||
-Target WAV file to save capture test content.
|
|
||||||
-.TP
|
|
||||||
-\fI\-\-local\fP
|
|
||||||
-Internal loopback mode.
|
|
||||||
-Playback, capture and analysis internal to BAT only. This is intended for
|
|
||||||
-developers to test new BAT features as no audio is routed outside of BAT.
|
|
||||||
-
|
|
||||||
-.SH EXAMPLES
|
|
||||||
-
|
|
||||||
-.TP
|
|
||||||
-\fBbat \-P plughw:0,0 \-C plughw:0,0 \-c 2 \-f S32_LE \-F 250\fR
|
|
||||||
-Generate and play a sine wave of 250 Hertz with 2 channel and S32_LE format,
|
|
||||||
-and then capture and analyze.
|
|
||||||
-
|
|
||||||
-.TP
|
|
||||||
-\fBbat \-P plughw:0,0 \-C plughw:0,0 \-\-file 500Hz.wav\fR
|
|
||||||
-Play the RIFF WAV file "500Hz.wav" which contains 500 Hertz waveform LPCM
|
|
||||||
-data, and then capture and analyze.
|
|
||||||
-
|
|
||||||
-.SH RETURN VALUE
|
|
||||||
-.br
|
|
||||||
-On success, returns 0.
|
|
||||||
-.br
|
|
||||||
-If no peak be detected, returns -1001;
|
|
||||||
-.br
|
|
||||||
-If only DC be detected, returns -1002;
|
|
||||||
-.br
|
|
||||||
-If peak frequency does not match with the target frequency, returns -1003.
|
|
||||||
-
|
|
||||||
-.SH SEE ALSO
|
|
||||||
-\fB
|
|
||||||
-aplay(1)
|
|
||||||
-\fP
|
|
||||||
-
|
|
||||||
-.SH BUGS
|
|
||||||
-Currently only support RIFF WAV format with PCM data. Please report any bugs to
|
|
||||||
-the alsa-devel mailing list.
|
|
||||||
-
|
|
||||||
-.SH AUTHOR
|
|
||||||
-\fBbat\fP is by Liam Girdwood <liam.r.girdwood@linux.intel.com>, Bernard Gautier
|
|
||||||
-<bernard.gautier@intel.com> and Han Lu <han.lu@intel.com>.
|
|
||||||
-This document is by Liam Girdwood <liam.r.girdwood@linux.intel.com> and Han Lu
|
|
||||||
-<han.lu@intel.com>.
|
|
||||||
diff --git a/bat/bat.c b/bat/bat.c
|
|
||||||
index 086b9fa4514d..ddb60b753009 100644
|
|
||||||
--- a/bat/bat.c
|
|
||||||
+++ b/bat/bat.c
|
|
||||||
@@ -272,7 +272,7 @@ static void test_capture(struct bat *bat)
|
|
||||||
static void usage(struct bat *bat)
|
|
||||||
{
|
|
||||||
fprintf(bat->log,
|
|
||||||
-_("Usage: bat [-options]...\n"
|
|
||||||
+_("Usage: alsabat [-options]...\n"
|
|
||||||
"\n"
|
|
||||||
" -h, --help this help\n"
|
|
||||||
" -D pcm device for both playback and capture\n"
|
|
||||||
--
|
|
||||||
2.7.0
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:3b1c3135b76e14532d3dd23fb15759ddd7daf9ffbc183f7a9a0a3a86374748f1
|
|
||||||
size 1181085
|
|
3
alsa-utils-1.1.1.tar.bz2
Normal file
3
alsa-utils-1.1.1.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:89757c9abaf420831b088fce354d492acc170bd02bb50eb7392c175f594b8041
|
||||||
|
size 1186408
|
@ -1,3 +1,16 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Mar 31 15:24:55 CEST 2016 - tiwai@suse.de
|
||||||
|
|
||||||
|
- Update to alsa-utils 1.1.1:
|
||||||
|
including previous fixes, more enhancements / fixes of alsabat,
|
||||||
|
fix in aplay for parsing parameter values
|
||||||
|
- Delete obsoleted patches:
|
||||||
|
0001-bat-Avoid-local-signal.h-file.patch
|
||||||
|
0002-bat-Don-t-pass-incompatible-function-pointers-to-pth.patch
|
||||||
|
0003-alsa-info.sh-add-man-page.patch
|
||||||
|
0004-amixer-skip-showing-asoc-tlv-byte-controls.patch
|
||||||
|
0005-alsabat-rename-to-avoid-naming-conflict.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Feb 3 18:04:00 CET 2016 - tiwai@suse.de
|
Wed Feb 3 18:04:00 CET 2016 - tiwai@suse.de
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
%define package_version 1.1.0
|
%define package_version 1.1.1
|
||||||
#
|
#
|
||||||
%if 0%{?suse_version} > 1130
|
%if 0%{?suse_version} > 1130
|
||||||
%define use_systemd 1
|
%define use_systemd 1
|
||||||
@ -35,7 +35,7 @@ BuildRequires: systemd
|
|||||||
%define _udevdir /lib/udev
|
%define _udevdir /lib/udev
|
||||||
%endif
|
%endif
|
||||||
Name: alsa-utils
|
Name: alsa-utils
|
||||||
Version: 1.1.0
|
Version: 1.1.1
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Advanced Linux Sound Architecture Utilities
|
Summary: Advanced Linux Sound Architecture Utilities
|
||||||
License: GPL-2.0+
|
License: GPL-2.0+
|
||||||
@ -44,11 +44,6 @@ Url: http://www.alsa-project.org/
|
|||||||
Source: ftp://ftp.alsa-project.org/pub/utils/alsa-utils-%{package_version}.tar.bz2
|
Source: ftp://ftp.alsa-project.org/pub/utils/alsa-utils-%{package_version}.tar.bz2
|
||||||
Source1: 01beep.conf
|
Source1: 01beep.conf
|
||||||
# Patch: alsa-utils-git-fixes.diff
|
# Patch: alsa-utils-git-fixes.diff
|
||||||
Patch1: 0001-bat-Avoid-local-signal.h-file.patch
|
|
||||||
Patch2: 0002-bat-Don-t-pass-incompatible-function-pointers-to-pth.patch
|
|
||||||
Patch3: 0003-alsa-info.sh-add-man-page.patch
|
|
||||||
Patch4: 0004-amixer-skip-showing-asoc-tlv-byte-controls.patch
|
|
||||||
Patch5: 0005-alsabat-rename-to-avoid-naming-conflict.patch
|
|
||||||
Patch99: alsa-utils-gettext-version-removal.diff
|
Patch99: alsa-utils-gettext-version-removal.diff
|
||||||
BuildRequires: alsa-devel
|
BuildRequires: alsa-devel
|
||||||
BuildRequires: automake
|
BuildRequires: automake
|
||||||
@ -88,11 +83,6 @@ and test audio before and after PM state changes.
|
|||||||
sed -i -e's/EXTRA_DIST= config.rpath /EXTRA_DIST=/' Makefile.am
|
sed -i -e's/EXTRA_DIST= config.rpath /EXTRA_DIST=/' Makefile.am
|
||||||
# rm -f po/Makefile* po/*.gmo po/*.pot po/*.header po/stamp-*
|
# rm -f po/Makefile* po/*.gmo po/*.pot po/*.header po/stamp-*
|
||||||
# patch -p1
|
# patch -p1
|
||||||
%patch1 -p1
|
|
||||||
%patch2 -p1
|
|
||||||
%patch3 -p1
|
|
||||||
%patch4 -p1
|
|
||||||
%patch5 -p1
|
|
||||||
#
|
#
|
||||||
%if 0%{?suse_version} < 1020
|
%if 0%{?suse_version} < 1020
|
||||||
%patch99 -p1
|
%patch99 -p1
|
||||||
|
Loading…
Reference in New Issue
Block a user