aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamuli Piippo <samuli.piippo@theqtcompany.com>2015-09-28 16:33:01 +0300
committerSamuli Piippo <samuli.piippo@theqtcompany.com>2015-09-29 09:42:19 +0000
commit9597f61fc1bbf270965729d533306d10ef3c43ea (patch)
tree97e91270c6e2380028fa37236bdc5c126831d743
parent8874262b25488d81bf9ee23f4d425a104f31a7e1 (diff)
gstreamer: fix audio volume pluginv5.5.1
Setting volume is broken on ARM when compiled with GCC 4.9, where anything but max volume (1.0) turns into mute. Patches taken from https://community.freescale.com/thread/350584 Change-Id: I43fe71fdb62bdeed066ec468ffe70f39e950843e Reviewed-by: Yoann Lopes <yoann.lopes@theqtcompany.com> Reviewed-by: Karim Pinter <karim.pinter@theqtcompany.com>
-rw-r--r--recipes/gstreamer/gst-plugins-base/fix-gstvolume.patch23
-rw-r--r--recipes/gstreamer/gst-plugins-base_0.10.%.bbappend25
-rw-r--r--recipes/gstreamer/gstreamer1.0-plugins-base/fix-gstvolume.patch23
-rw-r--r--recipes/gstreamer/gstreamer1.0-plugins-base_%.bbappend25
4 files changed, 96 insertions, 0 deletions
diff --git a/recipes/gstreamer/gst-plugins-base/fix-gstvolume.patch b/recipes/gstreamer/gst-plugins-base/fix-gstvolume.patch
new file mode 100644
index 00000000..d229e952
--- /dev/null
+++ b/recipes/gstreamer/gst-plugins-base/fix-gstvolume.patch
@@ -0,0 +1,23 @@
+diff --git a/gst/volume/gstvolume.c b/gst/volume/gstvolume.c
+index 0f5b362..94d03a3 100644
+--- a/gst/volume/gstvolume.c
++++ b/gst/volume/gstvolume.c
+@@ -314,10 +314,14 @@ volume_update_volume (GstVolume * self, gfloat volume,
+ self->current_mute = FALSE;
+ self->current_volume = volume;
+
+- self->current_vol_i8 = volume * VOLUME_UNITY_INT8;
+- self->current_vol_i16 = volume * VOLUME_UNITY_INT16;
+- self->current_vol_i24 = volume * VOLUME_UNITY_INT24;
+- self->current_vol_i32 = volume * VOLUME_UNITY_INT32;
++ self->current_vol_i8 =
++ (gint) ((gdouble) volume * (gdouble) VOLUME_UNITY_INT8);
++ self->current_vol_i16 =
++ (gint) ((gdouble) volume * (gdouble) VOLUME_UNITY_INT16);
++ self->current_vol_i24 =
++ (gint) ((gdouble) volume * (gdouble) VOLUME_UNITY_INT24);
++ self->current_vol_i32 =
++ (gint) ((gdouble) volume * (gdouble) VOLUME_UNITY_INT32);
+
+ passthrough = (self->current_vol_i16 == VOLUME_UNITY_INT16);
+ }
diff --git a/recipes/gstreamer/gst-plugins-base_0.10.%.bbappend b/recipes/gstreamer/gst-plugins-base_0.10.%.bbappend
new file mode 100644
index 00000000..026aa2b1
--- /dev/null
+++ b/recipes/gstreamer/gst-plugins-base_0.10.%.bbappend
@@ -0,0 +1,25 @@
+#############################################################################
+##
+## Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
+##
+## This file is part of the Qt Enterprise Embedded Scripts of the Qt
+## framework.
+##
+## $QT_BEGIN_LICENSE$
+## Commercial License Usage Only
+## Licensees holding valid commercial Qt license agreements with Digia
+## with an appropriate addendum covering the Qt Enterprise Embedded Scripts,
+## may use this file in accordance with the terms contained in said license
+## agreement.
+##
+## For further information use the contact form at
+## http://www.qt.io/contact-us.
+##
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+
+SRC_URI += "file://fix-gstvolume.patch"
diff --git a/recipes/gstreamer/gstreamer1.0-plugins-base/fix-gstvolume.patch b/recipes/gstreamer/gstreamer1.0-plugins-base/fix-gstvolume.patch
new file mode 100644
index 00000000..f67a8401
--- /dev/null
+++ b/recipes/gstreamer/gstreamer1.0-plugins-base/fix-gstvolume.patch
@@ -0,0 +1,23 @@
+diff --git a/gst/volume/gstvolume.c b/gst/volume/gstvolume.c
+index 0f5b362..94d03a3 100644
+--- a/gst/volume/gstvolume.c
++++ b/gst/volume/gstvolume.c
+@@ -250,10 +250,14 @@ volume_update_volume (GstVolume * self, const GstAudioInfo * info,
+ self->current_mute = FALSE;
+ self->current_volume = volume;
+
+- self->current_vol_i8 = volume * VOLUME_UNITY_INT8;
+- self->current_vol_i16 = volume * VOLUME_UNITY_INT16;
+- self->current_vol_i24 = volume * VOLUME_UNITY_INT24;
+- self->current_vol_i32 = volume * VOLUME_UNITY_INT32;
++ self->current_vol_i8 =
++ (gint) ((gdouble) volume * (gdouble) VOLUME_UNITY_INT8);
++ self->current_vol_i16 =
++ (gint) ((gdouble) volume * (gdouble) VOLUME_UNITY_INT16);
++ self->current_vol_i24 =
++ (gint) ((gdouble) volume * (gdouble) VOLUME_UNITY_INT24);
++ self->current_vol_i32 =
++ (gint) ((gdouble) volume * (gdouble) VOLUME_UNITY_INT32);
+
+ passthrough = (self->current_vol_i16 == VOLUME_UNITY_INT16);
+ }
diff --git a/recipes/gstreamer/gstreamer1.0-plugins-base_%.bbappend b/recipes/gstreamer/gstreamer1.0-plugins-base_%.bbappend
new file mode 100644
index 00000000..026aa2b1
--- /dev/null
+++ b/recipes/gstreamer/gstreamer1.0-plugins-base_%.bbappend
@@ -0,0 +1,25 @@
+#############################################################################
+##
+## Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
+##
+## This file is part of the Qt Enterprise Embedded Scripts of the Qt
+## framework.
+##
+## $QT_BEGIN_LICENSE$
+## Commercial License Usage Only
+## Licensees holding valid commercial Qt license agreements with Digia
+## with an appropriate addendum covering the Qt Enterprise Embedded Scripts,
+## may use this file in accordance with the terms contained in said license
+## agreement.
+##
+## For further information use the contact form at
+## http://www.qt.io/contact-us.
+##
+##
+## $QT_END_LICENSE$
+##
+#############################################################################
+
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+
+SRC_URI += "file://fix-gstvolume.patch"