diff --git a/0001-alsamixer-fix-display-of-active-inactive-controls.patch b/0001-alsamixer-fix-display-of-active-inactive-controls.patch new file mode 100644 index 0000000..01639af --- /dev/null +++ b/0001-alsamixer-fix-display-of-active-inactive-controls.patch @@ -0,0 +1,40 @@ +From cd26f244e7f2648a63411741552c658ca67334e9 Mon Sep 17 00:00:00 2001 +From: Raymond Yau +Date: Mon, 28 Feb 2011 15:36:36 +0100 +Subject: [PATCH 01/16] alsamixer: fix display of active/inactive controls + +Signed-off-by: Raymond Yau +Signed-off-by: Clemens Ladisch +--- + alsamixer/mixer_widget.c | 11 +++++++++++ + 1 files changed, 11 insertions(+), 0 deletions(-) + +diff --git a/alsamixer/mixer_widget.c b/alsamixer/mixer_widget.c +index fb352d3..caaf777 100644 +--- a/alsamixer/mixer_widget.c ++++ b/alsamixer/mixer_widget.c +@@ -59,10 +59,21 @@ enum channel_mask { + + static int elem_callback(snd_mixer_elem_t *elem, unsigned int mask) + { ++ unsigned int i; ++ + if (mask & (SND_CTL_EVENT_MASK_REMOVE | + SND_CTL_EVENT_MASK_INFO | + SND_CTL_EVENT_MASK_VALUE)) + controls_changed = TRUE; ++ ++ if (mask & SND_CTL_EVENT_MASK_INFO) ++ for (i = 0; i < controls_count; ++i) ++ if (controls[i].elem == elem) { ++ controls[i].flags &= ~IS_ACTIVE; ++ if (snd_mixer_selem_is_active(controls[i].elem)) ++ controls[i].flags |= IS_ACTIVE; ++ } ++ + return 0; + } + +-- +1.7.5.3 + diff --git a/0002-alsaloop-libsamplerate-requires-specific-formats-for.patch b/0002-alsaloop-libsamplerate-requires-specific-formats-for.patch new file mode 100644 index 0000000..0873dc1 --- /dev/null +++ b/0002-alsaloop-libsamplerate-requires-specific-formats-for.patch @@ -0,0 +1,61 @@ +From 3853175d122ef368db1f653140502ec44d4b2a4a Mon Sep 17 00:00:00 2001 +From: Jaroslav Kysela +Date: Mon, 7 Mar 2011 14:21:19 +0100 +Subject: [PATCH 02/16] alsaloop: libsamplerate requires specific formats, + force them for slave mode + +Signed-off-by: Jaroslav Kysela +--- + alsaloop/pcmjob.c | 22 ++++++++++++++++++++-- + 1 files changed, 20 insertions(+), 2 deletions(-) + +diff --git a/alsaloop/pcmjob.c b/alsaloop/pcmjob.c +index 0b84803..6b50cf0 100644 +--- a/alsaloop/pcmjob.c ++++ b/alsaloop/pcmjob.c +@@ -1238,8 +1238,8 @@ static int closeit(struct loopback_handle *lhandle) + static int init_handle(struct loopback_handle *lhandle, int alloc) + { + snd_pcm_uframes_t lat; +- lhandle->frame_size = (snd_pcm_format_width(lhandle->format) / 8) * +- lhandle->channels; ++ lhandle->frame_size = (snd_pcm_format_physical_width(lhandle->format) ++ / 8) * lhandle->channels; + lhandle->sync_point = lhandle->rate * 15; /* every 15 seconds */ + lat = lhandle->loopback->latency; + if (lhandle->buffer_size > lat) +@@ -1358,6 +1358,23 @@ static void lhandle_start(struct loopback_handle *lhandle) + lhandle->total_queued = 0; + } + ++static void fix_format(struct loopback *loop) ++{ ++ snd_pcm_format_t format = loop->capt->format; ++ ++ if (loop->sync != SYNC_TYPE_SAMPLERATE) ++ return; ++ if (format == SND_PCM_FORMAT_S16 || ++ format == SND_PCM_FORMAT_S32) ++ return; ++ if (snd_pcm_format_width(format) > 16) ++ format = SND_PCM_FORMAT_S32; ++ else ++ format = SND_PCM_FORMAT_S16; ++ loop->capt->format = format; ++ loop->play->format = format; ++} ++ + int pcmjob_start(struct loopback *loop) + { + snd_pcm_uframes_t count; +@@ -1383,6 +1400,7 @@ int pcmjob_start(struct loopback *loop) + if (err < 0) + goto __error; + loop->play->format = loop->capt->format = err; ++ fix_format(loop); + err = get_rate(loop->capt); + if (err < 0) + goto __error; +-- +1.7.5.3 + diff --git a/0003-alsaloop-another-try-to-force-correct-formats-for-li.patch b/0003-alsaloop-another-try-to-force-correct-formats-for-li.patch new file mode 100644 index 0000000..c4fc486 --- /dev/null +++ b/0003-alsaloop-another-try-to-force-correct-formats-for-li.patch @@ -0,0 +1,72 @@ +From 3801e25964070390c525b9f2c39913e6ea1eb864 Mon Sep 17 00:00:00 2001 +From: Jaroslav Kysela +Date: Tue, 8 Mar 2011 12:56:56 +0100 +Subject: [PATCH 03/16] alsaloop: another try to force correct formats for + libsamplerate + +Signed-off-by: Jaroslav Kysela +--- + alsaloop/pcmjob.c | 22 ++++++++++++++++------ + 1 files changed, 16 insertions(+), 6 deletions(-) + +diff --git a/alsaloop/pcmjob.c b/alsaloop/pcmjob.c +index 6b50cf0..bfac2d3 100644 +--- a/alsaloop/pcmjob.c ++++ b/alsaloop/pcmjob.c +@@ -1358,11 +1358,11 @@ static void lhandle_start(struct loopback_handle *lhandle) + lhandle->total_queued = 0; + } + +-static void fix_format(struct loopback *loop) ++static void fix_format(struct loopback *loop, int force) + { + snd_pcm_format_t format = loop->capt->format; + +- if (loop->sync != SYNC_TYPE_SAMPLERATE) ++ if (!force && loop->sync != SYNC_TYPE_SAMPLERATE) + return; + if (format == SND_PCM_FORMAT_S16 || + format == SND_PCM_FORMAT_S32) +@@ -1400,7 +1400,7 @@ int pcmjob_start(struct loopback *loop) + if (err < 0) + goto __error; + loop->play->format = loop->capt->format = err; +- fix_format(loop); ++ fix_format(loop, 0); + err = get_rate(loop->capt); + if (err < 0) + goto __error; +@@ -1412,6 +1412,7 @@ int pcmjob_start(struct loopback *loop) + } + loop->reinit = 0; + loop->use_samplerate = 0; ++__again: + if (loop->latency_req) { + loop->latency_reqtime = frames_to_time(loop->play->rate_req, + loop->latency_req); +@@ -1460,10 +1461,19 @@ int pcmjob_start(struct loopback *loop) + goto __error; + if ((err = init_handle(loop->capt, 1)) < 0) + goto __error; +- if (loop->play->rate_req != loop->play->rate) +- loop->use_samplerate = 1; +- if (loop->capt->rate_req != loop->capt->rate) ++ if (loop->play->rate_req != loop->play->rate || ++ loop->capt->rate_req != loop->capt->rate) { ++ snd_pcm_format_t format1, format2; + loop->use_samplerate = 1; ++ format1 = loop->play->format; ++ format2 = loop->capt->format; ++ fix_format(loop, 1); ++ if (loop->play->format != format1 || ++ loop->capt->format != format2) { ++ pcmjob_stop(loop); ++ goto __again; ++ } ++ } + } + #ifdef USE_SAMPLERATE + if (loop->sync == SYNC_TYPE_SAMPLERATE) +-- +1.7.5.3 + diff --git a/0004-alsamixer-fix-build-on-uClibc.patch b/0004-alsamixer-fix-build-on-uClibc.patch new file mode 100644 index 0000000..628ca4f --- /dev/null +++ b/0004-alsamixer-fix-build-on-uClibc.patch @@ -0,0 +1,34 @@ +From a7bd33957e099dea109e219a348b131c7186ee1e Mon Sep 17 00:00:00 2001 +From: Peter Korsgaard +Date: Mon, 14 Mar 2011 09:48:13 +0100 +Subject: [PATCH 04/16] alsamixer: fix build on uClibc + +exp10 is a glibc extension, which isn't supported on uClibc. Luckily, +exp10() is trivial to compute based on exp(), so add a wrapper for +the uClibc case. + +Signed-off-by: Peter Korsgaard +Signed-off-by: Jaroslav Kysela +--- + alsamixer/volume_mapping.c | 5 +++++ + 1 files changed, 5 insertions(+), 0 deletions(-) + +diff --git a/alsamixer/volume_mapping.c b/alsamixer/volume_mapping.c +index 9cacad8..1c0d7c4 100644 +--- a/alsamixer/volume_mapping.c ++++ b/alsamixer/volume_mapping.c +@@ -37,6 +37,11 @@ + #include + #include "volume_mapping.h" + ++#ifdef __UCLIBC__ ++/* 10^x = 10^(log e^x) = (e^x)^log10 = e^(x * log 10) */ ++#define exp10(x) (exp((x) * log(10))) ++#endif /* __UCLIBC__ */ ++ + #define MAX_LINEAR_DB_SCALE 24 + + static inline bool use_linear_dB_scale(long dBmin, long dBmax) +-- +1.7.5.3 + diff --git a/0005-alsactl-init-Mute-CD-Playback-volume-by-default.patch b/0005-alsactl-init-Mute-CD-Playback-volume-by-default.patch new file mode 100644 index 0000000..2a4114c --- /dev/null +++ b/0005-alsactl-init-Mute-CD-Playback-volume-by-default.patch @@ -0,0 +1,45 @@ +From 70451054e08e51f7eaebf9e7d72324acdac01cdb Mon Sep 17 00:00:00 2001 +From: David Henningsson +Date: Mon, 4 Apr 2011 11:28:47 +0200 +Subject: [PATCH 05/16] alsactl init: Mute CD Playback volume by default + +The CD analog playback line is seldom used these days, as all +modern players rip the CD and use the DAC on the sound card. +In addition, it causes background hum on some machines. +Therefore keep it muted by default. + +BugLink: http://bugs.launchpad.net/bugs/747184 +Signed-off-by: David Henningsson +Signed-off-by: Takashi Iwai +--- + alsactl/init/default | 13 +++---------- + 1 files changed, 3 insertions(+), 10 deletions(-) + +diff --git a/alsactl/init/default b/alsactl/init/default +index 7f8ec4c..b7cb941 100644 +--- a/alsactl/init/default ++++ b/alsactl/init/default +@@ -144,17 +144,10 @@ CTL{name}="Music Playback Switch",CTL{do_search}=="1", \ + CTL{values}="on" + + CTL{reset}="mixer" +-CTL{name}="CD Playback Volume",PROGRAM!="__ctl_search", GOTO="" +-# if master volume control is present, turn CD volume to max +-ENV{has_pmaster_vol}=="true",CTL{write}=="0dB",GOTO="" +-ENV{has_pmaster_vol}=="true",CTL{write}=="100%",GOTO="" +-# exception - some HDA codecs have shifted dB range +-CTL{dBmin}=="-34.50dB",CTL{dBmax}=="12.00dB",CTL{write}=="0dB",GOTO="" +-CTL{dBmin}=="-30.00dB",CTL{dBmax}=="0dB",CTL{write}=="0dB",GOTO="" +-CTL{write}!="$env{pvolume}",CTL{values}="$env{ppercent}" +-LABEL="" ++CTL{name}="CD Playback Volume",CTL{do_search}=="1", \ ++ CTL{values}="0%" + CTL{name}="CD Playback Switch",CTL{do_search}=="1", \ +- CTL{values}="on" ++ CTL{values}="off" + + CTL{reset}="mixer" + CTL{name}="Mono Playback Volume",CTL{do_search}=="1", \ +-- +1.7.5.3 + diff --git a/0006-Revert-alsactl-Display-help-for-names-command.patch b/0006-Revert-alsactl-Display-help-for-names-command.patch new file mode 100644 index 0000000..bc12e55 --- /dev/null +++ b/0006-Revert-alsactl-Display-help-for-names-command.patch @@ -0,0 +1,29 @@ +From 5ee6a670751db67f9e2b2910d5b3b6fc6fff8dfd Mon Sep 17 00:00:00 2001 +From: Jaroslav Kysela +Date: Thu, 28 Apr 2011 08:13:28 +0200 +Subject: [PATCH 06/16] Revert "alsactl - Display help for names command" + +This reverts commit 6d32e055d73edfe6be90135c500dcb32491cf04d. + +From: Alexander Stein +Signed-off-by: Jaroslav Kysela +--- + alsactl/alsactl.c | 2 -- + 1 files changed, 0 insertions(+), 2 deletions(-) + +diff --git a/alsactl/alsactl.c b/alsactl/alsactl.c +index c2120bd..1792747 100644 +--- a/alsactl/alsactl.c ++++ b/alsactl/alsactl.c +@@ -68,8 +68,6 @@ static void help(void) + printf(" restore load current driver setup for one or each soundcards\n"); + printf(" from configuration file\n"); + printf(" init initialize driver to a default state\n"); +- printf(" names dump information about all the known present (sub-)devices\n"); +- printf(" into configuration file (DEPRECATED)\n"); + } + + int main(int argc, char *argv[]) +-- +1.7.5.3 + diff --git a/0007-alsaucm-Add-list1-command-for-non-tuple-lists.patch b/0007-alsaucm-Add-list1-command-for-non-tuple-lists.patch new file mode 100644 index 0000000..f096ba3 --- /dev/null +++ b/0007-alsaucm-Add-list1-command-for-non-tuple-lists.patch @@ -0,0 +1,90 @@ +From 16bdb41b87d1f4baa3a54a4af0b85abd98cf9159 Mon Sep 17 00:00:00 2001 +From: Stephen Warren +Date: Thu, 2 Jun 2011 16:45:12 -0600 +Subject: [PATCH 07/16] alsaucm: Add list1 command for non-tuple lists + +snd_use_case_get_list returns lists of strings that are either: +a) A sequence of single strings +b) A sequence of pairs of strings all flattened into a single list + +The current list command assumes layout (b) above, and hence prints +nothing when printing a single-entry list that's actually in layout (a). +Add a new command "list1" to dump lists in layout (a). + +Signed-off-by: Stephen Warren +Signed-off-by: Jaroslav Kysela +--- + alsaucm/usecase.c | 29 +++++++++++++++++++++-------- + 1 files changed, 21 insertions(+), 8 deletions(-) + +diff --git a/alsaucm/usecase.c b/alsaucm/usecase.c +index 83781d0..f24e63e 100644 +--- a/alsaucm/usecase.c ++++ b/alsaucm/usecase.c +@@ -63,7 +63,8 @@ enum uc_cmd { + OM_RESET, + OM_RELOAD, + OM_LISTCARDS, +- OM_LIST, ++ OM_LIST2, ++ OM_LIST1, + + /* set/get */ + OM_SET, +@@ -87,7 +88,8 @@ static struct cmd cmds[] = { + { OM_RESET, 0, 1, "reset" }, + { OM_RELOAD, 0, 1, "reload" }, + { OM_LISTCARDS, 0, 0, "listcards" }, +- { OM_LIST, 1, 1, "list" }, ++ { OM_LIST1, 1, 1, "list1" }, ++ { OM_LIST2, 1, 1, "list" }, + { OM_SET, 2, 1, "set" }, + { OM_GET, 1, 1, "get" }, + { OM_GETI, 1, 1, "geti" }, +@@ -172,7 +174,7 @@ static int do_one(struct context *context, struct cmd *cmd, char **argv) + { + const char **list, *str; + long lval; +- int err, i; ++ int err, i, j, entries; + + if (cmd->opencard && context->uc_mgr == NULL) { + fprintf(stderr, "%s: command '%s' requires an open card\n", +@@ -233,7 +235,17 @@ static int do_one(struct context *context, struct cmd *cmd, char **argv) + } + snd_use_case_free_list(list, err); + break; +- case OM_LIST: ++ case OM_LIST1: ++ case OM_LIST2: ++ switch (cmd->code) { ++ case OM_LIST1: ++ entries = 1; ++ break; ++ case OM_LIST2: ++ entries = 2; ++ break; ++ } ++ + err = snd_use_case_get_list(context->uc_mgr, + argv[0], + &list); +@@ -246,10 +258,11 @@ static int do_one(struct context *context, struct cmd *cmd, char **argv) + } + if (err == 0) + printf(" list is empty\n"); +- for (i = 0; i < err / 2; i++) { +- printf(" %i: %s\n", i, list[i*2]); +- if (list[i*2+1]) +- printf(" %s\n", list[i*2+1]); ++ for (i = 0; i < err / entries; i++) { ++ printf(" %i: %s\n", i, list[i*entries]); ++ for (j = 0; j < entries - 1; j++) ++ if (list[i*entries+j+1]) ++ printf(" %s\n", list[i*entries+j+1]); + } + snd_use_case_free_list(list, err); + break; +-- +1.7.5.3 + diff --git a/0008-alsaucm-Don-t-double-free-empty-lists.patch b/0008-alsaucm-Don-t-double-free-empty-lists.patch new file mode 100644 index 0000000..c2c781e --- /dev/null +++ b/0008-alsaucm-Don-t-double-free-empty-lists.patch @@ -0,0 +1,48 @@ +From f30fbe3901da0f57a6b40102ae1c3ab3a9ff6744 Mon Sep 17 00:00:00 2001 +From: Stephen Warren +Date: Thu, 2 Jun 2011 16:45:13 -0600 +Subject: [PATCH 08/16] alsaucm: Don't double-free empty lists + +When snd_use_case_get_list (and hence also snd_use_case_card_list) returns +an empty list, alsaucm still attempts to free it. This ends up double- +freeing the returned list, or worse, freeing an invalid pointer, depending +on how snd_use_case_get_list gets implemented. Fix alsaucm to return early +on empty lists to avoid this. + +Signed-off-by: Stephen Warren +Signed-off-by: Jaroslav Kysela +--- + alsaucm/usecase.c | 8 ++++++-- + 1 files changed, 6 insertions(+), 2 deletions(-) + +diff --git a/alsaucm/usecase.c b/alsaucm/usecase.c +index f24e63e..1c94680 100644 +--- a/alsaucm/usecase.c ++++ b/alsaucm/usecase.c +@@ -226,8 +226,10 @@ static int do_one(struct context *context, struct cmd *cmd, char **argv) + snd_strerror(err)); + return err; + } +- if (err == 0) ++ if (err == 0) { + printf(" list is empty\n"); ++ return 0; ++ } + for (i = 0; i < err / 2; i++) { + printf(" %i: %s\n", i, list[i*2]); + if (list[i*2+1]) +@@ -256,8 +258,10 @@ static int do_one(struct context *context, struct cmd *cmd, char **argv) + snd_strerror(err)); + return err; + } +- if (err == 0) ++ if (err == 0) { + printf(" list is empty\n"); ++ return 0; ++ } + for (i = 0; i < err / entries; i++) { + printf(" %i: %s\n", i, list[i*entries]); + for (j = 0; j < entries - 1; j++) +-- +1.7.5.3 + diff --git a/0009-aplay-Add-i-option-for-interactive-mode.patch b/0009-aplay-Add-i-option-for-interactive-mode.patch new file mode 100644 index 0000000..6aa5b7d --- /dev/null +++ b/0009-aplay-Add-i-option-for-interactive-mode.patch @@ -0,0 +1,109 @@ +From d67a965aec800483ba48d6de736cb3851163e678 Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Fri, 3 Jun 2011 12:41:26 +0200 +Subject: [PATCH 09/16] aplay: Add -i option for interactive mode + +The recent addition of pause/resume control via keyboard brought +a problem when aplay/arecord is invoked in background. For avoiding +regressions, it's safer to use non-interactive mode as default and +enable the new feature via an option. + +Tested-by: Stephen Warren +Signed-off-by: Takashi Iwai +--- + aplay/aplay.1 | 4 ++++ + aplay/aplay.c | 14 +++++++++++++- + 2 files changed, 17 insertions(+), 1 deletions(-) + +diff --git a/aplay/aplay.1 b/aplay/aplay.1 +index b6caf0b..8ccf556 100644 +--- a/aplay/aplay.1 ++++ b/aplay/aplay.1 +@@ -137,6 +137,10 @@ by typing aplay. + Record. This is the default if the program is invoked + by typing arecord. + .TP ++\fI\-i, \-\-interactive\fP ++Allow interactive operation via stdin. ++Currently only pause/resume via space or enter key is implemented. ++.TP + \fI\-\-disable\-resample\fP + Disable automatic rate resample. + .TP +diff --git a/aplay/aplay.c b/aplay/aplay.c +index c09f23c..04959b8 100644 +--- a/aplay/aplay.c ++++ b/aplay/aplay.c +@@ -103,6 +103,7 @@ static int avail_min = -1; + static int start_delay = 0; + static int stop_delay = 0; + static int monotonic = 0; ++static int interactive = 0; + static int can_pause = 0; + static int verbose = 0; + static int vumeter = VUMETER_NONE; +@@ -200,6 +201,7 @@ _("Usage: %s [OPTION]... [FILE]...\n" + "-v, --verbose show PCM structure and setup (accumulative)\n" + "-V, --vumeter=TYPE enable VU meter (TYPE: mono or stereo)\n" + "-I, --separate-channels one file for each channel\n" ++"-i, --interactive allow interactive operation from stdin\n" + " --disable-resample disable automatic rate resample\n" + " --disable-channels disable automatic channel conversions\n" + " --disable-format disable automatic format conversions\n" +@@ -404,7 +406,7 @@ enum { + int main(int argc, char *argv[]) + { + int option_index; +- static const char short_options[] = "hnlLD:qt:c:f:r:d:MNF:A:R:T:B:vV:IPC"; ++ static const char short_options[] = "hnlLD:qt:c:f:r:d:MNF:A:R:T:B:vV:IPCi"; + static const struct option long_options[] = { + {"help", 0, 0, 'h'}, + {"version", 0, 0, OPT_VERSION}, +@@ -442,6 +444,7 @@ int main(int argc, char *argv[]) + {"max-file-time", 1, 0, OPT_MAX_FILE_TIME}, + {"process-id-file", 1, 0, OPT_PROCESS_ID_FILE}, + {"use-strftime", 0, 0, OPT_USE_STRFTIME}, ++ {"interactive", 0, 0, 'i'}, + {0, 0, 0, 0} + }; + char *pcm_name = "default"; +@@ -608,6 +611,9 @@ int main(int argc, char *argv[]) + if (file_type == FORMAT_DEFAULT) + file_type = FORMAT_WAVE; + break; ++ case 'i': ++ interactive = 1; ++ break; + case OPT_DISABLE_RESAMPLE: + open_mode |= SND_PCM_NO_AUTO_RESAMPLE; + break; +@@ -1206,6 +1212,8 @@ static void init_stdin(void) + struct termios term; + long flags; + ++ if (!interactive) ++ return; + tcgetattr(fileno(stdin), &term); + term_c_lflag = term.c_lflag; + if (fd == fileno(stdin)) +@@ -1221,6 +1229,8 @@ static void done_stdin(void) + { + struct termios term; + ++ if (!interactive) ++ return; + if (fd == fileno(stdin) || term_c_lflag == -1) + return; + tcgetattr(fileno(stdin), &term); +@@ -1258,6 +1268,8 @@ static void check_stdin(void) + { + unsigned char b; + ++ if (!interactive) ++ return; + if (fd != fileno(stdin)) { + while (read(fileno(stdin), &b, 1) == 1) { + if (b == ' ' || b == '\r') { +-- +1.7.5.3 + diff --git a/0010-aplay-Avoid-recursive-signal-handling.patch b/0010-aplay-Avoid-recursive-signal-handling.patch new file mode 100644 index 0000000..0f6646d --- /dev/null +++ b/0010-aplay-Avoid-recursive-signal-handling.patch @@ -0,0 +1,33 @@ +From a3ebe640a74d4a0e8acd15e31dd83c210b3c1be4 Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Fri, 3 Jun 2011 12:44:17 +0200 +Subject: [PATCH 10/16] aplay: Avoid recursive signal handling + +When abort() is issued in snd_pcm_close() path, it may loop recursively +and crash. + +Signed-off-by: Takashi Iwai +--- + aplay/aplay.c | 6 ++++++ + 1 files changed, 6 insertions(+), 0 deletions(-) + +diff --git a/aplay/aplay.c b/aplay/aplay.c +index 04959b8..72852b0 100644 +--- a/aplay/aplay.c ++++ b/aplay/aplay.c +@@ -358,6 +358,12 @@ static void prg_exit(int code) + + static void signal_handler(int sig) + { ++ static int in_aborting; ++ ++ if (in_aborting) ++ return; ++ ++ in_aborting = 1; + if (verbose==2) + putchar('\n'); + if (!quiet_mode) +-- +1.7.5.3 + diff --git a/0012-alsaloop-Use-AM_CFLAGS-in-Makefile.am.patch b/0012-alsaloop-Use-AM_CFLAGS-in-Makefile.am.patch new file mode 100644 index 0000000..5b0ddd0 --- /dev/null +++ b/0012-alsaloop-Use-AM_CFLAGS-in-Makefile.am.patch @@ -0,0 +1,25 @@ +From 2a627cfaed498e9175da2ffe3f43030013bb21be Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Fri, 3 Jun 2011 14:21:53 +0200 +Subject: [PATCH 12/16] alsaloop: Use AM_CFLAGS in Makefile.am + +Signed-off-by: Takashi Iwai +--- + alsaloop/Makefile.am | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/alsaloop/Makefile.am b/alsaloop/Makefile.am +index f76eafd..a694911 100644 +--- a/alsaloop/Makefile.am ++++ b/alsaloop/Makefile.am +@@ -1,6 +1,6 @@ + INCLUDES = -I$(top_srcdir)/include + LDADD = -lm +-CFLAGS += -D_GNU_SOURCE ++AM_CFLAGS = -D_GNU_SOURCE + if HAVE_SAMPLERATE + LDADD += -lsamplerate + endif +-- +1.7.5.3 + diff --git a/0013-Updated-COPYING-with-the-recent-FSF-address.patch b/0013-Updated-COPYING-with-the-recent-FSF-address.patch new file mode 100644 index 0000000..0b25de2 --- /dev/null +++ b/0013-Updated-COPYING-with-the-recent-FSF-address.patch @@ -0,0 +1,44 @@ +From ac2be7b33ad1ece1dd031d54be1a17a5f902cece Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Fri, 3 Jun 2011 14:24:30 +0200 +Subject: [PATCH 13/16] Updated COPYING with the recent FSF address + +Signed-off-by: Takashi Iwai +--- + COPYING | 6 +++--- + 1 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/COPYING b/COPYING +index 5b6e7c6..623b625 100644 +--- a/COPYING ++++ b/COPYING +@@ -2,7 +2,7 @@ + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. +- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ++ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +@@ -305,7 +305,7 @@ the "copyright" line and a pointer to where the full notice is found. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software +- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ++ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + + + Also add information on how to contact you by electronic and paper mail. +@@ -313,7 +313,7 @@ Also add information on how to contact you by electronic and paper mail. + If the program is interactive, make it output a short notice like this + when it starts in an interactive mode: + +- Gnomovision version 69, Copyright (C) year name of author ++ Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. +-- +1.7.5.3 + diff --git a/0014-alsamixer-Fix-64bit-issues.patch b/0014-alsamixer-Fix-64bit-issues.patch new file mode 100644 index 0000000..41ef4e9 --- /dev/null +++ b/0014-alsamixer-Fix-64bit-issues.patch @@ -0,0 +1,40 @@ +From 3bea722b3bfdbec2e26218aca66e55b019a24436 Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Fri, 3 Jun 2011 14:28:28 +0200 +Subject: [PATCH 14/16] alsamixer: Fix 64bit issues + +lrint() returns a long int. + +Signed-off-by: Takashi Iwai +--- + alsamixer/mixer_display.c | 6 +++--- + 1 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/alsamixer/mixer_display.c b/alsamixer/mixer_display.c +index 51a1546..8ba396a 100644 +--- a/alsamixer/mixer_display.c ++++ b/alsamixer/mixer_display.c +@@ -486,17 +486,17 @@ static void display_control(unsigned int control_index) + if (control->flags & IS_ACTIVE) + wattrset(mixer_widget.window, attr_mixer_active); + if (!(control->flags & HAS_VOLUME_1)) { +- sprintf(buf, "%d", lrint(volumes[0] * 100)); ++ sprintf(buf, "%d", (int)lrint(volumes[0] * 100)); + display_string_in_field(values_y, frame_left - 2, buf, 8, ALIGN_CENTER); + } else { + mvwprintw(mixer_widget.window, values_y, frame_left - 2, +- "%3d", lrint(volumes[0] * 100)); ++ "%3d", (int)lrint(volumes[0] * 100)); + if (control->flags & IS_ACTIVE) + wattrset(mixer_widget.window, attr_ctl_frame); + waddstr(mixer_widget.window, "<>"); + if (control->flags & IS_ACTIVE) + wattrset(mixer_widget.window, attr_mixer_active); +- wprintw(mixer_widget.window, "%-3d", lrint(volumes[1] * 100)); ++ wprintw(mixer_widget.window, "%-3d", (int)lrint(volumes[1] * 100)); + } + } + +-- +1.7.5.3 + diff --git a/0015-aplay-Add-include-files-for-mkdir.patch b/0015-aplay-Add-include-files-for-mkdir.patch new file mode 100644 index 0000000..87919af --- /dev/null +++ b/0015-aplay-Add-include-files-for-mkdir.patch @@ -0,0 +1,26 @@ +From ce2d64b48addd16c2ba25c76b795a9f7b277e642 Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Fri, 3 Jun 2011 14:30:55 +0200 +Subject: [PATCH 15/16] aplay: Add include files for mkdir() + +Signed-off-by: Takashi Iwai +--- + aplay/aplay.c | 2 ++ + 1 files changed, 2 insertions(+), 0 deletions(-) + +diff --git a/aplay/aplay.c b/aplay/aplay.c +index 72852b0..7175652 100644 +--- a/aplay/aplay.c ++++ b/aplay/aplay.c +@@ -46,6 +46,8 @@ + #include + #include + #include ++#include ++#include + #include + #include "aconfig.h" + #include "gettext.h" +-- +1.7.5.3 + diff --git a/0016-aplay-Use-standard-endian-convesions.patch b/0016-aplay-Use-standard-endian-convesions.patch new file mode 100644 index 0000000..d74adde --- /dev/null +++ b/0016-aplay-Use-standard-endian-convesions.patch @@ -0,0 +1,52 @@ +From 36d642f4481b54c035782ec1a71f7c67f64ed3bf Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Fri, 3 Jun 2011 14:35:44 +0200 +Subject: [PATCH 16/16] aplay: Use standard endian convesions + +asm/*.h stuff shouldn't be used directly from the user-space apps. + +Signed-off-by: Takashi Iwai +--- + aplay/aplay.c | 10 +++++----- + 1 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/aplay/aplay.c b/aplay/aplay.c +index 7175652..50e01ef 100644 +--- a/aplay/aplay.c ++++ b/aplay/aplay.c +@@ -48,7 +48,7 @@ + #include + #include + #include +-#include ++#include + #include "aconfig.h" + #include "gettext.h" + #include "formats.h" +@@ -1508,9 +1508,9 @@ static void compute_max_peak(u_char *data, size_t count) + c = 0; + while (count-- > 0) { + if (format_little_endian) +- sval = __le16_to_cpu(*valp); ++ sval = le16toh(*valp); + else +- sval = __be16_to_cpu(*valp); ++ sval = be16toh(*valp); + sval = abs(sval) ^ mask; + if (max_peak[c] < sval) + max_peak[c] = sval; +@@ -1553,9 +1553,9 @@ static void compute_max_peak(u_char *data, size_t count) + c = 0; + while (count-- > 0) { + if (format_little_endian) +- val = __le32_to_cpu(*valp); ++ val = le32toh(*valp); + else +- val = __be32_to_cpu(*valp); ++ val = be32toh(*valp); + val = abs(val) ^ mask; + if (max_peak[c] < val) + max_peak[c] = val; +-- +1.7.5.3 + diff --git a/alsa-utils.changes b/alsa-utils.changes index 600b968..9ba48e9 100644 --- a/alsa-utils.changes +++ b/alsa-utils.changes @@ -1,3 +1,23 @@ +------------------------------------------------------------------- +Fri Jun 3 14:50:00 CEST 2011 - tiwai@suse.de + +- Backport alsa-utils fixes from upstream: + 0001-alsamixer-fix-display-of-active-inactive-controls.patch + 0002-alsaloop-libsamplerate-requires-specific-formats-for.patch + 0003-alsaloop-another-try-to-force-correct-formats-for-li.patch + 0004-alsamixer-fix-build-on-uClibc.patch + 0005-alsactl-init-Mute-CD-Playback-volume-by-default.patch + 0006-Revert-alsactl-Display-help-for-names-command.patch + 0007-alsaucm-Add-list1-command-for-non-tuple-lists.patch + 0008-alsaucm-Don-t-double-free-empty-lists.patch + 0009-aplay-Add-i-option-for-interactive-mode.patch + 0010-aplay-Avoid-recursive-signal-handling.patch + 0012-alsaloop-Use-AM_CFLAGS-in-Makefile.am.patch + 0013-Updated-COPYING-with-the-recent-FSF-address.patch + 0014-alsamixer-Fix-64bit-issues.patch + 0015-aplay-Add-include-files-for-mkdir.patch + 0016-aplay-Use-standard-endian-convesions.patch + ------------------------------------------------------------------- Mon Jan 31 17:21:52 CET 2011 - tiwai@suse.de diff --git a/alsa-utils.spec b/alsa-utils.spec index 9dee159..100f022 100644 --- a/alsa-utils.spec +++ b/alsa-utils.spec @@ -1,7 +1,7 @@ # -# spec file for package alsa-utils (Version 1.0.24.2) +# spec file for package alsa-utils # -# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -38,6 +38,21 @@ Version: 1.0.24.2 Release: 1 Source: ftp://ftp.alsa-project.org/pub/util/alsa-utils-%{package_version}.tar.bz2 # Patch: alsa-utils-git-fixes.diff +Patch1: 0001-alsamixer-fix-display-of-active-inactive-controls.patch +Patch2: 0002-alsaloop-libsamplerate-requires-specific-formats-for.patch +Patch3: 0003-alsaloop-another-try-to-force-correct-formats-for-li.patch +Patch4: 0004-alsamixer-fix-build-on-uClibc.patch +Patch5: 0005-alsactl-init-Mute-CD-Playback-volume-by-default.patch +Patch6: 0006-Revert-alsactl-Display-help-for-names-command.patch +Patch7: 0007-alsaucm-Add-list1-command-for-non-tuple-lists.patch +Patch8: 0008-alsaucm-Don-t-double-free-empty-lists.patch +Patch9: 0009-aplay-Add-i-option-for-interactive-mode.patch +Patch10: 0010-aplay-Avoid-recursive-signal-handling.patch +Patch12: 0012-alsaloop-Use-AM_CFLAGS-in-Makefile.am.patch +Patch13: 0013-Updated-COPYING-with-the-recent-FSF-address.patch +Patch14: 0014-alsamixer-Fix-64bit-issues.patch +Patch15: 0015-aplay-Add-include-files-for-mkdir.patch +Patch16: 0016-aplay-Use-standard-endian-convesions.patch Patch99: alsa-utils-gettext-version-removal.diff # Patch100: alsa-utils-po-pre-patch.diff Url: http://www.alsa-project.org/ @@ -59,9 +74,24 @@ Authors: # fix stupid automake's automatic action sed -i -e's/EXTRA_DIST= config.rpath /EXTRA_DIST=/' Makefile.am # fix po changes in tarball first -# %patch100 -p1 +# %%patch100 -p1 # rm -f po/Makefile* po/*.gmo po/*.pot po/*.header po/stamp-* # %%patch -p1 +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 +%patch5 -p1 +%patch6 -p1 +%patch7 -p1 +%patch8 -p1 +%patch9 -p1 +%patch10 -p1 +%patch12 -p1 +%patch13 -p1 +%patch14 -p1 +%patch15 -p1 +%patch16 -p1 %if %suse_version < 1020 %patch99 -p1 %endif