Skip to contentSkip to conversation

3.14.38-6QP_Beta release

PATCH Superseded Yuqing Zhu 2 participants 5 messages Jul 23, 2015

v1 of 9 Superseded Latest is v9 →

lore
Share & tools
lore

Yuqing Zhu

author
#0 lore raw

cover 3.14.38-6QP_Beta release

-Add patch and configuration for PulseAudio

-Add gstreamer1.0-plugins-base patches on all devices for the plug-ins: basetextoverlay gstplaysink ssaparse subparse gststreamsynchronizer encodebin and gstplaybin

Yuqing Zhu (2):
gstreamer1.0-plugins-base: Add patches for Gstreamer 1.4.5 base
PulseAudio: Add patch and configuration for PulseAudio

 ...rlay-make-memory-copy-when-video-buffer-s.patch | 129 ++++++++++++
 ...-don-t-set-async-of-custom-text-sink-to-f.patch |  31 +++
 ...3-ssaparse-enhance-SSA-text-lines-parsing.patch | 225 +++++++++++++++++++++
 ...t-need_segment-after-sink-pad-received-GS.patch |  69 +++++++
 .../do-not-change-eos-event-to-gap-event2.patch    |  51 +++++
 .../do-not-change-eos-event-to-gap-event3.patch    |  33 +++
 ...eed-more-buffers-in-output-queue-for-bett.patch |  34 ++++
 ...ch => gstplaybin-remove-flag-deinterlace.patch} |   8 +-
 .../gstreamer/gstreamer1.0-plugins-base_%.bbappend |  16 +-
 ...dio-mutex-issue-when-do-pause-in-gstreame.patch |  34 ++++
 ...here-is-no-sound-after-plugin-plugout-hea.patch | 127 ++++++++++++
 ...ch-Avoid-specifically-starting-PA-and-rel.patch |  31 +++
 .../pulseaudio/pulseaudio/daemon.conf              |  87 ++++++++
 .../pulseaudio/pulseaudio/default.pa               | 170 ++++++++++++++++
 ...e-the-control-for-speaker-headphone-widge.patch |  73 +++++++
 .../pulseaudio/pulseaudio_%.bbappend               |  24 ++-
 16 files changed, 1133 insertions(+), 9 deletions(-)
 create mode 100644 recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-basetextoverlay-make-memory-copy-when-video-buffer-s.patch
 create mode 100644 recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-gstplaysink-don-t-set-async-of-custom-text-sink-to-f.patch
 create mode 100644 recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-ssaparse-enhance-SSA-text-lines-parsing.patch
 create mode 100644 recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-subparse-set-need_segment-after-sink-pad-received-GS.patch
 create mode 100755 recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/do-not-change-eos-event-to-gap-event2.patch
 create mode 100755 recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/do-not-change-eos-event-to-gap-event3.patch
 create mode 100644 recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/encodebin-Need-more-buffers-in-output-queue-for-bett.patch
 rename recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/{gstplaybin-enable-native-video.patch => gstplaybin-remove-flag-deinterlace.patch} (84%)
 create mode 100644 recipes-multimedia/pulseaudio/pulseaudio/0001-Fix-pulseaudio-mutex-issue-when-do-pause-in-gstreame.patch
 create mode 100644 recipes-multimedia/pulseaudio/pulseaudio/0002-Fix-issue-there-is-no-sound-after-plugin-plugout-hea.patch
 create mode 100644 recipes-multimedia/pulseaudio/pulseaudio/0002-Revert-launch-Avoid-specifically-starting-PA-and-rel.patch
 create mode 100644 recipes-multimedia/pulseaudio/pulseaudio/daemon.conf
 create mode 100644 recipes-multimedia/pulseaudio/pulseaudio/default.pa
 create mode 100644 recipes-multimedia/pulseaudio/pulseaudio/pulseaudio-remove-the-control-for-speaker-headphone-widge.patch
