diff --git a/0001-Unmute-MacBookAir4-1-speakers.patch b/0001-Unmute-MacBookAir4-1-speakers.patch new file mode 100644 index 0000000..393639a --- /dev/null +++ b/0001-Unmute-MacBookAir4-1-speakers.patch @@ -0,0 +1,33 @@ +From a0c92daabf4fdc0a636f445ec2312c1b4fe04421 Mon Sep 17 00:00:00 2001 +From: Bastien Nocera +Date: Wed, 14 Sep 2011 12:13:04 +0100 +Subject: [PATCH] Unmute MacBookAir4,1 speakers + +--- + alsactl/init/default | 10 ++++++++++ + 1 files changed, 10 insertions(+), 0 deletions(-) + +diff --git a/alsactl/init/default b/alsactl/init/default +index 7f8ec4c..198a306 100644 +--- a/alsactl/init/default ++++ b/alsactl/init/default +@@ -174,6 +174,16 @@ CTL{name}="AC97 Playback Volume",CTL{do_search}=="1", \ + CTL{name}="AC97 Playback Switch",CTL{do_search}=="1", \ + CTL{values}="on" + ++CTL{reset}="mixer" ++# With, and without typo, see ++# http://thread.gmane.org/gmane.linux.alsa.devel/89179 ++CTL{name}="Surround Speaker Playback Volum",CTL{do_search}=="1", \ ++ CTL{values}="$env{pvolume}",RESULT!="0",CTL{values}="100%" ++CTL{name}="Surround Speaker Playback Volume",CTL{do_search}=="1", \ ++ CTL{values}="$env{pvolume}",RESULT!="0",CTL{values}="100%" ++CTL{name}="Surround Speaker Playback Switch",CTL{do_search}=="1", \ ++ CTL{values}="on" ++ + # + # Powermacs + # +-- +1.7.6.2 + diff --git a/0002-alsamixer1.patch b/0002-alsamixer1.patch new file mode 100644 index 0000000..8be0151 --- /dev/null +++ b/0002-alsamixer1.patch @@ -0,0 +1,80 @@ +From cd26f244e7f2648a63411741552c658ca67334e9 Mon Sep 17 00:00:00 2001 +From: Raymond Yau +Date: Mon, 28 Feb 2011 15:36:36 +0100 +Subject: [PATCH] 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.6.4 + +From 3bea722b3bfdbec2e26218aca66e55b019a24436 Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Fri, 3 Jun 2011 14:28:28 +0200 +Subject: [PATCH] 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.6.4 + diff --git a/0003-alsamixer2.patch b/0003-alsamixer2.patch new file mode 100644 index 0000000..42794c9 --- /dev/null +++ b/0003-alsamixer2.patch @@ -0,0 +1,88 @@ +From 4c09aaa5c13c2260fea57a89c47f88252da8a692 Mon Sep 17 00:00:00 2001 +From: Jaroslav Kysela +Date: Wed, 2 Nov 2011 17:27:47 +0100 +Subject: [PATCH] alsamixer: Fix X-win related crash for PulseAudio plugin + (bad linking) + +A lot of reports that alsamixer crashes in X terminal when the PulseAudio +CTL plugin is activated were entered to the tracking systems. + +I figured that there is a linking clash for the shutdown() function. +The shutdown() function in glibc is socket related, but the alsamixer code +redefines this function and appearently that under some linking +circumstances - which PA client invokes during the runtime dynamic linking +- the wrong function is called. + +This patch, for safety, renames the shutdown() function from alsamixer +to app_shutdown(), but it might make sense to figure the real linking +culprit to avoid future surprises. + +Signed-off-by: Jaroslav Kysela +--- + alsamixer/cli.c | 2 +- + alsamixer/die.c | 4 ++-- + alsamixer/mainloop.c | 2 +- + alsamixer/mainloop.h | 2 +- + 4 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/alsamixer/cli.c b/alsamixer/cli.c +index 3898196..bb4f030 100644 +--- a/alsamixer/cli.c ++++ b/alsamixer/cli.c +@@ -130,6 +130,6 @@ int main(int argc, char *argv[]) + + mainloop(); + +- shutdown(); ++ app_shutdown(); + return 0; + } +diff --git a/alsamixer/die.c b/alsamixer/die.c +index dcd8536..899a501 100644 +--- a/alsamixer/die.c ++++ b/alsamixer/die.c +@@ -26,14 +26,14 @@ + + void fatal_error(const char *msg) + { +- shutdown(); ++ app_shutdown(); + fprintf(stderr, "%s\n", msg); + exit(EXIT_FAILURE); + } + + void fatal_alsa_error(const char *msg, int err) + { +- shutdown(); ++ app_shutdown(); + fprintf(stderr, _("%s: %s\n"), msg, snd_strerror(err)); + exit(EXIT_FAILURE); + } +diff --git a/alsamixer/mainloop.c b/alsamixer/mainloop.c +index eddaf3b..dbfef9b 100644 +--- a/alsamixer/mainloop.c ++++ b/alsamixer/mainloop.c +@@ -52,7 +52,7 @@ void initialize_curses(bool use_color) + snd_lib_error_set_handler(black_hole_error_handler); + } + +-void shutdown(void) ++void app_shutdown(void) + { + if (curses_initialized) { + clear(); +diff --git a/alsamixer/mainloop.h b/alsamixer/mainloop.h +index 0cfc989..22317be 100644 +--- a/alsamixer/mainloop.h ++++ b/alsamixer/mainloop.h +@@ -5,6 +5,6 @@ + + void initialize_curses(bool use_color); + void mainloop(void); +-void shutdown(void); ++void app_shutdown(void); + + #endif +-- +1.7.6.4 + diff --git a/alsa-utils.spec b/alsa-utils.spec index 5d56030..c2e335d 100644 --- a/alsa-utils.spec +++ b/alsa-utils.spec @@ -4,7 +4,7 @@ Summary: Advanced Linux Sound Architecture (ALSA) utilities Name: alsa-utils Version: %{baseversion}%{?fixversion} -Release: 3%{?dist} +Release: 5%{?dist} License: GPLv2+ Group: Applications/Multimedia URL: http://www.alsa-project.org/ @@ -25,12 +25,21 @@ BuildRequires: xmlto Conflicts: udev < 062 Requires: alsa-lib >= %{baseversion}, systemd-units, dialog +# https://bugzilla.redhat.com/show_bug.cgi?id=738227 +Patch0: 0001-Unmute-MacBookAir4-1-speakers.patch + +Patch1: 0002-alsamixer1.patch +Patch2: 0003-alsamixer2.patch + %description This package contains command line utilities for the Advanced Linux Sound Architecture (ALSA). %prep %setup -q -n %{name}-%{version} +%patch0 -p1 -b .mba41 +%patch1 -p1 -b .alsamixer1 +%patch2 -p1 -b .alsamixer2 %build %configure CFLAGS="$RPM_OPT_FLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" --sbindir=/sbin --disable-alsaconf @@ -108,6 +117,12 @@ if [ -s /etc/asound.state -a ! -s /var/lib/alsa/asound.state ] ; then fi %changelog +* Wed Nov 02 2011 Jaroslav Kysela 1.0.24.1-5 +- Fix alsamixer segfaults (rhbz#731381) and other alsamixer issues + +* Mon Oct 31 2011 Bastien Nocera 1.0.24.1-4 +- Add patch to unmute MacBookAir4,1 speakers + * Mon Feb 07 2011 Fedora Release Engineering - 1.0.24.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild