[Pkg-pulseaudio-devel] r83 - in /pulseaudio/trunk/debian: README.Debian changelog patches/00list patches/03_r1352_firefox_workaround.dpatch patches/04_r1373_JavaSound_support.dpatch patches/05_t28_wrong-endian-convert.dpatch

neurocyte-guest at users.alioth.debian.org neurocyte-guest at users.alioth.debian.org
Wed Oct 18 22:53:53 UTC 2006


Author: neurocyte-guest
Date: Wed Oct 18 22:53:52 2006
New Revision: 83

URL: http://svn.debian.org/wsvn/pkg-pulseaudio/?sc=1&rev=83
Log:
Add patches for firefox, javasound and BE to LE sample conversions. Add resampling info to README.Debian.

Added:
    pulseaudio/trunk/debian/patches/03_r1352_firefox_workaround.dpatch
    pulseaudio/trunk/debian/patches/04_r1373_JavaSound_support.dpatch
    pulseaudio/trunk/debian/patches/05_t28_wrong-endian-convert.dpatch
Modified:
    pulseaudio/trunk/debian/README.Debian
    pulseaudio/trunk/debian/changelog
    pulseaudio/trunk/debian/patches/00list

Modified: pulseaudio/trunk/debian/README.Debian
URL: http://svn.debian.org/wsvn/pkg-pulseaudio/pulseaudio/trunk/debian/README.Debian?rev=83&op=diff
==============================================================================
--- pulseaudio/trunk/debian/README.Debian (original)
+++ pulseaudio/trunk/debian/README.Debian Wed Oct 18 22:53:52 2006
@@ -4,7 +4,17 @@
 The pulseaudio executable is installed suid root. This is the recommended
 configuration as it allows pulseaudio to run with realtime priority. After
 grabbing the realtime capability, pulseaudio drops all other root
-priviledges. Only users in the realtime group are granted realtime
-priviledges in this way.
+priviledges. Only users in the pulse-rt group are granted realtime
+priviledges in this way. It is highly recommended that all users that will
+be running pulseaudio should be add to the pulse-rt group to prevent
+skipping and dropouts in audio output. You should also enable the
+high-priority option in /etc/pulse/daemon.conf to ensure that pulseaudio is
+started with realtime priority.
+
+PLEASE NOTE: PulseAudio's default configuration uses high quality sample
+rate conversion that may be overly CPU intensive. If PulseAudio's CPU usage
+is unacceptable on your hardware, please change the resample-method option
+in /etc/pulse/daemon.conf to either src-linear or trivial. See daemon.conf
+for more details.
 
  -- CJ van den Berg <cj at vdbonline.com>, Mon, 28 Aug 2006 00:31:10 +0200

