<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://blog.gmane.org/gmane.comp.audio.pulseaudio.general">
    <title>gmane.comp.audio.pulseaudio.general</title>
    <link>http://blog.gmane.org/gmane.comp.audio.pulseaudio.general</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.audio.pulseaudio.general/13339"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.audio.pulseaudio.general/13336"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.audio.pulseaudio.general/13335"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.audio.pulseaudio.general/13334"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.audio.pulseaudio.general/13332"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.audio.pulseaudio.general/13330"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.audio.pulseaudio.general/13328"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.audio.pulseaudio.general/13326"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.audio.pulseaudio.general/13320"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.audio.pulseaudio.general/13312"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.audio.pulseaudio.general/13311"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.audio.pulseaudio.general/13303"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.audio.pulseaudio.general/13296"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.audio.pulseaudio.general/13295"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.audio.pulseaudio.general/13294"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.audio.pulseaudio.general/13292"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.audio.pulseaudio.general/13287"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.audio.pulseaudio.general/13282"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.audio.pulseaudio.general/13281"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.audio.pulseaudio.general/13280"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://comments.gmane.org/gmane.comp.audio.pulseaudio.general/13339">
    <title>[PATCH] Remove usage of deprecatedudev_get_*_path</title>
    <link>http://comments.gmane.org/gmane.comp.audio.pulseaudio.general/13339</link>
    <description>&lt;pre&gt;From: "Jan Alexander Steffens (heftig)" &amp;lt;jan.steffens&amp;lt; at &amp;gt;gmail.com&amp;gt;

These symbols were removed in libudev.so.1.0.0. Replace them with
hardcoded strings.

Signed-off-by: Jan Alexander Steffens (heftig) &amp;lt;jan.steffens&amp;lt; at &amp;gt;gmail.com&amp;gt;
---
 src/modules/module-udev-detect.c |    9 +++------
 src/modules/udev-util.c          |    4 ++--
 2 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/src/modules/module-udev-detect.c b/src/modules/module-udev-detect.c
index 1192194..31416bd 100644
--- a/src/modules/module-udev-detect.c
+++ b/src/modules/module-udev-detect.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -123,7 +123,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static char *card_get_sysattr(const char *card_idx, const char *name) {
         goto finish;
     }
 
