rpms/audacious-plugins/F-10 audacious-plugins-1.5.1-underruns.patch, NONE, 1.1 audacious-plugins-1.5.1-alsa-ng.patch, 1.1, 1.2 audacious-plugins-1.5.1-alsaplug-id.patch, 1.1, 1.2 audacious-plugins-1.5.1-mixer-not-ready.patch, 1.2, 1.3 audacious-plugins.spec, 1.36, 1.37
Michael Schwendt
mschwendt at fedoraproject.org
Sat Sep 19 14:54:26 UTC 2009
Author: mschwendt
Update of /cvs/pkgs/rpms/audacious-plugins/F-10
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv6485
Modified Files:
audacious-plugins-1.5.1-alsa-ng.patch
audacious-plugins-1.5.1-alsaplug-id.patch
audacious-plugins-1.5.1-mixer-not-ready.patch
audacious-plugins.spec
Added Files:
audacious-plugins-1.5.1-underruns.patch
Log Message:
* Sat Sep 19 2009 Michael Schwendt <mschwendt at fedoraproject.org> - 1.5.1-11
- Patch alsa-ng plugin with some buffer prefilling to fight underruns.
- Merge minor changes from 2.2 alpha1 alsa-ng plugin.
audacious-plugins-1.5.1-underruns.patch:
alsa-core.c | 39 ++++++++++++++++++++++++++++++++++-----
1 file changed, 34 insertions(+), 5 deletions(-)
--- NEW FILE audacious-plugins-1.5.1-underruns.patch ---
diff -Nur audacious-plugins-fedora-1.5.1-alsa-ng/src/alsa/alsa-core.c audacious-plugins-fedora-1.5.1-alsa-ng-underruns/src/alsa/alsa-core.c
--- audacious-plugins-fedora-1.5.1-alsa-ng/src/alsa/alsa-core.c 2009-09-19 12:46:20.000000000 +0200
+++ audacious-plugins-fedora-1.5.1-alsa-ng-underruns/src/alsa/alsa-core.c 2009-09-19 15:52:28.000000000 +0200
@@ -27,6 +27,10 @@
static gboolean pcm_going = FALSE;
static GThread *audio_thread = NULL;
static gint bps;
+static gint loopbufsize = 384000;
+static gint looppostsize = 2048;
+static gint looppresize;
+static gboolean prefill = TRUE;
static gsize wr_total = 0;
static gsize wr_hwframes = 0;
@@ -219,6 +228,9 @@
}
else
{
+ if (wr_frames == -EPIPE) {
+ prefill = TRUE;
+ }
gint err = snd_pcm_recover(pcm_handle, wr_frames, 1);
_DEBUG ("snd_pcm_writei error: %s", snd_strerror (wr_frames));
@@ -235,7 +247,7 @@
static gpointer
alsaplug_loop(gpointer unused)
{
- guchar buf[2048];
+ guchar buf[loopbufsize];
int size;
while (pcm_going)
@@ -245,6 +257,7 @@
if (flush_request != -1)
{
alsaplug_ringbuffer_reset (& pcm_ringbuf);
+ prefill = TRUE;
snd_pcm_drop(pcm_handle);
snd_pcm_prepare(pcm_handle);
wr_total = flush_request * (long long) bps / 1000;
@@ -262,12 +275,25 @@
continue;
}
- if (size > sizeof buf)
- size = sizeof buf;
+ if (prefill) {
+ if (size > loopbufsize)
+ size = loopbufsize;
+
+ if (size >= looppresize) {
+ alsaplug_ringbuffer_read (& pcm_ringbuf, buf, size);
+ prefill = FALSE;
+ }
+ }
+ else {
+ if (size > looppostsize)
+ size = looppostsize;
- alsaplug_ringbuffer_read (& pcm_ringbuf, buf, size);
+ alsaplug_ringbuffer_read (& pcm_ringbuf, buf, size);
+ }
g_mutex_unlock (pcm_state_mutex);
- alsaplug_write_buffer (buf, size);
+ if (!prefill) {
+ alsaplug_write_buffer (buf, size);
+ }
}
snd_pcm_drain(pcm_handle);
@@ -362,6 +388,13 @@
_ERROR("alsaplug_ringbuffer_init failed");
return -1;
}
+ if (loopbufsize >= ringbuf_size) {
+ looppresize = ringbuf_size/2;
+ }
+ else {
+ looppresize = loopbufsize;
+ }
+ prefill = TRUE;
pcm_going = TRUE;
flush_request = -1;
paused = FALSE;
@@ -504,6 +537,7 @@
{
g_mutex_lock (pcm_state_mutex);
paused = p;
+ prefill = !paused;
g_cond_broadcast (pcm_state_cond);
g_mutex_unlock (pcm_state_mutex);
}
audacious-plugins-1.5.1-alsa-ng.patch:
Makefile | 8
TODO | 30 +
about.c | 49 --
alsa-configure.c | 345 +++++++++++++++++++
alsa-core.c | 534 +++++++++++++++++++++++++++++
alsa-debug.h | 36 +
alsa-ringbuffer.c | 366 ++++++++++++++++++++
alsa-ringbuffer.h | 58 +++
alsa-stdinc.h | 36 +
alsa-types.h | 40 ++
alsa-util.c | 55 +++
alsa.c | 100 -----
alsa.h | 79 ----
audio.c | 978 ------------------------------------------------------
configure.c | 396 ---------------------
15 files changed, 1504 insertions(+), 1606 deletions(-)
Index: audacious-plugins-1.5.1-alsa-ng.patch
===================================================================
RCS file: /cvs/pkgs/rpms/audacious-plugins/F-10/audacious-plugins-1.5.1-alsa-ng.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- audacious-plugins-1.5.1-alsa-ng.patch 29 Jun 2009 16:17:07 -0000 1.1
+++ audacious-plugins-1.5.1-alsa-ng.patch 19 Sep 2009 14:54:25 -0000 1.2
@@ -1,6 +1,6 @@
-diff -Nur audacious-plugins-fedora-1.5.1-orig/src/alsa/about.c audacious-plugins-fedora-1.5.1/src/alsa/about.c
+diff -Nur audacious-plugins-fedora-1.5.1-orig/src/alsa/about.c audacious-plugins-fedora-1.5.1-alsa-ng/src/alsa/about.c
--- audacious-plugins-fedora-1.5.1-orig/src/alsa/about.c 2008-06-08 10:37:44.000000000 +0200
-+++ audacious-plugins-fedora-1.5.1/src/alsa/about.c 1970-01-01 01:00:00.000000000 +0100
++++ audacious-plugins-fedora-1.5.1-alsa-ng/src/alsa/about.c 1970-01-01 01:00:00.000000000 +0100
@@ -1,49 +0,0 @@
-/* XMMS - ALSA output plugin
- * Copyright (C) 2001-2003 Matthieu Sozeau <mattam at altern.org>
@@ -51,9 +51,9 @@ diff -Nur audacious-plugins-fedora-1.5.1
- GTK_SIGNAL_FUNC(gtk_widget_destroyed),
- &dialog);
-}
-diff -Nur audacious-plugins-fedora-1.5.1-orig/src/alsa/alsa.c audacious-plugins-fedora-1.5.1/src/alsa/alsa.c
+diff -Nur audacious-plugins-fedora-1.5.1-orig/src/alsa/alsa.c audacious-plugins-fedora-1.5.1-alsa-ng/src/alsa/alsa.c
--- audacious-plugins-fedora-1.5.1-orig/src/alsa/alsa.c 2008-06-08 10:37:44.000000000 +0200
-+++ audacious-plugins-fedora-1.5.1/src/alsa/alsa.c 1970-01-01 01:00:00.000000000 +0100
++++ audacious-plugins-fedora-1.5.1-alsa-ng/src/alsa/alsa.c 1970-01-01 01:00:00.000000000 +0100
@@ -1,100 +0,0 @@
-/* XMMS - ALSA output plugin
- * Copyright (C) 2001 Matthieu Sozeau
@@ -155,10 +155,10 @@ diff -Nur audacious-plugins-fedora-1.5.1
-OutputPlugin *alsa_oplist[] = { &alsa_op, NULL };
-
-DECLARE_PLUGIN(alsa, NULL, NULL, NULL, alsa_oplist, NULL, NULL, NULL, NULL)
-diff -Nur audacious-plugins-fedora-1.5.1-orig/src/alsa/alsa-configure.c audacious-plugins-fedora-1.5.1/src/alsa/alsa-configure.c
+diff -Nur audacious-plugins-fedora-1.5.1-orig/src/alsa/alsa-configure.c audacious-plugins-fedora-1.5.1-alsa-ng/src/alsa/alsa-configure.c
--- audacious-plugins-fedora-1.5.1-orig/src/alsa/alsa-configure.c 1970-01-01 01:00:00.000000000 +0100
-+++ audacious-plugins-fedora-1.5.1/src/alsa/alsa-configure.c 2009-06-29 18:01:20.000000000 +0200
-@@ -0,0 +1,355 @@
++++ audacious-plugins-fedora-1.5.1-alsa-ng/src/alsa/alsa-configure.c 2009-09-16 00:57:07.000000000 +0200
+@@ -0,0 +1,345 @@
+/*
+ * Audacious ALSA Plugin (-ng)
+ * Copyright (c) 2009 William Pitcock <nenolod at dereferenced.org>
@@ -406,8 +406,7 @@ diff -Nur audacious-plugins-fedora-1.5.1
+
+void alsaplug_configure(void)
+{
-+ GtkWidget *vbox, *notebook;
-+ GtkWidget *dev_vbox, *adevice_frame, *adevice_box;
++ GtkWidget * vbox, * adevice_frame, * adevice_box;
+ GtkWidget *mixer_frame, *mixer_box, *mixer_table, *mixer_card_om;
+ GtkWidget *mixer_card_label, *mixer_device_label;
+ GtkWidget *bbox, *ok, *cancel;
@@ -420,31 +419,25 @@ diff -Nur audacious-plugins-fedora-1.5.1
+ return;
+ }
+
-+ configure_win = gtk_window_new(GTK_WINDOW_TOPLEVEL);
-+ gtk_signal_connect(GTK_OBJECT(configure_win), "destroy",
-+ GTK_SIGNAL_FUNC(gtk_widget_destroyed),
-+ &configure_win);
-+ gtk_window_set_title(GTK_WINDOW(configure_win),
-+ _("ALSA Driver configuration"));
-+ gtk_window_set_policy(GTK_WINDOW(configure_win),
-+ FALSE, TRUE, FALSE);
-+ gtk_container_border_width(GTK_CONTAINER(configure_win), 10);
-+
-+ vbox = gtk_vbox_new(FALSE, 10);
-+ gtk_container_add(GTK_CONTAINER(configure_win), vbox);
-+
-+ notebook = gtk_notebook_new();
-+ gtk_box_pack_start(GTK_BOX(vbox), notebook, TRUE, TRUE, 0);
-+
-+ dev_vbox = gtk_vbox_new(FALSE, 5);
-+ gtk_container_set_border_width(GTK_CONTAINER(dev_vbox), 5);
-+
-+ adevice_frame = gtk_frame_new(_("Audio device:"));
-+ gtk_box_pack_start(GTK_BOX(dev_vbox), adevice_frame, FALSE, FALSE, 0);
-+
-+ adevice_box = gtk_vbox_new(FALSE, 5);
-+ gtk_container_set_border_width(GTK_CONTAINER(adevice_box), 5);
-+ gtk_container_add(GTK_CONTAINER(adevice_frame), adevice_box);
++ configure_win = gtk_window_new (GTK_WINDOW_TOPLEVEL);
++ gtk_window_set_title ((GtkWindow *) configure_win, _("ALSA Output "
++ "Plugin Preferences"));
++ gtk_window_set_type_hint ((GtkWindow *) configure_win,
++ GDK_WINDOW_TYPE_HINT_DIALOG);
++ gtk_window_set_resizable ((GtkWindow *) configure_win, FALSE);
++ gtk_container_set_border_width ((GtkContainer *) configure_win, 6);
++ g_signal_connect ((GObject *) configure_win, "destroy", (GCallback)
++ gtk_widget_destroyed, & configure_win);
++
++ vbox = gtk_vbox_new (FALSE, 6);
++ gtk_container_add ((GtkContainer *) configure_win, vbox);
++
++ adevice_frame = gtk_frame_new (_("Device:"));
++ gtk_box_pack_start ((GtkBox *) vbox, adevice_frame, FALSE, FALSE, 0);
++
++ adevice_box = gtk_vbox_new (FALSE, 6);
++ gtk_container_set_border_width ((GtkContainer *) adevice_box, 6);
++ gtk_container_add ((GtkContainer *) adevice_frame, adevice_box);
+
+ devices_combo = gtk_combo_new();
+ gtk_box_pack_start(GTK_BOX(adevice_box), devices_combo,
@@ -453,12 +446,12 @@ diff -Nur audacious-plugins-fedora-1.5.1
+ gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(devices_combo)->entry),
+ alsaplug_cfg.pcm_device);
+
-+ mixer_frame = gtk_frame_new(_("Mixer:"));
-+ gtk_box_pack_start(GTK_BOX(dev_vbox), mixer_frame, FALSE, FALSE, 0);
++ mixer_frame = gtk_frame_new (_("Mixer:"));
++ gtk_box_pack_start ((GtkBox *) vbox, mixer_frame, FALSE, FALSE, 0);
+
-+ mixer_box = gtk_vbox_new(FALSE, 5);
-+ gtk_container_set_border_width(GTK_CONTAINER(mixer_box), 5);
-+ gtk_container_add(GTK_CONTAINER(mixer_frame), mixer_box);
++ mixer_box = gtk_vbox_new (FALSE, 6);
++ gtk_container_set_border_width ((GtkContainer *) mixer_box, 6);
++ gtk_container_add ((GtkContainer *) mixer_frame, mixer_box);
+
+ mixer_table = gtk_table_new(2, 2, FALSE);
+ gtk_table_set_row_spacings(GTK_TABLE(mixer_table), 5);
@@ -492,9 +485,6 @@ diff -Nur audacious-plugins-fedora-1.5.1
+ gtk_table_attach(GTK_TABLE(mixer_table), mixer_devices_combo,
+ 1, 2, 1, 2, GTK_FILL | GTK_EXPAND, 0, 0, 0);
+
-+ gtk_notebook_append_page(GTK_NOTEBOOK(notebook), dev_vbox,
-+ gtk_label_new(_("Device settings")));
-+
+ bbox = gtk_hbutton_box_new();
+ gtk_button_box_set_layout(GTK_BUTTON_BOX(bbox), GTK_BUTTONBOX_END);
+ gtk_button_box_set_spacing(GTK_BUTTON_BOX(bbox), 5);
@@ -514,10 +504,10 @@ diff -Nur audacious-plugins-fedora-1.5.1
+
+ gtk_widget_show_all(configure_win);
+}
-diff -Nur audacious-plugins-fedora-1.5.1-orig/src/alsa/alsa-core.c audacious-plugins-fedora-1.5.1/src/alsa/alsa-core.c
+diff -Nur audacious-plugins-fedora-1.5.1-orig/src/alsa/alsa-core.c audacious-plugins-fedora-1.5.1-alsa-ng/src/alsa/alsa-core.c
--- audacious-plugins-fedora-1.5.1-orig/src/alsa/alsa-core.c 1970-01-01 01:00:00.000000000 +0100
-+++ audacious-plugins-fedora-1.5.1/src/alsa/alsa-core.c 2009-06-29 18:01:20.000000000 +0200
-@@ -0,0 +1,511 @@
++++ audacious-plugins-fedora-1.5.1-alsa-ng/src/alsa/alsa-core.c 2009-09-19 12:46:20.000000000 +0200
+@@ -0,0 +1,534 @@
+/*
+ * Audacious ALSA Plugin (-ng)
+ * Copyright (c) 2009 William Pitcock <nenolod at dereferenced.org>
@@ -591,7 +581,7 @@ diff -Nur audacious-plugins-fedora-1.5.1
+static snd_mixer_elem_t *
+alsaplug_guess_mixer_elem(snd_mixer_t *mixer)
+{
-+ gchar *elem_names[] = { "Wave", "PCM", "Front", "Master" };
++ gchar *elem_names[] = {"PCM", "Wave", "Front", "Master"};
+ gint i;
+ snd_mixer_elem_t *elem;
+
@@ -691,25 +681,30 @@ diff -Nur audacious-plugins-fedora-1.5.1
+alsaplug_get_volume(gint *l, gint *r)
+{
+ snd_mixer_elem_t *elem = alsaplug_guess_mixer_elem(amixer);
++ long left, right;
+
+ if (elem == NULL)
++ {
++ * l = 50;
++ * r = 50;
+ return;
++ }
+
+ snd_mixer_handle_events(amixer);
+
-+ *l = 0;
-+ *r = 0;
-+
+ if (snd_mixer_selem_is_playback_mono(elem))
+ {
-+ snd_mixer_selem_get_playback_volume(elem, SND_MIXER_SCHN_MONO, (glong *) l);
-+ snd_mixer_selem_get_playback_volume(elem, SND_MIXER_SCHN_MONO, (glong *) r);
++ snd_mixer_selem_get_playback_volume(elem, SND_MIXER_SCHN_MONO, & left);
++ snd_mixer_selem_get_playback_volume(elem, SND_MIXER_SCHN_MONO, & right);
+ }
+ else
+ {
-+ snd_mixer_selem_get_playback_volume(elem, SND_MIXER_SCHN_FRONT_LEFT, (glong *) l);
-+ snd_mixer_selem_get_playback_volume(elem, SND_MIXER_SCHN_FRONT_RIGHT, (glong *) r);
++ snd_mixer_selem_get_playback_volume(elem, SND_MIXER_SCHN_FRONT_LEFT, & left);
++ snd_mixer_selem_get_playback_volume(elem, SND_MIXER_SCHN_FRONT_RIGHT, & right);
+ }
++
++ * l = left;
++ * r = right;
+}
+
+/********************************************************************************
@@ -735,10 +730,14 @@ diff -Nur audacious-plugins-fedora-1.5.1
+ else
+ {
+ gint err = snd_pcm_recover(pcm_handle, wr_frames, 1);
-+ if (err < 0)
-+ _ERROR("(write) snd_pcm_recover: %s", snd_strerror(err));
+
-+ return;
++ _DEBUG ("snd_pcm_writei error: %s", snd_strerror (wr_frames));
++
++ if (err < 0)
++ {
++ _ERROR ("snd_pcm_recover error: %s", snd_strerror (err));
++ return;
++ }
+ }
+ }
+}
@@ -815,10 +814,22 @@ diff -Nur audacious-plugins-fedora-1.5.1
+ /* return OUTPUT_PLUGIN_INIT_FOUND_DEVICES;*/
+}
+
++#define CHECK_FAIL(expression, name) \
++{ \
++ gint error = expression; \
++ if (error) \
++ { \
++ _ERROR (name " failed: %s.\n", snd_strerror (error)); \
++ snd_pcm_close (pcm_handle); \
++ pcm_handle = NULL; \
++ return -1; \
++ } \
++}
++
+static gint
+alsaplug_open_audio(AFormat fmt, gint rate, gint nch)
+{
-+ gint err, bitwidth, ringbuf_size;
++ gint err, bitwidth, ringbuf_size, buf_size;
+ snd_pcm_format_t afmt;
+ snd_pcm_hw_params_t *hwparams = NULL;
+
@@ -841,27 +852,29 @@ diff -Nur audacious-plugins-fedora-1.5.1
+
+ snd_pcm_hw_params_alloca(&hwparams);
+ snd_pcm_hw_params_any(pcm_handle, hwparams);
-+ snd_pcm_hw_params_set_access(pcm_handle, hwparams, SND_PCM_ACCESS_RW_INTERLEAVED);
-+ snd_pcm_hw_params_set_format(pcm_handle, hwparams, afmt);
-+ snd_pcm_hw_params_set_channels(pcm_handle, hwparams, nch);
-+ snd_pcm_hw_params_set_rate(pcm_handle, hwparams, rate, 0);
-+
-+ err = snd_pcm_hw_params(pcm_handle, hwparams);
-+ if (err < 0)
-+ {
-+ _ERROR("snd_pcm_hw_params failed: %s", snd_strerror(err));
-+ return -1;
-+ }
++ CHECK_FAIL (snd_pcm_hw_params_set_access (pcm_handle, hwparams,
++ SND_PCM_ACCESS_RW_INTERLEAVED), "snd_pcm_hw_params_set_access");
++ CHECK_FAIL (snd_pcm_hw_params_set_format (pcm_handle, hwparams, afmt),
++ "snd_pcm_hw_params_set_format");
++ CHECK_FAIL (snd_pcm_hw_params_set_channels (pcm_handle, hwparams, nch),
++ "snd_pcm_hw_params_set_channels");
++ CHECK_FAIL (snd_pcm_hw_params_set_rate (pcm_handle, hwparams, rate, 0),
++ "snd_pcm_hw_params_set_rate");
++ CHECK_FAIL (snd_pcm_hw_params (pcm_handle, hwparams), "snd_pcm_hw_params");
+
+ bitwidth = snd_pcm_format_physical_width(afmt);
+ bps = (rate * bitwidth * nch) >> 3;
-+ ringbuf_size = aud_cfg->output_buffer_size * bps / 1000;
++
++ buf_size = MAX(aud_cfg->output_buffer_size, 100);
++ ringbuf_size = buf_size * bps / 1000;
++
+ if (alsaplug_ringbuffer_init(&pcm_ringbuf, ringbuf_size) == -1) {
+ _ERROR("alsaplug_ringbuffer_init failed");
+ return -1;
+ }
+ pcm_going = TRUE;
+ flush_request = -1;
++ paused = FALSE;
+
+ audio_thread = g_thread_create(alsaplug_loop, NULL, TRUE, NULL);
+ return 1;
@@ -1029,9 +1042,9 @@ diff -Nur audacious-plugins-fedora-1.5.1
+
+OutputPlugin *alsa_oplist[] = { &alsa_op, NULL };
+SIMPLE_OUTPUT_PLUGIN(alsa, alsa_oplist);
-diff -Nur audacious-plugins-fedora-1.5.1-orig/src/alsa/alsa-debug.h audacious-plugins-fedora-1.5.1/src/alsa/alsa-debug.h
+diff -Nur audacious-plugins-fedora-1.5.1-orig/src/alsa/alsa-debug.h audacious-plugins-fedora-1.5.1-alsa-ng/src/alsa/alsa-debug.h
--- audacious-plugins-fedora-1.5.1-orig/src/alsa/alsa-debug.h 1970-01-01 01:00:00.000000000 +0100
-+++ audacious-plugins-fedora-1.5.1/src/alsa/alsa-debug.h 2009-06-29 18:01:20.000000000 +0200
++++ audacious-plugins-fedora-1.5.1-alsa-ng/src/alsa/alsa-debug.h 2009-09-19 12:30:59.000000000 +0200
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2005 Ralf Ertzinger
@@ -1069,9 +1082,9 @@ diff -Nur audacious-plugins-fedora-1.5.1
+#endif
+
+#endif
-diff -Nur audacious-plugins-fedora-1.5.1-orig/src/alsa/alsa.h audacious-plugins-fedora-1.5.1/src/alsa/alsa.h
+diff -Nur audacious-plugins-fedora-1.5.1-orig/src/alsa/alsa.h audacious-plugins-fedora-1.5.1-alsa-ng/src/alsa/alsa.h
--- audacious-plugins-fedora-1.5.1-orig/src/alsa/alsa.h 2008-06-08 10:37:44.000000000 +0200
-+++ audacious-plugins-fedora-1.5.1/src/alsa/alsa.h 1970-01-01 01:00:00.000000000 +0100
++++ audacious-plugins-fedora-1.5.1-alsa-ng/src/alsa/alsa.h 1970-01-01 01:00:00.000000000 +0100
@@ -1,79 +0,0 @@
-/* XMMS - ALSA output plugin
- * Copyright (C) 2001-2003 Matthieu Sozeau
@@ -1152,9 +1165,9 @@ diff -Nur audacious-plugins-fedora-1.5.1
-extern GStaticMutex alsa_mutex;
-
-#endif
-diff -Nur audacious-plugins-fedora-1.5.1-orig/src/alsa/alsa-ringbuffer.c audacious-plugins-fedora-1.5.1/src/alsa/alsa-ringbuffer.c
+diff -Nur audacious-plugins-fedora-1.5.1-orig/src/alsa/alsa-ringbuffer.c audacious-plugins-fedora-1.5.1-alsa-ng/src/alsa/alsa-ringbuffer.c
--- audacious-plugins-fedora-1.5.1-orig/src/alsa/alsa-ringbuffer.c 1970-01-01 01:00:00.000000000 +0100
-+++ audacious-plugins-fedora-1.5.1/src/alsa/alsa-ringbuffer.c 2009-06-29 18:01:20.000000000 +0200
++++ audacious-plugins-fedora-1.5.1-alsa-ng/src/alsa/alsa-ringbuffer.c 2009-09-19 12:30:59.000000000 +0200
@@ -0,0 +1,366 @@
+/*
+ * This program is free software; you can redistribute it and/or modify
@@ -1522,9 +1535,9 @@ diff -Nur audacious-plugins-fedora-1.5.1
+
+ _LEAVE;
+}
-diff -Nur audacious-plugins-fedora-1.5.1-orig/src/alsa/alsa-ringbuffer.h audacious-plugins-fedora-1.5.1/src/alsa/alsa-ringbuffer.h
+diff -Nur audacious-plugins-fedora-1.5.1-orig/src/alsa/alsa-ringbuffer.h audacious-plugins-fedora-1.5.1-alsa-ng/src/alsa/alsa-ringbuffer.h
--- audacious-plugins-fedora-1.5.1-orig/src/alsa/alsa-ringbuffer.h 1970-01-01 01:00:00.000000000 +0100
-+++ audacious-plugins-fedora-1.5.1/src/alsa/alsa-ringbuffer.h 2009-06-29 18:01:20.000000000 +0200
++++ audacious-plugins-fedora-1.5.1-alsa-ng/src/alsa/alsa-ringbuffer.h 2009-09-19 12:30:59.000000000 +0200
@@ -0,0 +1,58 @@
+/*
+ * This program is free software; you can redistribute it and/or modify
@@ -1584,9 +1597,9 @@ diff -Nur audacious-plugins-fedora-1.5.1
+void alsaplug_ringbuffer_destroy(alsaplug_ringbuf_t* rb);
+
+#endif
-diff -Nur audacious-plugins-fedora-1.5.1-orig/src/alsa/alsa-stdinc.h audacious-plugins-fedora-1.5.1/src/alsa/alsa-stdinc.h
+diff -Nur audacious-plugins-fedora-1.5.1-orig/src/alsa/alsa-stdinc.h audacious-plugins-fedora-1.5.1-alsa-ng/src/alsa/alsa-stdinc.h
--- audacious-plugins-fedora-1.5.1-orig/src/alsa/alsa-stdinc.h 1970-01-01 01:00:00.000000000 +0100
-+++ audacious-plugins-fedora-1.5.1/src/alsa/alsa-stdinc.h 2009-06-29 18:01:20.000000000 +0200
++++ audacious-plugins-fedora-1.5.1-alsa-ng/src/alsa/alsa-stdinc.h 2009-09-19 12:30:59.000000000 +0200
@@ -0,0 +1,36 @@
+/*
+ * Audacious ALSA Plugin (-ng)
@@ -1624,9 +1637,9 @@ diff -Nur audacious-plugins-fedora-1.5.1
+#include "alsa-ringbuffer.h"
+
+#endif
-diff -Nur audacious-plugins-fedora-1.5.1-orig/src/alsa/alsa-types.h audacious-plugins-fedora-1.5.1/src/alsa/alsa-types.h
+diff -Nur audacious-plugins-fedora-1.5.1-orig/src/alsa/alsa-types.h audacious-plugins-fedora-1.5.1-alsa-ng/src/alsa/alsa-types.h
--- audacious-plugins-fedora-1.5.1-orig/src/alsa/alsa-types.h 1970-01-01 01:00:00.000000000 +0100
-+++ audacious-plugins-fedora-1.5.1/src/alsa/alsa-types.h 2009-06-29 18:01:20.000000000 +0200
++++ audacious-plugins-fedora-1.5.1-alsa-ng/src/alsa/alsa-types.h 2009-09-19 12:30:59.000000000 +0200
@@ -0,0 +1,40 @@
+/*
+ * Audacious ALSA Plugin (-ng)
@@ -1668,9 +1681,9 @@ diff -Nur audacious-plugins-fedora-1.5.1
+extern alsaplug_cfg_t alsaplug_cfg;
+
+#endif
-diff -Nur audacious-plugins-fedora-1.5.1-orig/src/alsa/alsa-util.c audacious-plugins-fedora-1.5.1/src/alsa/alsa-util.c
+diff -Nur audacious-plugins-fedora-1.5.1-orig/src/alsa/alsa-util.c audacious-plugins-fedora-1.5.1-alsa-ng/src/alsa/alsa-util.c
--- audacious-plugins-fedora-1.5.1-orig/src/alsa/alsa-util.c 1970-01-01 01:00:00.000000000 +0100
-+++ audacious-plugins-fedora-1.5.1/src/alsa/alsa-util.c 2009-06-29 18:01:20.000000000 +0200
++++ audacious-plugins-fedora-1.5.1-alsa-ng/src/alsa/alsa-util.c 2009-09-19 12:30:59.000000000 +0200
@@ -0,0 +1,55 @@
+/*
+ * Audacious ALSA Plugin (-ng)
@@ -1727,9 +1740,9 @@ diff -Nur audacious-plugins-fedora-1.5.1
+
+ return SND_PCM_FORMAT_UNKNOWN;
+}
-diff -Nur audacious-plugins-fedora-1.5.1-orig/src/alsa/audio.c audacious-plugins-fedora-1.5.1/src/alsa/audio.c
+diff -Nur audacious-plugins-fedora-1.5.1-orig/src/alsa/audio.c audacious-plugins-fedora-1.5.1-alsa-ng/src/alsa/audio.c
--- audacious-plugins-fedora-1.5.1-orig/src/alsa/audio.c 2008-06-08 10:37:44.000000000 +0200
-+++ audacious-plugins-fedora-1.5.1/src/alsa/audio.c 1970-01-01 01:00:00.000000000 +0100
++++ audacious-plugins-fedora-1.5.1-alsa-ng/src/alsa/audio.c 1970-01-01 01:00:00.000000000 +0100
@@ -1,978 +0,0 @@
-/* XMMS - ALSA output plugin
- * Copyright (C) 2001-2003 Matthieu Sozeau <mattam at altern.org>
@@ -2709,9 +2722,9 @@ diff -Nur audacious-plugins-fedora-1.5.1
- (*rate) = inputf->rate;
- (*nch) = inputf->channels;
-}
-diff -Nur audacious-plugins-fedora-1.5.1-orig/src/alsa/configure.c audacious-plugins-fedora-1.5.1/src/alsa/configure.c
+diff -Nur audacious-plugins-fedora-1.5.1-orig/src/alsa/configure.c audacious-plugins-fedora-1.5.1-alsa-ng/src/alsa/configure.c
--- audacious-plugins-fedora-1.5.1-orig/src/alsa/configure.c 2008-06-08 10:37:44.000000000 +0200
-+++ audacious-plugins-fedora-1.5.1/src/alsa/configure.c 1970-01-01 01:00:00.000000000 +0100
++++ audacious-plugins-fedora-1.5.1-alsa-ng/src/alsa/configure.c 1970-01-01 01:00:00.000000000 +0100
@@ -1,396 +0,0 @@
-/* XMMS - ALSA output plugin
- * Copyright (C) 2001-2003 Matthieu Sozeau <mattam at altern.org>
@@ -3109,9 +3122,9 @@ diff -Nur audacious-plugins-fedora-1.5.1
-
- gtk_widget_show_all(configure_win);
-}
-diff -Nur audacious-plugins-fedora-1.5.1-orig/src/alsa/Makefile audacious-plugins-fedora-1.5.1/src/alsa/Makefile
+diff -Nur audacious-plugins-fedora-1.5.1-orig/src/alsa/Makefile audacious-plugins-fedora-1.5.1-alsa-ng/src/alsa/Makefile
--- audacious-plugins-fedora-1.5.1-orig/src/alsa/Makefile 2008-06-08 10:37:44.000000000 +0200
-+++ audacious-plugins-fedora-1.5.1/src/alsa/Makefile 2009-06-29 18:01:20.000000000 +0200
++++ audacious-plugins-fedora-1.5.1-alsa-ng/src/alsa/Makefile 2009-09-19 12:30:59.000000000 +0200
@@ -1,9 +1,9 @@
PLUGIN = ALSA${PLUGIN_SUFFIX}
@@ -3126,9 +3139,9 @@ diff -Nur audacious-plugins-fedora-1.5.1
include ../../buildsys.mk
include ../../extra.mk
-diff -Nur audacious-plugins-fedora-1.5.1-orig/src/alsa/TODO audacious-plugins-fedora-1.5.1/src/alsa/TODO
+diff -Nur audacious-plugins-fedora-1.5.1-orig/src/alsa/TODO audacious-plugins-fedora-1.5.1-alsa-ng/src/alsa/TODO
--- audacious-plugins-fedora-1.5.1-orig/src/alsa/TODO 1970-01-01 01:00:00.000000000 +0100
-+++ audacious-plugins-fedora-1.5.1/src/alsa/TODO 2009-06-29 18:01:20.000000000 +0200
++++ audacious-plugins-fedora-1.5.1-alsa-ng/src/alsa/TODO 2009-09-19 12:30:59.000000000 +0200
@@ -0,0 +1,30 @@
+The following things are not implemented yet:
+
audacious-plugins-1.5.1-alsaplug-id.patch:
alsa-configure.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
Index: audacious-plugins-1.5.1-alsaplug-id.patch
===================================================================
RCS file: /cvs/pkgs/rpms/audacious-plugins/F-10/audacious-plugins-1.5.1-alsaplug-id.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- audacious-plugins-1.5.1-alsaplug-id.patch 29 Jun 2009 19:05:23 -0000 1.1
+++ audacious-plugins-1.5.1-alsaplug-id.patch 19 Sep 2009 14:54:25 -0000 1.2
@@ -1,6 +1,6 @@
-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
+diff -Nur audacious-plugins-fedora-1.5.1-alsa-ng/src/alsa/alsa-configure.c audacious-plugins-fedora-1.5.1-alsa-ng-plugid/src/alsa/alsa-configure.c
+--- audacious-plugins-fedora-1.5.1-alsa-ng/src/alsa/alsa-configure.c 2009-09-16 00:57:07.000000000 +0200
++++ audacious-plugins-fedora-1.5.1-alsa-ng-plugid/src/alsa/alsa-configure.c 2009-09-19 12:50:35.118611192 +0200
@@ -46,18 +46,18 @@
/* Save configuration */
audacious-plugins-1.5.1-mixer-not-ready.patch:
alsa-core.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
Index: audacious-plugins-1.5.1-mixer-not-ready.patch
===================================================================
RCS file: /cvs/pkgs/rpms/audacious-plugins/F-10/audacious-plugins-1.5.1-mixer-not-ready.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -p -r1.2 -r1.3
--- audacious-plugins-1.5.1-mixer-not-ready.patch 2 Jul 2009 09:20:41 -0000 1.2
+++ audacious-plugins-1.5.1-mixer-not-ready.patch 19 Sep 2009 14:54:25 -0000 1.3
@@ -1,6 +1,6 @@
-diff -Nur audacious-plugins-1.5.1-alsa-ng/src/alsa/alsa-core.c audacious-plugins-1.5.1-alsa-ng2/src/alsa/alsa-core.c
---- audacious-plugins-1.5.1-alsa-ng/src/alsa/alsa-core.c 2009-06-29 18:01:20.000000000 +0200
-+++ audacious-plugins-1.5.1-alsa-ng2/src/alsa/alsa-core.c 2009-07-02 10:45:48.000000000 +0200
+diff -Nur audacious-plugins-fedora-1.5.1-alsa-ng/src/alsa/alsa-core.c audacious-plugins-fedora-1.5.1-alsa-ng-mixer/src/alsa/alsa-core.c
+--- audacious-plugins-fedora-1.5.1-alsa-ng/src/alsa/alsa-core.c 2009-09-19 12:46:20.000000000 +0200
++++ audacious-plugins-fedora-1.5.1-alsa-ng-mixer/src/alsa/alsa-core.c 2009-09-19 12:54:29.476615457 +0200
@@ -45,6 +45,7 @@
static snd_mixer_t *amixer = NULL;
@@ -27,12 +27,16 @@ diff -Nur audacious-plugins-1.5.1-alsa-n
if (elem == NULL)
return;
-@@ -172,6 +177,8 @@
- {
+@@ -173,10 +178,10 @@
snd_mixer_elem_t *elem = alsaplug_guess_mixer_elem(amixer);
+ long left, right;
+ *l = mixer_left;
+ *r = mixer_right;
if (elem == NULL)
+ {
+- * l = 50;
+- * r = 50;
return;
+ }
Index: audacious-plugins.spec
===================================================================
RCS file: /cvs/pkgs/rpms/audacious-plugins/F-10/audacious-plugins.spec,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -p -r1.36 -r1.37
--- audacious-plugins.spec 2 Jul 2009 09:20:41 -0000 1.36
+++ audacious-plugins.spec 19 Sep 2009 14:54:25 -0000 1.37
@@ -4,7 +4,7 @@
Name: audacious-plugins
Version: 1.5.1
-Release: 10%{?dist}
+Release: 11%{?dist}
Summary: Plugins for the Audacious media player
Group: Applications/Multimedia
@@ -27,10 +27,12 @@ Patch6: audacious-plugins-1.5.1-
Patch7: audacious-plugins-1.5.1-neon-reader-error-crash.patch
Patch8: audacious-plugins-1.5.1-sndfile-cleanup.patch
-# alsa-ng plugin from 2.1 devel
+# alsa-ng plugin from 2.1 devel up to 2.2 alpha1
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
+# fight snd_pcm_writei underruns
+Patch53: audacious-plugins-1.5.1-underruns.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -178,6 +180,7 @@ vortex compressed files.
%patch50 -p1 -b .alsa-ng
%patch51 -p1 -b .alsa-ng2
%patch52 -p1 -b .mixer-not-ready
+%patch53 -p1 -b .underruns
sed -i '\,^.SILENT:,d' buildsys.mk.in
@@ -272,6 +275,10 @@ update-desktop-database &> /dev/null ||
%changelog
+* Sat Sep 19 2009 Michael Schwendt <mschwendt at fedoraproject.org> - 1.5.1-11
+- Patch alsa-ng plugin with some buffer prefilling to fight underruns.
+- Merge minor changes from 2.2 alpha1 alsa-ng plugin.
+
* Thu Jul 2 2009 Michael Schwendt <mschwendt at fedoraproject.org> - 1.5.1-10
- Prevent alsalib mixer crash if mixer isn't ready.
More information about the fedora-extras-commits
mailing list