Modified: pulseaudio/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-pulseaudio/pulseaudio/trunk/debian/changelog?rev=83&op=diff
==============================================================================
--- pulseaudio/trunk/debian/changelog (original)
+++ pulseaudio/trunk/debian/changelog Wed Oct 18 22:53:52 2006
@@ -1,3 +1,14 @@
+pulseaudio (0.9.5-4) unstable; urgency=low
+
+  * Add comment about resampling methods and CPU consumption to
+    README.Debian (Closes: #391455)
+  * Patch padsp to work with firefox.
+  * Patch padsp to work with JavaSound.
+  * Patch sconv.c to add additional sample conversions for
+    BE <-> LE network audio.
+
+ -- CJ van den Berg <cj at vdbonline.com>  Wed, 18 Oct 2006 23:10:47 +0200
+
 pulseaudio (0.9.5-3) unstable; urgency=low
 
   * Add support for .ifexists configuration directive.

Modified: pulseaudio/trunk/debian/patches/00list
URL: http://svn.debian.org/wsvn/pkg-pulseaudio/pulseaudio/trunk/debian/patches/00list?rev=83&op=diff
==============================================================================
--- pulseaudio/trunk/debian/patches/00list (original)
+++ pulseaudio/trunk/debian/patches/00list Wed Oct 18 22:53:52 2006
@@ -1,2 +1,5 @@
 01_use_ifexists_in_default_pa.dpatch
 02_ifexists_else_endif.dpatch
+03_r1352_firefox_workaround.dpatch
+04_r1373_JavaSound_support.dpatch
+05_t28_wrong-endian-convert.dpatch

Added: pulseaudio/trunk/debian/patches/03_r1352_firefox_workaround.dpatch
URL: http://svn.debian.org/wsvn/pkg-pulseaudio/pulseaudio/trunk/debian/patches/03_r1352_firefox_workaround.dpatch?rev=83&op=file
==============================================================================
--- pulseaudio/trunk/debian/patches/03_r1352_firefox_workaround.dpatch (added)
+++ pulseaudio/trunk/debian/patches/03_r1352_firefox_workaround.dpatch Wed Oct 18 22:53:52 2006
@@ -1,0 +1,24 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 03_r1352_firefox_workaround.dpatch by Lennart Poettering <mzcnihpbageby at 0pointer.de>
+##
+## DP: work around bug in firefox which apparently misuses access() as NULL
+## DP: pointer test. Original patch by "alon".
+
+ at DPATCH@
+diff -urNad pulseaudio~/src/utils/padsp.c pulseaudio/src/utils/padsp.c
+--- pulseaudio~/src/utils/padsp.c	2006-08-18 23:29:26.000000000 +0200
++++ pulseaudio/src/utils/padsp.c	2006-10-19 00:13:47.082198231 +0200
+@@ -2121,6 +2121,13 @@
+ }
+ 
+ int access(const char *pathname, int mode) {
++
++    if (!pathname) {
++        /* Firefox needs this. See #27 */
++        errno = EFAULT;
++        return -1;
++    }
++    
+     debug(DEBUG_LEVEL_VERBOSE, __FILE__": access(%s)\n", pathname);
+ 
+     if (strcmp(pathname, "/dev/dsp") != 0 &&

Added: pulseaudio/trunk/debian/patches/04_r1373_JavaSound_support.dpatch
URL: http://svn.debian.org/wsvn/pkg-pulseaudio/pulseaudio/trunk/debian/patches/04_r1373_JavaSound_support.dpatch?rev=83&op=file
==============================================================================
--- pulseaudio/trunk/debian/patches/04_r1373_JavaSound_support.dpatch (added)
+++ pulseaudio/trunk/debian/patches/04_r1373_JavaSound_support.dpatch Wed Oct 18 22:53:52 2006
@@ -1,0 +1,118 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 04_r1373_JavaSound_support.dpatch by Lennart Poettering <mzcnihpbageby at 0pointer.de>
+##
+## DP: implement a few more ioctl()s, including a subset of
+## DP: SNDCTL_DSP_GETOPTR.  Just enough to make JavaSound work.
+
+ at DPATCH@
+diff -urNad pulseaudio~/src/utils/padsp.c pulseaudio/src/utils/padsp.c
+--- pulseaudio~/src/utils/padsp.c	2006-10-19 00:16:53.841869981 +0200
++++ pulseaudio/src/utils/padsp.c	2006-10-19 00:17:03.458470981 +0200
+@@ -88,6 +88,8 @@
+     pa_cvolume sink_volume, source_volume;
+     uint32_t sink_index, source_index;
+     int volume_modify_count;
++
++    int optr_n_blocks;
+     
+     PA_LLIST_FIELDS(fd_info);
+ };
+@@ -574,6 +576,7 @@
+     i->volume_modify_count = 0;
+     i->sink_index = (uint32_t) -1;
+     i->source_index = (uint32_t) -1;
++    i->optr_n_blocks = 0;
+     PA_LLIST_INIT(fd_info, i);
+ 
+     reset_params(i);
+@@ -1947,6 +1950,8 @@
+             free_streams(i);
+             dsp_flush_socket(i);
+             reset_params(i);
++
++            i->optr_n_blocks = 0;
+             
+             pa_threaded_mainloop_unlock(i->mainloop);
+             break;
+@@ -2035,14 +2040,76 @@
+             break;
+         }
+ 
++        case SOUND_PCM_READ_RATE:
++            debug(DEBUG_LEVEL_NORMAL, __FILE__": SOUND_PCM_READ_RATE\n");
++            
++            pa_threaded_mainloop_lock(i->mainloop);
++            *(int*) argp = i->sample_spec.rate;
++            pa_threaded_mainloop_unlock(i->mainloop);
++            break; 
++
++        case SOUND_PCM_READ_CHANNELS:
++            debug(DEBUG_LEVEL_NORMAL, __FILE__": SOUND_PCM_READ_CHANNELS\n");
++            
++            pa_threaded_mainloop_lock(i->mainloop);
++            *(int*) argp = i->sample_spec.channels;
++            pa_threaded_mainloop_unlock(i->mainloop);
++            break; 
++
++        case SOUND_PCM_READ_BITS:
++            debug(DEBUG_LEVEL_NORMAL, __FILE__": SOUND_PCM_READ_BITS\n");
++            
++            pa_threaded_mainloop_lock(i->mainloop);
++            *(int*) argp = pa_sample_size(&i->sample_spec)*8;
++            pa_threaded_mainloop_unlock(i->mainloop);
++            break; 
++            
++        case SNDCTL_DSP_GETOPTR: {
++            count_info *info;
++            
++            debug(DEBUG_LEVEL_NORMAL, __FILE__": SNDCTL_DSP_GETODELAY\n");
++
++            info = (count_info*) argp;
++            memset(info, 0, sizeof(*info));
++            
++            pa_threaded_mainloop_lock(i->mainloop);
++
++            for (;;) {
++                pa_usec_t usec;
++
++                PLAYBACK_STREAM_CHECK_DEAD_GOTO(i, exit_loop);
++
++                if (pa_stream_get_time(i->play_stream, &usec) >= 0) {
++                    size_t k = pa_usec_to_bytes(usec, &i->sample_spec);
++                    int m;
++                    
++                    info->bytes = (int) k;
++                    m = k / i->fragment_size;
++                    info->blocks = m - i->optr_n_blocks;
++                    i->optr_n_blocks = m;
++
++                    break;
++                }
++
++                if (pa_context_errno(i->context) != PA_ERR_NODATA) {
++                    debug(DEBUG_LEVEL_NORMAL, __FILE__": pa_stream_get_latency(): %s\n", pa_strerror(pa_context_errno(i->context)));
++                    break;
++                }
++
++                pa_threaded_mainloop_wait(i->mainloop);
++            }
++            
++            pa_threaded_mainloop_unlock(i->mainloop);
++
++            debug(DEBUG_LEVEL_NORMAL, __FILE__": GETOPTR bytes=%i, blocks=%i, ptr=%i\n", info->bytes, info->blocks, info->ptr);
++
++            break;
++        }
++
+         case SNDCTL_DSP_GETIPTR:
+             debug(DEBUG_LEVEL_NORMAL, __FILE__": invalid ioctl SNDCTL_DSP_GETIPTR\n");
+             goto inval;
+-
+-        case SNDCTL_DSP_GETOPTR:
+-            debug(DEBUG_LEVEL_NORMAL, __FILE__": invalid ioctl SNDCTL_DSP_GETOPTR\n");
+-            goto inval;
+-
++            
+         default:
+             debug(DEBUG_LEVEL_NORMAL, __FILE__": unknown ioctl 0x%08lx\n", request);
+ 