-    t = pa_sprintf_malloc("%s/class/sound/card%s", udev_get_sys_path(udev), card_idx);
+    t = pa_sprintf_malloc("/sys/class/sound/card%s", card_idx);
     card = udev_device_new_from_syspath(udev, t);
     pa_xfree(t);
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -282,7 +282,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void verify_access(struct userdata *u, struct device *d) {
     pa_assert(u);
     pa_assert(d);
 
-    cd = pa_sprintf_malloc("%s/snd/controlC%s", udev_get_dev_path(u-&amp;gt;udev), path_get_card_id(d-&amp;gt;path));
+    cd = pa_sprintf_malloc("/dev/snd/controlC%s", path_get_card_id(d-&amp;gt;path));
     accessible = access(cd, R_OK|W_OK) &amp;gt;= 0;
     pa_log_debug("%s is accessible: %s", cd, pa_yes_no(accessible));
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -621,7 +621,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; fail:
 }
 
 static int setup_inotify(struct userdata *u) {
-    char *dev_snd;
     int r;
 
     if (u-&amp;gt;inotify_fd &amp;gt;= 0)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -632,9 +631,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int setup_inotify(struct userdata *u) {
         return -1;
     }
 
-    dev_snd = pa_sprintf_malloc("%s/snd", udev_get_dev_path(u-&amp;gt;udev));
-    r = inotify_add_watch(u-&amp;gt;inotify_fd, dev_snd, IN_ATTRIB|IN_CLOSE_WRITE|IN_DELETE_SELF|IN_MOVE_SELF);
-    pa_xfree(dev_snd);
+    r = inotify_add_watch(u-&amp;gt;inotify_fd, "/dev/snd", IN_ATTRIB|IN_CLOSE_WRITE|IN_DELETE_SELF|IN_MOVE_SELF);
 
     if (r &amp;lt; 0) {
         int saved_errno = errno;
diff --git a/src/modules/udev-util.c b/src/modules/udev-util.c
index 2f18bc4..b0bb17d 100644
--- a/src/modules/udev-util.c
+++ b/src/modules/udev-util.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -180,7 +180,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int pa_udev_get_info(int card_idx, pa_proplist *p) {
         goto finish;
     }
 
-    t = pa_sprintf_malloc("%s/class/sound/card%i", udev_get_sys_path(udev), card_idx);
+    t = pa_sprintf_malloc("/sys/class/sound/card%i", card_idx);
     card = udev_device_new_from_syspath(udev, t);
     pa_xfree(t);
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -277,7 +277,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; char* pa_udev_get_property(int card_idx, const char *name) {
         goto finish;
     }
 
-    t = pa_sprintf_malloc("%s/class/sound/card%i", udev_get_sys_path(udev), card_idx);
+    t = pa_sprintf_malloc("/sys/class/sound/card%i", card_idx);
     card = udev_device_new_from_syspath(udev, t);
     pa_xfree(t);
 
&lt;/pre&gt;</description>
    <dc:creator>Jan Alexander Steffens (heftig</dc:creator>
    <dc:date>2012-05-26T01:28:45</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.audio.pulseaudio.general/13336">
    <title>[PATCH] add set-log-target command for pacmd</title>
    <link>http://comments.gmane.org/gmane.comp.audio.pulseaudio.general/13336</link>
    <description>&lt;pre&gt;Please review!

This helps to change log target on the fly.
_______________________________________________
pulseaudio-discuss mailing list
pulseaudio-discuss&amp;lt; at &amp;gt;lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss
&lt;/pre&gt;</description>
    <dc:creator>rong deng</dc:creator>
    <dc:date>2012-05-25T06:47:33</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.audio.pulseaudio.general/13335">
    <title>[PATCH] use pa_streq instead of plain strcmpin daemon-conf.c</title>
    <link>http://comments.gmane.org/gmane.comp.audio.pulseaudio.general/13335</link>
    <description>&lt;pre&gt;Please review and hopefully got accepted. :)

I did a simple grep and saw there are lots of other usages of strcmp, but
let's translate it bit by bit...

--deng
_______________________________________________
pulseaudio-discuss mailing list
pulseaudio-discuss&amp;lt; at &amp;gt;lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss
&lt;/pre&gt;</description>
    <dc:creator>rong deng</dc:creator>
    <dc:date>2012-05-25T02:22:42</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.audio.pulseaudio.general/13334">
    <title>VLC + pulseaudio issues</title>
    <link>http://comments.gmane.org/gmane.comp.audio.pulseaudio.general/13334</link>
    <description>&lt;pre&gt;I've been trying to figure out a problem I'm having with continuous
dopplering of VLC when using pulseaudio for sound.  There is no
dopplering with use of pure ALSA output.  I'd greatly appreciate any
assistance as I've been unable to resolve this on my own after
extensive google digging.

Here's the behavior (from vlc -vvv):

[0xb3f59e98] pulse audio output warning: too late by 87060 us
[0xb3f59e98] pulse audio output debug: changed sample rate to 48092 Hz
[0xb4d1f458] main decoder debug: removing module "subsdec"
[0xb4d1f458] main decoder debug: killing decoder fourcc `subt', 0 PES in FIFO
[0xb3f59e98] pulse audio output warning: too late by 99491 us
[0xb3f59e98] pulse audio output debug: changed sample rate to 48138 Hz
[0xb3f59e98] pulse audio output warning: too late by 113518 us
[0xb3f59e98] pulse audio output debug: changed sample rate to 48184 Hz
[0xb3f59e98] pulse audio output warning: too late by 116756 us
[0xb3f59e98] pulse audio output debug: changed sample rate to 48230 Hz
[0xb3f59e98] pulse audio output warning: too late by 127217 us
[0xb3f59e98] pulse audio output debug: changed sample rate to 48276 Hz
[0xb3f59e98] pulse audio output warning: too late by 134908 us
[0xb3f59e98] pulse audio output debug: changed sample rate to 48322 Hz
[0xb3f59e98] pulse audio output warning: too late by 146724 us
[0xb3f59e98] pulse audio output debug: changed sample rate to 48368 Hz
[0xb3f59e98] pulse audio output warning: too late by 148023 us
[0xb3f59e98] pulse audio output debug: changed sample rate to 48414 Hz
[0xb3f59e98] pulse audio output warning: too late by 150270 us
[0xb3f59e98] pulse audio output debug: changed sample rate to 48460 Hz
[0xb3f59e98] pulse audio output warning: too late by 149440 us
[0xb3f59e98] pulse audio output debug: changed sample rate to 48506 Hz
[0xb3f59e98] pulse audio output warning: too late by 139743 us
[0xb3f59e98] pulse audio output debug: changed sample rate to 48495 Hz

This continues throughout the playback causing sound to 'warble' and
doppler up and down nearly continuously.

Any suggestions on ways to tweak/fix this issue?

Thanks,
Drew
&lt;/pre&gt;</description>
    <dc:creator>Drew</dc:creator>
    <dc:date>2012-05-24T18:08:12</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.audio.pulseaudio.general/13332">
    <title>[PATCH 1/2] module-pipe: whitespace and logoutput cleanup</title>
    <link>http://comments.gmane.org/gmane.comp.audio.pulseaudio.general/13332</link>
    <description>&lt;pre&gt;From: Peter Meerwald &amp;lt;p.meerwald&amp;lt; at &amp;gt;bct-electronic.com&amp;gt;

---
 src/modules/module-pipe-sink.c   |    4 ++--
 src/modules/module-pipe-source.c |   10 +++++-----
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/modules/module-pipe-sink.c b/src/modules/module-pipe-sink.c
index 91e01f9..fa0a080 100644
--- a/src/modules/module-pipe-sink.c
+++ b/src/modules/module-pipe-sink.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -221,7 +221,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; finish:
     pa_log_debug("Thread shutting down");
 }
 
-int pa__init(pa_module*m) {
+int pa__init(pa_module *m) {
     struct userdata *u;
     struct stat st;
     pa_sample_spec ss;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -338,7 +338,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int pa__get_n_used(pa_module *m) {
     return pa_sink_linked_by(u-&amp;gt;sink);
 }
 
-void pa__done(pa_module*m) {
+void pa__done(pa_module *m) {
     struct userdata *u;
 
     pa_assert(m);
diff --git a/src/modules/module-pipe-source.c b/src/modules/module-pipe-source.c
index 3335907..eb531d8 100644
--- a/src/modules/module-pipe-source.c
+++ b/src/modules/module-pipe-source.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -208,7 +208,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; finish:
     pa_log_debug("Thread shutting down");
 }
 
-int pa__init(pa_module*m) {
+int pa__init(pa_module *m) {
     struct userdata *u;
     struct stat st;
     pa_sample_spec ss;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -220,14 +220,14 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int pa__init(pa_module*m) {
     pa_assert(m);
 
     if (!(ma = pa_modargs_new(m-&amp;gt;argument, valid_modargs))) {
-        pa_log("failed to parse module arguments.");
+        pa_log("Failed to parse module arguments.");
         goto fail;
     }
 
     ss = m-&amp;gt;core-&amp;gt;default_sample_spec;
     map = m-&amp;gt;core-&amp;gt;default_channel_map;
     if (pa_modargs_get_sample_spec_and_channel_map(ma, &amp;amp;ss, &amp;amp;map, PA_CHANNEL_MAP_DEFAULT) &amp;lt; 0) {
-        pa_log("invalid sample format specification or channel map");
+        pa_log("Invalid sample format specification or channel map");
         goto fail;
     }
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -249,7 +249,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int pa__init(pa_module*m) {
     pa_make_fd_nonblock(u-&amp;gt;fd);
 
     if (fstat(u-&amp;gt;fd, &amp;amp;st) &amp;lt; 0) {
-        pa_log("fstat('%s'): %s",u-&amp;gt;filename, pa_cstrerror(errno));
+        pa_log("fstat('%s'): %s", u-&amp;gt;filename, pa_cstrerror(errno));
         goto fail;
     }
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -322,7 +322,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int pa__get_n_used(pa_module *m) {
     return pa_source_linked_by(u-&amp;gt;source);
 }
 
-void pa__done(pa_module*m) {
+void pa__done(pa_module *m) {
     struct userdata *u;
 
     pa_assert(m);
&lt;/pre&gt;</description>
    <dc:creator>Peter Meerwald</dc:creator>
    <dc:date>2012-05-24T15:52:55</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.audio.pulseaudio.general/13330">
    <title>module-pipe-source,sink</title>
    <link>http://comments.gmane.org/gmane.comp.audio.pulseaudio.general/13330</link>
    <description>&lt;pre&gt;Hello,

I have a couple of issues with module-pipe:

1. module-pipe-source and module-pipe-sink do not check the return value 
ofmkfifo(), hence PulseAudio happily opens the same pipe several times

I think PulseAudio should check if mkfifo() fails to create the FIFO file 
and abort -- see suggested patch in next mail

2. documentation at 
http://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Modules#module-pipe-sink
incorrectly states that the FIFO of module-pipe-sink defaults to 
/tmp/music.output, in fact it defaults to /tmp/pulse-xxxxxxxxx/fifo_output

3. module-pipe-source defaults to /tmp/music.input (as per documentation), 
but this is inconsistent with module-pipe-sink

thoughts?

regards, p.

&lt;/pre&gt;</description>
    <dc:creator>Peter Meerwald</dc:creator>
    <dc:date>2012-05-24T15:46:54</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.audio.pulseaudio.general/13328">
    <title>User volume vs. Application volume</title>
    <link>http://comments.gmane.org/gmane.comp.audio.pulseaudio.general/13328</link>
    <description>&lt;pre&gt;Hi folks,

I've been thinking about this issue for a while and I'd like to share
my thoughts and receive opinions back.

While developing a PulseAudio driver for Wine, I ran into the issue of
implementing the volume control interfaces. Microsoft's APIs allow the
application to make calls that set the stream volume. However, the
Windows 7 mixer /also/ allows the user to set stream volumes. These
two volumes are entirely independent of each other.

I think this makes complete sense. For example, you might have a music
player which implements a crossfade between tracks. The obvious way to
implement this to open two streams, and as the first stream reaches
its last 5 seconds, you fade its volume down and simultaneously start
and increase the volume for the second stream. The user can then set
the music player's volume at 50% relative to their chat program, and
everything works as expected.

Crossfading in this manner works fine in PulseAudio, but it conflicts
with the user's volume settings. When the music player starts setting
the volumes for the purposes of crossfading, it overrides the user's
settings, potentially deafening them[1].

This actually extends beyond volume control. Both of the music
player's streams will appear in pavucontrol, when they really
represent a single logical audio channel. I would expect some API to
combine those into a single user-facing stream, akin to Microsoft's
AudioSessions[2]. But this is a separate-but-related issue and can be
resolved later.

Perhaps this goes beyond the scope of PulseAudio, in that PA shouldn't
be used as an application mixer. If that's the case, PA's APIs don't
make it obvious enough, as we have actual applications that use the
volume APIs to implement mixing (see [1], [3], [4]). That said, I
think this is a reasonably small service to provide to applications.
There's already a long history of audio APIs providing
application-level mixing, and now we have the opportunity to provide
both application-level /and/ user-facing volume control.

I don't understand flat volumes, so I haven't accounted for them at
all in the preceding discussion.

I also haven't looked much at implementing this. We would need to
modify PulseAudio's volume APIs to make it clear whether the
application is trying to set the user volume (for mixer applications
like pavucontrol) or the application volume. PulseAudio's volume APIs
are already pretty humongous and confusing, so this might be tricky.

Do others agree with my analysis? Is this something that should be
included in PulseAudio? Any tips for how to design the APIs for this?

Andrew

[1]
http://pulseaudio.org/ticket/774
mplayer sets the stream volume to 100%

[2]
http://msdn.microsoft.com/en-us/library/windows/desktop/dd368246(v=vs.85).aspx
IAudioSessionControl interface

[3]
http://lists.freedesktop.org/archives/pulseaudio-discuss/2012-March/013128.html
References Decibel Audio Player as setting maximum volume upon launch.

[4]
http://repo.or.cz/w/wine/multimedia.git/blob/HEAD:/dlls/winepulse.drv/mmdevdrv.c#l2246
An unofficial PulseAudio driver for Wine which uses PA's volume APIs
to implement Windows 7's "application-side" volume controls mentioned
above.
&lt;/pre&gt;</description>
    <dc:creator>Andrew Eikum</dc:creator>
    <dc:date>2012-05-24T14:28:34</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.audio.pulseaudio.general/13326">
    <title>[PATCH] add log category</title>
    <link>http://comments.gmane.org/gmane.comp.audio.pulseaudio.general/13326</link>
    <description>&lt;pre&gt;---
 src/modules/module-loopback.c  |    5 ++
 src/pulse/channelmap.c         |    2 +
 src/pulse/client-conf.c        |    2 +
 src/pulse/context.c            |    2 +
 src/pulse/ext-device-manager.c |    2 +
 src/pulse/ext-device-restore.c |    2 +
 src/pulse/ext-stream-restore.c |    2 +
 src/pulse/format.c             |    2 +
 src/pulse/introspect.c         |    2 +
 src/pulse/mainloop-api.c       |    2 +
 src/pulse/mainloop-signal.c    |    2 +
 src/pulse/mainloop.c           |    2 +
 src/pulse/operation.c          |    2 +
 src/pulse/proplist.c           |    2 +
 src/pulse/sample.c             |    2 +
 src/pulse/scache.c             |    2 +
 src/pulse/stream.c             |    2 +
 src/pulse/subscribe.c          |    2 +
 src/pulse/thread-mainloop.c    |    2 +
 src/pulse/timeval.c            |    2 +
 src/pulse/utf8.c               |    2 +
 src/pulse/util.c               |    2 +
 src/pulse/volume.c             |    2 +
 src/pulse/xmalloc.c            |    2 +
 src/pulsecore/authkey.c        |    2 +
 src/pulsecore/conf-parser.c    |    2 +
 src/pulsecore/core-error.c     |    2 +
 src/pulsecore/core-rtclock.c   |    2 +
 src/pulsecore/core-util.c      |    2 +
 src/pulsecore/dynarray.c       |    2 +
 src/pulsecore/flist.c          |    2 +
 src/pulsecore/iochannel.c      |    2 +
 src/pulsecore/ioline.c         |    2 +
 src/pulsecore/ipacl.c          |    2 +
 src/pulsecore/lock-autospawn.c |    2 +
 src/pulsecore/log.c            |  104 ++++++++++++++++++++++++++++++++++++++--
 src/pulsecore/log.h            |   39 +++++++++++----
 src/pulsecore/macro.h          |    2 +-
 src/pulsecore/ratelimit.c      |    2 +
 39 files changed, 205 insertions(+), 15 deletions(-)

diff --git a/src/modules/module-loopback.c b/src/modules/module-loopback.c
index 1a69445..3b9bb90 100644
--- a/src/modules/module-loopback.c
+++ b/src/modules/module-loopback.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -59,6 +59,9 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; PA_MODULE_USAGE(
         "sink_dont_move=&amp;lt;boolean&amp;gt; "
         "remix=&amp;lt;remix channels?&amp;gt; ");
 
+PA_LOG_CATEGORY_STATIC(module_loopback_category);
+#define PA_LOG_CATEGORY_DEFAULT module_loopback_category
+
 #define DEFAULT_LATENCY_MSEC 200
 
 #define MEMBLOCKQ_MAXLENGTH (1024*1024*16)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -663,6 +666,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int pa__init(pa_module *m) {
 
     pa_assert(m);
 
+    PA_LOG_CATEGORY_INIT(module_loopback_category, "loopback", 0);
+
     if (!(ma = pa_modargs_new(m-&amp;gt;argument, valid_modargs))) {
         pa_log("Failed to parse module arguments");
         goto fail;
diff --git a/src/pulse/channelmap.c b/src/pulse/channelmap.c
index 0d199f3..f375cbf 100644
--- a/src/pulse/channelmap.c
+++ b/src/pulse/channelmap.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -38,6 +38,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 
 #include "channelmap.h"
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CAT_CHANNELMAP
+
 const char *const table[PA_CHANNEL_POSITION_MAX] = {
     [PA_CHANNEL_POSITION_MONO] = "mono",
 
diff --git a/src/pulse/client-conf.c b/src/pulse/client-conf.c
index e2c2aae..1801062 100644
--- a/src/pulse/client-conf.c
+++ b/src/pulse/client-conf.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -40,6 +40,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 
 #include "client-conf.h"
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CAT_CORE
+
 #define DEFAULT_CLIENT_CONFIG_FILE PA_DEFAULT_CONFIG_DIR PA_PATH_SEP "client.conf"
 #define DEFAULT_CLIENT_CONFIG_FILE_USER "client.conf"
 
diff --git a/src/pulse/context.c b/src/pulse/context.c
index 5bd3448..14520e5 100644
--- a/src/pulse/context.c
+++ b/src/pulse/context.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -71,6 +71,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #include "internal.h"
 #include "context.h"
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CAT_CONTEXT
+
 void pa_command_extension(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata);
 
 static const pa_pdispatch_cb_t command_table[PA_COMMAND_MAX] = {
diff --git a/src/pulse/ext-device-manager.c b/src/pulse/ext-device-manager.c
index f2ea63a..2dca36c 100644
--- a/src/pulse/ext-device-manager.c
+++ b/src/pulse/ext-device-manager.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -35,6 +35,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #include "internal.h"
 #include "ext-device-manager.h"
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CAT_CORE
+
 enum {
     SUBCOMMAND_TEST,
     SUBCOMMAND_READ,
diff --git a/src/pulse/ext-device-restore.c b/src/pulse/ext-device-restore.c
index 25d33d1..2174d82 100644
--- a/src/pulse/ext-device-restore.c
+++ b/src/pulse/ext-device-restore.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -37,6 +37,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #include "internal.h"
 #include "ext-device-restore.h"
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CAT_CORE
+
 /* Protocol extension commands */
 enum {
     SUBCOMMAND_TEST,
diff --git a/src/pulse/ext-stream-restore.c b/src/pulse/ext-stream-restore.c
index 1f72c1c..569bcb0 100644
--- a/src/pulse/ext-stream-restore.c
+++ b/src/pulse/ext-stream-restore.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -33,6 +33,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #include "internal.h"
 #include "ext-stream-restore.h"
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CAT_CORE
+
 enum {
     SUBCOMMAND_TEST,
     SUBCOMMAND_READ,
diff --git a/src/pulse/format.c b/src/pulse/format.c
index 542d119..972a6d0 100644
--- a/src/pulse/format.c
+++ b/src/pulse/format.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -36,6 +36,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 
 #include "format.h"
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CAT_CORE
+
 #define PA_JSON_MIN_KEY "min"
 #define PA_JSON_MAX_KEY "max"
 
diff --git a/src/pulse/introspect.c b/src/pulse/introspect.c
index 38a9d1c..1ec638f 100644
--- a/src/pulse/introspect.c
+++ b/src/pulse/introspect.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -35,6 +35,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #include "internal.h"
 #include "introspect.h"
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CAT_CORE
+
 /*** Statistics ***/
 
 static void context_stat_callback(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
diff --git a/src/pulse/mainloop-api.c b/src/pulse/mainloop-api.c
index 45539cc..be76c27 100644
--- a/src/pulse/mainloop-api.c
+++ b/src/pulse/mainloop-api.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -32,6 +32,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 
 #include "mainloop-api.h"
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CAT_CORE
+
 struct once_info {
     void (*callback)(pa_mainloop_api*m, void *userdata);
     void *userdata;
diff --git a/src/pulse/mainloop-signal.c b/src/pulse/mainloop-signal.c
index 9482fe3..b0a9453 100644
--- a/src/pulse/mainloop-signal.c
+++ b/src/pulse/mainloop-signal.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -45,6 +45,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 
 #include "mainloop-signal.h"
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CAT_CORE
+
 struct pa_signal_event {
     int sig;
 #ifdef HAVE_SIGACTION
diff --git a/src/pulse/mainloop.c b/src/pulse/mainloop.c
index 5c0345e..7031f8f 100644
--- a/src/pulse/mainloop.c
+++ b/src/pulse/mainloop.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -51,6 +51,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #include "mainloop.h"
 #include "internal.h"
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CAT_CORE
+
 struct pa_io_event {
     pa_mainloop *mainloop;
     pa_bool_t dead:1;
diff --git a/src/pulse/operation.c b/src/pulse/operation.c
index fe160a3..f14466d 100644
--- a/src/pulse/operation.c
+++ b/src/pulse/operation.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -30,6 +30,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #include "internal.h"
 #include "operation.h"
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CAT_CORE
+
 PA_STATIC_FLIST_DECLARE(operations, 0, pa_xfree);
 
 pa_operation *pa_operation_new(pa_context *c, pa_stream *s, pa_operation_cb_t cb, void *userdata) {
diff --git a/src/pulse/proplist.c b/src/pulse/proplist.c
index 649138c..1296bc8 100644
--- a/src/pulse/proplist.c
+++ b/src/pulse/proplist.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -35,6 +35,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 
 #include "proplist.h"
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CAT_CORE
+
 struct property {
     char *key;
     void *value;
diff --git a/src/pulse/sample.c b/src/pulse/sample.c
index b613612..5731736 100644
--- a/src/pulse/sample.c
+++ b/src/pulse/sample.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -35,6 +35,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 
 #include "sample.h"
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CAT_CORE
+
 static const size_t size_table[] = {
     [PA_SAMPLE_U8] = 1,
     [PA_SAMPLE_ULAW] = 1,
diff --git a/src/pulse/scache.c b/src/pulse/scache.c
index 3fad82a..60bc803 100644
--- a/src/pulse/scache.c
+++ b/src/pulse/scache.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -36,6 +36,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #include "internal.h"
 #include "scache.h"
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CAT_CORE
+
 int pa_stream_connect_upload(pa_stream *s, size_t length) {
     pa_tagstruct *t;
     uint32_t tag;
diff --git a/src/pulse/stream.c b/src/pulse/stream.c
index 39338c1..52c9ae4 100644
--- a/src/pulse/stream.c
+++ b/src/pulse/stream.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -44,6 +44,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #include "internal.h"
 #include "stream.h"
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CAT_CORE
+
 #define AUTO_TIMING_INTERVAL_START_USEC (10*PA_USEC_PER_MSEC)
 #define AUTO_TIMING_INTERVAL_END_USEC (1500*PA_USEC_PER_MSEC)
 
diff --git a/src/pulse/subscribe.c b/src/pulse/subscribe.c
index a6ad238..4cf002a 100644
--- a/src/pulse/subscribe.c
+++ b/src/pulse/subscribe.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -31,6 +31,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #include "internal.h"
 #include "subscribe.h"
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CAT_CORE
+
 void pa_command_subscribe_event(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata) {
     pa_context *c = userdata;
     pa_subscription_event_type_t e;
diff --git a/src/pulse/thread-mainloop.c b/src/pulse/thread-mainloop.c
index aa56a92..8e822b8 100644
--- a/src/pulse/thread-mainloop.c
+++ b/src/pulse/thread-mainloop.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -43,6 +43,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 
 #include "thread-mainloop.h"
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CAT_CORE
+
 struct pa_threaded_mainloop {
     pa_mainloop *real_mainloop;
     volatile int n_waiting, n_waiting_for_accept;
diff --git a/src/pulse/timeval.c b/src/pulse/timeval.c
index a394dbe..a993b2b 100644
--- a/src/pulse/timeval.c
+++ b/src/pulse/timeval.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -36,6 +36,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 
 #include "timeval.h"
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CAT_CORE
+
 struct timeval *pa_gettimeofday(struct timeval *tv) {
     pa_assert(tv);
 
diff --git a/src/pulse/utf8.c b/src/pulse/utf8.c
index 773a1f8..0962515 100644
--- a/src/pulse/utf8.c
+++ b/src/pulse/utf8.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -62,6 +62,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 
 #include "utf8.h"
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CAT_CORE
+
 #define FILTER_CHAR '_'
 
 static inline pa_bool_t is_unicode_valid(uint32_t ch) {
diff --git a/src/pulse/util.c b/src/pulse/util.c
index 6656bc3..75bef42 100644
--- a/src/pulse/util.c
+++ b/src/pulse/util.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -64,6 +64,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 
 #include "util.h"
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CAT_CORE
+
 char *pa_get_user_name(char *s, size_t l) {
     const char *p;
     char *name = NULL;
diff --git a/src/pulse/volume.c b/src/pulse/volume.c
index cf0a226..3478893 100644
--- a/src/pulse/volume.c
+++ b/src/pulse/volume.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -34,6 +34,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 
 #include "volume.h"
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CAT_CORE
+
 int pa_cvolume_equal(const pa_cvolume *a, const pa_cvolume *b) {
     int i;
     pa_assert(a);
diff --git a/src/pulse/xmalloc.c b/src/pulse/xmalloc.c
index e17a354..840c9df 100644
--- a/src/pulse/xmalloc.c
+++ b/src/pulse/xmalloc.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -35,6 +35,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 
 #include "xmalloc.h"
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CAT_CORE
+
 /* Make sure not to allocate more than this much memory. */
 #define MAX_ALLOC_SIZE (1024*1024*96) /* 96MB */
 
diff --git a/src/pulsecore/authkey.c b/src/pulsecore/authkey.c
index ac81513..6ad4574 100644
--- a/src/pulsecore/authkey.c
+++ b/src/pulsecore/authkey.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -42,6 +42,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 
 #include "authkey.h"
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CAT_CORE
+
 /* Generate a new authorization key, store it in file fd and return it in *data  */
 static int generate(int fd, void *ret_data, size_t length) {
     ssize_t r;
diff --git a/src/pulsecore/conf-parser.c b/src/pulsecore/conf-parser.c
index 7152955..8098e70 100644
--- a/src/pulsecore/conf-parser.c
+++ b/src/pulsecore/conf-parser.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -36,6 +36,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 
 #include "conf-parser.h"
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CAT_CORE
+
 #define WHITESPACE " \t\n"
 #define COMMENTS "#;\n"
 
diff --git a/src/pulsecore/core-error.c b/src/pulsecore/core-error.c
index 4d930a0..f731be5 100644
--- a/src/pulsecore/core-error.c
+++ b/src/pulsecore/core-error.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -38,6 +38,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 
 #include "core-error.h"
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CAT_CORE
+
 PA_STATIC_TLS_DECLARE(cstrerror, pa_xfree);
 
 const char* pa_cstrerror(int errnum) {
diff --git a/src/pulsecore/core-rtclock.c b/src/pulsecore/core-rtclock.c
index 6632cc6..537cfb1 100644
--- a/src/pulsecore/core-rtclock.c
+++ b/src/pulsecore/core-rtclock.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -54,6 +54,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 
 #include "core-rtclock.h"
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CAT_CORE
+
 #ifdef OS_IS_WIN32
 static int64_t counter_freq = 0;
 #endif
diff --git a/src/pulsecore/core-util.c b/src/pulsecore/core-util.c
index 61f980e..1044dad 100644
--- a/src/pulsecore/core-util.c
+++ b/src/pulsecore/core-util.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -138,6 +138,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 
 #include "core-util.h"
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CAT_CORE
+
 /* Not all platforms have this */
 #ifndef MSG_NOSIGNAL
 #define MSG_NOSIGNAL 0
diff --git a/src/pulsecore/dynarray.c b/src/pulsecore/dynarray.c
index 78b2eb9..62c58c1 100644
--- a/src/pulsecore/dynarray.c
+++ b/src/pulsecore/dynarray.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -31,6 +31,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 
 #include "dynarray.h"
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CAT_CORE
+
 /* If the array becomes to small, increase its size by 25 entries */
 #define INCREASE_BY 25
 
diff --git a/src/pulsecore/flist.c b/src/pulsecore/flist.c
index 0aa95c7..03475e2 100644
--- a/src/pulsecore/flist.c
+++ b/src/pulsecore/flist.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -37,6 +37,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 
 #include "flist.h"
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CAT_CORE
+
 #define FLIST_SIZE 128
 
 /* Atomic table indices contain
diff --git a/src/pulsecore/iochannel.c b/src/pulsecore/iochannel.c
index fa3d767..f020535 100644
--- a/src/pulsecore/iochannel.c
+++ b/src/pulsecore/iochannel.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -43,6 +43,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 
 #include "iochannel.h"
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CAT_CORE
+
 struct pa_iochannel {
     int ifd, ofd;
     int ifd_type, ofd_type;
diff --git a/src/pulsecore/ioline.c b/src/pulsecore/ioline.c
index a18188d..5781d91 100644
--- a/src/pulsecore/ioline.c
+++ b/src/pulsecore/ioline.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -39,6 +39,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 
 #include "ioline.h"
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CAT_CORE
+
 #define BUFFER_LIMIT (64*1024)
 #define READ_SIZE (1024)
 
diff --git a/src/pulsecore/ipacl.c b/src/pulsecore/ipacl.c
index 5455d0e..39beaa2 100644
--- a/src/pulsecore/ipacl.c
+++ b/src/pulsecore/ipacl.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -49,6 +49,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 
 #include "ipacl.h"
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CAT_CORE
+
 struct acl_entry {
     PA_LLIST_FIELDS(struct acl_entry);
     int family;
diff --git a/src/pulsecore/lock-autospawn.c b/src/pulsecore/lock-autospawn.c
index b1d414b..a936a86 100644
--- a/src/pulsecore/lock-autospawn.c
+++ b/src/pulsecore/lock-autospawn.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -42,6 +42,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 
 #include "lock-autospawn.h"
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CAT_CORE
+
 /* So, why do we have this complex code here with threads and pipes
  * and stuff? For two reasons: POSIX file locks are per-process, not
  * per-file descriptor. That means that two contexts within the same
diff --git a/src/pulsecore/log.c b/src/pulsecore/log.c
index 8eaef54..628aa59 100644
--- a/src/pulsecore/log.c
+++ b/src/pulsecore/log.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -50,6 +50,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #include &amp;lt;pulsecore/once.h&amp;gt;
 #include &amp;lt;pulsecore/ratelimit.h&amp;gt;
 #include &amp;lt;pulsecore/thread.h&amp;gt;
+#include &amp;lt;pulsecore/llist.h&amp;gt;
+#include &amp;lt;pulsecore/mutex.h&amp;gt;
 
 #include "log.h"
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -63,6 +65,20 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #define ENV_LOG_BACKTRACE "PULSE_LOG_BACKTRACE"
 #define ENV_LOG_BACKTRACE_SKIP "PULSE_LOG_BACKTRACE_SKIP"
 #define ENV_LOG_NO_RATELIMIT "PULSE_LOG_NO_RATE_LIMIT"
+#define ENV_LOG_DEBUG "PULSE_LOG_DEBUG"
+
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CAT_CORE
+
+struct pa_log_category {
+    PA_LLIST_FIELDS(pa_log_category_t);
+    int threshold;
+    int color;
+    const char *name;
+    const char *description;
+};
+
+static pa_static_mutex categories_mutex = PA_STATIC_MUTEX_INIT;
+static pa_log_category_t *categories = NULL;
 
 static char *ident = NULL; /* in local charset format */
 static pa_log_target_t target = PA_LOG_STDERR, target_override;
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -207,11 +223,21 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static char* get_backtrace(unsigned show_nframes) {
 
 #endif
 
+pa_log_category_t *PA_LOG_CAT_CORE = NULL;
+pa_log_category_t *PA_LOG_CAT_CHANNELMAP = NULL;
+pa_log_category_t *PA_LOG_CAT_CONTEXT = NULL;
+static void init_log_categories(void) {
+    PA_LOG_CAT_CORE = pa_log_category_new("core", 0, "pulsecore");
+    PA_LOG_CAT_CONTEXT = pa_log_category_new("channelmap", 0, "channelmap");
+}
+
 static void init_defaults(void) {
     PA_ONCE_BEGIN {
 
         const char *e;
 
+        init_log_categories();
+
         if (!ident) {
             char binary[256];
             if (pa_get_binary_name(binary, sizeof(binary)))
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -262,10 +288,37 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void init_defaults(void) {
         if (getenv(ENV_LOG_NO_RATELIMIT))
             no_rate_limit = TRUE;
 
+        if ((e = getenv(ENV_LOG_DEBUG)))
+            parse_log_debug(e);
+
     } PA_ONCE_END;
 }
 
+void parse_log_debug(const char *debug)
+{
+    const char *state = NULL;
+    const char *p;
+
+    /*
+    while ((p = pa_split(debug, ",", &amp;amp;state))) {
+        if (strchr(p, ':')) {
+        } else {
+        }
+    }
+    */
+    pa_mutex *mutex = NULL;
+    pa_log_category_t *iter;
+
+    mutex = pa_static_mutex_get(&amp;amp;categories_mutex, TRUE, TRUE);
+    pa_mutex_lock(mutex);
+    PA_LLIST_FOREACH(iter, categories) {
+        iter-&amp;gt;threshold = 0;
+    }
+    pa_mutex_unlock(mutex);
+}
+
 void pa_log_levelv_meta(
+        pa_log_category_t *category,
         pa_log_level_t level,
         const char*file,
         int line,
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -290,6 +343,11 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; void pa_log_levelv_meta(
 
     init_defaults();
 
+    if (category == NULL)
+        return;
+    if (level &amp;lt; category-&amp;gt;threshold)
+        return;
+
     _target = target_override_set ? target_override : target;
     _maximum_level = PA_MAX(maximum_level, maximum_level_override);
     _show_backtrace = PA_MAX(show_backtrace, show_backtrace_override);
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -438,6 +496,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; void pa_log_levelv_meta(
 }
 
 void pa_log_level_meta(
+        pa_log_category_t *category,
         pa_log_level_t level,
         const char*file,
         int line,
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -446,19 +505,19 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; void pa_log_level_meta(
 
     va_list ap;
     va_start(ap, format);
-    pa_log_levelv_meta(level, file, line, func, format, ap);
+    pa_log_levelv_meta(category, level, file, line, func, format, ap);
     va_end(ap);
 }
 
-void pa_log_levelv(pa_log_level_t level, const char *format, va_list ap) {
-    pa_log_levelv_meta(level, NULL, 0, NULL, format, ap);
+void pa_log_levelv(pa_log_category_t *category, pa_log_level_t level, const char *format, va_list ap) {
+    pa_log_levelv_meta(category, level, NULL, 0, NULL, format, ap);
 }
 
-void pa_log_level(pa_log_level_t level, const char *format, ...) {
+void pa_log_level(pa_log_category_t *category, pa_log_level_t level, const char *format, ...) {
     va_list ap;
 
     va_start(ap, format);
-    pa_log_levelv_meta(level, NULL, 0, NULL, format, ap);
+    pa_log_levelv_meta(category, level, NULL, 0, NULL, format, ap);
     va_end(ap);
 }
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -473,3 +532,38 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; pa_bool_t pa_log_ratelimit(pa_log_level_t level) {
 
     return pa_ratelimit_test(&amp;amp;ratelimit, level);
 }
+
+pa_log_category_t *pa_log_category_new(const char *name, int color, const char *description)
+{
+    pa_mutex *mutex = NULL;
+    pa_log_category_t *cat = pa_xnew0(pa_log_category_t, 1);
+
+    cat-&amp;gt;threshold = 0;
+    cat-&amp;gt;color = color;
+    cat-&amp;gt;name = pa_xstrdup(name);
+    cat-&amp;gt;description = pa_xstrdup(description);
+
+    mutex = pa_static_mutex_get(&amp;amp;categories_mutex, TRUE, TRUE);
+    pa_mutex_lock(mutex);
+    PA_LLIST_PREPEND(pa_log_category_t, categories, cat);
+    pa_mutex_unlock(mutex);
+
+    return cat;
+}
+
+static pa_log_category_t *pa_log_category_get(const char *name)
+{
+    pa_mutex *mutex = NULL;
+    pa_log_category_t *iter;
+
+    mutex = pa_static_mutex_get(&amp;amp;categories_mutex, TRUE, TRUE);
+    pa_mutex_lock(mutex);
+    PA_LLIST_FOREACH(iter, categories) {
+        if (pa_streq(iter-&amp;gt;name, name)) {
+                pa_mutex_unlock(mutex);
+                return iter;
+        }
+    }
+    pa_mutex_unlock(mutex);
+    return NULL;
+}
diff --git a/src/pulsecore/log.h b/src/pulsecore/log.h
index 8dd056b..c10d0cc 100644
--- a/src/pulsecore/log.h
+++ b/src/pulsecore/log.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -31,6 +31,23 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 
 /* A simple logging subsystem */
 
+typedef struct pa_log_category pa_log_category_t;
+
+pa_log_category_t *pa_log_category_new(const char *name,
+                                       int color,
+                                       const char *description);
+
+extern pa_log_category_t *PA_LOG_CAT_CORE;
+extern pa_log_category_t *PA_LOG_CAT_CHANNELMAP;
+extern pa_log_category_t *PA_LOG_CAT_CONTEXT;
+
+#define PA_LOG_CATEGORY_STATIC(category) \
+    static pa_log_category_t *category = NULL;
+#define PA_LOG_CATEGORY_INIT(category,name,color) do {                      \
+    if (category == NULL)                                                   \
+        category = pa_log_category_new(name, color, pa__get_description()); \
+} while (0)
+
 /* Where to log to */
 typedef enum pa_log_target {
     PA_LOG_STDERR,  /* default */
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -86,13 +103,15 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; void pa_log_set_show_backtrace(unsigned nlevels);
 void pa_log_set_skip_backtrace(unsigned nlevels);
 
 void pa_log_level_meta(
+        pa_log_category_t *category,
         pa_log_level_t level,
         const char*file,
         int line,
         const char *func,
-        const char *format, ...) PA_GCC_PRINTF_ATTR(5,6);
+        const char *format, ...) PA_GCC_PRINTF_ATTR(6,7);
 
 void pa_log_levelv_meta(
+        pa_log_category_t *category,
         pa_log_level_t level,
         const char*file,
         int line,
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -101,10 +120,12 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; void pa_log_levelv_meta(
         va_list ap);
 
 void pa_log_level(
+        pa_log_category_t *category,
         pa_log_level_t level,
-        const char *format, ...) PA_GCC_PRINTF_ATTR(2,3);
+        const char *format, ...) PA_GCC_PRINTF_ATTR(3,4);
 
 void pa_log_levelv(
+        pa_log_category_t *category,
         pa_log_level_t level,
         const char *format,
         va_list ap);
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -113,12 +134,12 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; void pa_log_levelv(
 
 /* ISO varargs available */
 
-#define pa_log_debug(...)  pa_log_level_meta(PA_LOG_DEBUG,  __FILE__, __LINE__, __func__, __VA_ARGS__)
-#define pa_log_info(...)   pa_log_level_meta(PA_LOG_INFO,   __FILE__, __LINE__, __func__, __VA_ARGS__)
-#define pa_log_notice(...) pa_log_level_meta(PA_LOG_NOTICE, __FILE__, __LINE__, __func__, __VA_ARGS__)
-#define pa_log_warn(...)   pa_log_level_meta(PA_LOG_WARN,   __FILE__, __LINE__, __func__, __VA_ARGS__)
-#define pa_log_error(...)  pa_log_level_meta(PA_LOG_ERROR,  __FILE__, __LINE__, __func__, __VA_ARGS__)
-#define pa_logl(level, ...)  pa_log_level_meta(level,  __FILE__, __LINE__, __func__, __VA_ARGS__)
+#define pa_log_debug(...)  pa_log_level_meta(PA_LOG_CATEGORY_DEFAULT, PA_LOG_DEBUG,  __FILE__, __LINE__, __func__, __VA_ARGS__)
+#define pa_log_info(...)   pa_log_level_meta(PA_LOG_CATEGORY_DEFAULT, PA_LOG_INFO,   __FILE__, __LINE__, __func__, __VA_ARGS__)
+#define pa_log_notice(...) pa_log_level_meta(PA_LOG_CATEGORY_DEFAULT, PA_LOG_NOTICE, __FILE__, __LINE__, __func__, __VA_ARGS__)
+#define pa_log_warn(...)   pa_log_level_meta(PA_LOG_CATEGORY_DEFAULT, PA_LOG_WARN,   __FILE__, __LINE__, __func__, __VA_ARGS__)
+#define pa_log_error(...)  pa_log_level_meta(PA_LOG_CATEGORY_DEFAULT, PA_LOG_ERROR,  __FILE__, __LINE__, __func__, __VA_ARGS__)
+#define pa_logl(level, ...)  pa_log_level_meta(PA_LOG_CATEGORY_DEFAULT, level,  __FILE__, __LINE__, __func__, __VA_ARGS__)
 
 #else
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -126,7 +147,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; void pa_log_levelv(
 PA_GCC_UNUSED static void pa_log_##suffix(const char *format, ...) { \
     va_list ap; \
     va_start(ap, format); \
-    pa_log_levelv_meta(level, NULL, 0, NULL, format, ap); \
+    pa_log_levelv_meta(PA_LOG_CATEGORY_DEFAULT, level, NULL, 0, NULL, format, ap); \
     va_end(ap); \
 }
 
diff --git a/src/pulsecore/macro.h b/src/pulsecore/macro.h
index c6d7d56..3cfa0ce 100644
--- a/src/pulsecore/macro.h
+++ b/src/pulsecore/macro.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -221,11 +221,11 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; typedef int pa_bool_t;
 #define pa_assert_se(expr)                                              \
     do {                                                                \
         if (PA_UNLIKELY(!(expr))) {                                     \
-            pa_log_error("Assertion '%s' failed at %s:%u, function %s(). Aborting.", #expr , __FILE__, __LINE__, PA_PRETTY_FUNCTION); \
             abort();                                                    \
         }                                                               \
     } while (FALSE)
 
+//pa_log_error("Assertion '%s' failed at %s:%u, function %s(). Aborting.", #expr , __FILE__, __LINE__, PA_PRETTY_FUNCTION);
 /* Does exactly nothing */
 #define pa_nop() do {} while (FALSE)
 
diff --git a/src/pulsecore/ratelimit.c b/src/pulsecore/ratelimit.c
index a274d2c..c5c03ee 100644
--- a/src/pulsecore/ratelimit.c
+++ b/src/pulsecore/ratelimit.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -30,6 +30,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 
 #include "ratelimit.h"
 
+#define PA_LOG_CATEGORY_DEFAULT PA_LOG_CAT_CORE
+
 static pa_static_mutex mutex = PA_STATIC_MUTEX_INIT;
 
 /* Modelled after Linux' lib/ratelimit.c by Dave Young
&lt;/pre&gt;</description>
    <dc:creator>Deng Zhengrong</dc:creator>
    <dc:date>2012-05-24T13:46:40</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.audio.pulseaudio.general/13320">
    <title>[PATCH 0/2] core: Add debug prints for statechanges in sinks and sink-inputs.</title>
    <link>http://comments.gmane.org/gmane.comp.audio.pulseaudio.general/13320</link>
    <description>&lt;pre&gt;These two patches add state change debug prints to sinks and sink-inputs.

Jarkko Suontausta (2):
  core: Add functions that return the logical name of the state of
    sinks and sink inputs.
  core: Add debug prints for state changes in sinks and sink-inputs.

 src/pulsecore/sink-input.c |    5 +++++
 src/pulsecore/sink-input.h |   12 ++++++++++++
 src/pulsecore/sink.c       |    6 ++++++
 src/pulsecore/sink.h       |   13 +++++++++++++
 4 files changed, 36 insertions(+), 0 deletions(-)
&lt;/pre&gt;</description>
    <dc:creator>Jarkko Suontausta</dc:creator>
    <dc:date>2012-05-24T10:43:24</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.audio.pulseaudio.general/13312">
    <title>[PATCH 0/2] modules, pulse,core: React to failing pa_memblockq_push calls.</title>
    <link>http://comments.gmane.org/gmane.comp.audio.pulseaudio.general/13312</link>
    <description>&lt;pre&gt;Based on Coverity findings, the return values of pa_memblockq_push and
pa_memblockq_push_align calls were not taken into account. These patches
are addressing many of those cases by adding an assertion.

Thanks to a thorough review of the first version, Tanu is already familiar
with the patches. He had many good proposals for the remaining FIXME cases,
but unfortunately I do not have time to address them now.


Jarkko Suontausta (2):
  core: Assert on memchunk divisibility by sample spec in
    pa_memblockq_push().
  modules, pulse, core: React to failing pa_memblockq_push calls.

 src/modules/echo-cancel/module-echo-cancel.c |    4 ++--
 src/modules/module-combine-sink.c            |    2 ++
 src/modules/module-equalizer-sink.c          |    4 ++--
 src/modules/module-ladspa-sink.c             |    2 +-
 src/modules/module-loopback.c                |    1 +
 src/modules/module-virtual-sink.c            |    2 +-
 src/modules/module-virtual-source.c          |    2 +-
 src/modules/module-virtual-surround-sink.c   |    2 +-
 src/pulse/context.c                          |    1 +
 src/pulsecore/memblockq.c                    |    3 +--
 src/pulsecore/memblockq.h                    |    2 +-
 src/pulsecore/protocol-esound.c              |    3 ++-
 src/pulsecore/protocol-http.c                |    2 ++
 src/pulsecore/protocol-simple.c              |    3 ++-
 src/pulsecore/sink-input.c                   |    4 ++--
 src/pulsecore/sound-file-stream.c            |    2 +-
 16 files changed, 23 insertions(+), 16 deletions(-)
&lt;/pre&gt;</description>
    <dc:creator>Jarkko Suontausta</dc:creator>
    <dc:date>2012-05-24T07:38:21</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.audio.pulseaudio.general/13311">
    <title>PulseAudio with mutiple users and MPD</title>
    <link>http://comments.gmane.org/gmane.comp.audio.pulseaudio.general/13311</link>
    <description>&lt;pre&gt;I'm trying to understand how PulseAudio is supposed to work in my
situation but I think I need some help:
Basically my workstation is shared between 3 users who are always logged
in (tho on different virtual consoles).  Additionally, they all share
a single (system-wide) MPD daemon to play the music.

IIUC running a system-wide pulseaudio is the wrong thing to do.
So I should run a PA daemon for each user.  Somehow those PA daemons
should figure out when we Ctl-Alt-Fn to switch from one virtual console
to another and (re|dis)connect from the actual output sound driver.

OK, I'm not sure this always works reliably, but assuming it does, how
should the MPD daemon enter the picture?  Clearly we don't want the
music to be interrupted merely by someone switching virtual console.


        Stefan
&lt;/pre&gt;</description>
    <dc:creator>Stefan Monnier</dc:creator>
    <dc:date>2012-05-24T02:11:42</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.audio.pulseaudio.general/13303">
    <title>Patches for Solaris</title>
    <link>http://comments.gmane.org/gmane.comp.audio.pulseaudio.general/13303</link>
    <description>&lt;pre&gt;
I am attaching 3 patches for consideration upstream:

- pulseaudio-05-shm.diff
   The shm files on Solaris end up with a different name.  This patch
   makes the code work on Solaris too.

- pulseaudio-07-sada.diff
   Fixes to improve the SunAudio plugin so it works better.

- pulsaudio-10-endian.diff
   On Sparc, WORDS_BIGENDIAN needs to get set if _BIG_ENDIAN is set.

Brian
--- pulseaudio-1.1/src/pulsecore/shm.c-orig2011-10-24 19:42:44.692685416 -0500
+++ pulseaudio-1.1/src/pulsecore/shm.c2011-10-24 20:24:30.605598557 -0500
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -68,8 +68,13 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
  * /dev/shm. We can use that information to list all blocks and
  * cleanup unused ones */
 #define SHM_PATH "/dev/shm/"
+#define SHM_ID_LEN 10
+#elif defined(__sun)
+#define SHM_PATH "/tmp"
+#define SHM_ID_LEN 15
 #else
 #undef SHM_PATH
+#define SHM_ID_LEN 0
 #endif
 
 #define SHM_MARKER ((int) 0xbeefcafe)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -359,10 +364,14 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int pa_shm_cleanup(void) {
         char fn[128];
         struct shm_marker *m;
 
-        if (strncmp(de-&amp;gt;d_name, "pulse-shm-", 10))
+#ifdef defined(__sun)
+        if (strncmp(de-&amp;gt;d_name, "pulse-shm-", SHM_ID_LEN))
+#else
+        if (strncmp(de-&amp;gt;d_name, ".SHMDpulse-shm-", SHM_ID_LEN))
+#endif
             continue;
 
-        if (pa_atou(de-&amp;gt;d_name + 10, &amp;amp;id) &amp;lt; 0)
+        if (pa_atou(de-&amp;gt;d_name + SHM_ID_LEN, &amp;amp;id) &amp;lt; 0)
             continue;
 
         if (pa_shm_attach_ro(&amp;amp;seg, id) &amp;lt; 0)
--- pulseaudio-1.1/src/modules/module-solaris.c-orig2012-05-14 20:28:17.916336872 -0500
+++ pulseaudio-1.1/src/modules/module-solaris.c2012-05-14 20:28:38.353786471 -0500
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -137,6 +137,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static const char* const valid_modargs[]
 static uint64_t get_playback_buffered_bytes(struct userdata *u) {
     audio_info_t info;
     uint64_t played_bytes;
+    int64_t buffered_bytes;
     int err;
 
     pa_assert(u-&amp;gt;sink);
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -163,7 +164,13 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static uint64_t get_playback_buffered_by
 
     pa_smoother_put(u-&amp;gt;smoother, pa_rtclock_now(), pa_bytes_to_usec(played_bytes, &amp;amp;u-&amp;gt;sink-&amp;gt;sample_spec));
 
-    return u-&amp;gt;written_bytes - played_bytes;
+    buffered_bytes = u-&amp;gt;written_bytes - played_bytes;
+
+    if (buffered_bytes &amp;lt; 0) {
+        buffered_bytes = 0;
+    }
+
+    return (uint64_t) buffered_bytes;
 }
 
 static pa_usec_t sink_get_latency(struct userdata *u, pa_sample_spec *ss) {
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -348,7 +355,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int suspend(struct userdata *u) {
 
     pa_log_info("Suspending...");
 
-    ioctl(u-&amp;gt;fd, AUDIO_DRAIN, NULL);
+    ioctl(u-&amp;gt;fd, I_FLUSH, FLUSHRW);
     pa_close(u-&amp;gt;fd);
     u-&amp;gt;fd = -1;
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -485,14 +492,26 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int source_process_msg(pa_msgobje
 static void sink_set_volume(pa_sink *s) {
     struct userdata *u;
     audio_info_t info;
+    pa_volume_t v;
 
     pa_assert_se(u = s-&amp;gt;userdata);
 
+    if (u-&amp;gt;fd &amp;lt; 0) {
+       u-&amp;gt;fd = pa_open_cloexec(u-&amp;gt;device_name, u-&amp;gt;mode | O_NONBLOCK, 0);
+    }
+
     if (u-&amp;gt;fd &amp;gt;= 0) {
         AUDIO_INITINFO(&amp;amp;info);
 
-        info.play.gain = pa_cvolume_max(&amp;amp;s-&amp;gt;real_volume) * AUDIO_MAX_GAIN / PA_VOLUME_NORM;
-        assert(info.play.gain &amp;lt;= AUDIO_MAX_GAIN);
+        v = pa_cvolume_max(&amp;amp;s-&amp;gt;real_volume);
+        if (v &amp;gt; PA_VOLUME_NORM) {
+                v = PA_VOLUME_NORM;
+        }
+
+        info.play.gain = v * AUDIO_MAX_GAIN / PA_VOLUME_NORM;
+
+        pa_log_debug("PA_VOLUME_NORM is %ld", PA_VOLUME_NORM);
+        pa_log_debug("Setting volume %ld %ld", v, info.play.gain);
 
         if (ioctl(u-&amp;gt;fd, AUDIO_SETINFO, &amp;amp;info) &amp;lt; 0) {
             if (errno == EINVAL)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -513,6 +532,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void sink_get_volume(pa_sink *s) 
         if (ioctl(u-&amp;gt;fd, AUDIO_GETINFO, &amp;amp;info) &amp;lt; 0)
             pa_log("AUDIO_SETINFO: %s", pa_cstrerror(errno));
         else
+            pa_log_debug("Getting volume %ld %ld", info.play.gain, (info.play.gain * PA_VOLUME_NORM / AUDIO_MAX_GAIN));
             pa_cvolume_set(&amp;amp;s-&amp;gt;real_volume, s-&amp;gt;sample_spec.channels, info.play.gain * PA_VOLUME_NORM / AUDIO_MAX_GAIN);
     }
 }
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -520,14 +540,19 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void sink_get_volume(pa_sink *s) 
 static void source_set_volume(pa_source *s) {
     struct userdata *u;
     audio_info_t info;
+    pa_volume_t v;
 
     pa_assert_se(u = s-&amp;gt;userdata);
 
     if (u-&amp;gt;fd &amp;gt;= 0) {
         AUDIO_INITINFO(&amp;amp;info);
 
-        info.play.gain = pa_cvolume_max(&amp;amp;s-&amp;gt;real_volume) * AUDIO_MAX_GAIN / PA_VOLUME_NORM;
-        assert(info.play.gain &amp;lt;= AUDIO_MAX_GAIN);
+        v = pa_cvolume_max(&amp;amp;s-&amp;gt;real_volume);
+        if (v &amp;gt; PA_VOLUME_NORM) {
+                v = PA_VOLUME_NORM;
+        }
+
+        info.play.gain = v * AUDIO_MAX_GAIN / PA_VOLUME_NORM;
 
         if (ioctl(u-&amp;gt;fd, AUDIO_SETINFO, &amp;amp;info) &amp;lt; 0) {
             if (errno == EINVAL)
--- pulseaudio-1.1/src/pulse/sample.h-orig2012-05-14 20:24:44.242497036 -0500
+++ pulseaudio-1.1/src/pulse/sample.h2012-05-14 20:24:27.792501491 -0500
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -117,6 +117,9 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; PA_C_DECL_BEGIN
 #define WORDS_BIGENDIAN
 #endif
 #endif
+#if defined(_BIG_ENDIAN)
+#define WORDS_BIGENDIAN
+#endif
 #endif
 
 /** Maximum number of allowed channels */
_______________________________________________
pulseaudio-discuss mailing list
pulseaudio-discuss&amp;lt; at &amp;gt;lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss
&lt;/pre&gt;</description>
    <dc:creator>Brian Cameron</dc:creator>
    <dc:date>2012-05-23T01:55:45</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.audio.pulseaudio.general/13296">
    <title>[PATCH 0/3] Unloading modules by name</title>
    <link>http://comments.gmane.org/gmane.comp.audio.pulseaudio.general/13296</link>
    <description>&lt;pre&gt;A new function was added to module.c to handle unload requests by name.
The native protocol was extended and a new opcode was introduced, and 
finally pactl was extended to make use of the new functionality.

 PROTOCOL                        |    7 +++++++
 configure.ac                    |    2 +-
 man/pactl.1.xml.in              |    4 ++--
 src/map-file                    |    2 ++
 src/pulse/introspect.c          |   31 ++++++++++++++++++++++++++++++-
 src/pulse/introspect.h          |   12 +++++++++---
 src/pulsecore/module.c          |   11 +++++++++++
 src/pulsecore/module.h          |    1 + 
 src/pulsecore/native-common.h   |    5 ++++-
 src/pulsecore/protocol-native.c |   30 ++++++++++++++++++++++++++----
 src/utils/pactl.c               |   15 +++++++++++----
&lt;/pre&gt;</description>
    <dc:creator>poljar</dc:creator>
    <dc:date>2012-05-22T16:06:11</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.audio.pulseaudio.general/13295">
    <title>[PATCH] bluetooth: Release transport when thepa_rtpoll_run loop finishes.</title>
    <link>http://comments.gmane.org/gmane.comp.audio.pulseaudio.general/13295</link>
    <description>&lt;pre&gt;Based on a patch by Marko Ollonen.
---
 src/modules/bluetooth/module-bluetooth-device.c |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/src/modules/bluetooth/module-bluetooth-device.c b/src/modules/bluetooth/module-bluetooth-device.c
index 0b12cc7..68c4efc 100644
--- a/src/modules/bluetooth/module-bluetooth-device.c
+++ b/src/modules/bluetooth/module-bluetooth-device.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -1731,11 +1731,18 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void thread_func(void *userdata) {
             pollfd-&amp;gt;events = (short) (((u-&amp;gt;sink &amp;amp;&amp;amp; PA_SINK_IS_LINKED(u-&amp;gt;sink-&amp;gt;thread_info.state) &amp;amp;&amp;amp; !writable) ? POLLOUT : 0) |
                                       (u-&amp;gt;source &amp;amp;&amp;amp; PA_SOURCE_IS_LINKED(u-&amp;gt;source-&amp;gt;thread_info.state) ? POLLIN : 0));
 
-        if ((ret = pa_rtpoll_run(u-&amp;gt;rtpoll, TRUE)) &amp;lt; 0)
+        if ((ret = pa_rtpoll_run(u-&amp;gt;rtpoll, TRUE)) &amp;lt; 0) {
+            pa_log_debug("pa_rtpoll_run failed with: %d", ret);
             goto fail;
-
-        if (ret == 0)
+        }
+        if (ret == 0) {
+            pa_log_debug("IO thread shutdown requested, stopping cleanly");
+            if (u-&amp;gt;transport)
+                bt_transport_release(u);
+            else
+                stop_stream_fd(u);
             goto finish;
+        }
 
         pollfd = u-&amp;gt;rtpoll_item ? pa_rtpoll_item_get_pollfd(u-&amp;gt;rtpoll_item, NULL) : NULL;
 
&lt;/pre&gt;</description>
    <dc:creator>Jarkko Suontausta</dc:creator>
    <dc:date>2012-05-22T12:58:33</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.audio.pulseaudio.general/13294">
    <title>[PATCH] protocol-native: Use foreach toiterate trough modules.</title>
    <link>http://comments.gmane.org/gmane.comp.audio.pulseaudio.general/13294</link>
    <description>&lt;pre&gt;The PA_IDXSET_FOREACH is easier to read than the standard for loop.
Also pa_streq() should be used for checking string equality.
---
 src/pulsecore/protocol-native.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/pulsecore/protocol-native.c b/src/pulsecore/protocol-native.c
index c2d5fcf..f221d21 100644
--- a/src/pulsecore/protocol-native.c
+++ b/src/pulsecore/protocol-native.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -4621,8 +4621,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void command_extension(pa_pdispatch *pd, uint32_t command, uint32_t tag,
     if (idx != PA_INVALID_INDEX)
         m = pa_idxset_get_by_index(c-&amp;gt;protocol-&amp;gt;core-&amp;gt;modules, idx);
     else {
-        for (m = pa_idxset_first(c-&amp;gt;protocol-&amp;gt;core-&amp;gt;modules, &amp;amp;idx); m; m = pa_idxset_next(c-&amp;gt;protocol-&amp;gt;core-&amp;gt;modules, &amp;amp;idx))
-            if (strcmp(name, m-&amp;gt;name) == 0)
+        PA_IDXSET_FOREACH(m, c-&amp;gt;protocol-&amp;gt;core-&amp;gt;modules, idx) {
+            if (pa_streq(name, m-&amp;gt;name))
                 break;
     }
 
&lt;/pre&gt;</description>
    <dc:creator>poljar</dc:creator>
    <dc:date>2012-05-22T12:37:09</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.audio.pulseaudio.general/13292">
    <title>Failed to load module "module-bluetooth-device"</title>
    <link>http://comments.gmane.org/gmane.comp.audio.pulseaudio.general/13292</link>
    <description>&lt;pre&gt;when i give command

aplay gong.wav

the file plays ok via bluetooth speaker, but i get to console:

Playing WAVE 'gong.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
May 22 10:57:59 siika kernel: [27439.133117] input: 00:02:3C:30:37:DE as /devices/virtual/input/input28
May 22 10:57:59 siika pulseaudio[4416]: [pulseaudio] module.c: Failed to load module "module-bluetooth-device" (argument: "address="00:02:3C:30:37:DE" path="/org/bluez/2553/hci0/dev_00_02_3C_30_37_DE""): initialization failed.
May 22 10:57:59 siika pulseaudio[4416]: [pulseaudio] module.c: Failed to load module "module-bluetooth-device" (argument: "address="00:02:3C:30:37:DE" path="/org/bluez/2553/hci0/dev_00_02_3C_30_37_DE""): initialization failed.
May 22 10:57:59 siika pulseaudio[4416]: [pulseaudio] module.c: Failed to load module "module-bluetooth-device" (argument: "address="00:02:3C:30:37:DE" path="/org/bluez/2553/hci0/dev_00_02_3C_30_37_DE""): initialization failed.
jh&amp;lt; at &amp;gt;siika:~$ May 22 10:58:04 siika rtkit-daemon[4418]: Successfully made thread 24411 of process 4416 (/usr/bin/pulseaudio (deleted)) owned by '1000' RT at priority 5.

why is that?

and then when i give command

paplay gong.wav

the file gets played via internal speaker, not bluetooth
speaker. pavucontrol does show bluetooth speaker after aplay command,
but then it disappears.  how do i tell to paplay to use by
default the bluetooth speaker if it is turned on?

&lt;/pre&gt;</description>
    <dc:creator>Juha Heinanen</dc:creator>
    <dc:date>2012-05-22T08:04:56</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.audio.pulseaudio.general/13287">
    <title>About My Blog Space</title>
    <link>http://comments.gmane.org/gmane.comp.audio.pulseaudio.general/13287</link>
    <description>&lt;pre&gt;Hi Col,

According to your advice, I'm setting my blog up, to track my status and
some thoughts during this GSoC project. The URL is
http://zhengrong.wordpress.com

I'll make everything related to PulseAudio into the category "PulseAudio",
so hopefully it would only output the correct RSS.

There's already one post there. :D

--deng
_______________________________________________
pulseaudio-discuss mailing list
pulseaudio-discuss&amp;lt; at &amp;gt;lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss
&lt;/pre&gt;</description>
    <dc:creator>rong deng</dc:creator>
    <dc:date>2012-05-21T15:45:08</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.audio.pulseaudio.general/13282">
    <title>[PATCH] Add support of callbacks for operationcancelation</title>
    <link>http://comments.gmane.org/gmane.comp.audio.pulseaudio.general/13282</link>
    <description>&lt;pre&gt;- Add new API `pa_operation_set_cancel_callback`
  for users to set cancelation callbacks.
---
 src/pulse/context.c   |    9 +++++++--
 src/pulse/internal.h  |    3 +++
 src/pulse/operation.c |   25 ++++++++++++++++++++++++-
 src/pulse/operation.h |    7 +++++++
 4 files changed, 41 insertions(+), 3 deletions(-)

diff --git a/src/pulse/context.c b/src/pulse/context.c
index 4618635..1ce2738 100644
--- a/src/pulse/context.c
+++ b/src/pulse/context.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -199,8 +199,13 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void context_unlink(pa_context *c) {
         s = n;
     }
 
-    while (c-&amp;gt;operations)
-        pa_operation_cancel(c-&amp;gt;operations);
+    while (c-&amp;gt;operations) {
+        pa_operation *o = c-&amp;gt;operations;
+        if (o-&amp;gt;cancel_callback)
+            o-&amp;gt;cancel_callback(o, o-&amp;gt;cancel_userdata);
+
+        pa_operation_cancel(o);
+    }
 
     if (c-&amp;gt;pdispatch) {
         pa_pdispatch_unref(c-&amp;gt;pdispatch);
diff --git a/src/pulse/internal.h b/src/pulse/internal.h
index c5bdcb1..c647c96 100644
--- a/src/pulse/internal.h
+++ b/src/pulse/internal.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -234,6 +234,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; struct pa_operation {
     pa_operation_state_t state;
     void *userdata;
     pa_operation_cb_t callback;
+    void *cancel_userdata;
+    pa_operation_cancel_cb_t cancel_callback;
 
     void *private; /* some operations might need this */
 };
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -249,6 +251,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; void pa_command_stream_event(pa_pdispatch *pd, uint32_t command, uint32_t tag, p
 void pa_command_client_event(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata);
 void pa_command_stream_buffer_attr(pa_pdispatch *pd, uint32_t command, uint32_t tag, pa_tagstruct *t, void *userdata);
 
+pa_operation *pa_operation_new_with_cancel_callback(pa_context *c, pa_stream *s, pa_operation_cb_t callback, void *userdata, pa_operation_cancel_cb_t cancel_callback, void *cancel_userdata);
 pa_operation *pa_operation_new(pa_context *c, pa_stream *s, pa_operation_cb_t callback, void *userdata);
 void pa_operation_done(pa_operation *o);
 
diff --git a/src/pulse/operation.c b/src/pulse/operation.c
index fe160a3..85867f5 100644
--- a/src/pulse/operation.c
+++ b/src/pulse/operation.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -26,13 +26,14 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #include &amp;lt;pulse/xmalloc.h&amp;gt;
 #include &amp;lt;pulsecore/macro.h&amp;gt;
 #include &amp;lt;pulsecore/flist.h&amp;gt;
+#include &amp;lt;pulse/fork-detect.h&amp;gt;
 
 #include "internal.h"
 #include "operation.h"
 
 PA_STATIC_FLIST_DECLARE(operations, 0, pa_xfree);
 
-pa_operation *pa_operation_new(pa_context *c, pa_stream *s, pa_operation_cb_t cb, void *userdata) {
+pa_operation *pa_operation_new_with_cancel_callback(pa_context *c, pa_stream *s, pa_operation_cb_t cb, void *userdata, pa_operation_cancel_cb_t cancel_cb, void *cancel_userdata) {
     pa_operation *o;
     pa_assert(c);
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -47,6 +48,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; pa_operation *pa_operation_new(pa_context *c, pa_stream *s, pa_operation_cb_t cb
     o-&amp;gt;state = PA_OPERATION_RUNNING;
     o-&amp;gt;callback = cb;
     o-&amp;gt;userdata = userdata;
+    o-&amp;gt;cancel_callback = cancel_cb;
+    o-&amp;gt;cancel_userdata = cancel_userdata;
 
     /* Refcounting is strictly one-way: from the "bigger" to the "smaller" object. */
     PA_LLIST_PREPEND(pa_operation, c-&amp;gt;operations, o);
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -55,6 +58,10 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; pa_operation *pa_operation_new(pa_context *c, pa_stream *s, pa_operation_cb_t cb
     return o;
 }
 
+pa_operation *pa_operation_new(pa_context *c, pa_stream *s, pa_operation_cb_t cb, void *userdata) {
+    return pa_operation_new_with_cancel_callback(c, s, cb, userdata, NULL, NULL);
+}
+
 pa_operation *pa_operation_ref(pa_operation *o) {
     pa_assert(o);
     pa_assert(PA_REFCNT_VALUE(o) &amp;gt;= 1);
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -91,6 +98,8 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void operation_unlink(pa_operation *o) {
     o-&amp;gt;stream = NULL;
     o-&amp;gt;callback = NULL;
     o-&amp;gt;userdata = NULL;
+    o-&amp;gt;cancel_callback = NULL;
+    o-&amp;gt;cancel_userdata = NULL;
 }
 
 static void operation_set_state(pa_operation *o, pa_operation_state_t st) {
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -130,3 +139,17 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; pa_operation_state_t pa_operation_get_state(pa_operation *o) {
 
     return o-&amp;gt;state;
 }
+
+void pa_operation_set_cancel_callback(pa_operation *o, pa_operation_cancel_cb_t cb, void *userdata) {
+    pa_assert(o);
+    pa_assert(PA_REFCNT_VALUE(o) &amp;gt;= 1);
+
+    if (pa_detect_fork())
+        return;
+
+    if (o-&amp;gt;state == PA_OPERATION_DONE || o-&amp;gt;state == PA_OPERATION_CANCELED)
+        return;
+
+    o-&amp;gt;cancel_callback = cb;
+    o-&amp;gt;cancel_userdata = userdata;
+}
diff --git a/src/pulse/operation.h b/src/pulse/operation.h
index b6b5691..a5f97fa 100644
--- a/src/pulse/operation.h
+++ b/src/pulse/operation.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -34,6 +34,9 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; PA_C_DECL_BEGIN
 /** An asynchronous operation object */
 typedef struct pa_operation pa_operation;
 
+/** A generic callback for operation cancelation */
+typedef void (*pa_operation_cancel_cb_t) (pa_operation *o, void *userdata);
+
 /** Increase the reference count by one */
 pa_operation *pa_operation_ref(pa_operation *o);
 
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -50,6 +53,10 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; void pa_operation_cancel(pa_operation *o);
 /** Return the current status of the operation */
 pa_operation_state_t pa_operation_get_state(pa_operation *o);
 
+/** Set the callback function that is called when the operation
+ * is canceled due to disconnection. \since 3.0 */
+void pa_operation_set_cancel_callback(pa_operation *o, pa_operation_cancel_cb_t cb, void *userdata);
+
 PA_C_DECL_END
 
 #endif
&lt;/pre&gt;</description>
    <dc:creator>Favonia</dc:creator>
    <dc:date>2012-05-20T00:03:19</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.audio.pulseaudio.general/13281">
    <title>[PATCH] Fix spelling of separated: s, sepera,separa, g</title>
    <link>http://comments.gmane.org/gmane.comp.audio.pulseaudio.general/13281</link>
    <description>&lt;pre&gt;Date: Sat, 19 May 2012 10:03:01 +0200

The used command for fixing the script is the following.

    $ git grep sepera | cut --delimiter=: --fields=1 | xargs sed -i s,sepera,separa,g

This patch is motivated by a patch in Debian from Martin-Éric Racine [1].

[1] http://anonscm.debian.org/gitweb/?p=pkg-pulseaudio/pulseaudio.git;a=commitdiff;h=70e7261a615141908c0cf366fd49e0fc0f550fbf
---
I am not sure why just those eight translation files contain the incorrect spelled string and the others not.
---
 man/pulse-daemon.conf.5.xml.in                                     |    2 +-
 po/as.po                                                           |    4 ++--
 po/bn_IN.po                                                        |    4 ++--
 po/gu.po                                                           |    4 ++--
 po/hi.po                                                           |    4 ++--
 po/ml.po                                                           |    4 ++--
 po/pa.po                                                           |    4 ++--
 po/ta.po                                                           |    4 ++--
 po/zh_CN.po                                                        |    4 ++--
 src/modules/alsa/mixer/paths/analog-input.conf                     |    2 +-
 src/modules/alsa/mixer/paths/analog-output-lfe-on-mono.conf        |    2 +-
 src/modules/alsa/mixer/paths/analog-output-mono.conf               |    2 +-
 .../alsa/mixer/profile-sets/native-instruments-audio8dj.conf       |    2 +-
 13 files changed, 21 insertions(+), 21 deletions(-)

diff --git a/man/pulse-daemon.conf.5.xml.in b/man/pulse-daemon.conf.5.xml.in
index 47318e2..de4511a 100644
--- a/man/pulse-daemon.conf.5.xml.in
+++ b/man/pulse-daemon.conf.5.xml.in
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -267,7 +267,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; USA.
     &amp;lt;option&amp;gt;
       &amp;lt;p&amp;gt;&amp;lt;opt&amp;gt;dl-search-path=&amp;lt;/opt&amp;gt; The path were to look for dynamic
       shared objects (DSOs/plugins). You may specify more than one
-      path seperated by colons. The default path depends on compile
+      path separated by colons. The default path depends on compile
       time settings. The &amp;lt;opt&amp;gt;--dl-search-path&amp;lt;/opt&amp;gt; command line
       option takes precedence. &amp;lt;/p&amp;gt;
     &amp;lt;/option&amp;gt;
diff --git a/po/as.po b/po/as.po
index 6cbc923..c0e8422 100644
--- a/po/as.po
+++ b/po/as.po
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -92,7 +92,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; msgstr ""
 "sink_name=&amp;lt;name for the sink&amp;gt; sink_properties=&amp;lt;properties for the sink&amp;gt; "
 "master=&amp;lt;name of sink to filter&amp;gt; format=&amp;lt;sample format&amp;gt; rate=&amp;lt;sample rate&amp;gt; "
 "channels=&amp;lt;number of channels&amp;gt; channel_map=&amp;lt;channel map&amp;gt; plugin=&amp;lt;ladspa "
-"plugin name&amp;gt; label=&amp;lt;ladspa plugin label&amp;gt; control=&amp;lt;comma seperated list of "
+"plugin name&amp;gt; label=&amp;lt;ladspa plugin label&amp;gt; control=&amp;lt;comma separated list of "
 "input control values&amp;gt;"
 
 #: ../src/modules/module-null-sink.c:49
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2868,7 +2868,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; msgstr ""
 "sink_name=&amp;lt;name for the sink&amp;gt; sink_properties=&amp;lt;properties for the sink&amp;gt; "
 "master=&amp;lt;name of sink to filter&amp;gt; format=&amp;lt;sample format&amp;gt; rate=&amp;lt;sample rate&amp;gt; "
 "channels=&amp;lt;number of channels&amp;gt; channel_map=&amp;lt;channel map&amp;gt; plugin=&amp;lt;ladspa "
-"plugin name&amp;gt; label=&amp;lt;ladspa plugin label&amp;gt; control=&amp;lt;comma seperated list of "
+"plugin name&amp;gt; label=&amp;lt;ladspa plugin label&amp;gt; control=&amp;lt;comma separated list of "
 "input control values&amp;gt;"
 
 #: ../src/modules/module-filter-apply.c:48
diff --git a/po/bn_IN.po b/po/bn_IN.po
index ff1d0be..1c35a2d 100644
--- a/po/bn_IN.po
+++ b/po/bn_IN.po
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -93,7 +93,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; msgstr ""
 "sink_name=&amp;lt;name for the sink&amp;gt; sink_properties=&amp;lt;properties for the sink&amp;gt; "
 "master=&amp;lt;name of sink to filter&amp;gt; format=&amp;lt;sample format&amp;gt; rate=&amp;lt;sample rate&amp;gt; "
 "channels=&amp;lt;number of channels&amp;gt; channel_map=&amp;lt;channel map&amp;gt; plugin=&amp;lt;ladspa "
-"plugin name&amp;gt; label=&amp;lt;ladspa plugin label&amp;gt; control=&amp;lt;comma seperated list of "
+"plugin name&amp;gt; label=&amp;lt;ladspa plugin label&amp;gt; control=&amp;lt;comma separated list of "
 "input control values&amp;gt;"
 
 #: ../src/modules/module-null-sink.c:49
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2887,7 +2887,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; msgstr ""
 "sink_name=&amp;lt;name for the sink&amp;gt; sink_properties=&amp;lt;properties for the sink&amp;gt; "
 "master=&amp;lt;name of sink to filter&amp;gt; format=&amp;lt;sample format&amp;gt; rate=&amp;lt;sample rate&amp;gt; "
 "channels=&amp;lt;number of channels&amp;gt; channel_map=&amp;lt;channel map&amp;gt; plugin=&amp;lt;ladspa "
-"plugin name&amp;gt; label=&amp;lt;ladspa plugin label&amp;gt; control=&amp;lt;comma seperated list of "
+"plugin name&amp;gt; label=&amp;lt;ladspa plugin label&amp;gt; control=&amp;lt;comma separated list of "
 "input control values&amp;gt;"
 
 #: ../src/modules/module-filter-apply.c:48
diff --git a/po/gu.po b/po/gu.po
index 41da4f9..65374c7 100644
--- a/po/gu.po
+++ b/po/gu.po
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -94,7 +94,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; msgstr ""
 "sink_name=&amp;lt;name for the sink&amp;gt; sink_properties=&amp;lt;properties for the sink&amp;gt; "
 "master=&amp;lt;name of sink to filter&amp;gt; format=&amp;lt;sample format&amp;gt; rate=&amp;lt;sample rate&amp;gt; "
 "channels=&amp;lt;number of channels&amp;gt; channel_map=&amp;lt;channel map&amp;gt; plugin=&amp;lt;ladspa "
-"plugin name&amp;gt; label=&amp;lt;ladspa plugin label&amp;gt; control=&amp;lt;comma seperated list of "
+"plugin name&amp;gt; label=&amp;lt;ladspa plugin label&amp;gt; control=&amp;lt;comma separated list of "
 "input control values&amp;gt;"
 
 #: ../src/modules/module-null-sink.c:49
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2856,7 +2856,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; msgstr ""
 "sink_name=&amp;lt;name for the sink&amp;gt; sink_properties=&amp;lt;properties for the sink&amp;gt; "
 "master=&amp;lt;name of sink to filter&amp;gt; format=&amp;lt;sample format&amp;gt; rate=&amp;lt;sample rate&amp;gt; "
 "channels=&amp;lt;number of channels&amp;gt; channel_map=&amp;lt;channel map&amp;gt; plugin=&amp;lt;ladspa "
-"plugin name&amp;gt; label=&amp;lt;ladspa plugin label&amp;gt; control=&amp;lt;comma seperated list of "
+"plugin name&amp;gt; label=&amp;lt;ladspa plugin label&amp;gt; control=&amp;lt;comma separated list of "
 "input control values&amp;gt;"
 
 #: ../src/modules/module-filter-apply.c:48
diff --git a/po/hi.po b/po/hi.po
index 9436cb8..644c9ac 100644
--- a/po/hi.po
+++ b/po/hi.po
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -100,7 +100,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; msgstr ""
 "sink_name=&amp;lt;name for the sink&amp;gt; sink_properties=&amp;lt;properties for the sink&amp;gt; "
 "master=&amp;lt;name of sink to filter&amp;gt; format=&amp;lt;sample format&amp;gt; rate=&amp;lt;sample rate&amp;gt; "
 "channels=&amp;lt;number of channels&amp;gt; channel_map=&amp;lt;channel map&amp;gt; plugin=&amp;lt;ladspa "
-"plugin name&amp;gt; label=&amp;lt;ladspa plugin label&amp;gt; control=&amp;lt;comma seperated list of "
+"plugin name&amp;gt; label=&amp;lt;ladspa plugin label&amp;gt; control=&amp;lt;comma separated list of "
 "input control values&amp;gt;"
 
 #: ../src/modules/module-null-sink.c:49
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2873,7 +2873,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; msgstr ""
 "sink_name=&amp;lt;name for the sink&amp;gt; sink_properties=&amp;lt;properties for the sink&amp;gt; "
 "master=&amp;lt;name of sink to filter&amp;gt; format=&amp;lt;sample format&amp;gt; rate=&amp;lt;sample rate&amp;gt; "
 "channels=&amp;lt;number of channels&amp;gt; channel_map=&amp;lt;channel map&amp;gt; plugin=&amp;lt;ladspa "
-"plugin name&amp;gt; label=&amp;lt;ladspa plugin label&amp;gt; control=&amp;lt;comma seperated list of "
+"plugin name&amp;gt; label=&amp;lt;ladspa plugin label&amp;gt; control=&amp;lt;comma separated list of "
 "input control values&amp;gt;"
 
 #: ../src/modules/module-filter-apply.c:48
diff --git a/po/ml.po b/po/ml.po
index ffdcf1b..91ff254 100644
--- a/po/ml.po
+++ b/po/ml.po
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -85,7 +85,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; msgstr ""
 "sink_name=&amp;lt;name for the sink&amp;gt; sink_properties=&amp;lt;properties for the sink&amp;gt; "
 "master=&amp;lt;name of sink to filter&amp;gt; format=&amp;lt;sample format&amp;gt; rate=&amp;lt;sample rate&amp;gt; "
 "channels=&amp;lt;number of channels&amp;gt; channel_map=&amp;lt;channel map&amp;gt; plugin=&amp;lt;ladspa "
-"plugin name&amp;gt; label=&amp;lt;ladspa plugin label&amp;gt; control=&amp;lt;comma seperated list of "
+"plugin name&amp;gt; label=&amp;lt;ladspa plugin label&amp;gt; control=&amp;lt;comma separated list of "
 "input control values&amp;gt;"
 
 #: ../src/modules/module-null-sink.c:49
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2860,7 +2860,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; msgstr ""
 "sink_name=&amp;lt;name for the sink&amp;gt; sink_properties=&amp;lt;properties for the sink&amp;gt; "
 "master=&amp;lt;name of sink to filter&amp;gt; format=&amp;lt;sample format&amp;gt; rate=&amp;lt;sample rate&amp;gt; "
 "channels=&amp;lt;number of channels&amp;gt; channel_map=&amp;lt;channel map&amp;gt; plugin=&amp;lt;ladspa "
-"plugin name&amp;gt; label=&amp;lt;ladspa plugin label&amp;gt; control=&amp;lt;comma seperated list of "
+"plugin name&amp;gt; label=&amp;lt;ladspa plugin label&amp;gt; control=&amp;lt;comma separated list of "
 "input control values&amp;gt;"
 
 #: ../src/modules/module-filter-apply.c:48
diff --git a/po/pa.po b/po/pa.po
index f8000a0..c630293 100644
--- a/po/pa.po
+++ b/po/pa.po
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -91,7 +91,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; msgstr ""
 "sink_name=&amp;lt;name for the sink&amp;gt; sink_properties=&amp;lt;properties for the sink&amp;gt; "
 "master=&amp;lt;name of sink to filter&amp;gt; format=&amp;lt;sample format&amp;gt; rate=&amp;lt;sample rate&amp;gt; "
 "channels=&amp;lt;number of channels&amp;gt; channel_map=&amp;lt;channel map&amp;gt; plugin=&amp;lt;ladspa "
-"plugin name&amp;gt; label=&amp;lt;ladspa plugin label&amp;gt; control=&amp;lt;comma seperated list of "
+"plugin name&amp;gt; label=&amp;lt;ladspa plugin label&amp;gt; control=&amp;lt;comma separated list of "
 "input control values&amp;gt;"
 
 #: ../src/modules/module-null-sink.c:49
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2859,7 +2859,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; msgstr ""
 "sink_name=&amp;lt;name for the sink&amp;gt; sink_properties=&amp;lt;properties for the sink&amp;gt; "
 "master=&amp;lt;name of sink to filter&amp;gt; format=&amp;lt;sample format&amp;gt; rate=&amp;lt;sample rate&amp;gt; "
 "channels=&amp;lt;number of channels&amp;gt; channel_map=&amp;lt;channel map&amp;gt; plugin=&amp;lt;ladspa "
-"plugin name&amp;gt; label=&amp;lt;ladspa plugin label&amp;gt; control=&amp;lt;comma seperated list of "
+"plugin name&amp;gt; label=&amp;lt;ladspa plugin label&amp;gt; control=&amp;lt;comma separated list of "
 "input control values&amp;gt;"
 
 #: ../src/modules/module-filter-apply.c:48
diff --git a/po/ta.po b/po/ta.po
index 963bf42..d8c8363 100644
--- a/po/ta.po
+++ b/po/ta.po
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -118,7 +118,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; msgstr ""
 "sink_name=&amp;lt;name for the sink&amp;gt; sink_properties=&amp;lt;properties for the sink&amp;gt; "
 "master=&amp;lt;name of sink to filter&amp;gt; format=&amp;lt;sample format&amp;gt; rate=&amp;lt;sample rate&amp;gt; "
 "channels=&amp;lt;number of channels&amp;gt; channel_map=&amp;lt;channel map&amp;gt; plugin=&amp;lt;ladspa "
-"plugin name&amp;gt; label=&amp;lt;ladspa plugin label&amp;gt; control=&amp;lt;comma seperated list of "
+"plugin name&amp;gt; label=&amp;lt;ladspa plugin label&amp;gt; control=&amp;lt;comma separated list of "
 "input control values&amp;gt;"
 
 #: ../src/modules/module-null-sink.c:49
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2894,7 +2894,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; msgstr ""
 "sink_name=&amp;lt;name for the sink&amp;gt; sink_properties=&amp;lt;properties for the sink&amp;gt; "
 "master=&amp;lt;name of sink to filter&amp;gt; format=&amp;lt;sample format&amp;gt; rate=&amp;lt;sample rate&amp;gt; "
 "channels=&amp;lt;number of channels&amp;gt; channel_map=&amp;lt;channel map&amp;gt; plugin=&amp;lt;ladspa "
-"plugin name&amp;gt; label=&amp;lt;ladspa plugin label&amp;gt; control=&amp;lt;comma seperated list of "
+"plugin name&amp;gt; label=&amp;lt;ladspa plugin label&amp;gt; control=&amp;lt;comma separated list of "
 "input control values&amp;gt;"
 
 #: ../src/modules/module-filter-apply.c:48
diff --git a/po/zh_CN.po b/po/zh_CN.po
index 6d259ab..2971a35 100644
--- a/po/zh_CN.po
+++ b/po/zh_CN.po
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -92,7 +92,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; msgstr ""
 "sink_name=&amp;lt;name for the sink&amp;gt; sink_properties=&amp;lt;properties for the sink&amp;gt; "
 "master=&amp;lt;name of sink to filter&amp;gt; format=&amp;lt;sample format&amp;gt; rate=&amp;lt;sample rate&amp;gt; "
 "channels=&amp;lt;number of channels&amp;gt; channel_map=&amp;lt;channel map&amp;gt; plugin=&amp;lt;ladspa "
-"plugin name&amp;gt; label=&amp;lt;ladspa plugin label&amp;gt; control=&amp;lt;comma seperated list of "
+"plugin name&amp;gt; label=&amp;lt;ladspa plugin label&amp;gt; control=&amp;lt;comma separated list of "
 "input control values&amp;gt;"
 
 #: ../src/modules/module-null-sink.c:49
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -2815,7 +2815,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; msgstr ""
 "sink_name=&amp;lt;name for the sink&amp;gt; sink_properties=&amp;lt;properties for the sink&amp;gt; "
 "master=&amp;lt;name of sink to filter&amp;gt; format=&amp;lt;sample format&amp;gt; rate=&amp;lt;sample rate&amp;gt; "
 "channels=&amp;lt;number of channels&amp;gt; channel_map=&amp;lt;channel map&amp;gt; plugin=&amp;lt;ladspa "
-"plugin name&amp;gt; label=&amp;lt;ladspa plugin label&amp;gt; control=&amp;lt;comma seperated list of "
+"plugin name&amp;gt; label=&amp;lt;ladspa plugin label&amp;gt; control=&amp;lt;comma separated list of "
 "input control values&amp;gt;"
 
 #: ../src/modules/module-filter-apply.c:48
diff --git a/src/modules/alsa/mixer/paths/analog-input.conf b/src/modules/alsa/mixer/paths/analog-input.conf
index b86c356..ecacc9c 100644
--- a/src/modules/alsa/mixer/paths/analog-input.conf
+++ b/src/modules/alsa/mixer/paths/analog-input.conf
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -14,7 +14,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 # along with PulseAudio; if not, write to the Free Software Foundation,
 # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
 
-; A fallback for devices that lack seperate Mic/Line/Aux/Video/TV
+; A fallback for devices that lack separate Mic/Line/Aux/Video/TV
 ; Tuner/FM elements
 ;
 ; See analog-output.conf.common for an explanation on the directives
diff --git a/src/modules/alsa/mixer/paths/analog-output-lfe-on-mono.conf b/src/modules/alsa/mixer/paths/analog-output-lfe-on-mono.conf
index 67ee32f..181aa38 100644
--- a/src/modules/alsa/mixer/paths/analog-output-lfe-on-mono.conf
+++ b/src/modules/alsa/mixer/paths/analog-output-lfe-on-mono.conf
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -14,7 +14,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 # along with PulseAudio; if not, write to the Free Software Foundation,
 # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
 
-; Intended for usage in laptops that have a seperate LFE speaker
+; Intended for usage in laptops that have a separate LFE speaker
 ; connected to the Master mono connector
 ;
 ; See analog-output.conf.common for an explanation on the directives
diff --git a/src/modules/alsa/mixer/paths/analog-output-mono.conf b/src/modules/alsa/mixer/paths/analog-output-mono.conf
index 13a2d6a..87b5081 100644
--- a/src/modules/alsa/mixer/paths/analog-output-mono.conf
+++ b/src/modules/alsa/mixer/paths/analog-output-mono.conf
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -14,7 +14,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 # along with PulseAudio; if not, write to the Free Software Foundation,
 # Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
 
-; Intended for usage on boards that have a seperate Mono output plug.
+; Intended for usage on boards that have a separate Mono output plug.
 ;
 ; See analog-output.conf.common for an explanation on the directives
 
diff --git a/src/modules/alsa/mixer/profile-sets/native-instruments-audio8dj.conf b/src/modules/alsa/mixer/profile-sets/native-instruments-audio8dj.conf
index 3fe3cc5..d2990de 100644
--- a/src/modules/alsa/mixer/profile-sets/native-instruments-audio8dj.conf
+++ b/src/modules/alsa/mixer/profile-sets/native-instruments-audio8dj.conf
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -39,7 +39,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; device-strings = hw:%f,0,1
 channel-map = left,right
 
 # Since we want to set a different description for channel C's/D's input
-# and output we define two seperate mappings for them
+# and output we define two separate mappings for them
 [Mapping analog-stereo-c-output]
 description = Analog Stereo Channel C
 device-strings = hw:%f,0,2
&lt;/pre&gt;</description>
    <dc:creator>Paul Menzel</dc:creator>
    <dc:date>2012-05-19T08:25:04</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.audio.pulseaudio.general/13280">
    <title>[PATCH] PulseAudio 2.0 to latest systemd/udevgit</title>
    <link>http://comments.gmane.org/gmane.comp.audio.pulseaudio.general/13280</link>
    <description>&lt;pre&gt;Hi,

I just rebuilt PulseAudio 2.0 with latest systemd/udev git.

It requires removing some deprecated functions.

--- ./src/modules/module-udev-detect.c.orig    2012-03-01 
02:02:19.000000000 -0700
+++ ./src/modules/module-udev-detect.c    2012-05-18 20:02:12.549056842 
-0600
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -123,7 +123,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static char *card_get_sysattr(const char
          goto finish;
      }

-    t = pa_sprintf_malloc("%s/class/sound/card%s", 
udev_get_sys_path(udev), card_idx);
+    t = pa_sprintf_malloc("/sys/class/sound/card%s", card_idx);
      card = udev_device_new_from_syspath(udev, t);
      pa_xfree(t);

&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -282,7 +282,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static void verify_access(struct userdat
      pa_assert(u);
      pa_assert(d);

-    cd = pa_sprintf_malloc("%s/snd/controlC%s", 
udev_get_dev_path(u-&amp;gt;udev), path_get_card_id(d-&amp;gt;path));
+    cd = pa_sprintf_malloc("/dev/snd/controlC%s", 
path_get_card_id(d-&amp;gt;path));
      accessible = access(cd, R_OK|W_OK) &amp;gt;= 0;
      pa_log_debug("%s is accessible: %s", cd, pa_yes_no(accessible));

&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -621,7 +621,6 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; fail:
  }

  static int setup_inotify(struct userdata *u) {
-    char *dev_snd;
      int r;

      if (u-&amp;gt;inotify_fd &amp;gt;= 0)
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -632,9 +631,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; static int setup_inotify(struct userdata
          return -1;
      }

-    dev_snd = pa_sprintf_malloc("%s/snd", udev_get_dev_path(u-&amp;gt;udev));
-    r = inotify_add_watch(u-&amp;gt;inotify_fd, dev_snd, 
IN_ATTRIB|IN_CLOSE_WRITE|IN_DELETE_SELF|IN_MOVE_SELF);
-    pa_xfree(dev_snd);
+    r = inotify_add_watch(u-&amp;gt;inotify_fd, "/dev/snd", 
IN_ATTRIB|IN_CLOSE_WRITE|IN_DELETE_SELF|IN_MOVE_SELF);

      if (r &amp;lt; 0) {
          int saved_errno = errno;
--- ./src/modules/udev-util.c.orig    2011-10-28 06:44:20.000000000 -0600
+++ ./src/modules/udev-util.c    2012-05-19 01:21:21.847915814 -0600
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -180,7 +180,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; int pa_udev_get_info(int card_idx, pa_pr
          goto finish;
      }

-    t = pa_sprintf_malloc("%s/class/sound/card%i", 
udev_get_sys_path(udev), card_idx);
+    t = pa_sprintf_malloc("/sys/class/sound/card%i", card_idx);
      card = udev_device_new_from_syspath(udev, t);
      pa_xfree(t);

&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -277,7 +277,7 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; char* pa_udev_get_property(int card_idx,
          goto finish;
      }

-    t = pa_sprintf_malloc("%s/class/sound/card%i", 
udev_get_sys_path(udev), card_idx);
+    t = pa_sprintf_malloc("/sys/class/sound/card%i", card_idx);
      card = udev_device_new_from_syspath(udev, t);
      pa_xfree(t);
&lt;/pre&gt;</description>
    <dc:creator>Kelly Anderson</dc:creator>
    <dc:date>2012-05-19T07:39:49</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.audio.pulseaudio.general/13278">
    <title>[PATCH] once: Fix race causing pa_once tosometimes run twice</title>
    <link>http://comments.gmane.org/gmane.comp.audio.pulseaudio.general/13278</link>
    <description>&lt;pre&gt;There was a race in the existing code that could cause the pa_once code
to be run twice, see:
http://lists.freedesktop.org/archives/pulseaudio-discuss/2012-April/013354.html

Therefore the existing implementation was rewritten to instead look like
the reference implementation here:
http://www.hpl.hp.com/research/linux/atomic_ops/example.php4

Signed-off-by: David Henningsson &amp;lt;david.henningsson&amp;lt; at &amp;gt;canonical.com&amp;gt;
---

We had some discussion about this a little while ago, but no patch was merged,
so the bug was left unfixed.
If there are no objections I'll push this one.

 src/pulsecore/once.c |   43 +++++++++++++------------------------------
 src/pulsecore/once.h |    8 ++++----
 2 files changed, 17 insertions(+), 34 deletions(-)

diff --git a/src/pulsecore/once.c b/src/pulsecore/once.c
index 4e509e0..30b35a6 100644
--- a/src/pulsecore/once.c
+++ b/src/pulsecore/once.c
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -24,46 +24,33 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 #endif
 
 #include &amp;lt;pulsecore/macro.h&amp;gt;
-#include &amp;lt;pulsecore/mutex.h&amp;gt;
 
 #include "once.h"
 
+/* See http://www.hpl.hp.com/research/linux/atomic_ops/example.php4 for the
+ * reference algorithm used here. */
+
 pa_bool_t pa_once_begin(pa_once *control) {
+    pa_mutex *m;
+
     pa_assert(control);
 
     if (pa_atomic_load(&amp;amp;control-&amp;gt;done))
         return FALSE;
 
-    pa_atomic_inc(&amp;amp;control-&amp;gt;ref);
-
     /* Caveat: We have to make sure that the once func has completed
      * before returning, even if the once func is not actually
      * executed by us. Hence the awkward locking. */
 
-    for (;;) {
-        pa_mutex *m;
-
-        if ((m = pa_atomic_ptr_load(&amp;amp;control-&amp;gt;mutex))) {
-
-            /* The mutex is stored in locked state, hence let's just
-             * wait until it is unlocked */
-            pa_mutex_lock(m);
-
-            pa_assert(pa_atomic_load(&amp;amp;control-&amp;gt;done));
-
-            pa_once_end(control);
-            return FALSE;
-        }
-
-        pa_assert_se(m = pa_mutex_new(FALSE, FALSE));
-        pa_mutex_lock(m);
-
-        if (pa_atomic_ptr_cmpxchg(&amp;amp;control-&amp;gt;mutex, NULL, m))
-            return TRUE;
+    m = pa_static_mutex_get(&amp;amp;control-&amp;gt;mutex, FALSE, FALSE);
+    pa_mutex_lock(m);
 
+    if (pa_atomic_load(&amp;amp;control-&amp;gt;done)) {
         pa_mutex_unlock(m);
-        pa_mutex_free(m);
+        return FALSE;
     }
+
+    return TRUE;
 }
 
 void pa_once_end(pa_once *control) {
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -71,15 +58,11 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt; void pa_once_end(pa_once *control) {
 
     pa_assert(control);
 
+    pa_assert(!pa_atomic_load(&amp;amp;control-&amp;gt;done));
     pa_atomic_store(&amp;amp;control-&amp;gt;done, 1);
 
-    pa_assert_se(m = pa_atomic_ptr_load(&amp;amp;control-&amp;gt;mutex));
+    m = pa_static_mutex_get(&amp;amp;control-&amp;gt;mutex, FALSE, FALSE);
     pa_mutex_unlock(m);
-
-    if (pa_atomic_dec(&amp;amp;control-&amp;gt;ref) &amp;lt;= 1) {
-        pa_assert_se(pa_atomic_ptr_cmpxchg(&amp;amp;control-&amp;gt;mutex, m, NULL));
-        pa_mutex_free(m);
-    }
 }
 
 /* Not reentrant -- how could it be? */
diff --git a/src/pulsecore/once.h b/src/pulsecore/once.h
index edc8188..a478d1f 100644
--- a/src/pulsecore/once.h
+++ b/src/pulsecore/once.h
&amp;lt; at &amp;gt;&amp;lt; at &amp;gt; -23,16 +23,16 &amp;lt; at &amp;gt;&amp;lt; at &amp;gt;
 ***/
 
 #include &amp;lt;pulsecore/atomic.h&amp;gt;
+#include &amp;lt;pulsecore/mutex.h&amp;gt;
 
 typedef struct pa_once {
-    pa_atomic_ptr_t mutex;
-    pa_atomic_t ref, done;
+    pa_static_mutex mutex;
+    pa_atomic_t done;
 } pa_once;
 
 #define PA_ONCE_INIT                                                    \
     {                                                                   \
-        .mutex = PA_ATOMIC_PTR_INIT(NULL),                              \
-        .ref = PA_ATOMIC_INIT(0),                                       \
+        .mutex = PA_STATIC_MUTEX_INIT,                                  \
         .done = PA_ATOMIC_INIT(0)                                       \
     }
 
&lt;/pre&gt;</description>
    <dc:creator>David Henningsson</dc:creator>
    <dc:date>2012-05-18T20:43:45</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.comp.audio.pulseaudio.general">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.comp.audio.pulseaudio.general</link>
  </textinput>
</rdf:RDF>

