Move all to deprecated folder.
This commit is contained in:
@@ -0,0 +1,143 @@
|
||||
bat: Avoid local signal.h file
|
||||
|
||||
Patch backported from upstream:
|
||||
|
||||
http://git.alsa-project.org/?p=alsa-utils.git;a=commit;h=3bf8e79c3bfee3ca14277aad3d9c406dfc053bbf
|
||||
|
||||
Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
|
||||
|
||||
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 842ae6b..f0dc5ab 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 582c604..d31a633 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 0000000..a295517
|
||||
--- /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 a295517..0000000
|
||||
--- 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.4.10
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
bat: Don't pass incompatible function pointers to pthread_cleanup_push()
|
||||
|
||||
Patch backported from upstream:
|
||||
|
||||
http://git.alsa-project.org/?p=alsa-utils.git;a=commit;h=ed0cce1b6061aade0077982cb5d22fa68ddffd2f
|
||||
|
||||
Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
|
||||
|
||||
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 d31a633..5eaa25b 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.4.10
|
||||
|
||||
94
deprecated/firmware/buildroot/package/alsa-utils/Config.in
Normal file
94
deprecated/firmware/buildroot/package/alsa-utils/Config.in
Normal file
@@ -0,0 +1,94 @@
|
||||
comment "alsa-utils needs a toolchain w/ threads, dynamic library"
|
||||
depends on BR2_USE_MMU # fork
|
||||
depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS
|
||||
|
||||
menuconfig BR2_PACKAGE_ALSA_UTILS
|
||||
bool "alsa-utils"
|
||||
depends on BR2_USE_MMU # fork
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS # alsa-lib
|
||||
depends on !BR2_STATIC_LIBS # uses dlfcn.h
|
||||
select BR2_PACKAGE_ALSA_LIB
|
||||
select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
|
||||
help
|
||||
This package contains the command line utilities for the ALSA
|
||||
project.
|
||||
|
||||
http://www.alsa-project.org/
|
||||
|
||||
if BR2_PACKAGE_ALSA_UTILS
|
||||
|
||||
config BR2_PACKAGE_ALSA_UTILS_ALSACONF
|
||||
bool "alsaconf"
|
||||
|
||||
config BR2_PACKAGE_ALSA_UTILS_ACONNECT
|
||||
bool "aconnect"
|
||||
select BR2_PACKAGE_ALSA_LIB_SEQ
|
||||
|
||||
config BR2_PACKAGE_ALSA_UTILS_ALSACTL
|
||||
bool "alsactl"
|
||||
default y
|
||||
|
||||
config BR2_PACKAGE_ALSA_UTILS_ALSALOOP
|
||||
bool "alsaloop"
|
||||
|
||||
config BR2_PACKAGE_ALSA_UTILS_ALSAMIXER
|
||||
bool "alsamixer"
|
||||
select BR2_PACKAGE_NCURSES
|
||||
select BR2_PACKAGE_NCURSES_TARGET_PANEL
|
||||
select BR2_PACKAGE_NCURSES_TARGET_FORM
|
||||
select BR2_PACKAGE_NCURSES_TARGET_MENU
|
||||
select BR2_PACKAGE_ALSA_LIB_MIXER
|
||||
depends on BR2_USE_WCHAR
|
||||
default y
|
||||
|
||||
comment "alsamixer needs a toolchain w/ wchar"
|
||||
depends on !BR2_USE_WCHAR
|
||||
|
||||
config BR2_PACKAGE_ALSA_UTILS_ALSAUCM
|
||||
bool "alsaucm"
|
||||
|
||||
config BR2_PACKAGE_ALSA_UTILS_ALSATPLG
|
||||
bool "alsatplg"
|
||||
|
||||
config BR2_PACKAGE_ALSA_UTILS_AMIDI
|
||||
bool "amidi"
|
||||
select BR2_PACKAGE_ALSA_LIB_RAWMIDI
|
||||
select BR2_PACKAGE_ALSA_LIB_SEQ
|
||||
|
||||
config BR2_PACKAGE_ALSA_UTILS_AMIXER
|
||||
bool "amixer"
|
||||
select BR2_PACKAGE_ALSA_LIB_MIXER
|
||||
|
||||
config BR2_PACKAGE_ALSA_UTILS_APLAY
|
||||
bool "aplay/arecord"
|
||||
select BR2_PACKAGE_ALSA_LIB_PCM
|
||||
|
||||
config BR2_PACKAGE_ALSA_UTILS_APLAYMIDI
|
||||
bool "aplaymidi"
|
||||
select BR2_PACKAGE_ALSA_LIB_SEQ
|
||||
|
||||
config BR2_PACKAGE_ALSA_UTILS_ARECORDMIDI
|
||||
bool "arecordmidi"
|
||||
select BR2_PACKAGE_ALSA_LIB_SEQ
|
||||
|
||||
config BR2_PACKAGE_ALSA_UTILS_ASEQDUMP
|
||||
bool "aseqdump"
|
||||
select BR2_PACKAGE_ALSA_LIB_SEQ
|
||||
|
||||
config BR2_PACKAGE_ALSA_UTILS_ASEQNET
|
||||
bool "aseqnet"
|
||||
select BR2_PACKAGE_ALSA_LIB_SEQ
|
||||
|
||||
config BR2_PACKAGE_ALSA_UTILS_BAT
|
||||
bool "bat"
|
||||
select BR2_PACKAGE_FFTW
|
||||
|
||||
config BR2_PACKAGE_ALSA_UTILS_IECSET
|
||||
bool "iecset"
|
||||
select BR2_PACKAGE_ALSA_LIB_PCM
|
||||
|
||||
config BR2_PACKAGE_ALSA_UTILS_SPEAKER_TEST
|
||||
bool "speaker-test"
|
||||
select BR2_PACKAGE_ALSA_LIB_PCM
|
||||
|
||||
endif
|
||||
@@ -0,0 +1,2 @@
|
||||
# Locally calculated
|
||||
sha256 3b1c3135b76e14532d3dd23fb15759ddd7daf9ffbc183f7a9a0a3a86374748f1 alsa-utils-1.1.0.tar.bz2
|
||||
@@ -0,0 +1,86 @@
|
||||
################################################################################
|
||||
#
|
||||
# alsa-utils
|
||||
#
|
||||
################################################################################
|
||||
|
||||
ALSA_UTILS_VERSION = 1.1.0
|
||||
ALSA_UTILS_SOURCE = alsa-utils-$(ALSA_UTILS_VERSION).tar.bz2
|
||||
ALSA_UTILS_SITE = ftp://ftp.alsa-project.org/pub/utils
|
||||
ALSA_UTILS_LICENSE = GPLv2
|
||||
ALSA_UTILS_LICENSE_FILES = COPYING
|
||||
ALSA_UTILS_INSTALL_STAGING = YES
|
||||
ALSA_UTILS_DEPENDENCIES = host-gettext host-pkgconf alsa-lib \
|
||||
$(if $(BR2_PACKAGE_NCURSES),ncurses) \
|
||||
$(if $(BR2_PACKAGE_LIBSAMPLERATE),libsamplerate)
|
||||
# Regenerate aclocal.m4 to pick the patched
|
||||
# version of alsa.m4 from alsa-lib
|
||||
ALSA_UTILS_AUTORECONF = YES
|
||||
ALSA_UTILS_GETTEXTIZE = YES
|
||||
|
||||
ALSA_UTILS_CONF_ENV = \
|
||||
ac_cv_prog_ncurses5_config=$(STAGING_DIR)/usr/bin/$(NCURSES_CONFIG_SCRIPTS)
|
||||
|
||||
ALSA_UTILS_CONF_OPTS = \
|
||||
--disable-xmlto \
|
||||
--with-curses=$(if $(BR2_PACKAGE_NCURSES_WCHAR),ncursesw,ncurses)
|
||||
|
||||
ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y)
|
||||
ALSA_UTILS_DEPENDENCIES += gettext
|
||||
ALSA_UTILS_CONF_ENV += LIBS=-lintl
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_ALSA_UTILS_ALSALOOP),y)
|
||||
ALSA_UTILS_CONF_OPTS += --enable-alsaloop
|
||||
else
|
||||
ALSA_UTILS_CONF_OPTS += --disable-alsaloop
|
||||
endif
|
||||
|
||||
ifneq ($(BR2_PACKAGE_ALSA_UTILS_ALSAMIXER),y)
|
||||
ALSA_UTILS_CONF_OPTS += --disable-alsamixer --disable-alsatest
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_ALSA_UTILS_BAT),y)
|
||||
ALSA_UTILS_CONF_OPTS += --enable-bat
|
||||
ALSA_UTILS_DEPENDENCIES += fftw
|
||||
else
|
||||
ALSA_UTILS_CONF_OPTS += --disable-bat
|
||||
endif
|
||||
|
||||
ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_ALSACONF) += usr/sbin/alsaconf
|
||||
ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_ALSACTL) += usr/sbin/alsactl
|
||||
ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_ALSALOOP) += usr/bin/alsaloop
|
||||
ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_ALSAMIXER) += usr/bin/alsamixer
|
||||
ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_ALSATPLG) += usr/bin/alsatplg
|
||||
ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_AMIDI) += usr/bin/amidi
|
||||
ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_AMIXER) += usr/bin/amixer
|
||||
ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_APLAY) += usr/bin/aplay usr/bin/arecord
|
||||
ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_BAT) += usr/bin/bat
|
||||
ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_IECSET) += usr/bin/iecset
|
||||
ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_ACONNECT) += usr/bin/aconnect
|
||||
ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_ALSAUCM) += usr/bin/alsaucm
|
||||
ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_APLAYMIDI) += usr/bin/aplaymidi
|
||||
ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_ARECORDMIDI) += usr/bin/arecordmidi
|
||||
ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_ASEQDUMP) += usr/bin/aseqdump
|
||||
ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_ASEQNET) += usr/bin/aseqnet
|
||||
ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_SPEAKER_TEST) += usr/bin/speaker-test
|
||||
|
||||
define ALSA_UTILS_INSTALL_TARGET_CMDS
|
||||
mkdir -p $(TARGET_DIR)/var/lib/alsa
|
||||
for i in $(ALSA_UTILS_TARGETS_y); do \
|
||||
$(INSTALL) -D -m 755 $(STAGING_DIR)/$$i $(TARGET_DIR)/$$i || exit 1; \
|
||||
done
|
||||
if [ -x "$(TARGET_DIR)/usr/bin/speaker-test" ]; then \
|
||||
mkdir -p $(TARGET_DIR)/usr/share/alsa/speaker-test; \
|
||||
mkdir -p $(TARGET_DIR)/usr/share/sounds/alsa; \
|
||||
cp -rdpf $(STAGING_DIR)/usr/share/alsa/speaker-test/* $(TARGET_DIR)/usr/share/alsa/speaker-test/; \
|
||||
cp -rdpf $(STAGING_DIR)/usr/share/sounds/alsa/* $(TARGET_DIR)/usr/share/sounds/alsa/; \
|
||||
fi
|
||||
if [ -x "$(TARGET_DIR)/usr/sbin/alsactl" ]; then \
|
||||
mkdir -p $(TARGET_DIR)/usr/share/; \
|
||||
rm -rf $(TARGET_DIR)/usr/share/alsa/; \
|
||||
cp -rdpf $(STAGING_DIR)/usr/share/alsa/ $(TARGET_DIR)/usr/share/alsa/; \
|
||||
fi
|
||||
endef
|
||||
|
||||
$(eval $(autotools-package))
|
||||
Reference in New Issue
Block a user