diff --git a/audacious-plugins-1.5.1-alsaplug-id.patch b/audacious-plugins-1.5.1-alsaplug-id.patch new file mode 100644 index 0000000..d55eea1 --- /dev/null +++ b/audacious-plugins-1.5.1-alsaplug-id.patch @@ -0,0 +1,28 @@ +diff -Nur audacious-plugins-1.5.1-alsa-ng/src/alsa/alsa-configure.c audacious-plugins-1.5.1-alsa-ng2/src/alsa/alsa-configure.c +--- audacious-plugins-1.5.1-alsa-ng/src/alsa/alsa-configure.c 2009-06-29 18:01:20.000000000 +0200 ++++ audacious-plugins-1.5.1-alsa-ng2/src/alsa/alsa-configure.c 2009-06-29 20:24:34.000000000 +0200 +@@ -46,18 +46,18 @@ + + /* Save configuration */ + mcs_handle_t *cfgfile = aud_cfg_db_open(); +- aud_cfg_db_set_string(cfgfile, "alsaplug", "pcm_device", alsaplug_cfg.pcm_device); +- aud_cfg_db_set_string(cfgfile, "alsaplug", "mixer_card", alsaplug_cfg.mixer_card); +- aud_cfg_db_set_string(cfgfile, "alsaplug","mixer_device", alsaplug_cfg.mixer_device); ++ aud_cfg_db_set_string(cfgfile, "ALSA", "pcm_device", alsaplug_cfg.pcm_device); ++ aud_cfg_db_set_string(cfgfile, "ALSA", "mixer_card", alsaplug_cfg.mixer_card); ++ aud_cfg_db_set_string(cfgfile, "ALSA","mixer_device", alsaplug_cfg.mixer_device); + aud_cfg_db_close(cfgfile); + } + + void alsaplug_get_config(void) + { + mcs_handle_t *cfgfile = aud_cfg_db_open(); +- aud_cfg_db_get_string(cfgfile, "alsaplug", "pcm_device", &alsaplug_cfg.pcm_device); +- aud_cfg_db_get_string(cfgfile, "alsaplug", "mixer_card", &alsaplug_cfg.mixer_card); +- aud_cfg_db_get_string(cfgfile, "alsaplug","mixer_device", &alsaplug_cfg.mixer_device); ++ aud_cfg_db_get_string(cfgfile, "ALSA", "pcm_device", &alsaplug_cfg.pcm_device); ++ aud_cfg_db_get_string(cfgfile, "ALSA", "mixer_card", &alsaplug_cfg.mixer_card); ++ aud_cfg_db_get_string(cfgfile, "ALSA","mixer_device", &alsaplug_cfg.mixer_device); + aud_cfg_db_close(cfgfile); + } + diff --git a/audacious-plugins-1.5.1-mixer-not-ready.patch b/audacious-plugins-1.5.1-mixer-not-ready.patch new file mode 100644 index 0000000..a22c37f --- /dev/null +++ b/audacious-plugins-1.5.1-mixer-not-ready.patch @@ -0,0 +1,32 @@ +diff -Nur audacious-plugins-fedora-1.5.1-alsa-ng/src/alsa/alsa-core.c audacious-plugins-fedora-1.5.1/src/alsa/alsa-core.c +--- audacious-plugins-fedora-1.5.1-alsa-ng/src/alsa/alsa-core.c 2009-06-29 18:01:20.000000000 +0200 ++++ audacious-plugins-fedora-1.5.1/src/alsa/alsa-core.c 2009-06-29 20:12:36.000000000 +0200 +@@ -45,6 +45,7 @@ + + static snd_mixer_t *amixer = NULL; + static gboolean mixer_ready = FALSE; ++static gint mixer_left, mixer_right; + + static snd_mixer_elem_t * + alsaplug_get_mixer_elem_by_name(snd_mixer_t *mixer, gchar *name) +@@ -140,6 +141,8 @@ + { + snd_mixer_elem_t *elem = alsaplug_guess_mixer_elem(amixer); + ++ mixer_left = l; ++ mixer_right = r; + if (elem == NULL) + return; + +@@ -172,6 +175,11 @@ + { + snd_mixer_elem_t *elem = alsaplug_guess_mixer_elem(amixer); + ++ *l = mixer_left; ++ *r = mixer_right; ++ if (!mixer_ready) { ++ return; ++ } + if (elem == NULL) + return; + diff --git a/audacious-plugins.spec b/audacious-plugins.spec index f2f6117..8675571 100644 --- a/audacious-plugins.spec +++ b/audacious-plugins.spec @@ -4,7 +4,7 @@ Name: audacious-plugins Version: 1.5.1 -Release: 8%{?dist} +Release: 9%{?dist} Summary: Plugins for the Audacious media player Group: Applications/Multimedia @@ -29,6 +29,8 @@ Patch8: audacious-plugins-1.5.1-sndfile-cleanup.patch # alsa-ng plugin from 2.1 devel Patch50: audacious-plugins-1.5.1-alsa-ng.patch +Patch51: audacious-plugins-1.5.1-alsaplug-id.patch +Patch52: audacious-plugins-1.5.1-mixer-not-ready.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -174,6 +176,8 @@ vortex compressed files. %patch8 -p1 -b .sndfile-cleanup %patch50 -p1 -b .alsa-ng +%patch51 -p1 -b .alsa-ng2 +%patch52 -p1 -b .mixer-not-ready sed -i '\,^.SILENT:,d' buildsys.mk.in @@ -268,6 +272,10 @@ update-desktop-database &> /dev/null || : %changelog +* Mon Jun 29 2009 Michael Schwendt - 1.5.1-9 +- Use old "ALSA" plugin id for config file. +- Keep old mixer level even if mixer isn't ready. + * Mon Jun 29 2009 Michael Schwendt - 1.5.1-8 - Replace old ALSA output plugin and related patches with the "alsa-ng" code from Audacious 2.1 development. This is supposed to