diff options
author | Samuli Piippo <samuli.piippo@theqtcompany.com> | 2015-09-28 16:33:01 +0300 |
---|---|---|
committer | Samuli Piippo <samuli.piippo@theqtcompany.com> | 2015-09-29 09:42:19 +0000 |
commit | 9597f61fc1bbf270965729d533306d10ef3c43ea (patch) | |
tree | 97e91270c6e2380028fa37236bdc5c126831d743 | |
parent | 8874262b25488d81bf9ee23f4d425a104f31a7e1 (diff) | |
download | meta-boot2qt-9597f61fc1bbf270965729d533306d10ef3c43ea.tar.gz |
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>
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 0000000..d229e95 --- /dev/null +++ b/recipes/gstreamer/gst-plugins-base/fix-gstvolume.patch | |||
@@ -0,0 +1,23 @@ | |||
1 | diff --git a/gst/volume/gstvolume.c b/gst/volume/gstvolume.c | ||
2 | index 0f5b362..94d03a3 100644 | ||
3 | --- a/gst/volume/gstvolume.c | ||
4 | +++ b/gst/volume/gstvolume.c | ||
5 | @@ -314,10 +314,14 @@ volume_update_volume (GstVolume * self, gfloat volume, | ||
6 | self->current_mute = FALSE; | ||
7 | self->current_volume = volume; | ||
8 | |||
9 | - self->current_vol_i8 = volume * VOLUME_UNITY_INT8; | ||
10 | - self->current_vol_i16 = volume * VOLUME_UNITY_INT16; | ||
11 | - self->current_vol_i24 = volume * VOLUME_UNITY_INT24; | ||
12 | - self->current_vol_i32 = volume * VOLUME_UNITY_INT32; | ||
13 | + self->current_vol_i8 = | ||
14 | + (gint) ((gdouble) volume * (gdouble) VOLUME_UNITY_INT8); | ||
15 | + self->current_vol_i16 = | ||
16 | + (gint) ((gdouble) volume * (gdouble) VOLUME_UNITY_INT16); | ||
17 | + self->current_vol_i24 = | ||
18 | + (gint) ((gdouble) volume * (gdouble) VOLUME_UNITY_INT24); | ||
19 | + self->current_vol_i32 = | ||
20 | + (gint) ((gdouble) volume * (gdouble) VOLUME_UNITY_INT32); | ||
21 | |||
22 | passthrough = (self->current_vol_i16 == VOLUME_UNITY_INT16); | ||
23 | } | ||
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 0000000..026aa2b --- /dev/null +++ b/recipes/gstreamer/gst-plugins-base_0.10.%.bbappend | |||
@@ -0,0 +1,25 @@ | |||
1 | ############################################################################# | ||
2 | ## | ||
3 | ## Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). | ||
4 | ## | ||
5 | ## This file is part of the Qt Enterprise Embedded Scripts of the Qt | ||
6 | ## framework. | ||
7 | ## | ||
8 | ## $QT_BEGIN_LICENSE$ | ||
9 | ## Commercial License Usage Only | ||
10 | ## Licensees holding valid commercial Qt license agreements with Digia | ||
11 | ## with an appropriate addendum covering the Qt Enterprise Embedded Scripts, | ||
12 | ## may use this file in accordance with the terms contained in said license | ||
13 | ## agreement. | ||
14 | ## | ||
15 | ## For further information use the contact form at | ||
16 | ## http://www.qt.io/contact-us. | ||
17 | ## | ||
18 | ## | ||
19 | ## $QT_END_LICENSE$ | ||
20 | ## | ||
21 | ############################################################################# | ||
22 | |||
23 | FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" | ||
24 | |||
25 | 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 0000000..f67a840 --- /dev/null +++ b/recipes/gstreamer/gstreamer1.0-plugins-base/fix-gstvolume.patch | |||
@@ -0,0 +1,23 @@ | |||
1 | diff --git a/gst/volume/gstvolume.c b/gst/volume/gstvolume.c | ||
2 | index 0f5b362..94d03a3 100644 | ||
3 | --- a/gst/volume/gstvolume.c | ||
4 | +++ b/gst/volume/gstvolume.c | ||
5 | @@ -250,10 +250,14 @@ volume_update_volume (GstVolume * self, const GstAudioInfo * info, | ||
6 | self->current_mute = FALSE; | ||
7 | self->current_volume = volume; | ||
8 | |||
9 | - self->current_vol_i8 = volume * VOLUME_UNITY_INT8; | ||
10 | - self->current_vol_i16 = volume * VOLUME_UNITY_INT16; | ||
11 | - self->current_vol_i24 = volume * VOLUME_UNITY_INT24; | ||
12 | - self->current_vol_i32 = volume * VOLUME_UNITY_INT32; | ||
13 | + self->current_vol_i8 = | ||
14 | + (gint) ((gdouble) volume * (gdouble) VOLUME_UNITY_INT8); | ||
15 | + self->current_vol_i16 = | ||
16 | + (gint) ((gdouble) volume * (gdouble) VOLUME_UNITY_INT16); | ||
17 | + self->current_vol_i24 = | ||
18 | + (gint) ((gdouble) volume * (gdouble) VOLUME_UNITY_INT24); | ||
19 | + self->current_vol_i32 = | ||
20 | + (gint) ((gdouble) volume * (gdouble) VOLUME_UNITY_INT32); | ||
21 | |||
22 | passthrough = (self->current_vol_i16 == VOLUME_UNITY_INT16); | ||
23 | } | ||
diff --git a/recipes/gstreamer/gstreamer1.0-plugins-base_%.bbappend b/recipes/gstreamer/gstreamer1.0-plugins-base_%.bbappend new file mode 100644 index 0000000..026aa2b --- /dev/null +++ b/recipes/gstreamer/gstreamer1.0-plugins-base_%.bbappend | |||
@@ -0,0 +1,25 @@ | |||
1 | ############################################################################# | ||
2 | ## | ||
3 | ## Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). | ||
4 | ## | ||
5 | ## This file is part of the Qt Enterprise Embedded Scripts of the Qt | ||
6 | ## framework. | ||
7 | ## | ||
8 | ## $QT_BEGIN_LICENSE$ | ||
9 | ## Commercial License Usage Only | ||
10 | ## Licensees holding valid commercial Qt license agreements with Digia | ||
11 | ## with an appropriate addendum covering the Qt Enterprise Embedded Scripts, | ||
12 | ## may use this file in accordance with the terms contained in said license | ||
13 | ## agreement. | ||
14 | ## | ||
15 | ## For further information use the contact form at | ||
16 | ## http://www.qt.io/contact-us. | ||
17 | ## | ||
18 | ## | ||
19 | ## $QT_END_LICENSE$ | ||
20 | ## | ||
21 | ############################################################################# | ||
22 | |||
23 | FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" | ||
24 | |||
25 | SRC_URI += "file://fix-gstvolume.patch" | ||