tags 462810 + pending
thanks

Dear maintainer,

I've prepared an NMU for allegro4.2 (versioned as 2:4.2.2-2.2) and
uploaded it to DELAYED/2. Please feel free to tell me if I
should delay it longer.

Regards.

-- 
 .''`.   http://info.comodo.priv.at/ -- GPG key IDs: 0x8649AA06, 0x00F3CFE4
 : :' :  Debian GNU/Linux user, admin, & developer - http://www.debian.org/
 `. `'   Member of VIBE!AT & SPI, fellow of Free Software Foundation Europe
   `-    NP: Townes Van Zandt: The Velvet Voices
diff -u allegro4.2-4.2.2/debian/changelog allegro4.2-4.2.2/debian/changelog
--- allegro4.2-4.2.2/debian/changelog
+++ allegro4.2-4.2.2/debian/changelog
@@ -1,3 +1,11 @@
+allegro4.2 (2:4.2.2-2.2) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Fix "alsa plugin doesn't work with many sound cards": apply patch from
+    Peter De Wachter (debian/patches/070_alsa_signed.diff) (closes: #462810).
+
+ -- gregor herrmann <gre...@debian.org>  Sun, 13 Jun 2010 17:03:36 +0200
+
 allegro4.2 (2:4.2.2-2.1) unstable; urgency=medium
 
   * Non-maintainer upload.
diff -u allegro4.2-4.2.2/debian/patches/series allegro4.2-4.2.2/debian/patches/series
--- allegro4.2-4.2.2/debian/patches/series
+++ allegro4.2-4.2.2/debian/patches/series
@@ -11,0 +12 @@
+070_alsa_signed.diff
only in patch2:
unchanged:
--- allegro4.2-4.2.2.orig/debian/patches/070_alsa_signed.diff
+++ allegro4.2-4.2.2/debian/patches/070_alsa_signed.diff
@@ -0,0 +1,89 @@
+Index: allegro4.2-4.2.2/src/unix/alsa9.c
+===================================================================
+--- allegro4.2-4.2.2.orig/src/unix/alsa9.c	2008-01-27 16:01:06.000000000 +0100
++++ allegro4.2-4.2.2/src/unix/alsa9.c	2008-01-27 16:22:56.000000000 +0100
+@@ -353,26 +353,47 @@
+    alsa_bits = (_sound_bits == 8) ? 8 : 16;
+    alsa_stereo = (_sound_stereo) ? 1 : 0;
+    alsa_rate = (_sound_freq > 0) ? _sound_freq : 44100;
+-   alsa_signed = 0;
+ 
+-   format = ((alsa_bits == 16) ? SND_PCM_FORMAT_U16_NE : SND_PCM_FORMAT_U8);
+-
+-   switch (format) {
++   snd_pcm_hw_params_malloc(&hwparams);
++   ALSA9_CHECK(snd_pcm_hw_params_any(pcm_handle, hwparams));
+ 
+-      case SND_PCM_FORMAT_U8:
+-	 alsa_bits = 8;
+-	 break;
+-
+-      case SND_PCM_FORMAT_U16_NE:
+-	 if (sizeof(short) != 2) {
+-	    ustrzcpy(allegro_error, ALLEGRO_ERROR_SIZE, get_config_text("Unsupported sample format"));
+-	    goto Error;
+-	 }
+-	 break;
+-
+-      default:
+-	 ustrzcpy(allegro_error, ALLEGRO_ERROR_SIZE, get_config_text("Unsupported sample format"));
+-	 goto Error;
++   if (alsa_bits == 8) {
++      if (snd_pcm_hw_params_test_format(pcm_handle, hwparams, SND_PCM_FORMAT_U8) == 0) {
++         format = SND_PCM_FORMAT_U8;
++         alsa_signed = 0;
++      }
++      else if (snd_pcm_hw_params_test_format(pcm_handle, hwparams, SND_PCM_FORMAT_S8) == 0) {
++         format = SND_PCM_FORMAT_S8;
++         alsa_signed = 1;
++      }
++      else {
++         ustrzcpy(allegro_error, ALLEGRO_ERROR_SIZE, get_config_text("Unsupported sample format"));
++         goto Error;
++      }
++   }
++   else if (alsa_bits == 16)
++   {
++      if (sizeof(short) != 2)
++      {
++         ustrzcpy(allegro_error, ALLEGRO_ERROR_SIZE, get_config_text("Unsupported sample format"));
++         goto Error;
++      }
++
++      if (snd_pcm_hw_params_test_format(pcm_handle, hwparams, SND_PCM_FORMAT_U16_NE) == 0)
++      {
++         format = SND_PCM_FORMAT_U16_NE;
++         alsa_signed = 0;
++      }
++      else if (snd_pcm_hw_params_test_format(pcm_handle, hwparams, SND_PCM_FORMAT_S16_NE) == 0)
++      {
++         format = SND_PCM_FORMAT_S16_NE;
++         alsa_signed = 1;
++      }
++      else
++      {
++         ustrzcpy(allegro_error, ALLEGRO_ERROR_SIZE, get_config_text("Unsupported sample format"));
++         goto Error;
++      }
+    }
+ 
+    alsa_sample_size = (alsa_bits / 8) * (alsa_stereo ? 2 : 1);
+@@ -384,10 +405,6 @@
+ 	 fragsize <<= 1;
+    }
+ 
+-   snd_pcm_hw_params_malloc(&hwparams);
+-   snd_pcm_sw_params_malloc(&swparams);
+-
+-   ALSA9_CHECK(snd_pcm_hw_params_any(pcm_handle, hwparams));
+    ALSA9_CHECK(snd_pcm_hw_params_set_access(pcm_handle, hwparams, SND_PCM_ACCESS_RW_INTERLEAVED));
+    ALSA9_CHECK(snd_pcm_hw_params_set_format(pcm_handle, hwparams, format));
+    ALSA9_CHECK(snd_pcm_hw_params_set_channels(pcm_handle, hwparams, alsa_stereo + 1));
+@@ -403,6 +420,7 @@
+ 
+    TRACE (PREFIX_I "alsa_bufsize = %ld, alsa_fragments = %d\n", alsa_bufsize, alsa_fragments);
+ 
++   snd_pcm_sw_params_malloc(&swparams);
+    ALSA9_CHECK(snd_pcm_sw_params_current(pcm_handle, swparams));
+    ALSA9_CHECK(snd_pcm_sw_params_set_start_threshold(pcm_handle, swparams, alsa_bufsize));
+    ALSA9_CHECK(snd_pcm_sw_params_set_avail_min(pcm_handle, swparams, fragsize));

Attachment: signature.asc
Description: Digital signature

Reply via email to