Sync from SUSE:SLFO:Main alsa-utils revision dd1f1399c1e8b9663ad6e664343e2db2
This commit is contained in:
commit
bdbff3adb0
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
229
0001-axfer-use-ATTRIBUTE_UNUSED-instead-remove-argument-n.patch
Normal file
229
0001-axfer-use-ATTRIBUTE_UNUSED-instead-remove-argument-n.patch
Normal file
@ -0,0 +1,229 @@
|
||||
From a90faa2dd644af585d6a00f0aaf297c15ea0aa7b Mon Sep 17 00:00:00 2001
|
||||
From: Jaroslav Kysela <perex@perex.cz>
|
||||
Date: Mon, 4 Sep 2023 16:33:47 +0200
|
||||
Subject: [PATCH] axfer: use ATTRIBUTE_UNUSED instead remove argument name
|
||||
|
||||
We need to support older compilers than GCC 11.
|
||||
|
||||
Link: https://github.com/alsa-project/alsa-utils/issues/233
|
||||
Fixes: ad5a1c0 ("axfer: fix the verbose compilation warnings for latest gcc")
|
||||
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
||||
---
|
||||
axfer/container-raw.c | 14 +++++++-------
|
||||
axfer/mapper-single.c | 6 +++---
|
||||
axfer/subcmd-list.c | 2 +-
|
||||
axfer/subcmd-transfer.c | 4 ++--
|
||||
axfer/waiter-poll.c | 4 ++--
|
||||
axfer/waiter-select.c | 4 ++--
|
||||
axfer/waiter.h | 1 +
|
||||
axfer/xfer-libasound-irq-rw.c | 2 +-
|
||||
axfer/xfer-libasound.c | 4 ++--
|
||||
axfer/xfer-options.c | 3 ++-
|
||||
10 files changed, 23 insertions(+), 21 deletions(-)
|
||||
|
||||
diff --git a/axfer/container-raw.c b/axfer/container-raw.c
|
||||
index 071f94cb244a..18860455c2eb 100644
|
||||
--- a/axfer/container-raw.c
|
||||
+++ b/axfer/container-raw.c
|
||||
@@ -13,10 +13,10 @@
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
|
||||
-static int raw_builder_pre_process(struct container_context *,
|
||||
- snd_pcm_format_t *,
|
||||
- unsigned int *,
|
||||
- unsigned int *,
|
||||
+static int raw_builder_pre_process(struct container_context *cntr ATTRIBUTE_UNUSED,
|
||||
+ snd_pcm_format_t *format ATTRIBUTE_UNUSED,
|
||||
+ unsigned int *samples_per_frame ATTRIBUTE_UNUSED,
|
||||
+ unsigned int *frames_per_second ATTRIBUTE_UNUSED,
|
||||
uint64_t *byte_count)
|
||||
{
|
||||
*byte_count = UINT64_MAX;
|
||||
@@ -25,9 +25,9 @@ static int raw_builder_pre_process(struct container_context *,
|
||||
}
|
||||
|
||||
static int raw_parser_pre_process(struct container_context *cntr,
|
||||
- snd_pcm_format_t *,
|
||||
- unsigned int *,
|
||||
- unsigned int *,
|
||||
+ snd_pcm_format_t *format ATTRIBUTE_UNUSED,
|
||||
+ unsigned int *samples_per_frame ATTRIBUTE_UNUSED,
|
||||
+ unsigned int *frames_per_second ATTRIBUTE_UNUSED,
|
||||
uint64_t *byte_count)
|
||||
{
|
||||
struct stat buf = {0};
|
||||
diff --git a/axfer/mapper-single.c b/axfer/mapper-single.c
|
||||
index 13e7fc5cfd42..f669f7fed549 100644
|
||||
--- a/axfer/mapper-single.c
|
||||
+++ b/axfer/mapper-single.c
|
||||
@@ -62,7 +62,7 @@ static void align_from_vector(void *frame_buf, unsigned int frame_count,
|
||||
|
||||
static int single_pre_process(struct mapper_context *mapper,
|
||||
struct container_context *cntrs,
|
||||
- unsigned int)
|
||||
+ unsigned int cntr_count ATTRIBUTE_UNUSED)
|
||||
{
|
||||
struct single_state *state = mapper->private_data;
|
||||
unsigned int bytes_per_buffer;
|
||||
@@ -110,7 +110,7 @@ static int single_muxer_process_frames(struct mapper_context *mapper,
|
||||
void *frame_buf,
|
||||
unsigned int *frame_count,
|
||||
struct container_context *cntrs,
|
||||
- unsigned int)
|
||||
+ unsigned int cntr_count ATTRIBUTE_UNUSED)
|
||||
{
|
||||
struct single_state *state = mapper->private_data;
|
||||
void *src;
|
||||
@@ -141,7 +141,7 @@ static int single_demuxer_process_frames(struct mapper_context *mapper,
|
||||
void *frame_buf,
|
||||
unsigned int *frame_count,
|
||||
struct container_context *cntrs,
|
||||
- unsigned int)
|
||||
+ unsigned int cntr_count ATTRIBUTE_UNUSED)
|
||||
{
|
||||
struct single_state *state = mapper->private_data;
|
||||
void *dst;
|
||||
diff --git a/axfer/subcmd-list.c b/axfer/subcmd-list.c
|
||||
index f9c8e0f931e1..187e1d7ce477 100644
|
||||
--- a/axfer/subcmd-list.c
|
||||
+++ b/axfer/subcmd-list.c
|
||||
@@ -19,7 +19,7 @@ enum list_op {
|
||||
};
|
||||
|
||||
static int dump_device(snd_ctl_t *handle, const char *id, const char *name,
|
||||
- snd_pcm_stream_t, snd_pcm_info_t *info)
|
||||
+ snd_pcm_stream_t stream ATTRIBUTE_UNUSED, snd_pcm_info_t *info)
|
||||
{
|
||||
unsigned int i, count;
|
||||
int err;
|
||||
diff --git a/axfer/subcmd-transfer.c b/axfer/subcmd-transfer.c
|
||||
index b39fde86ac82..8d63043d15a5 100644
|
||||
--- a/axfer/subcmd-transfer.c
|
||||
+++ b/axfer/subcmd-transfer.c
|
||||
@@ -40,7 +40,7 @@ static void handle_unix_signal_for_finish(int sig)
|
||||
ctx_ptr->interrupted = true;
|
||||
}
|
||||
|
||||
-static void handle_unix_signal_for_suspend(int)
|
||||
+static void handle_unix_signal_for_suspend(int sig ATTRIBUTE_UNUSED)
|
||||
{
|
||||
sigset_t curr, prev;
|
||||
struct sigaction sa = {0};
|
||||
@@ -439,7 +439,7 @@ static int context_process_frames(struct context *ctx,
|
||||
}
|
||||
|
||||
static void context_post_process(struct context *ctx,
|
||||
- uint64_t)
|
||||
+ uint64_t accumulated_frame_count ATTRIBUTE_UNUSED)
|
||||
{
|
||||
uint64_t total_frame_count;
|
||||
unsigned int i;
|
||||
diff --git a/axfer/waiter-poll.c b/axfer/waiter-poll.c
|
||||
index 31fab88717a9..b81300cd6e93 100644
|
||||
--- a/axfer/waiter-poll.c
|
||||
+++ b/axfer/waiter-poll.c
|
||||
@@ -13,7 +13,7 @@
|
||||
#include <errno.h>
|
||||
#include <poll.h>
|
||||
|
||||
-static int poll_prepare(struct waiter_context *)
|
||||
+static int poll_prepare(struct waiter_context *waiter ATTRIBUTE_UNUSED)
|
||||
{
|
||||
// Nothing to do because an instance of waiter has required data.
|
||||
return 0;
|
||||
@@ -30,7 +30,7 @@ static int poll_wait_event(struct waiter_context *waiter, int timeout_msec)
|
||||
return err;
|
||||
}
|
||||
|
||||
-static void poll_release(struct waiter_context *)
|
||||
+static void poll_release(struct waiter_context *waiter ATTRIBUTE_UNUSED)
|
||||
{
|
||||
// Nothing to do because an instance of waiter has required data.
|
||||
return;
|
||||
diff --git a/axfer/waiter-select.c b/axfer/waiter-select.c
|
||||
index 164c9c8a1a27..fe19776bc1f3 100644
|
||||
--- a/axfer/waiter-select.c
|
||||
+++ b/axfer/waiter-select.c
|
||||
@@ -34,7 +34,7 @@ struct select_state {
|
||||
fd_set rfds_ex;
|
||||
};
|
||||
|
||||
-static int select_prepare(struct waiter_context *)
|
||||
+static int select_prepare(struct waiter_context *waiter ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@@ -94,7 +94,7 @@ static int select_wait_event(struct waiter_context *waiter, int timeout_msec)
|
||||
return err;
|
||||
}
|
||||
|
||||
-static void select_release(struct waiter_context *)
|
||||
+static void select_release(struct waiter_context *waiter ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return;
|
||||
}
|
||||
diff --git a/axfer/waiter.h b/axfer/waiter.h
|
||||
index db18e33e337f..0f4e9b9f0548 100644
|
||||
--- a/axfer/waiter.h
|
||||
+++ b/axfer/waiter.h
|
||||
@@ -9,6 +9,7 @@
|
||||
#ifndef __ALSA_UTILS_AXFER_WAITER__H_
|
||||
#define __ALSA_UTILS_AXFER_WAITER__H_
|
||||
|
||||
+#include <alsa/global.h>
|
||||
#include <poll.h>
|
||||
|
||||
enum waiter_type {
|
||||
diff --git a/axfer/xfer-libasound-irq-rw.c b/axfer/xfer-libasound-irq-rw.c
|
||||
index b7f0645e885a..45fb6d5ee358 100644
|
||||
--- a/axfer/xfer-libasound-irq-rw.c
|
||||
+++ b/axfer/xfer-libasound-irq-rw.c
|
||||
@@ -313,7 +313,7 @@ error:
|
||||
}
|
||||
|
||||
static int w_process_frames_nonblocking(struct libasound_state *state,
|
||||
- snd_pcm_state_t,
|
||||
+ snd_pcm_state_t pcm_state ATTRIBUTE_UNUSED,
|
||||
unsigned int *frame_count,
|
||||
struct mapper_context *mapper,
|
||||
struct container_context *cntrs)
|
||||
diff --git a/axfer/xfer-libasound.c b/axfer/xfer-libasound.c
|
||||
index 9713533897a2..36ee08d7054b 100644
|
||||
--- a/axfer/xfer-libasound.c
|
||||
+++ b/axfer/xfer-libasound.c
|
||||
@@ -60,7 +60,7 @@ static const struct option l_opts[] = {
|
||||
};
|
||||
|
||||
static int xfer_libasound_init(struct xfer_context *xfer,
|
||||
- snd_pcm_stream_t)
|
||||
+ snd_pcm_stream_t stream ATTRIBUTE_UNUSED)
|
||||
{
|
||||
struct libasound_state *state = xfer->private_data;
|
||||
int err;
|
||||
@@ -887,7 +887,7 @@ static void xfer_libasound_destroy(struct xfer_context *xfer)
|
||||
state->log = NULL;
|
||||
}
|
||||
|
||||
-static void xfer_libasound_help(struct xfer_context *)
|
||||
+static void xfer_libasound_help(struct xfer_context *xfer ATTRIBUTE_UNUSED)
|
||||
{
|
||||
printf(
|
||||
" [BASICS]\n"
|
||||
diff --git a/axfer/xfer-options.c b/axfer/xfer-options.c
|
||||
index 974570c817fe..e716dede765c 100644
|
||||
--- a/axfer/xfer-options.c
|
||||
+++ b/axfer/xfer-options.c
|
||||
@@ -447,7 +447,8 @@ static int generate_path_with_suffix(struct xfer_context *xfer,
|
||||
|
||||
static int generate_path_without_suffix(struct xfer_context *xfer,
|
||||
const char *template,
|
||||
- unsigned int index, const char *)
|
||||
+ unsigned int index,
|
||||
+ const char *suffix ATTRIBUTE_UNUSED)
|
||||
{
|
||||
static const char *const single_format = "%s";
|
||||
static const char *const multiple_format = "%s-%i";
|
||||
--
|
||||
2.35.3
|
||||
|
@ -0,0 +1,30 @@
|
||||
From 2db896afd475b0b3ad07e97ba74ec9680b4f7f6d Mon Sep 17 00:00:00 2001
|
||||
From: Jaroslav Kysela <perex@perex.cz>
|
||||
Date: Mon, 4 Sep 2023 16:37:24 +0200
|
||||
Subject: [PATCH] amidi: use ATTRIBUTE_UNUSED instead remove argument name
|
||||
|
||||
We need to support older compilers than GCC 11.
|
||||
|
||||
Link: https://github.com/alsa-project/alsa-utils/issues/233
|
||||
Fixes: 1843540 ("amidi: fix the verbose compilation warnings for latest gcc")
|
||||
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
||||
---
|
||||
amidi/amidi.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/amidi/amidi.c b/amidi/amidi.c
|
||||
index f930ca8ef30b..75fb8c0a42a3 100644
|
||||
--- a/amidi/amidi.c
|
||||
+++ b/amidi/amidi.c
|
||||
@@ -446,7 +446,7 @@ static void print_byte(unsigned char byte, struct timespec *ts)
|
||||
printf("%02X", byte);
|
||||
}
|
||||
|
||||
-static void sig_handler(int)
|
||||
+static void sig_handler(int sig ATTRIBUTE_UNUSED)
|
||||
{
|
||||
stop = 1;
|
||||
}
|
||||
--
|
||||
2.35.3
|
||||
|
@ -0,0 +1,53 @@
|
||||
From 7552aef6e08b5b1fd8c1704e21cb9f6f15017bfa Mon Sep 17 00:00:00 2001
|
||||
From: Jaroslav Kysela <perex@perex.cz>
|
||||
Date: Mon, 4 Sep 2023 16:45:09 +0200
|
||||
Subject: [PATCH] alsaloop: use ATTRIBUTE_UNUSED instead remove argument name
|
||||
|
||||
We need to support older compilers than GCC 11.
|
||||
|
||||
Link: https://github.com/alsa-project/alsa-utils/issues/233
|
||||
Fixes: d609a58 ("alsaloop: fix the verbose compilation warnings for latest gcc")
|
||||
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
||||
---
|
||||
alsaloop/alsaloop.c | 2 +-
|
||||
alsaloop/pcmjob.c | 4 ++--
|
||||
2 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/alsaloop/alsaloop.c b/alsaloop/alsaloop.c
|
||||
index b10733e0b300..51fb64626a90 100644
|
||||
--- a/alsaloop/alsaloop.c
|
||||
+++ b/alsaloop/alsaloop.c
|
||||
@@ -821,7 +821,7 @@ static void send_to_all(int sig)
|
||||
}
|
||||
}
|
||||
|
||||
-static void signal_handler(int)
|
||||
+static void signal_handler(int sig ATTRIBUTE_UNUSED)
|
||||
{
|
||||
quit = 1;
|
||||
send_to_all(SIGUSR2);
|
||||
diff --git a/alsaloop/pcmjob.c b/alsaloop/pcmjob.c
|
||||
index be7197122ed9..ffb439b45e66 100644
|
||||
--- a/alsaloop/pcmjob.c
|
||||
+++ b/alsaloop/pcmjob.c
|
||||
@@ -625,7 +625,7 @@ static void buf_add_src(struct loopback *loop)
|
||||
}
|
||||
}
|
||||
#else
|
||||
-static void buf_add_src(struct loopback *)
|
||||
+static void buf_add_src(struct loopback *loop ATTRIBUTE_UNUSED)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
@@ -1794,7 +1794,7 @@ static int ctl_event_check(snd_ctl_elem_value_t *val, snd_ctl_event_t *ev)
|
||||
}
|
||||
|
||||
static int handle_ctl_events(struct loopback_handle *lhandle,
|
||||
- unsigned short)
|
||||
+ unsigned short events ATTRIBUTE_UNUSED)
|
||||
{
|
||||
struct loopback *loop = lhandle->loopback;
|
||||
snd_ctl_event_t *ev;
|
||||
--
|
||||
2.35.3
|
||||
|
@ -0,0 +1,63 @@
|
||||
From 94eeb5a40f77e92624eb32d2e9c50b1cd9e4f837 Mon Sep 17 00:00:00 2001
|
||||
From: Jaroslav Kysela <perex@perex.cz>
|
||||
Date: Mon, 4 Sep 2023 16:49:03 +0200
|
||||
Subject: [PATCH] bat: use ATTRIBUTE_UNUSED instead remove argument name
|
||||
|
||||
We need to support older compilers than GCC 11.
|
||||
|
||||
Link: https://github.com/alsa-project/alsa-utils/issues/233
|
||||
Fixes: b366875 ("bat: fix the verbose compilation warnings for latest gcc")
|
||||
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
||||
---
|
||||
bat/bat.c | 3 ++-
|
||||
bat/common.c | 3 ++-
|
||||
bat/common.h | 5 +++++
|
||||
3 files changed, 9 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/bat/bat.c b/bat/bat.c
|
||||
index e88c65f72f49..ea04ed9c8813 100644
|
||||
--- a/bat/bat.c
|
||||
+++ b/bat/bat.c
|
||||
@@ -158,7 +158,8 @@ static void get_format(struct bat *bat, char *optarg)
|
||||
}
|
||||
}
|
||||
|
||||
-static inline int thread_wait_completion(struct bat *, pthread_t id, int **val)
|
||||
+static inline int thread_wait_completion(struct bat *bat ATTRIBUTE_UNUSED,
|
||||
+ pthread_t id, int **val)
|
||||
{
|
||||
int err;
|
||||
|
||||
diff --git a/bat/common.c b/bat/common.c
|
||||
index 9ff940572029..470a7e6ffc15 100644
|
||||
--- a/bat/common.c
|
||||
+++ b/bat/common.c
|
||||
@@ -47,7 +47,8 @@ static int update_fmt_to_bat(struct bat *bat, struct chunk_fmt *fmt)
|
||||
}
|
||||
|
||||
/* calculate frames and update to bat */
|
||||
-static int update_frames_to_bat(struct bat *bat, struct wav_chunk_header *header, FILE *)
|
||||
+static int update_frames_to_bat(struct bat *bat, struct wav_chunk_header *header,
|
||||
+ FILE *file ATTRIBUTE_UNUSED)
|
||||
{
|
||||
/* The number of analyzed captured frames is arbitrarily set to half of
|
||||
the number of frames of the wav file or the number of frames of the
|
||||
diff --git a/bat/common.h b/bat/common.h
|
||||
index a9bae5d2b741..bb51b0d452e2 100644
|
||||
--- a/bat/common.h
|
||||
+++ b/bat/common.h
|
||||
@@ -13,6 +13,11 @@
|
||||
*
|
||||
*/
|
||||
|
||||
+#ifndef ATTRIBUTE_UNUSED
|
||||
+/** do not print warning (gcc) when function parameter is not used */
|
||||
+#define ATTRIBUTE_UNUSED __attribute__ ((__unused__))
|
||||
+#endif
|
||||
+
|
||||
#define TEMP_RECORD_FILE_NAME "/tmp/bat.wav.XXXXXX"
|
||||
#define DEFAULT_DEV_NAME "default"
|
||||
|
||||
--
|
||||
2.35.3
|
||||
|
@ -0,0 +1,89 @@
|
||||
From 66112d60e4ce68720022eaf26080c0f1a2caf81f Mon Sep 17 00:00:00 2001
|
||||
From: Jaroslav Kysela <perex@perex.cz>
|
||||
Date: Mon, 4 Sep 2023 16:52:46 +0200
|
||||
Subject: [PATCH] seq: use ATTRIBUTE_UNUSED instead remove argument name
|
||||
|
||||
We need to support older compilers than GCC 11.
|
||||
|
||||
Link: https://github.com/alsa-project/alsa-utils/issues/233
|
||||
Fixes: 181e190 ("aplaymidi: fix the verbose compilation warnings for latest gcc")
|
||||
Fixes: a03377a ("aseqnet: fix the verbose compilation warnings for latest gcc")
|
||||
Fixes: 429c32a ("aseqdump: fix the verbose compilation warnings for latest gcc")
|
||||
Fixes: 0b48dd6 ("aconnect: fix the verbose compilation warnings for latest gcc")
|
||||
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
||||
---
|
||||
seq/aconnect/aconnect.c | 9 ++++++---
|
||||
seq/aplaymidi/arecordmidi.c | 2 +-
|
||||
seq/aseqdump/aseqdump.c | 2 +-
|
||||
seq/aseqnet/aseqnet.c | 2 +-
|
||||
4 files changed, 9 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/seq/aconnect/aconnect.c b/seq/aconnect/aconnect.c
|
||||
index 3a10de9d95af..7096febfe1c1 100644
|
||||
--- a/seq/aconnect/aconnect.c
|
||||
+++ b/seq/aconnect/aconnect.c
|
||||
@@ -193,7 +193,8 @@ static void do_search_port(snd_seq_t *seq, int perm, action_func_t do_action)
|
||||
}
|
||||
|
||||
|
||||
-static void print_port(snd_seq_t *, snd_seq_client_info_t *cinfo,
|
||||
+static void print_port(snd_seq_t *seq ATTRIBUTE_UNUSED,
|
||||
+ snd_seq_client_info_t *cinfo,
|
||||
snd_seq_port_info_t *pinfo, int count)
|
||||
{
|
||||
if (! count) {
|
||||
@@ -247,8 +248,10 @@ static void print_port_and_subs(snd_seq_t *seq, snd_seq_client_info_t *cinfo,
|
||||
/*
|
||||
* remove all (exported) connections
|
||||
*/
|
||||
-static void remove_connection(snd_seq_t *seq, snd_seq_client_info_t *,
|
||||
- snd_seq_port_info_t *pinfo, int)
|
||||
+static void remove_connection(snd_seq_t *seq,
|
||||
+ snd_seq_client_info_t *info ATTRIBUTE_UNUSED,
|
||||
+ snd_seq_port_info_t *pinfo,
|
||||
+ int count ATTRIBUTE_UNUSED)
|
||||
{
|
||||
snd_seq_query_subscribe_t *query;
|
||||
snd_seq_port_info_t *port;
|
||||
diff --git a/seq/aplaymidi/arecordmidi.c b/seq/aplaymidi/arecordmidi.c
|
||||
index ce714728b8a2..a4c1181d3d31 100644
|
||||
--- a/seq/aplaymidi/arecordmidi.c
|
||||
+++ b/seq/aplaymidi/arecordmidi.c
|
||||
@@ -719,7 +719,7 @@ static void version(void)
|
||||
fputs("arecordmidi version " SND_UTIL_VERSION_STR "\n", stderr);
|
||||
}
|
||||
|
||||
-static void sighandler(int)
|
||||
+static void sighandler(int sig ATTRIBUTE_UNUSED)
|
||||
{
|
||||
stop = 1;
|
||||
}
|
||||
diff --git a/seq/aseqdump/aseqdump.c b/seq/aseqdump/aseqdump.c
|
||||
index 8455ecba3d85..af4ca216ad65 100644
|
||||
--- a/seq/aseqdump/aseqdump.c
|
||||
+++ b/seq/aseqdump/aseqdump.c
|
||||
@@ -676,7 +676,7 @@ static void version(void)
|
||||
puts("aseqdump version " SND_UTIL_VERSION_STR);
|
||||
}
|
||||
|
||||
-static void sighandler(int)
|
||||
+static void sighandler(int sig ATTRIBUTE_UNUSED)
|
||||
{
|
||||
stop = 1;
|
||||
}
|
||||
diff --git a/seq/aseqnet/aseqnet.c b/seq/aseqnet/aseqnet.c
|
||||
index f40de7d4e044..aa70b501db8e 100644
|
||||
--- a/seq/aseqnet/aseqnet.c
|
||||
+++ b/seq/aseqnet/aseqnet.c
|
||||
@@ -334,7 +334,7 @@ static void get_net_addr(struct addrinfo *rp, char *buf, size_t buflen)
|
||||
/*
|
||||
* signal handler
|
||||
*/
|
||||
-static void sigterm_exit(int)
|
||||
+static void sigterm_exit(int sig ATTRIBUTE_UNUSED)
|
||||
{
|
||||
close_files();
|
||||
exit(1);
|
||||
--
|
||||
2.35.3
|
||||
|
105
0006-alsaucm-use-ATTRIBUTE_UNUSED-instead-remove-argument.patch
Normal file
105
0006-alsaucm-use-ATTRIBUTE_UNUSED-instead-remove-argument.patch
Normal file
@ -0,0 +1,105 @@
|
||||
From 9e5e9a6d70de63bea01f0669b01319952f2cfdea Mon Sep 17 00:00:00 2001
|
||||
From: Jaroslav Kysela <perex@perex.cz>
|
||||
Date: Mon, 4 Sep 2023 16:57:47 +0200
|
||||
Subject: [PATCH] alsaucm: use ATTRIBUTE_UNUSED instead remove argument name
|
||||
|
||||
We need to support older compilers than GCC 11.
|
||||
|
||||
Link: https://github.com/alsa-project/alsa-utils/issues/233
|
||||
Fixes: d7bbc26 ("alsaucm: fix the verbose compilation warnings for latest gcc")
|
||||
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
||||
---
|
||||
alsaucm/dump.c | 22 ++++++++++++----------
|
||||
1 file changed, 12 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/alsaucm/dump.c b/alsaucm/dump.c
|
||||
index 102ac4d2c4b5..a5c57f21d33b 100644
|
||||
--- a/alsaucm/dump.c
|
||||
+++ b/alsaucm/dump.c
|
||||
@@ -93,7 +93,8 @@ static char *tesc(const char *s, char *buf, size_t buf_len)
|
||||
|
||||
#define ESC(s, esc) tesc((s), (esc), sizeof(esc))
|
||||
|
||||
-static int text_verb_start(struct renderer *, const char *verb, const char *comment)
|
||||
+static int text_verb_start(struct renderer *r ATTRIBUTE_UNUSED,
|
||||
+ const char *verb, const char *comment)
|
||||
{
|
||||
char buf1[128], buf2[128];
|
||||
printf("Verb.%s {\n", ESC(verb, buf1));
|
||||
@@ -102,13 +103,13 @@ static int text_verb_start(struct renderer *, const char *verb, const char *comm
|
||||
return 0;
|
||||
}
|
||||
|
||||
-static int text_verb_end(struct renderer *)
|
||||
+static int text_verb_end(struct renderer *r ATTRIBUTE_UNUSED)
|
||||
{
|
||||
printf("}\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
-static int text_2nd_level_begin(struct renderer *,
|
||||
+static int text_2nd_level_begin(struct renderer *r ATTRIBUTE_UNUSED,
|
||||
const char *key,
|
||||
const char *val,
|
||||
const char *comment)
|
||||
@@ -120,19 +121,19 @@ static int text_2nd_level_begin(struct renderer *,
|
||||
return 0;
|
||||
}
|
||||
|
||||
-static int text_2nd_level_end(struct renderer *)
|
||||
+static int text_2nd_level_end(struct renderer *r ATTRIBUTE_UNUSED)
|
||||
{
|
||||
printf("\t}\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
-static int text_2nd_level(struct renderer *, const char *txt)
|
||||
+static int text_2nd_level(struct renderer *r ATTRIBUTE_UNUSED, const char *txt)
|
||||
{
|
||||
printf("\t\t%s", txt);
|
||||
return 0;
|
||||
}
|
||||
|
||||
-static int text_3rd_level(struct renderer *, const char *txt)
|
||||
+static int text_3rd_level(struct renderer *r ATTRIBUTE_UNUSED, const char *txt)
|
||||
{
|
||||
printf("\t\t\t%s", txt);
|
||||
return 0;
|
||||
@@ -266,7 +267,7 @@ static void json_block(struct renderer *r, int level, int last)
|
||||
j->block[level] = last ? 0 : 1;
|
||||
}
|
||||
|
||||
-static int json_init(struct renderer *)
|
||||
+static int json_init(struct renderer *r ATTRIBUTE_UNUSED)
|
||||
{
|
||||
printf("{\n \"Verbs\": {");
|
||||
return 0;
|
||||
@@ -325,13 +326,13 @@ static int json_2nd_level_end(struct renderer *r)
|
||||
return 0;
|
||||
}
|
||||
|
||||
-static int json_2nd_level(struct renderer *, const char *txt)
|
||||
+static int json_2nd_level(struct renderer *r ATTRIBUTE_UNUSED, const char *txt)
|
||||
{
|
||||
printf(" %s", txt);
|
||||
return 0;
|
||||
}
|
||||
|
||||
-static int json_3rd_level(struct renderer *, const char *txt)
|
||||
+static int json_3rd_level(struct renderer *r ATTRIBUTE_UNUSED, const char *txt)
|
||||
{
|
||||
printf(" %s", txt);
|
||||
return 0;
|
||||
@@ -360,7 +361,8 @@ static int json_supcon_start(struct renderer *r, const char *key)
|
||||
return 0;
|
||||
}
|
||||
|
||||
-static int json_supcon_value(struct renderer *r, const char *value, int)
|
||||
+static int json_supcon_value(struct renderer *r, const char *value,
|
||||
+ int last ATTRIBUTE_UNUSED)
|
||||
{
|
||||
char buf[256];
|
||||
JESC(value, buf);
|
||||
--
|
||||
2.35.3
|
||||
|
308
0007-topology-use-ATTRIBUTE_UNUSED-instead-remove-argumen.patch
Normal file
308
0007-topology-use-ATTRIBUTE_UNUSED-instead-remove-argumen.patch
Normal file
@ -0,0 +1,308 @@
|
||||
From dfe1c7143ab6ea01789e276b1ba361a00e545997 Mon Sep 17 00:00:00 2001
|
||||
From: Jaroslav Kysela <perex@perex.cz>
|
||||
Date: Mon, 4 Sep 2023 17:11:05 +0200
|
||||
Subject: [PATCH] topology: use ATTRIBUTE_UNUSED instead remove argument name
|
||||
|
||||
We need to support older compilers than GCC 11.
|
||||
|
||||
Link: https://github.com/alsa-project/alsa-utils/issues/233
|
||||
Fixes: 153d185 ("topology: fix the verbose compilation warnings for latest gcc")
|
||||
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
|
||||
---
|
||||
topology/nhlt/intel/dmic-nhlt.c | 3 ++-
|
||||
topology/nhlt/intel/dmic/dmic-debug.c | 7 ++++---
|
||||
topology/nhlt/intel/ssp/ssp-debug.c | 5 +++--
|
||||
topology/nhlt/intel/ssp/ssp-process.c | 4 +++-
|
||||
topology/nhlt/nhlt-processor.c | 7 +++++--
|
||||
topology/pre-process-class.c | 10 +++++-----
|
||||
topology/pre-process-object.c | 21 +++++++++++----------
|
||||
topology/pre-processor.c | 10 ++++++----
|
||||
8 files changed, 39 insertions(+), 28 deletions(-)
|
||||
|
||||
diff --git a/topology/nhlt/intel/dmic-nhlt.c b/topology/nhlt/intel/dmic-nhlt.c
|
||||
index 70a22e3e288a..de659cfdbd1f 100644
|
||||
--- a/topology/nhlt/intel/dmic-nhlt.c
|
||||
+++ b/topology/nhlt/intel/dmic-nhlt.c
|
||||
@@ -10,6 +10,7 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
+#include <alsa/global.h>
|
||||
#include <alsa/input.h>
|
||||
#include <alsa/output.h>
|
||||
#include <alsa/conf.h>
|
||||
@@ -155,7 +156,7 @@ static int set_vendor_mic_data(struct intel_nhlt_params *nhlt, snd_config_t *cfg
|
||||
horizontal_angle_end);
|
||||
}
|
||||
|
||||
-static int set_bytes_data(struct intel_nhlt_params *, snd_config_t *cfg)
|
||||
+static int set_bytes_data(struct intel_nhlt_params *nhlt ATTRIBUTE_UNUSED, snd_config_t *cfg)
|
||||
{
|
||||
snd_config_iterator_t i, next;
|
||||
snd_config_t *n;
|
||||
diff --git a/topology/nhlt/intel/dmic/dmic-debug.c b/topology/nhlt/intel/dmic/dmic-debug.c
|
||||
index f99d308c0419..a977c93f2a2d 100644
|
||||
--- a/topology/nhlt/intel/dmic/dmic-debug.c
|
||||
+++ b/topology/nhlt/intel/dmic/dmic-debug.c
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "aconfig.h"
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
+#include <alsa/global.h>
|
||||
#include "dmic-debug.h"
|
||||
|
||||
#ifdef NHLT_DEBUG
|
||||
@@ -181,7 +182,7 @@ void dmic_print_internal(struct intel_dmic_params *dmic)
|
||||
}
|
||||
|
||||
#else /* NHLT_DEBUG */
|
||||
-void dmic_print_bytes_as_hex(uint8_t *, size_t) {}
|
||||
-void dmic_print_integers_as_hex(uint32_t *, size_t) {}
|
||||
-void dmic_print_internal(struct intel_dmic_params *) {}
|
||||
+void dmic_print_bytes_as_hex(uint8_t *src ATTRIBUTE_UNUSED, size_t size ATTRIBUTE_UNUSED) {}
|
||||
+void dmic_print_integers_as_hex(uint32_t *src ATTRIBUTE_UNUSED, size_t size ATTRIBUTE_UNUSED) {}
|
||||
+void dmic_print_internal(struct intel_dmic_params *dmic ATTRIBUTE_UNUSED) {}
|
||||
#endif
|
||||
diff --git a/topology/nhlt/intel/ssp/ssp-debug.c b/topology/nhlt/intel/ssp/ssp-debug.c
|
||||
index 8c6467556e72..2d2f6b0fc5ab 100644
|
||||
--- a/topology/nhlt/intel/ssp/ssp-debug.c
|
||||
+++ b/topology/nhlt/intel/ssp/ssp-debug.c
|
||||
@@ -7,6 +7,7 @@
|
||||
#include "aconfig.h"
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
+#include <alsa/global.h>
|
||||
#include "ssp-debug.h"
|
||||
#include "../intel-nhlt.h"
|
||||
|
||||
@@ -252,6 +253,6 @@ void ssp_print_internal(struct intel_ssp_params *ssp)
|
||||
}
|
||||
|
||||
#else /* NHLT_DEBUG */
|
||||
-void ssp_print_internal(struct intel_ssp_params *) {}
|
||||
-void ssp_print_calculated(struct intel_ssp_params *) {}
|
||||
+void ssp_print_internal(struct intel_ssp_params *ssp ATTRIBUTE_UNUSED) {}
|
||||
+void ssp_print_calculated(struct intel_ssp_params *ssp ATTRIBUTE_UNUSED) {}
|
||||
#endif
|
||||
diff --git a/topology/nhlt/intel/ssp/ssp-process.c b/topology/nhlt/intel/ssp/ssp-process.c
|
||||
index 9cda5c3500d9..17b88d2b712b 100644
|
||||
--- a/topology/nhlt/intel/ssp/ssp-process.c
|
||||
+++ b/topology/nhlt/intel/ssp/ssp-process.c
|
||||
@@ -14,6 +14,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdbool.h>
|
||||
+#include <alsa/global.h>
|
||||
#include <alsa/input.h>
|
||||
#include <alsa/output.h>
|
||||
#include <alsa/conf.h>
|
||||
@@ -952,7 +953,8 @@ int ssp_set_params(struct intel_nhlt_params *nhlt, const char *dir, int dai_inde
|
||||
return 0;
|
||||
}
|
||||
|
||||
-int ssp_hw_set_params(struct intel_nhlt_params *nhlt, const char *format, const char *,
|
||||
+int ssp_hw_set_params(struct intel_nhlt_params *nhlt, const char *format,
|
||||
+ const char *mclk ATTRIBUTE_UNUSED,
|
||||
const char *bclk, const char *bclk_invert, const char *fsync,
|
||||
const char *fsync_invert, int mclk_freq, int bclk_freq, int fsync_freq,
|
||||
int tdm_slots, int tdm_slot_width, int tx_slots, int rx_slots)
|
||||
diff --git a/topology/nhlt/nhlt-processor.c b/topology/nhlt/nhlt-processor.c
|
||||
index 567fa5cc2498..ca539c3de5bb 100644
|
||||
--- a/topology/nhlt/nhlt-processor.c
|
||||
+++ b/topology/nhlt/nhlt-processor.c
|
||||
@@ -11,6 +11,7 @@
|
||||
#include <string.h>
|
||||
#include <stdbool.h>
|
||||
#include <inttypes.h>
|
||||
+#include <alsa/global.h>
|
||||
#include <alsa/input.h>
|
||||
#include <alsa/output.h>
|
||||
#include <alsa/conf.h>
|
||||
@@ -87,7 +88,8 @@ static void debug_print_nhlt(struct nhlt *blob, struct endpoint_descriptor **eps
|
||||
fprintf(stdout, "\n");
|
||||
}
|
||||
#else
|
||||
-static void debug_print_nhlt(struct nhlt *, struct endpoint_descriptor **) {}
|
||||
+static void debug_print_nhlt(struct nhlt *blob ATTRIBUTE_UNUSED,
|
||||
+ struct endpoint_descriptor **eps ATTRIBUTE_UNUSED) {}
|
||||
#endif
|
||||
|
||||
static int print_as_hex_bytes(uint8_t *manifest_buffer, uint32_t manifest_size,
|
||||
@@ -313,7 +315,8 @@ static int nhlt_get_flat_buffer(struct nhlt *blob, struct endpoint_descriptor **
|
||||
}
|
||||
|
||||
/* called at the end of topology pre-processing, create flat buffer from variable size nhlt */
|
||||
-static int nhlt_create(struct intel_nhlt_params *nhlt, snd_config_t *input, snd_config_t *,
|
||||
+static int nhlt_create(struct intel_nhlt_params *nhlt, snd_config_t *input,
|
||||
+ snd_config_t *output ATTRIBUTE_UNUSED,
|
||||
uint8_t **nhlt_buffer, uint32_t *nhlt_size)
|
||||
{
|
||||
struct endpoint_descriptor *eps[MAX_ENDPOINT_COUNT];
|
||||
diff --git a/topology/pre-process-class.c b/topology/pre-process-class.c
|
||||
index d883d053fcb6..bedcebe6c410 100644
|
||||
--- a/topology/pre-process-class.c
|
||||
+++ b/topology/pre-process-class.c
|
||||
@@ -127,7 +127,7 @@ snd_config_t *tplg_class_lookup(struct tplg_pre_processor *tplg_pp, snd_config_t
|
||||
}
|
||||
|
||||
/* find the attribute config by name in the class definition */
|
||||
-snd_config_t *tplg_class_find_attribute_by_name(struct tplg_pre_processor *,
|
||||
+snd_config_t *tplg_class_find_attribute_by_name(struct tplg_pre_processor *tplg_p ATTRIBUTE_UNUSED,
|
||||
snd_config_t *class, const char *name)
|
||||
{
|
||||
snd_config_t *attr = NULL;
|
||||
@@ -152,7 +152,7 @@ snd_config_t *tplg_class_find_attribute_by_name(struct tplg_pre_processor *,
|
||||
}
|
||||
|
||||
/* get the name of the attribute that must have a unique value in the object instance */
|
||||
-const char *tplg_class_get_unique_attribute_name(struct tplg_pre_processor *,
|
||||
+const char *tplg_class_get_unique_attribute_name(struct tplg_pre_processor *tplg_pp ATTRIBUTE_UNUSED,
|
||||
snd_config_t *class)
|
||||
{
|
||||
snd_config_t *unique;
|
||||
@@ -177,7 +177,7 @@ const char *tplg_class_get_unique_attribute_name(struct tplg_pre_processor *,
|
||||
}
|
||||
|
||||
/* get attribute type from the definition */
|
||||
-snd_config_type_t tplg_class_get_attribute_type(struct tplg_pre_processor *,
|
||||
+snd_config_type_t tplg_class_get_attribute_type(struct tplg_pre_processor *tplg_pp ATTRIBUTE_UNUSED,
|
||||
snd_config_t *attr)
|
||||
{
|
||||
snd_config_t *type;
|
||||
@@ -208,7 +208,7 @@ snd_config_type_t tplg_class_get_attribute_type(struct tplg_pre_processor *,
|
||||
}
|
||||
|
||||
/* get token_ref for attribute with name attr_name in the class */
|
||||
-const char *tplg_class_get_attribute_token_ref(struct tplg_pre_processor *,
|
||||
+const char *tplg_class_get_attribute_token_ref(struct tplg_pre_processor *tplg_pp ATTRIBUTE_UNUSED,
|
||||
snd_config_t *class, const char *attr_name)
|
||||
{
|
||||
snd_config_t *attributes, *attr, *token_ref;
|
||||
@@ -235,7 +235,7 @@ const char *tplg_class_get_attribute_token_ref(struct tplg_pre_processor *,
|
||||
}
|
||||
|
||||
/* convert a valid attribute string value to the corresponding tuple value */
|
||||
-long tplg_class_attribute_valid_tuple_value(struct tplg_pre_processor *,
|
||||
+long tplg_class_attribute_valid_tuple_value(struct tplg_pre_processor *tplg_pp ATTRIBUTE_UNUSED,
|
||||
snd_config_t *class, snd_config_t *attr)
|
||||
{
|
||||
|
||||
diff --git a/topology/pre-process-object.c b/topology/pre-process-object.c
|
||||
index 48555e7ff7e2..61cc85fbc43d 100644
|
||||
--- a/topology/pre-process-object.c
|
||||
+++ b/topology/pre-process-object.c
|
||||
@@ -31,7 +31,8 @@
|
||||
|
||||
/* Parse VendorToken object, create the "SectionVendorToken" and save it */
|
||||
int tplg_build_vendor_token_object(struct tplg_pre_processor *tplg_pp,
|
||||
- snd_config_t *obj_cfg, snd_config_t *)
|
||||
+ snd_config_t *obj_cfg,
|
||||
+ snd_config_t *parent ATTRIBUTE_UNUSED)
|
||||
{
|
||||
snd_config_iterator_t i, next;
|
||||
snd_config_t *vtop, *n, *obj;
|
||||
@@ -196,7 +197,7 @@ int tplg_build_data_object(struct tplg_pre_processor *tplg_pp, snd_config_t *obj
|
||||
return tplg_parent_update(tplg_pp, parent, "data", name);
|
||||
}
|
||||
|
||||
-static int tplg_create_config_template(struct tplg_pre_processor *,
|
||||
+static int tplg_create_config_template(struct tplg_pre_processor *tplg_pp ATTRIBUTE_UNUSED,
|
||||
snd_config_t **template,
|
||||
const struct config_template_items *items)
|
||||
{
|
||||
@@ -499,7 +500,7 @@ min_max_check:
|
||||
}
|
||||
|
||||
/* get object's name attribute value */
|
||||
-const char *tplg_object_get_name(struct tplg_pre_processor *,
|
||||
+const char *tplg_object_get_name(struct tplg_pre_processor *tplg_pp ATTRIBUTE_UNUSED,
|
||||
snd_config_t *object)
|
||||
{
|
||||
snd_config_t *cfg;
|
||||
@@ -518,7 +519,7 @@ const char *tplg_object_get_name(struct tplg_pre_processor *,
|
||||
}
|
||||
|
||||
/* look up the instance of object in a config */
|
||||
-static snd_config_t *tplg_object_lookup_in_config(struct tplg_pre_processor *,
|
||||
+static snd_config_t *tplg_object_lookup_in_config(struct tplg_pre_processor *tplg_pp ATTRIBUTE_UNUSED,
|
||||
snd_config_t *class, const char *type,
|
||||
const char *class_name, const char *id)
|
||||
{
|
||||
@@ -977,7 +978,7 @@ template:
|
||||
}
|
||||
|
||||
static int tplg_build_generic_object(struct tplg_pre_processor *tplg_pp, snd_config_t *obj_cfg,
|
||||
- snd_config_t *)
|
||||
+ snd_config_t *parent ATTRIBUTE_UNUSED)
|
||||
{
|
||||
snd_config_t *wtop;
|
||||
const char *name;
|
||||
@@ -1090,7 +1091,7 @@ const struct build_function_map object_build_map[] = {
|
||||
NULL, &pcm_caps_config},
|
||||
};
|
||||
|
||||
-static const struct build_function_map *tplg_object_get_map(struct tplg_pre_processor *,
|
||||
+static const struct build_function_map *tplg_object_get_map(struct tplg_pre_processor *tplg_pp ATTRIBUTE_UNUSED,
|
||||
snd_config_t *obj)
|
||||
{
|
||||
snd_config_iterator_t first;
|
||||
@@ -1145,7 +1146,7 @@ snd_config_t *tplg_object_get_section(struct tplg_pre_processor *tplg_pp, snd_co
|
||||
}
|
||||
|
||||
/* return 1 if attribute not found in search_config, 0 on success and negative value on error */
|
||||
-static int tplg_object_copy_and_add_param(struct tplg_pre_processor *,
|
||||
+static int tplg_object_copy_and_add_param(struct tplg_pre_processor *tplg_pp ATTRIBUTE_UNUSED,
|
||||
snd_config_t *obj,
|
||||
snd_config_t *attr_cfg,
|
||||
snd_config_t *search_config)
|
||||
@@ -1351,8 +1352,8 @@ static int tplg_object_pre_process_children(struct tplg_pre_processor *tplg_pp,
|
||||
return 0;
|
||||
}
|
||||
|
||||
-static int tplg_construct_object_name(struct tplg_pre_processor *, snd_config_t *obj,
|
||||
- snd_config_t *class_cfg)
|
||||
+static int tplg_construct_object_name(struct tplg_pre_processor *tplg_pp ATTRIBUTE_UNUSED,
|
||||
+ snd_config_t *obj, snd_config_t *class_cfg)
|
||||
{
|
||||
snd_config_iterator_t i, next;
|
||||
snd_config_t *args, *n;
|
||||
@@ -1547,7 +1548,7 @@ static int tplg_object_set_unique_attribute(struct tplg_pre_processor *tplg_pp,
|
||||
* Helper function to get object instance config which is 2 nodes down from class_type config.
|
||||
* ex: Get the pointer to the config node with ID "0" from the input config Widget.pga.0 {}
|
||||
*/
|
||||
-snd_config_t *tplg_object_get_instance_config(struct tplg_pre_processor *,
|
||||
+snd_config_t *tplg_object_get_instance_config(struct tplg_pre_processor *tplg_pp ATTRIBUTE_UNUSED,
|
||||
snd_config_t *class_type)
|
||||
{
|
||||
snd_config_iterator_t first;
|
||||
diff --git a/topology/pre-processor.c b/topology/pre-processor.c
|
||||
index 3903dee556b8..01f8a5de513e 100644
|
||||
--- a/topology/pre-processor.c
|
||||
+++ b/topology/pre-processor.c
|
||||
@@ -231,8 +231,9 @@ void tplg_pp_config_debug(struct tplg_pre_processor *tplg_pp, snd_config_t *cfg)
|
||||
snd_config_save(cfg, tplg_pp->dbg_output);
|
||||
}
|
||||
#else
|
||||
-void tplg_pp_debug(char *, ...) {}
|
||||
-void tplg_pp_config_debug(struct tplg_pre_processor *, snd_config_t *){}
|
||||
+void tplg_pp_debug(char *fmt ATTRIBUTE_UNUSED, ...) {}
|
||||
+void tplg_pp_config_debug(struct tplg_pre_processor *tplg_pp ATTRIBUTE_UNUSED,
|
||||
+ snd_config_t *cfg ATTRIBUTE_UNUSED) {}
|
||||
#endif
|
||||
|
||||
static int pre_process_config(struct tplg_pre_processor *tplg_pp, snd_config_t *cfg)
|
||||
@@ -640,8 +641,9 @@ static int pre_process_includes_all(struct tplg_pre_processor *tplg_pp, snd_conf
|
||||
}
|
||||
|
||||
/* duplicate the existing objects in src into dest and update with new attribute */
|
||||
-static int pre_process_add_objects(struct tplg_pre_processor *, int *object_count,
|
||||
- snd_config_t *src, snd_config_t *dest, snd_config_t *attr_cfg)
|
||||
+static int pre_process_add_objects(struct tplg_pre_processor *tplg_pp ATTRIBUTE_UNUSED,
|
||||
+ int *object_count, snd_config_t *src,
|
||||
+ snd_config_t *dest, snd_config_t *attr_cfg)
|
||||
{
|
||||
snd_config_iterator_t i, next;
|
||||
int ret;
|
||||
--
|
||||
2.35.3
|
||||
|
17
01beep.conf
Normal file
17
01beep.conf
Normal file
@ -0,0 +1,17 @@
|
||||
CTL{reset}="mixer"
|
||||
CTL{name}="PC Speaker Playback Volume",CTL{do_search}=="1", \
|
||||
CTL{values}="$env{pvolume}",RESULT!="0",CTL{values}="0"
|
||||
CTL{name}="PC Speaker Playback Switch",CTL{do_search}=="1", \
|
||||
CTL{values}="off"
|
||||
|
||||
CTL{reset}="mixer"
|
||||
CTL{name}="PC Beep Playback Volume",CTL{do_search}=="1", \
|
||||
CTL{values}="$env{pvolume}",RESULT!="0",CTL{values}="0"
|
||||
CTL{name}="PC Beep Playback Switch",CTL{do_search}=="1", \
|
||||
CTL{values}="off"
|
||||
|
||||
CTL{reset}="mixer"
|
||||
CTL{name}="Beep Playback Volume",CTL{do_search}=="1", \
|
||||
CTL{values}="$env{pvolume}",RESULT!="0",CTL{values}="0"
|
||||
CTL{name}="Beep Playback Switch",CTL{do_search}=="1", \
|
||||
CTL{values}="off"
|
24
alsa-info-no-update-for-distro-script.patch
Normal file
24
alsa-info-no-update-for-distro-script.patch
Normal file
@ -0,0 +1,24 @@
|
||||
From: Takashi Iwai <tiwai@suse.de>
|
||||
Subject: alsa-info: Suppress the automatic update
|
||||
Patch-mainline: Never, distro specific
|
||||
References: bsc#1185280
|
||||
|
||||
We don't want to modify the script distributed in the standard package.
|
||||
|
||||
Signed-off-by: Takashi Iwai <tiwai@suse.de>
|
||||
|
||||
---
|
||||
--- a/alsa-info/alsa-info.sh
|
||||
+++ b/alsa-info/alsa-info.sh
|
||||
@@ -720,11 +720,6 @@ if [ -s "$TEMPDIR/alsa-usbmixer.tmp" ]; then
|
||||
echo "" >> $FILE
|
||||
fi
|
||||
|
||||
-#If no command line options are specified, then run as though --with-all was specified
|
||||
-if [ -z "$1" ]; then
|
||||
- update
|
||||
-fi
|
||||
-
|
||||
fi # proceed
|
||||
|
||||
#loop through command line arguments, until none are left.
|
BIN
alsa-utils-1.2.10.tar.bz2
(Stored with Git LFS)
Normal file
BIN
alsa-utils-1.2.10.tar.bz2
(Stored with Git LFS)
Normal file
Binary file not shown.
16
alsa-utils-1.2.10.tar.bz2.sig
Normal file
16
alsa-utils-1.2.10.tar.bz2.sig
Normal file
@ -0,0 +1,16 @@
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
|
||||
iQIzBAABCAAdFiEE8E31BzesGohMSz1xg4BZbablnJEFAmTyDK4ACgkQg4BZbabl
|
||||
nJEUHg//SeLBeNwQTaOiPBcsDEa35WNSTpcXhpf+E4btdNaWlKnxD3sdXn2IdyP5
|
||||
kos7wbNLm+NGWuLoskAAx0wNjuXlXJAcAja7QH7Wyc1RXhSJZElP0IXQfXu86nDL
|
||||
DxsZmuCsxx6Ojm4olQ7SChKTnqwQcVDosHNLO03UzePFEIXn/F0kkt8JGAGn1sQ9
|
||||
oh9M/aKdvbaMOpBRrwZ4oLHnq+hhTFqxGG2kZmKiDG5fDc8DJeSH8ItkeB7CvSsz
|
||||
4nDE/4IUyTc7Hz27/BDQBEXD7hF4dgLiWsbbUhobspql+snK+ZjIQbDv1M/xwDN7
|
||||
wAwTB2gXBmw/htKukHllgfuUy1SR7e7imKVHsx+3M7pNRqwkNpcCdabwDYkJi8qJ
|
||||
zulZRneIp0H75pLVw+fd1diLEpfw7hFZF3hpQKZ/RvElQz/b6SGjZDAFFL9mW7/M
|
||||
zCNNcUm5hZNtf1LC2N/FHOhtwyvv9XAXOsf+2t1AmiQafPx29r+csgzHK3EoMsY5
|
||||
2xcjRkioNVHJGDNWGbh73YH1LiwFPdQPfFukLmFSfFKoXmkr4d17xHV5VMFx4ZB5
|
||||
cjUzN3F6XOn91Fqo2zFKp+oNQXsLWJlYqebolInInyH5eTzGv6kAgoQCebqzQdG6
|
||||
9aAuOTkv82Qxw3QpnxGwLTo8kiV0hQdokb61maTFGuW9Dz27wOU=
|
||||
=7Rxf
|
||||
-----END PGP SIGNATURE-----
|
13
alsa-utils-configure-version-revert.patch
Normal file
13
alsa-utils-configure-version-revert.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 3c11f3554021..b411ce866794 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -8,7 +8,7 @@ AM_INIT_AUTOMAKE
|
||||
AM_MAINTAINER_MODE([enable])
|
||||
|
||||
AM_GNU_GETTEXT([external])
|
||||
-AM_GNU_GETTEXT_VERSION([0.19.8])
|
||||
+AM_GNU_GETTEXT_VERSION([0.15])
|
||||
|
||||
dnl Checks for programs.
|
||||
|
1446
alsa-utils.changes
Normal file
1446
alsa-utils.changes
Normal file
File diff suppressed because it is too large
Load Diff
29
alsa-utils.keyring
Normal file
29
alsa-utils.keyring
Normal file
@ -0,0 +1,29 @@
|
||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
|
||||
mQINBF+PBUIBEACQ0eLhY6zJkZCztI3Zj7GiEkGyDYXFr10wMn2BmAxXEOhvGs5C
|
||||
XtZYokNnYnojU2ehb14pdQiIYVm7YwjNjPhFmc6DnSJ74tlDtzI0ZfZYgU8B3/AU
|
||||
hHCIe7NeH+uqaS4hQ4gQF3HB19GNQ21keQPtm/cZzNvkAwWQ6wxiIas/odQGt6sg
|
||||
TULub4gXQw42iCW0jNeliNgeOc/4/2qtznN+Ss5G+Hs+EBh0kFCG4+5RcpgtKmYO
|
||||
LEy+8qI/UmlgOeT+47eTXm4LjxHfRuKcbvSExfICUB5XLD2ZmeZbFyP48jkDvB7w
|
||||
A4jNfImtlRfTvoviNlOl08Pk3aJoPR8IZIGw+EQCf3ChXTziadqOg37SAy4yGJ14
|
||||
BjirKgBNO4zB+lkLOAknsVKJOKRt3w54MevCuj0GGbfSyErZAeHvliXrfBa1ACLu
|
||||
c2ynRDR/5j0FA3vPzRsHyOGFC4F34W5BhkXCuJBG2o2VDv/zANzjg/hw+0IbmH3G
|
||||
kYn73EDIaz5giKJolE32WaWkz39DwuuoUaLLyfxyiN+c0p2/XQFCrOSqHNUMfI5z
|
||||
Ll62nL1XruF6u9ApLKRv/uDJN7tLgds83rteYJP7/5/JSYCPB8PcUkmhB8OoVdpr
|
||||
tYI8C/6Y6KREm3Jk4AdkySIFnPXZQCkiOR2qOmAuaQPeesjsrSkUtJYZcwARAQAB
|
||||
tEVBTFNBIFJlbGVhc2UgVGVhbSAoUGFja2FnZSBTaWduaW5nIEtleSB2MSkgPHJl
|
||||
bGVhc2VAYWxzYS1wcm9qZWN0Lm9yZz6JAk4EEwEIADgWIQTwTfUHN6waiExLPXGD
|
||||
gFltpuWckQUCX48FQgIbAwULCQgHAgYVCgkICwIEFgIDAQIeAQIXgAAKCRCDgFlt
|
||||
puWckRhVD/45DNoD79lHBJEu0Wv93OSlPZDUKR+BnkkdEDgDEhTvk+Bin/EWdb3g
|
||||
Unc+rEczgAqjqblLH7ndBtFZPNGiQ2nu8eAdN0TrOFQx7bFg4Do7KXNUUqdPUETC
|
||||
AgkozF3ucsgOcBbv6LwwDfdQDFjkg7CuNGy8CRcLSO5dLK7domq3RxF5mKl1dkOv
|
||||
4brfw6ssn+pja/jkgM9BKt80ycIDiJtVRuXMBJD19ZB8EzQO9OQBdAPERSG8BwLX
|
||||
LemTLAZqNd0mixVbn50qCQil64UOkOd5DHVBBokxgtlJEcDujqWaCUYSygSiP2ke
|
||||
44ArDr7hRwG5KhhbFOigXo3nBYnKyiuWs0jpnrTQD9+uTxcetyBpJ6BW/i/Fy2a9
|
||||
NBFNhbDI07rCMXM25cLP8qbI5i6nTSDlkpLP40At9yUVYt8gIO6ZpGpO04/lAhT1
|
||||
NxtbZkKMo1nphMHU/MDSusoHyLxUXpppdbXTdMgsuFrXae3gcFDowQbLZqb6ZAJ5
|
||||
opX4sDBIdoHDBsI6wCGTV7AAWB8RXWW0RTYMkyIxqixiiB2N2jaau4yHfqv9QWOY
|
||||
oPcx6ySKqGN0HV50PeRis5eeq7kHIdRrVIOBd0tPIqCKIvyJZk1QXReKvvE84Km2
|
||||
dYPusBlhhF7/4WVovlE6HFwyLSOyb32m4qf5dV35op07ew8i4DHpkQ==
|
||||
=n4lM
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
190
alsa-utils.spec
Normal file
190
alsa-utils.spec
Normal file
@ -0,0 +1,190 @@
|
||||
#
|
||||
# spec file for package alsa-utils
|
||||
#
|
||||
# Copyright (c) 2023 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
%define do_autoreconf 0
|
||||
%define _udevdir %(pkg-config --variable=udevdir udev)
|
||||
%ifarch %ix86 x86_64 %arm aarch64 ppc64le riscv64
|
||||
%define enable_topology 1
|
||||
%else
|
||||
%define enable_topology 0
|
||||
%endif
|
||||
|
||||
Name: alsa-utils
|
||||
Version: 1.2.10
|
||||
Release: 0
|
||||
Summary: Advanced Linux Sound Architecture Utilities
|
||||
License: GPL-2.0-or-later
|
||||
Group: Productivity/Multimedia/Sound/Players
|
||||
URL: http://www.alsa-project.org/
|
||||
Source: https://www.alsa-project.org/files/pub/utils/alsa-utils-%{version}.tar.bz2
|
||||
Source1: https://www.alsa-project.org/files/pub/utils/alsa-utils-%{version}.tar.bz2.sig
|
||||
Source2: 01beep.conf
|
||||
Source3: sound-extra.service
|
||||
Source5: load-sound-modules.sh
|
||||
# from https://www.alsa-project.org/files/pub/gpg-release-key-v1.txt
|
||||
Source6: alsa-utils.keyring
|
||||
# upstream fixes
|
||||
Patch1: 0001-axfer-use-ATTRIBUTE_UNUSED-instead-remove-argument-n.patch
|
||||
Patch2: 0002-amidi-use-ATTRIBUTE_UNUSED-instead-remove-argument-n.patch
|
||||
Patch3: 0003-alsaloop-use-ATTRIBUTE_UNUSED-instead-remove-argumen.patch
|
||||
Patch4: 0004-bat-use-ATTRIBUTE_UNUSED-instead-remove-argument-nam.patch
|
||||
Patch5: 0005-seq-use-ATTRIBUTE_UNUSED-instead-remove-argument-nam.patch
|
||||
Patch6: 0006-alsaucm-use-ATTRIBUTE_UNUSED-instead-remove-argument.patch
|
||||
Patch7: 0007-topology-use-ATTRIBUTE_UNUSED-instead-remove-argumen.patch
|
||||
Patch100: alsa-info-no-update-for-distro-script.patch
|
||||
Patch101: alsa-utils-configure-version-revert.patch
|
||||
BuildRequires: alsa-devel
|
||||
%if %enable_topology
|
||||
BuildRequires: alsa-topology-devel
|
||||
%endif
|
||||
BuildRequires: fftw3-devel
|
||||
BuildRequires: libsamplerate-devel
|
||||
BuildRequires: ncurses-devel
|
||||
BuildRequires: pkgconfig
|
||||
%if 0%{?suse_version} < 1500
|
||||
BuildRequires: python-docutils
|
||||
%else
|
||||
BuildRequires: python3-docutils
|
||||
%endif
|
||||
BuildRequires: xmlto
|
||||
BuildRequires: pkgconfig(systemd)
|
||||
BuildRequires: pkgconfig(udev)
|
||||
%if 0%{?do_autoreconf}
|
||||
BuildRequires: automake
|
||||
BuildRequires: libtool
|
||||
%endif
|
||||
Requires: alsa
|
||||
# for alsa-info.sh
|
||||
Requires: dialog
|
||||
Requires: pciutils
|
||||
|
||||
%description
|
||||
This package contains utility programs supporting ALSA, Advanced Linux
|
||||
Sound Architecture.
|
||||
|
||||
%package -n alsabat
|
||||
Summary: Command-line sound tester for ALSA sound card driver
|
||||
Group: Productivity/Multimedia/Sound/Utilities
|
||||
Requires: alsa-utils = %{version}
|
||||
|
||||
%description -n alsabat
|
||||
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
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
%patch5 -p1
|
||||
%patch6 -p1
|
||||
%patch7 -p1
|
||||
%patch100 -p1
|
||||
%if 0%{?do_autoreconf}
|
||||
%patch101 -p1
|
||||
# fix stupid automake's automatic action
|
||||
sed -i -e's/EXTRA_DIST= config.rpath /EXTRA_DIST=/' Makefile.am
|
||||
%endif
|
||||
|
||||
%build
|
||||
export AUTOMAKE_JOBS="%{?_smp_mflags}"
|
||||
%if 0%{?do_autoreconf}
|
||||
gettextize -c -f --no-changelog
|
||||
autoreconf -fi
|
||||
%endif
|
||||
%configure --with-curses=ncursesw \
|
||||
--with-systemdsystemunitdir=%{_unitdir} \
|
||||
--with-udev-rules-dir=%{_udevdir}/rules.d \
|
||||
--with-alsactl-lock-dir=/run/lock
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
%make_install
|
||||
mkdir -p %{buildroot}%{_datadir}/alsa/init/preinit
|
||||
mkdir -p %{buildroot}%{_datadir}/alsa/init/postinit
|
||||
%if %enable_topology
|
||||
rm -f %{_libdir}/alsa-topology/*.la
|
||||
%endif
|
||||
for i in %{_sourcedir}/[0-9]*.conf; do
|
||||
install -c -m 0644 $i %{buildroot}%{_datadir}/alsa/init/postinit
|
||||
done
|
||||
# remove obsoleted alsaconf script
|
||||
rm -f %{buildroot}%{_sbindir}/alsaconf
|
||||
rm -f %{buildroot}%{_datadir}/locale/*/*/alsaconf.mo
|
||||
rm -f %{buildroot}%{_mandir}/*/man*/alsaconf.*
|
||||
rm -f %{buildroot}%{_mandir}/man*/alsaconf.*
|
||||
rmdir --ignore-fail-on-non-empty -p %{buildroot}%{_mandir}/*/man* %{buildroot}%{_mandir}/man*
|
||||
%find_lang %{name} --all-name
|
||||
ln -s alsa-restore.service %{buildroot}%{_unitdir}/alsasound.service
|
||||
mkdir -p %{buildroot}%{_localstatedir}/lib/alsa
|
||||
# systemd unit files
|
||||
install -c -m 0644 %{SOURCE3} %{buildroot}%{_unitdir}
|
||||
ln -s ../sound-extra.service %{buildroot}%{_unitdir}/sound.target.wants
|
||||
mkdir -p %{buildroot}%{_prefix}/lib/systemd/scripts
|
||||
install -c -m 0755 %{SOURCE5} %{buildroot}%{_prefix}/lib/systemd/scripts
|
||||
|
||||
%pre
|
||||
%service_add_pre sound-extra.service
|
||||
|
||||
%post
|
||||
%service_add_post sound-extra.service
|
||||
# migrate the old asound.state
|
||||
if [ ! -f %{_localstatedir}/lib/alsa/asound.state ]; then
|
||||
test -f /etc/asound.state && \
|
||||
cp -a /etc/asound.state %{_localstatedir}/lib/alsa/asound.state
|
||||
fi
|
||||
exit 0
|
||||
|
||||
%preun
|
||||
%service_del_preun sound-extra.service
|
||||
|
||||
%postun
|
||||
%service_del_postun sound-extra.service
|
||||
|
||||
%files -f %{name}.lang
|
||||
%license COPYING
|
||||
%doc README.md
|
||||
%doc seq/aconnect/README*
|
||||
%doc seq/aseqnet/README*
|
||||
%{_mandir}/man*/*
|
||||
%{_bindir}/*
|
||||
%{_sbindir}/*
|
||||
%exclude %{_bindir}/alsabat
|
||||
%exclude %{_sbindir}/alsabat-test.sh
|
||||
%if %enable_topology
|
||||
%{_libdir}/alsa-topology
|
||||
%endif
|
||||
%exclude %{_mandir}/man*/alsabat.*
|
||||
%{_datadir}/sounds/alsa
|
||||
%{_datadir}/alsa
|
||||
%{_udevdir}
|
||||
%{_unitdir}/*.service
|
||||
%{_unitdir}/sound.target.wants
|
||||
%{_prefix}/lib/systemd/scripts
|
||||
%{_localstatedir}/lib/alsa
|
||||
|
||||
%files -n alsabat
|
||||
%license COPYING
|
||||
%{_bindir}/alsabat
|
||||
%{_sbindir}/alsabat-test.sh
|
||||
%{_mandir}/man*/alsabat.*
|
||||
|
||||
%changelog
|
29
load-sound-modules.sh
Normal file
29
load-sound-modules.sh
Normal file
@ -0,0 +1,29 @@
|
||||
#!/bin/sh
|
||||
|
||||
test -r /etc/sysconfig/sound && . /etc/sysconfig/sound
|
||||
|
||||
if [ "$LOAD_OSS_EMUL_MODULES" = "yes" ]; then
|
||||
/sbin/modprobe -q snd-mixer-oss
|
||||
/sbin/modprobe -q snd-pcm-oss
|
||||
fi
|
||||
|
||||
if [ "$LOAD_SEQUENCER" = "yes" ]; then
|
||||
/sbin/modprobe -q snd-seq
|
||||
fi
|
||||
|
||||
if [ -r /proc/asound/seq/drivers ]; then
|
||||
OLDIFS="$IFS"
|
||||
IFS=","
|
||||
while read t x c; do
|
||||
/sbin/modprobe -q $t
|
||||
done < /proc/asound/seq/drivers
|
||||
IFS="$OLDIFS"
|
||||
fi
|
||||
|
||||
if [ -d /proc/asound/seq ]; then
|
||||
if [ "$LOAD_OSS_SEQ_MODULE" = "yes" ]; then
|
||||
/sbin/modprobe -q snd-seq-oss
|
||||
fi
|
||||
fi
|
||||
|
||||
exit 0
|
16
sound-extra.service
Normal file
16
sound-extra.service
Normal file
@ -0,0 +1,16 @@
|
||||
[Unit]
|
||||
Description=Load extra kernel modules for sound stuff
|
||||
After=alsa-restore.service
|
||||
ConditionPathExists=/proc/asound
|
||||
|
||||
[Service]
|
||||
# added automatically, for details please see
|
||||
# https://en.opensuse.org/openSUSE:Security_Features#Systemd_hardening_effort
|
||||
ProtectSystem=full
|
||||
ProtectHome=true
|
||||
ProtectHostname=true
|
||||
ProtectKernelTunables=true
|
||||
ProtectKernelLogs=true
|
||||
ProtectControlGroups=true
|
||||
Type=oneshot
|
||||
ExecStart=/usr/lib/systemd/scripts/load-sound-modules.sh
|
Loading…
Reference in New Issue
Block a user