Added: pulseaudio/trunk/debian/patches/05_t28_wrong-endian-convert.dpatch
URL: http://svn.debian.org/wsvn/pkg-pulseaudio/pulseaudio/trunk/debian/patches/05_t28_wrong-endian-convert.dpatch?rev=83&op=file
==============================================================================
--- pulseaudio/trunk/debian/patches/05_t28_wrong-endian-convert.dpatch (added)
+++ pulseaudio/trunk/debian/patches/05_t28_wrong-endian-convert.dpatch Wed Oct 18 22:53:52 2006
@@ -1,0 +1,61 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 05_t28_wrong-endian-convert.dpatch by ed at catmur.co.uk
+##
+## DP: float32le <-> float32ne <-> float32be sample converters
+
+ at DPATCH@
+diff -urNad pulseaudio~/src/pulsecore/sample-util.c pulseaudio/src/pulsecore/sample-util.c
+--- pulseaudio~/src/pulsecore/sample-util.c	2006-08-18 23:38:49.000000000 +0200
++++ pulseaudio/src/pulsecore/sample-util.c	2006-10-19 00:19:56.233268731 +0200
+@@ -68,6 +68,7 @@
+         case PA_SAMPLE_S16LE:
+         case PA_SAMPLE_S16BE:
+         case PA_SAMPLE_FLOAT32:
++        case PA_SAMPLE_FLOAT32RE:
+             c = 0;
+             break;
+         case PA_SAMPLE_ALAW:
+diff -urNad pulseaudio~/src/pulsecore/sconv.c pulseaudio/src/pulsecore/sconv.c
+--- pulseaudio~/src/pulsecore/sconv.c	2006-08-18 23:29:25.000000000 +0200
++++ pulseaudio/src/pulsecore/sconv.c	2006-10-19 00:19:56.229268481 +0200
+@@ -72,6 +72,22 @@
+     oil_memcpy(b, a, sizeof(float) * n);
+ }
+ 
++static void float32re_to_float32ne(unsigned n, const void *a, float *b) {
++    assert(a);
++    assert(b);
++
++    while (n-- > 0)
++	((uint32_t *)b)[n] = UINT32_SWAP (((uint32_t *)a)[n]);
++}
++
++static void float32re_from_float32ne(unsigned n, const float *a, void *b) {
++    assert(a);
++    assert(b);
++
++    while (n-- > 0)
++	((uint32_t *)b)[n] = UINT32_SWAP (((uint32_t *)a)[n]);
++}
++
+ static void ulaw_to_float32ne(unsigned n, const void *a, float *b) {
+     const uint8_t *ca = a;
+ 
+@@ -140,6 +156,8 @@
+             return pa_sconv_s16be_to_float32ne;
+         case PA_SAMPLE_FLOAT32NE:
+             return float32ne_to_float32ne;
++	case PA_SAMPLE_FLOAT32RE:
++	    return float32re_to_float32ne;
+         case PA_SAMPLE_ALAW:
+             return alaw_to_float32ne;
+         case PA_SAMPLE_ULAW:
+@@ -159,6 +177,8 @@
+             return pa_sconv_s16be_from_float32ne;
+         case PA_SAMPLE_FLOAT32NE:
+             return float32ne_from_float32ne;
++        case PA_SAMPLE_FLOAT32RE:
++            return float32re_from_float32ne;
+         case PA_SAMPLE_ALAW:
+             return alaw_from_float32ne;
+         case PA_SAMPLE_ULAW:




More information about the Pkg-pulseaudio-devel mailing list