[pulseaudio-commits] 4 commits - src/modules src/pulse src/pulsecore

Tanu Kaskinen tanuk at kemper.freedesktop.org
Fri Jan 4 07:25:40 PST 2013


 src/modules/module-solaris.c |    7 +++++--
 src/pulse/sample.h           |    7 +++++++
 src/pulsecore/shm.c          |   13 +++++++++++--
 3 files changed, 23 insertions(+), 4 deletions(-)

New commits:
commit e05972ff130f458a518980ea0bbb98e56128dc7a
Author: Tanu Kaskinen <tanuk at iki.fi>
Date:   Fri Jan 4 17:21:25 2013 +0200

    pulse: Fix endianness definition on Sparc.
    
    Patch by Brian Cameron <brian.cameron at oracle.com>.

diff --git a/src/pulse/sample.h b/src/pulse/sample.h
index 965559e..9067951 100644
--- a/src/pulse/sample.h
+++ b/src/pulse/sample.h
@@ -112,11 +112,18 @@
 PA_C_DECL_BEGIN
 
 #if !defined(WORDS_BIGENDIAN)
+
 #if defined(__BYTE_ORDER)
 #if __BYTE_ORDER == __BIG_ENDIAN
 #define WORDS_BIGENDIAN
 #endif
 #endif
+
+/* On Sparc, WORDS_BIGENDIAN needs to be set if _BIG_ENDIAN is defined. */
+#ifdef _BIG_ENDIAN
+#define WORDS_BIGENDIAN
+#endif
+
 #endif
 
 /** Maximum number of allowed channels */

commit c3207d4080c979c8800ac61d46f924e1abb993dc
Author: Tanu Kaskinen <tanuk at iki.fi>
Date:   Fri Jan 4 16:57:48 2013 +0200

    solaris: When suspending, flush the device instead of draining it.
    
    Patch by Brian Cameron <brian.cameron at oracle.com>.

diff --git a/src/modules/module-solaris.c b/src/modules/module-solaris.c
index eea5c0d..7f3342f 100644
--- a/src/modules/module-solaris.c
+++ b/src/modules/module-solaris.c
@@ -351,7 +351,7 @@ static int suspend(struct userdata *u) {
 
     pa_log_info("Suspending...");
 
-    ioctl(u->fd, AUDIO_DRAIN, NULL);
+    ioctl(u->fd, I_FLUSH, FLUSHRW);
     pa_close(u->fd);
     u->fd = -1;
 

commit e530feb62c134eb55f32810de5f428b902fe6034
Author: Tanu Kaskinen <tanuk at iki.fi>
Date:   Fri Jan 4 16:49:52 2013 +0200

    solaris: Fix get_playback_buffered_bytes() return value.
    
    Based on a patch by Brian Cameron <brian.cameron at oracle.com>.

diff --git a/src/modules/module-solaris.c b/src/modules/module-solaris.c
index 753c1a1..eea5c0d 100644
--- a/src/modules/module-solaris.c
+++ b/src/modules/module-solaris.c
@@ -163,7 +163,10 @@ static uint64_t get_playback_buffered_bytes(struct userdata *u) {
 
     pa_smoother_put(u->smoother, pa_rtclock_now(), pa_bytes_to_usec(played_bytes, &u->sink->sample_spec));
 
-    return u->written_bytes - played_bytes;
+    if (u->written_bytes > played_bytes)
+        return u->written_bytes - played_bytes;
+    else
+        return 0;
 }
 
 static pa_usec_t sink_get_latency(struct userdata *u, pa_sample_spec *ss) {

commit 54c9fa97bd5bf1290648513f2938699e27707234
Author: Tanu Kaskinen <tanuk at iki.fi>
Date:   Fri Jan 4 16:31:57 2013 +0200

    shm: Support Solaris shm file paths.
    
    Patch by Brian Cameron <brian.cameron at oracle.com>

diff --git a/src/pulsecore/shm.c b/src/pulsecore/shm.c
index fe34a51..9f44df3 100644
--- a/src/pulsecore/shm.c
+++ b/src/pulsecore/shm.c
@@ -68,8 +68,13 @@
  * /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
+#undef SHM_ID_LEN
 #endif
 
 #define SHM_MARKER ((int) 0xbeefcafe)
@@ -359,10 +364,14 @@ int pa_shm_cleanup(void) {
         char fn[128];
         struct shm_marker *m;
 
-        if (strncmp(de->d_name, "pulse-shm-", 10))
+#if defined(__sun)
+        if (strncmp(de->d_name, ".SHMDpulse-shm-", SHM_ID_LEN))
+#else
+        if (strncmp(de->d_name, "pulse-shm-", SHM_ID_LEN))
+#endif
             continue;
 
-        if (pa_atou(de->d_name + 10, &id) < 0)
+        if (pa_atou(de->d_name + SHM_ID_LEN, &id) < 0)
             continue;
 
         if (pa_shm_attach_ro(&seg, id) < 0)



More information about the pulseaudio-commits mailing list