Signature · 1 line
1.9.1
author
#1 lore raw

PATCH 1/2 gstreamer1.0-plugins-base: Add patches for Gstreamer 1.4.5 base

Fixed issue including basetextoverlay gstplaysink ssaparse subparse encodebin and gstplaybin

-[basetextoverlay plugin] Make memory copy when video buffer's memory is ready only

-[gstplaysink plugin] Don't set async of custom text-sink to false

-[ssaparse plugin] Enhance SSA text lines parsing

-[subparse plugin] Set need_segment after sink pad received GST_EVENT_SEGMENT

-[gststreamsynchronizer plugin] Send EOS event insterd of GAP event as GAP event has issue when A/V have different duration

-[gststreamsynchronizer plugin] Stop sending second track EOS event if send the first track EOS return fail

-[encodebin plugin] Need more buffers in output queue for better performance

-[gstplaybin plugin] Remove default deinterlace flag

---
 ...rlay-make-memory-copy-when-video-buffer-s.patch | 129 ++++++++++++
 ...-don-t-set-async-of-custom-text-sink-to-f.patch |  31 +++
 ...3-ssaparse-enhance-SSA-text-lines-parsing.patch | 225 +++++++++++++++++++++
 ...t-need_segment-after-sink-pad-received-GS.patch |  69 +++++++
 .../do-not-change-eos-event-to-gap-event2.patch    |  51 +++++
 .../do-not-change-eos-event-to-gap-event3.patch    |  33 +++
 ...eed-more-buffers-in-output-queue-for-bett.patch |  34 ++++
 ...ch => gstplaybin-remove-flag-deinterlace.patch} |   8 +-
 .../gstreamer/gstreamer1.0-plugins-base_%.bbappend |  16 +-
 9 files changed, 588 insertions(+), 8 deletions(-)
 create mode 100644 recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-basetextoverlay-make-memory-copy-when-video-buffer-s.patch
 create mode 100644 recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-gstplaysink-don-t-set-async-of-custom-text-sink-to-f.patch
 create mode 100644 recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-ssaparse-enhance-SSA-text-lines-parsing.patch
 create mode 100644 recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-subparse-set-need_segment-after-sink-pad-received-GS.patch
 create mode 100755 recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/do-not-change-eos-event-to-gap-event2.patch
 create mode 100755 recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/do-not-change-eos-event-to-gap-event3.patch
 create mode 100644 recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/encodebin-Need-more-buffers-in-output-queue-for-bett.patch
 rename recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/{gstplaybin-enable-native-video.patch => gstplaybin-remove-flag-deinterlace.patch} (84%)
recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-basetextoverlay-make-memory-copy-when-video-buffer-s.patch new file +129 -0
new file mode 100644
index 0000000..0206b79
@@ -0,0 +1,129 @@
+From 3781d40940d46d7e6a502092d24aac7997f6da5b Mon Sep 17 00:00:00 2001
+From: Mingke Wang <[email protected]>
+Date: Thu, 5 Mar 2015 12:06:23 +0800
+Subject: [PATCH 1/4] basetextoverlay: make memory copy when video buffer's
+ memory is ready only
+
+1. since gst_buffer_make_writable just lookup the refcount to determine if
+   a buffer is writable, and it will use _gst_buffer_copy() which don't
+   perform a deep memory copy even if the flag of a memory is set to
+   GST_MEMORY_FLAG_READONLY. So, we detect the memory flag and use
+   gst_buffer_copy_region with GST_BUFFER_COPY_DEEP parameter to perform
+   deep memory copy. if the allocator of a memory don't support mem_copy
+   interface, the it will return NULL, if this case, we can use
+   gst_buffer_make_writable() to get a shared memory buffer or the orignal
+   buffer if the buffer's refcount is 1.
+2.  new feature is no added if caps has no feature during caps negotiation
+
+Upstream Status: Inappropriate [i.MX specific]
+
+Signed-off-by: Mingke Wang <[email protected]>
+
+diff --git a/ext/pango/gstbasetextoverlay.c b/ext/pango/gstbasetextoverlay.c
+index c919861..3c0a1d7 100755
+--- a/ext/pango/gstbasetextoverlay.c
++++ b/ext/pango/gstbasetextoverlay.c
+@@ -747,6 +747,7 @@ gst_base_text_overlay_negotiate (GstBaseTextOverlay * overlay, GstCaps * caps)
+     if (f == NULL) {
+       f = gst_caps_features_new
+           (GST_CAPS_FEATURE_META_GST_VIDEO_OVERLAY_COMPOSITION, NULL);
++      gst_caps_set_features(overlay_caps, 0, f);
+     } else {
+       gst_caps_features_add (f,
+           GST_CAPS_FEATURE_META_GST_VIDEO_OVERLAY_COMPOSITION);
+@@ -1890,16 +1891,71 @@ gst_base_text_overlay_push_frame (GstBaseTextOverlay * overlay,
+   if (gst_pad_check_reconfigure (overlay->srcpad))
+     gst_base_text_overlay_negotiate (overlay, NULL);
+ 
+-  video_frame = gst_buffer_make_writable (video_frame);
+-
+   if (overlay->attach_compo_to_buffer) {
+     GST_DEBUG_OBJECT (overlay, "Attaching text overlay image to video buffer");
++    video_frame = gst_buffer_make_writable (video_frame);
+     gst_buffer_add_video_overlay_composition_meta (video_frame,
+         overlay->composition);
+     /* FIXME: emulate shaded background box if want_shading=true */
+     goto done;
+   }
+ 
++  gint m = gst_buffer_n_memory(video_frame);
++  gboolean mem_rdonly = FALSE;
++  GstMemory *mem;
++  GstBuffer *orig = video_frame;
++
++  while (--m>=0) {
++    mem = gst_buffer_get_memory(video_frame, m);
++    if (GST_MEMORY_IS_READONLY(mem)) {
++      mem_rdonly = TRUE;
++      gst_memory_unref (mem);
++      break;
++    }
++    gst_memory_unref (mem);
++  }
++
++  if (mem_rdonly) {
++    // since gst_buffer_make_writable just lookup the refcount to determine if
++    // a buffer is writable, and it will use _gst_buffer_copy() which don't
++    // perform a deep memory copy even if the flag of a memory is set to
++    // GST_MEMORY_FLAG_READONLY. So, we detect the memory flag and use
++    // gst_buffer_copy_region with GST_BUFFER_COPY_DEEP parameter to perform
++    // deep memory copy. if the allocator of a memory don't support mem_copy
++    // interface, the it will return NULL, if this case, we can use
++    // gst_buffer_make_writable() to get a shared memory buffer or the orignal
++    // buffer if the buffer's refcount is 1.
++    GstBuffer *new_buf = gst_buffer_copy_region (video_frame,
++        GST_BUFFER_COPY_ALL | GST_BUFFER_COPY_DEEP, 0, -1);
++
++    GST_DEBUG_OBJECT (overlay, "copy %s video frame buffer %p -> %p",
++        g_type_name (GST_MINI_OBJECT_TYPE (video_frame)), video_frame, new_buf);
++
++    if (!new_buf) {
++      //maybe the allocator don't support mem_copy interface, the we just use
++      //gst_buffer_make_writable() to get a writable buffer.
++      video_frame = gst_buffer_make_writable (video_frame);
++    } else {
++      gst_mini_object_unref (video_frame);
++      GST_BUFFER_FLAG_UNSET (new_buf, GST_BUFFER_FLAG_TAG_MEMORY);
++      video_frame = new_buf;
++    }
++
++    if (!video_frame) {
++      GST_WARNING_OBJECT (overlay, "make writable buffer failed");
++      return GST_FLOW_OK;
++    }
++
++    m = gst_buffer_n_memory(video_frame);
++    while (--m>=0) {
++      mem = gst_buffer_get_memory(video_frame, m);
++      GST_MEMORY_FLAG_UNSET (mem, GST_MEMORY_FLAG_READONLY);
++      gst_memory_unref (mem);
++    }
++  } else {
++    video_frame = gst_buffer_make_writable (video_frame);
++  }
++
+   if (!gst_video_frame_map (&frame, &overlay->info, video_frame,
+           GST_MAP_READWRITE))
+     goto invalid_frame;
+@@ -1918,6 +1974,18 @@ gst_base_text_overlay_push_frame (GstBaseTextOverlay * overlay,
+ 
+   gst_video_frame_unmap (&frame);
+ 
++  if (mem_rdonly && orig == video_frame) {
++    //if we used the original buffer and it's mem is set to read only,
++    //recover the memory ready only flag since we unset it before
++    // gst_video_frame_map ()
++    m = gst_buffer_n_memory(video_frame);
++    while (--m>=0) {
++      mem = gst_buffer_get_memory(video_frame, m);
++      GST_MEMORY_FLAGS(mem) |= (GST_MEMORY_FLAG_READONLY);
++      gst_memory_unref (mem);
++    }
++  }
++
+ done:
+ 
+   return gst_pad_push (overlay->srcpad, video_frame);
+-- 
+1.7.9.5
+
recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0002-gstplaysink-don-t-set-async-of-custom-text-sink-to-f.patch new file +31 -0
new file mode 100644
index 0000000..cd25f0a
@@ -0,0 +1,31 @@
+From 0a78555ea6c8c2f1ee27ee4707e8d7aa00ab7a66 Mon Sep 17 00:00:00 2001
+From: Mingke Wang <[email protected]>
+Date: Thu, 19 Mar 2015 14:15:25 +0800
+Subject: [PATCH 2/4] gstplaysink: don't set async of custom text-sink to
+ false
+
+set async to false lead to A/V sync problem when seeking.
+the preroll need use GAP event instead of set async to false.
+
+Upstream Status: Inappropriate [i.MX specific]
+
+Signed-off-by: Mingke Wang <[email protected]>
+
+diff --git a/gst/playback/gstplaysink.c b/gst/playback/gstplaysink.c
+old mode 100644
+new mode 100755
+index f5a2d42..fba0172
+--- a/gst/playback/gstplaysink.c
++++ b/gst/playback/gstplaysink.c
+@@ -2408,7 +2408,7 @@ gen_text_chain (GstPlaySink * playsink)
+           G_TYPE_BOOLEAN);
+       if (elem) {
+         /* make sure the sparse subtitles don't participate in the preroll */
+-        g_object_set (elem, "async", FALSE, NULL);
++        //g_object_set (elem, "async", FALSE, NULL);
+         GST_DEBUG_OBJECT (playsink, "adding custom text sink");
+         gst_bin_add (bin, chain->sink);
+         /* NOTE streamsynchronizer needs streams decoupled */
+-- 
+1.7.9.5
+
recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0003-ssaparse-enhance-SSA-text-lines-parsing.patch new file +225 -0

225 lines not on this page · raw message

recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0004-subparse-set-need_segment-after-sink-pad-received-GS.patch new file +69 -0

69 lines not on this page · raw message

recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/do-not-change-eos-event-to-gap-event2.patch new file +51 -0

51 lines not on this page · raw message

recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/do-not-change-eos-event-to-gap-event3.patch new file +33 -0
new file mode 100755
index 0000000..4a8b23c
@@ -0,0 +1,33 @@
+commit 3f7052aac5e0118a9a9e09fff2f65091be448972
+Author: Song Bing <[email protected]>
+Date:   Thu Oct 23 13:35:13 2014 +0800
+
+[streamsynchronizer] One stream can finish playback.
+  
+As changed GAP event EOS event, so EOS will send more times, which will
+cause send function return error.
+Streamsynchronizer will don’t send second track EOS event if send the
+first track EOS return fail. Fixed by ignore the return error.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=736655
+
+Upstream Status: Inappropriate [platform specific]
+
+Signed-off-by: Song Bing [email protected]
+
+diff --git a/gst/playback/gststreamsynchronizer.c b/gst/playback/gststreamsynchronizer.c
+index ff42d72..d1732c3 100644
+--- a/gst/playback/gststreamsynchronizer.c
++++ b/gst/playback/gststreamsynchronizer.c
+@@ -482,7 +482,10 @@ gst_stream_synchronizer_sink_event (GstPad * pad, GstObject * parent,
+         while (epad) {
+           pad = epad->data;
+           GST_DEBUG_OBJECT (pad, "Pushing EOS");
+-          ret = ret && gst_pad_push_event (pad, gst_event_new_eos ());
++          /* FIXME: remove error check as GAP changed to EOS will send EOS
++           * more times, which will cause return error and then don't send
++           * EOS event to following tracks. */
++          gst_pad_push_event (pad, gst_event_new_eos ());
+           gst_object_unref (pad);
+           epad = g_slist_next (epad);
+         }
recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/encodebin-Need-more-buffers-in-output-queue-for-bett.patch new file +34 -0
new file mode 100644
index 0000000..570a513
@@ -0,0 +1,34 @@
+From 540e02c92c75e08b90326863dc787fa5cadf9da6 Mon Sep 17 00:00:00 2001
+From: Song Bing <[email protected]>
+Date: Fri, 13 Mar 2015 18:04:31 +0800
+Subject: [PATCH] encodebin: Need more buffers in output queue for better
+ performance
+
+Need more buffers in output queue for better performance
+
+https://bugzilla.gnome.org/show_bug.cgi?id=744191
+
+Upstream Status: Inappropriate [i.MX specific]
+
+Signed-off-by: Song Bing <[email protected]>
+---
+ gst/encoding/gstencodebin.c |    3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/gst/encoding/gstencodebin.c b/gst/encoding/gstencodebin.c
+index 6728e58..32daae4 100644
+--- a/gst/encoding/gstencodebin.c
++++ b/gst/encoding/gstencodebin.c
+@@ -1138,8 +1138,7 @@ _create_stream_group (GstEncodeBin * ebin, GstEncodingProfile * sprof,
+    * We only use a 1buffer long queue here, the actual queueing will be done
+    * in the input queue */
+   last = sgroup->outqueue = gst_element_factory_make ("queue", NULL);
+-  g_object_set (sgroup->outqueue, "max-size-buffers", (guint32) 1,
+-      "max-size-bytes", (guint32) 0, "max-size-time", (guint64) 0,
++  g_object_set (sgroup->outqueue, "max-size-time", (guint64) 0,
+       "silent", TRUE, NULL);
+ 
+   gst_bin_add (GST_BIN (ebin), sgroup->outqueue);
+-- 
+1.7.9.5
+
recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/gstplaybin-remove-flag-deinterlace.patch renamed from recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/gstplaybin-enable-native-video.patch +4 -4
similarity index 84%
rename from recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/gstplaybin-enable-native-video.patch
rename to recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/gstplaybin-remove-flag-deinterlace.patch
index 15322bd..ab6d4b1 100644
@@ -1,9 +1,9 @@
 From 9cfb86cd100904f0ef2626f348695bd2d3416c6a Mon Sep 17 00:00:00 2001
 From: Jian Li <[email protected]>
 Date: Mon, 23 Jun 2014 14:14:07 +0800
-Subject: [PATCH] gstplaybin enable native video
+Subject: [PATCH] gstplaybin remove default deinterlace flag
 
-- use native video patch in playbin for i.MX SoCs
+- remove default deinterlace flag in playbin for i.MX SoCs
 
 Upstream Status: Inappropriate [platform specific]
 
@@ -22,10 +22,10 @@ index fc02ca3..c342438 100644
  #define DEFAULT_FLAGS             GST_PLAY_FLAG_AUDIO | GST_PLAY_FLAG_VIDEO | GST_PLAY_FLAG_TEXT | \
 -                                  GST_PLAY_FLAG_SOFT_VOLUME | GST_PLAY_FLAG_DEINTERLACE | \
 -                                  GST_PLAY_FLAG_SOFT_COLORBALANCE
-+                                  GST_PLAY_FLAG_SOFT_VOLUME | GST_PLAY_FLAG_NATIVE_VIDEO
++                                  GST_PLAY_FLAG_SOFT_VOLUME
  #define DEFAULT_N_VIDEO           0
  #define DEFAULT_CURRENT_VIDEO     -1
  #define DEFAULT_N_AUDIO           0
--- 
+--
 1.7.9.5
 
recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_%.bbappend +12 -4
index 5b939d4..d1659e3 100644
@@ -1,9 +1,17 @@
-
 FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
 
-SRC_URI_append_mxs = " file://gstplaybin-enable-native-video.patch"
-SRC_URI_append_mx5 = " file://gstplaybin-enable-native-video.patch"
-SRC_URI_append_mx6 = " file://gstplaybin-enable-native-video.patch"
+SRC_URI_append = " file://gstplaybin-remove-flag-deinterlace.patch \
+                   file://do-not-change-eos-event-to-gap-event2.patch \
+                   file://do-not-change-eos-event-to-gap-event3.patch \
+                   file://0001-basetextoverlay-make-memory-copy-when-video-buffer-s.patch \
+                   file://0002-gstplaysink-don-t-set-async-of-custom-text-sink-to-f.patch \
+                   file://0003-ssaparse-enhance-SSA-text-lines-parsing.patch \
+                   file://0004-subparse-set-need_segment-after-sink-pad-received-GS.patch \
+                   file://encodebin-Need-more-buffers-in-output-queue-for-bett.patch \
+"
+
+# Enable pango lib
+PACKAGECONFIG_append = " pango "
 
 PACKAGE_ARCH_mxs = "${MACHINE_SOCARCH}"
 PACKAGE_ARCH_mx5 = "${MACHINE_SOCARCH}"
Signature · 1 line
1.9.1
#2 lore raw

Re: [meta-fsl-arm][PATCH 1/2] gstreamer1.0-plugins-base: Add patches for Gstreamer 1.4.5 base

Quoted 12 lines · Yuqing Zhu

Fixed issue including basetextoverlay gstplaysink ssaparse subparse encodebin and gstplaybin

-[basetextoverlay plugin] Make memory copy when video buffer's memory is ready only

-[gstplaysink plugin] Don't set async of custom text-sink to false

-[ssaparse plugin] Enhance SSA text lines parsing

-[subparse plugin] Set need_segment after sink pad received GST_EVENT_SEGMENT

-[gststreamsynchronizer plugin] Send EOS event insterd of GAP event as GAP event has issue when A/V have different duration

Quoted 7 lines

-[gststreamsynchronizer plugin] Stop sending second track EOS event if send the first track EOS return fail

-[encodebin plugin] Need more buffers in output queue for better performance

-[gstplaybin plugin] Remove default deinterlace flag

Same comments as the other patch, please split it for proper review.

Also, please add Carlos on Cc for those multimedia related patches as he is our GStreamer guru at community ;-)

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750
author
#3 lore raw

PATCH 2/2 PulseAudio: Add patch and configuration for PulseAudio

In reply to Yuqing Zhu

-Undef HAVE_PTHREAD_PRIO_INHERIT to fix PulseAudio mutex issue when do pause in gstreamer

-Ignore volume when switch on to fix no sound after plugin/plugout headphone and
remain the volume same as the asound state

-Revert "launch: Avoid specifically starting PA adn rely on
autospawn/socket activation"

-Remove the control for speaker/headphone widget

---
 ...dio-mutex-issue-when-do-pause-in-gstreame.patch |  34 +++++
 ...here-is-no-sound-after-plugin-plugout-hea.patch | 127 +++++++++++++++
 ...ch-Avoid-specifically-starting-PA-and-rel.patch |  31 ++++
 .../pulseaudio/pulseaudio/daemon.conf              |  87 +++++++++++
 .../pulseaudio/pulseaudio/default.pa               | 170 +++++++++++++++++++++
 ...e-the-control-for-speaker-headphone-widge.patch |  73 +++++++++
 .../pulseaudio/pulseaudio_%.bbappend               |  24 ++-
 7 files changed, 545 insertions(+), 1 deletion(-)
 create mode 100644 recipes-multimedia/pulseaudio/pulseaudio/0001-Fix-pulseaudio-mutex-issue-when-do-pause-in-gstreame.patch
 create mode 100644 recipes-multimedia/pulseaudio/pulseaudio/0002-Fix-issue-there-is-no-sound-after-plugin-plugout-hea.patch
 create mode 100644 recipes-multimedia/pulseaudio/pulseaudio/0002-Revert-launch-Avoid-specifically-starting-PA-and-rel.patch
 create mode 100644 recipes-multimedia/pulseaudio/pulseaudio/daemon.conf
 create mode 100644 recipes-multimedia/pulseaudio/pulseaudio/default.pa
 create mode 100644 recipes-multimedia/pulseaudio/pulseaudio/pulseaudio-remove-the-control-for-speaker-headphone-widge.patch
recipes-multimedia/pulseaudio/pulseaudio/0001-Fix-pulseaudio-mutex-issue-when-do-pause-in-gstreame.patch new file +34 -0
new file mode 100644
index 0000000..67bc46f
@@ -0,0 +1,34 @@
+From c21e24f5c53e81fc715905c54a6c82b69e397e63 Mon Sep 17 00:00:00 2001
+From: "shengjiu.wang" <[email protected]>
+Date: Thu, 3 Apr 2014 14:22:02 +0800
+Subject: [PATCH] Fix pulseaudio mutex issue when do pause in gstreamer
+
+The error log is "Assertion 'pthread_mutex_unlock(&m->mutex) == 0'
+failed at pulsecore/mutex-posix.c:106, function pa_mutex_unlock(). Aborting"
+
+This fix is a workaround base on the solution from this link "
+https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/932096"
+
+Upstream status: N/A
+  - It is i.MX specific
+
+Signed-off-by: shengjiu.wang <[email protected]>
+---
+ src/pulsecore/mutex-posix.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/pulsecore/mutex-posix.c b/src/pulsecore/mutex-posix.c
+index 36c2787..d592501 100644
+--- a/src/pulsecore/mutex-posix.c
++++ b/src/pulsecore/mutex-posix.c
+@@ -30,6 +30,7 @@
+ #include <pulsecore/macro.h>
+ 
+ #include "mutex.h"
++#undef HAVE_PTHREAD_PRIO_INHERIT
+ 
+ struct pa_mutex {
+     pthread_mutex_t mutex;
+-- 
+1.7.9.5
+
recipes-multimedia/pulseaudio/pulseaudio/0002-Fix-issue-there-is-no-sound-after-plugin-plugout-hea.patch new file +127 -0

127 lines not on this page · raw message

recipes-multimedia/pulseaudio/pulseaudio/0002-Revert-launch-Avoid-specifically-starting-PA-and-rel.patch new file +31 -0
new file mode 100644
index 0000000..37ae387
@@ -0,0 +1,31 @@
+From 5760c6b1a3c9b6dd8e70c9d1ea78fcf192250b4a Mon Sep 17 00:00:00 2001
+From: Shengjiu Wang <[email protected]>
+Date: Mon, 16 Mar 2015 15:30:11 +0800
+Subject: [PATCH] Revert "launch: Avoid specifically starting PA and rely on
+ autospawn/socket activation"
+
+This reverts commit 42156d2b5ac797e5f28f8d0d38b691053f3f6fc7.
+
+Upstream status: Inappropriate [i.MX specifiec] 
+
+Signed-off-by: shengjiu.wang <[email protected]>
+---
+ src/daemon/start-pulseaudio-x11.in |    2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/daemon/start-pulseaudio-x11.in b/src/daemon/start-pulseaudio-x11.in
+index 16e46b1..e108645 100755
+--- a/src/daemon/start-pulseaudio-x11.in
++++ b/src/daemon/start-pulseaudio-x11.in
+@@ -17,6 +17,8 @@
+ 
+ set -e
+ 
++@PA_BINARY@ --start "$@"
++
+ if [ x"$DISPLAY" != x ] ; then
+ 
+     @PACTL_BINARY@ load-module module-x11-publish "display=$DISPLAY" > /dev/null
+-- 
+1.7.9.5
+
recipes-multimedia/pulseaudio/pulseaudio/daemon.conf new file +87 -0

87 lines not on this page · raw message

recipes-multimedia/pulseaudio/pulseaudio/default.pa new file +170 -0

170 lines not on this page · raw message

recipes-multimedia/pulseaudio/pulseaudio/pulseaudio-remove-the-control-for-speaker-headphone-widge.patch new file +73 -0

73 lines not on this page · raw message

recipes-multimedia/pulseaudio/pulseaudio_%.bbappend +23 -1
index b9acb36..4a04445 100644
@@ -1,4 +1,26 @@
-
 CACHED_CONFIGUREVARS_append_mx6 = " ax_cv_PTHREAD_PRIO_INHERIT=no"
 
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+
+SRC_URI_append = " file://daemon.conf \
+        file://default.pa \
+        file://0001-Fix-pulseaudio-mutex-issue-when-do-pause-in-gstreame.patch \
+        file://0002-Revert-launch-Avoid-specifically-starting-PA-and-rel.patch \
+"
+
+SRC_URI_append_mx7 = " file://pulseaudio-remove-the-control-for-speaker-headphone-widge.patch "
+
+do_install_append() {
+    install -m 0644 ${WORKDIR}/daemon.conf ${D}${sysconfdir}/pulse/daemon.conf
+    install -m 0644 ${WORKDIR}/default.pa ${D}${sysconfdir}/pulse/default.pa
+
+    #Fix me: Remove the kde desktop, because there are two destop in default
+    #        (pulseaudio-kde.destop, pulseaudio.destop), then the pulseaudio server
+    #        will be started twice, pulseaudio will have issue to switch to default input/output.
+    if [ -e ${D}${sysconfdir}/xdg/autostart/pulseaudio-kde.desktop ]
+    then
+        rm ${D}${sysconfdir}/xdg/autostart/pulseaudio-kde.desktop
+    fi
+}
+
 PACKAGE_ARCH_mx6 = "${MACHINE_SOCARCH}"
Signature · 1 line
1.9.1
#4 lore raw

Re: [meta-fsl-arm][PATCH 2/2] PulseAudio: Add patch and configuration for PulseAudio

Quoted 11 lines · Yuqing Zhu
(quoted diff) +0 -4
-Undef HAVE_PTHREAD_PRIO_INHERIT to fix PulseAudio mutex issue when do pause in gstreamer
 
-Ignore volume when switch on to fix no sound after plugin/plugout headphone and
 remain the volume same as the asound state
 
-Revert "launch: Avoid specifically starting PA adn rely on
 autospawn/socket activation"
 
-Remove the control for speaker/headphone widget

This commit needs to be splitted so we can review each one individually.

The mutex issue should be workarounded passing
ax_cv_PTHREAD_PRIO_INHERIT=no for autoconf cache.

All Upstream-Status fields need review[1].

1. http://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines

The headset workaround seem to stop saving the volume setting for user, does not? For a multimedia processor this seems like a Bad Thing
...

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750