From 7faccb97d69c7581e338f88ce3a2153cdd69fd16 Mon Sep 17 00:00:00 2001 From: Scott Murray Date: Fri, 8 Feb 2019 10:53:08 -0500 Subject: Upgrade to thud MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Changes include: - Add LAYERSERIES_COMPAT definitions to layer.conf files - Remove now unnecessary SECURITY_*FLAGS over-rides from distro configuration - Set intel-corei7-64 preferred kernel version to 4.19 to match latest linux-intel kernel available in meta-intel - Update qemuarm preferred kernel version to 4.18 to match latest linux-yocto - Update firmware package and devicetree file names for raspberrypi3 - Remove linux-firmware bbappend specific to raspberrypi, it seems no longer required and breaks the cross SDK build - Update linux-intel bbappend to 4.19, remove now unnecessary patch - Remove now unnecessary lttng-modules backport - Update linux-raspberrypi bbappend to 4.14 kernel - Added kernel configuration fragment for raspberrypi to disable Kprobes. This is required until linux-raspberrypi is updated to greater than 4.14.104 to avoid a build failure in lttng-modules related to a check for known breakage in the kernel CONFIG_OPTPROBES code. - Replace obsolete base_conditional usage with oe.utils.conditional - Add gstreamer1.0-plugins-bad bbappend for raspberrypi3 to disable faad PACKAGECONFIG to avoid commercial license issues - Remove unused and unbuildable Vayu gstreamer recipes - Update linux-ti-staging bbappend for new BSP kernel - Regen dcan2_pinmux_enable.patch for linux-ti-staging to remove fuzz warning, and remove upstreamed fix_dcan_addresses.patch - Remove ipumm-fw from meta-agl-bsp/meta-ti, as newer version is available in the upstream BSP - Update meta-agl-bsp/meta-ti weston patch to apply against 5.0.0 - Update meta-agl-bsp/meta-ti wayland-ivi-extension patch to apply against 2.2.0 - Add ti-sgx-ddk-km patch to add AGL toolchain configuration file - Remove now unnecessary fdtoverlay recipe - Update core.cfg and ivishell.cfg in weston-ini-conf recipe to handle move of ivi-controller.so configuration in Weston 5.0.0 - Update connman-ncurses patch to remove fuzz warning - Add installation of systemd over-ride file for run-postinsts.service in run-postinsts bbappend to workaround race condition between ldconfig.service and the /sbin/ldconfig invocations in the post-install scripts run by run-postinsts.service. The observed failure was cynara's post-install script failing and its database not being created. - Remove now unnecessary valgrind backport - Add patches to fix most driver compilation against newer kernels - Update libmicrohttpd bbappend - Remove libssp-dev from agl-image-graphical-qt5-crosssdk and agl-demo-platform-html5-crosssdk, upstream have removed it from non-mingw32 platform SDKs - Update wayland-ivi-extension recipe to build 2.2.0, and update local patches - Update weston patches for 5.0.0. Patches: 0016-ivi-shell_add_screen_remove_layer_api.patch 0017-ivi-shell-register-ivi_layout_interface.patch have been removed as they have been applied upstream and are no longer necessary. Patches: 0018-compositor-add-output-type-to-weston_output.patch 0019-compositor-drm-introduce-drm_get_dmafd_from_view.patch (both related to Waltham) have been disabled for now as they need significant rework. - Remove weston-conf RRECOMMENDS in weston bbappend to avoid conflict with weston-ini-conf - Add OECMAKE_GENERATOR = "Unix Makefiles" to aglwgt.bbclass to work around CMake+ninja issue in cmake-apps-module - Update dbus cynara patches for 1.12.10 - Add do_install_append in cynara recipe to remove /var/cynara from cynara package so the directory creation and labelling in the post-install scriptlet will function as intended - Remove now unnecessary e2fsprogs backport - Remove now unnecessary libcap-ng backport - Update pulseaudio patches to remove fuzz warnings - Update neardal patch to remove fuzz warning - Update freetype patch to remove fuzz warning - Rename opencv bbappend to 3.% to handle 3.x backports in upstream - Updated qtwayland patch to remove fuzz warning Changes from Stephane Desneux : - Remove wayland-ivi-extension PREFERRED_VERSION - Remove now unnecessary nativesdk-cmake patch - Remove now unnecessary ptest-runner patches - Remove now unnecessary harfbuzz patches - Disable waltham-transmitter as it does not build against weston 5.0.0 - Update af-main, cynara, and security-manager to use pkg_postinst_ontarget - Bump connman-ncurses revision to avoid deprecated ncurses functions - Update libva package usage with new intel-vaapi-driver name - Add patches to security-manager to fix compilation with gcc8 - Updated systemd bbappend Changes from Jan-Simon Möller : - Remove meta-agl-bsp/ROCKO.FIXMEs - Remove linux-yocto_4.12.bbappend and now unnecessary associated patch - Remove now unneeded kern-tools-native patch - Bump gstreamer PREFERRED_VERSIONs to 1.14.x - Remove latencytop from packagegroup-agl-core-devel, it has been dropped by upstream - Remove now unnecessary rpm patches - Update pulseaudio bbappend to 12.2 - Update opencv bbappend to 3.4 - Update freetype bbappend to 2.9.1 - Update dbus bbappend to 1.12.10 - Update weston bbappend to 5.0.0 - Update cynara patches to remove fuzz warnings - Add patch to cynara to fix compilation with gcc8 - Add xmlsec1 bbappend to clear EXTRA_OECONF to fix compilation on sumo or newer Changes from Ronan Le Martet : - Update meta-rcar-gen3-adas layer gstreamer1.0-plugin-vspfilter bbappend to version 1.0.1 Known issues (marked with FIXME): - CMake+ninja issue in cmake-apps-module has been worked around with OECMAKE_GENERATOR - waltham-transmitter and the patches to weston related to it have been disabled - Currently unclear if patch to libcap-native is actually required or not Bug-AGL: SPEC-1837 Change-Id: I7b8b9ef667aec2d229952eace6663dfc761654d0 Signed-off-by: Scott Murray --- meta-agl-profile-core/conf/layer.conf | 2 + .../connman-ncurses/connman-ncurses_git.bb | 3 +- .../files/0001-disable-when-booting-over-nfs.patch | 7 +- ...-fix-segfault-on-help-page-being-displaye.patch | 14 +- .../recipes-devtools/cmake/cmake_%.bbappend | 1 - ...ineSystem-use-oe-environment-vars-to-load.patch | 45 -- .../packagegroups/packagegroup-agl-core-devel.bb | 1 - ...0001-Factor-out-and-unify-setting-CLOEXEC.patch | 140 ----- .../files/0002-Optimize-rpmSetCloseOnExec.patch | 102 ---- .../0003-rpmSetCloseOnExec-use-getrlimit.patch | 55 -- .../recipes-devtools/rpm/rpm_%.bbappend | 7 - .../run-postinsts/run-postinsts/ldconfig-wait.conf | 2 + .../run-postinsts/run-postinsts_%.bbappend | 9 + ...s-that-fail-to-build-on-some-PPC32-config.patch | 51 -- ...rop-setting-mcpu-to-cortex-a8-on-arm-arch.patch | 108 ---- ...m64-Define-__THROW-if-not-already-defined.patch | 32 -- ...sts-Use-ucontext_t-instead-of-struct-ucon.patch | 30 -- ...e-Rename-_sifields-to-__si_fields-on-musl.patch | 31 -- ...tr_tester.c-Limit-rawmemchr-test-to-glibc.patch | 39 -- ...02-context-APIs-are-not-available-on-musl.patch | 47 -- ...emcheck-x86-Define-__THROW-if-not-defined.patch | 32 -- .../valgrind/valgrind/0002-remove-rpath.patch | 35 -- ...rrect-include-directive-path-for-config.h.patch | 45 -- ...verride-Replace-__modify_ldt-with-syscall.patch | 68 --- .../valgrind/0004-Fix-out-of-tree-builds.patch | 189 ------- ...4-pth_atfork1.c-Define-error-API-for-musl.patch | 37 -- ...-vg_test-wrapper-to-support-PTEST-formats.patch | 252 --------- ...erifywrap.c-Fake-__GLIBC_PREREQ-with-musl.patch | 30 -- ...d3.c-Dereference-pthread_t-before-adding-.patch | 32 -- ...upport-for-PPC-instructions-mfatbu-mfatbl.patch | 96 ---- ...d-neon-for-targets-which-don-t-support-it.patch | 33 -- .../valgrind/valgrind/fixed-perl-path.patch | 78 --- .../valgrind/valgrind/link-gz-tests.patch | 27 - .../valgrind/valgrind/ppc-headers.patch | 87 ---- .../recipes-devtools/valgrind/valgrind/run-ptest | 25 - ...opriate-march-mcpu-mfpu-for-ARM-test-apps.patch | 44 -- ...-make-ld-XXX.so-strlen-intercept-optional.patch | 45 -- .../recipes-devtools/valgrind/valgrind_git.bb | 158 ------ .../most/files/0010-backport-usb-setup-timer.patch | 35 ++ ...1-handle-snd_pcm_lib_mmap_vmalloc-removal.patch | 18 + .../recipes-kernel/most/most.bbappend | 3 + ...01-install-files-for-a-module-development.patch | 78 --- ...ume-ramp-additions-to-the-low-level-infra.patch | 566 --------------------- ...-ramp-adding-volume-ramping-to-sink-input.patch | 189 ------- ...put-Code-cleanup-regarding-volume-ramping.patch | 62 --- ...volume-Add-support-for-volume-ramp-factor.patch | 299 ----------- ...nput-Remove-pa_sink_input_set_volume_ramp.patch | 63 --- .../pulseaudio-10.0/enable-ofono-hfp-backend.patch | 11 - ...01-install-files-for-a-module-development.patch | 70 +++ ...ume-ramp-additions-to-the-low-level-infra.patch | 564 ++++++++++++++++++++ ...-ramp-adding-volume-ramping-to-sink-input.patch | 189 +++++++ ...put-Code-cleanup-regarding-volume-ramping.patch | 62 +++ ...volume-Add-support-for-volume-ramp-factor.patch | 299 +++++++++++ ...nput-Remove-pa_sink_input_set_volume_ramp.patch | 63 +++ .../pulseaudio-12.2/enable-ofono-hfp-backend.patch | 11 + .../pulseaudio/pulseaudio_10.0.bbappend | 15 - .../pulseaudio/pulseaudio_12.2.bbappend | 15 + .../recipes-support/opencv/opencv_3.%.bbappend | 1 + .../recipes-support/opencv/opencv_3.3.bbappend | 1 - .../files/0001-Makefile-dont-build-gfx-demos.patch | 12 +- .../recipes-test/freetype/freetype_2.8.bbappend | 32 -- .../recipes-test/freetype/freetype_2.9.1.bbappend | 32 ++ 62 files changed, 1392 insertions(+), 3337 deletions(-) delete mode 100644 meta-agl-profile-core/recipes-devtools/cmake/files/0001-CMakeDetermineSystem-use-oe-environment-vars-to-load.patch delete mode 100644 meta-agl-profile-core/recipes-devtools/rpm/files/0001-Factor-out-and-unify-setting-CLOEXEC.patch delete mode 100644 meta-agl-profile-core/recipes-devtools/rpm/files/0002-Optimize-rpmSetCloseOnExec.patch delete mode 100644 meta-agl-profile-core/recipes-devtools/rpm/files/0003-rpmSetCloseOnExec-use-getrlimit.patch delete mode 100644 meta-agl-profile-core/recipes-devtools/rpm/rpm_%.bbappend create mode 100644 meta-agl-profile-core/recipes-devtools/run-postinsts/run-postinsts/ldconfig-wait.conf delete mode 100644 meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0001-Remove-tests-that-fail-to-build-on-some-PPC32-config.patch delete mode 100644 meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0001-makefiles-Drop-setting-mcpu-to-cortex-a8-on-arm-arch.patch delete mode 100644 meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0001-memcheck-arm64-Define-__THROW-if-not-already-defined.patch delete mode 100644 meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0001-memcheck-tests-Use-ucontext_t-instead-of-struct-ucon.patch delete mode 100644 meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0001-sigqueue-Rename-_sifields-to-__si_fields-on-musl.patch delete mode 100644 meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0001-str_tester.c-Limit-rawmemchr-test-to-glibc.patch delete mode 100644 meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0002-context-APIs-are-not-available-on-musl.patch delete mode 100644 meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0002-memcheck-x86-Define-__THROW-if-not-defined.patch delete mode 100644 meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0002-remove-rpath.patch delete mode 100644 meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0003-correct-include-directive-path-for-config.h.patch delete mode 100644 meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0003-tests-seg_override-Replace-__modify_ldt-with-syscall.patch delete mode 100644 meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0004-Fix-out-of-tree-builds.patch delete mode 100644 meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0004-pth_atfork1.c-Define-error-API-for-musl.patch delete mode 100644 meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0005-Modify-vg_test-wrapper-to-support-PTEST-formats.patch delete mode 100644 meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0005-tc20_verifywrap.c-Fake-__GLIBC_PREREQ-with-musl.patch delete mode 100644 meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0006-pth_detached3.c-Dereference-pthread_t-before-adding-.patch delete mode 100644 meta-agl-profile-core/recipes-devtools/valgrind/valgrind/Added-support-for-PPC-instructions-mfatbu-mfatbl.patch delete mode 100644 meta-agl-profile-core/recipes-devtools/valgrind/valgrind/avoid-neon-for-targets-which-don-t-support-it.patch delete mode 100644 meta-agl-profile-core/recipes-devtools/valgrind/valgrind/fixed-perl-path.patch delete mode 100644 meta-agl-profile-core/recipes-devtools/valgrind/valgrind/link-gz-tests.patch delete mode 100644 meta-agl-profile-core/recipes-devtools/valgrind/valgrind/ppc-headers.patch delete mode 100755 meta-agl-profile-core/recipes-devtools/valgrind/valgrind/run-ptest delete mode 100644 meta-agl-profile-core/recipes-devtools/valgrind/valgrind/use-appropriate-march-mcpu-mfpu-for-ARM-test-apps.patch delete mode 100644 meta-agl-profile-core/recipes-devtools/valgrind/valgrind/valgrind-make-ld-XXX.so-strlen-intercept-optional.patch delete mode 100644 meta-agl-profile-core/recipes-devtools/valgrind/valgrind_git.bb create mode 100644 meta-agl-profile-core/recipes-kernel/most/files/0010-backport-usb-setup-timer.patch create mode 100644 meta-agl-profile-core/recipes-kernel/most/files/0011-handle-snd_pcm_lib_mmap_vmalloc-removal.patch delete mode 100644 meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-10.0/0001-install-files-for-a-module-development.patch delete mode 100644 meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-10.0/0002-volume-ramp-additions-to-the-low-level-infra.patch delete mode 100644 meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-10.0/0003-volume-ramp-adding-volume-ramping-to-sink-input.patch delete mode 100644 meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-10.0/0004-sink-input-Code-cleanup-regarding-volume-ramping.patch delete mode 100644 meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-10.0/0005-sink-input-volume-Add-support-for-volume-ramp-factor.patch delete mode 100644 meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-10.0/0006-sink-input-Remove-pa_sink_input_set_volume_ramp.patch delete mode 100644 meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-10.0/enable-ofono-hfp-backend.patch create mode 100644 meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-12.2/0001-install-files-for-a-module-development.patch create mode 100644 meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-12.2/0002-volume-ramp-additions-to-the-low-level-infra.patch create mode 100644 meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-12.2/0003-volume-ramp-adding-volume-ramping-to-sink-input.patch create mode 100644 meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-12.2/0004-sink-input-Code-cleanup-regarding-volume-ramping.patch create mode 100644 meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-12.2/0005-sink-input-volume-Add-support-for-volume-ramp-factor.patch create mode 100644 meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-12.2/0006-sink-input-Remove-pa_sink_input_set_volume_ramp.patch create mode 100644 meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-12.2/enable-ofono-hfp-backend.patch delete mode 100644 meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio_10.0.bbappend create mode 100644 meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio_12.2.bbappend create mode 100644 meta-agl-profile-core/recipes-support/opencv/opencv_3.%.bbappend delete mode 100644 meta-agl-profile-core/recipes-support/opencv/opencv_3.3.bbappend delete mode 100644 meta-agl-profile-core/recipes-test/freetype/freetype_2.8.bbappend create mode 100644 meta-agl-profile-core/recipes-test/freetype/freetype_2.9.1.bbappend (limited to 'meta-agl-profile-core') diff --git a/meta-agl-profile-core/conf/layer.conf b/meta-agl-profile-core/conf/layer.conf index 83c5555bc..641b22867 100644 --- a/meta-agl-profile-core/conf/layer.conf +++ b/meta-agl-profile-core/conf/layer.conf @@ -8,3 +8,5 @@ BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ BBFILE_COLLECTIONS += "aglprofilecore" BBFILE_PATTERN_aglprofilecore = "^${LAYERDIR}/" BBFILE_PRIORITY_aglprofilecore = "80" + +LAYERSERIES_COMPAT_aglprofilecore = "thud" diff --git a/meta-agl-profile-core/recipes-connectivity/connman-ncurses/connman-ncurses_git.bb b/meta-agl-profile-core/recipes-connectivity/connman-ncurses/connman-ncurses_git.bb index 02afef75f..61086dfe7 100644 --- a/meta-agl-profile-core/recipes-connectivity/connman-ncurses/connman-ncurses_git.bb +++ b/meta-agl-profile-core/recipes-connectivity/connman-ncurses/connman-ncurses_git.bb @@ -9,7 +9,8 @@ DEPENDS = "dbus ncurses connman json-c" LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://LICENSE;md5=8c16666ae6c159876a0ba63099614381" -SRC_URI = "git://gitlab.com/iotbzh/connman-json-client.git;protocol=https;rev=ad4261a2f87c914667b1f6841c913f6b08d373e2" +SRC_URI = "git://gitlab.com/iotbzh/connman-json-client.git;protocol=https" +SRCREV = "2b0f93ec9518c978c04807fe52e95315d6d80e6b" inherit autotools pkgconfig diff --git a/meta-agl-profile-core/recipes-connectivity/connman/files/0001-disable-when-booting-over-nfs.patch b/meta-agl-profile-core/recipes-connectivity/connman/files/0001-disable-when-booting-over-nfs.patch index 95fc0a905..f129a6580 100644 --- a/meta-agl-profile-core/recipes-connectivity/connman/files/0001-disable-when-booting-over-nfs.patch +++ b/meta-agl-profile-core/recipes-connectivity/connman/files/0001-disable-when-booting-over-nfs.patch @@ -1,7 +1,6 @@ ---- a/src/connman.service.in 2016-08-15 13:51:03.479478140 +0200 -+++ b/src/connman.service.in 2016-08-15 13:51:33.469478267 +0200 -@@ -7,6 +7,7 @@ RequiresMountsFor=@localstatedir@/lib/co - After=dbus.service network-pre.target systemd-sysusers.service +--- connman-1.36.orig/src/connman.service.in 2019-02-18 18:02:07.034947373 -0500 ++++ connman-1.36/src/connman.service.in 2019-02-18 18:07:24.689959219 -0500 +@@ -7,6 +7,7 @@ Before=network.target multi-user.target shutdown.target Wants=network.target Conflicts=systemd-resolved.service diff --git a/meta-agl-profile-core/recipes-connectivity/neardal/neardal/0001-neardal-ncl-fix-segfault-on-help-page-being-displaye.patch b/meta-agl-profile-core/recipes-connectivity/neardal/neardal/0001-neardal-ncl-fix-segfault-on-help-page-being-displaye.patch index 8e45e1ca2..596fe0579 100644 --- a/meta-agl-profile-core/recipes-connectivity/neardal/neardal/0001-neardal-ncl-fix-segfault-on-help-page-being-displaye.patch +++ b/meta-agl-profile-core/recipes-connectivity/neardal/neardal/0001-neardal-ncl-fix-segfault-on-help-page-being-displaye.patch @@ -1,4 +1,4 @@ -From 0f33143d13d9224ffa8b648e2d9cf11c62ba234d Mon Sep 17 00:00:00 2001 +From 795308b2452ee617da4096914b53ba3a1142e3db Mon Sep 17 00:00:00 2001 From: Matt Ranostay Date: Fri, 6 Jul 2018 17:19:09 -0700 Subject: [PATCH] neardal: ncl: fix segfault on help page being displayed @@ -7,23 +7,21 @@ LISTCMD_NAME is declared as a const char due to being defined in a macro so g_strdup it to stop proceeding operations from segfaulting. Signed-off-by: Matt Ranostay + --- ncl/ncl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ncl/ncl.c b/ncl/ncl.c -index ef42862..c26e757 100644 +index 590d13b..f4165b7 100644 --- a/ncl/ncl.c +++ b/ncl/ncl.c -@@ -342,7 +342,7 @@ int main(int argc, char *argv[]) +@@ -329,7 +329,7 @@ int main(int argc, char *argv[]) g_io_channel_unref(gNclCtx.channel); if (show_help) - ncl_exec(LISTCMD_NAME); + ncl_exec(g_strdup(LISTCMD_NAME)); - g_main_loop_run(gNclCtx.main_loop); - } --- -2.17.1 - + rl_callback_handler_install(NCL_PROMPT, ncl_parse_line); + diff --git a/meta-agl-profile-core/recipes-devtools/cmake/cmake_%.bbappend b/meta-agl-profile-core/recipes-devtools/cmake/cmake_%.bbappend index 22f8163fe..2de1e6836 100644 --- a/meta-agl-profile-core/recipes-devtools/cmake/cmake_%.bbappend +++ b/meta-agl-profile-core/recipes-devtools/cmake/cmake_%.bbappend @@ -1,7 +1,6 @@ FILESEXTRAPATHS_append := ":${THISDIR}/files" SRC_URI_append_class-nativesdk = " \ - file://0001-CMakeDetermineSystem-use-oe-environment-vars-to-load.patch \ file://environment.d-cmake-agl.sh \ " diff --git a/meta-agl-profile-core/recipes-devtools/cmake/files/0001-CMakeDetermineSystem-use-oe-environment-vars-to-load.patch b/meta-agl-profile-core/recipes-devtools/cmake/files/0001-CMakeDetermineSystem-use-oe-environment-vars-to-load.patch deleted file mode 100644 index a2332879c..000000000 --- a/meta-agl-profile-core/recipes-devtools/cmake/files/0001-CMakeDetermineSystem-use-oe-environment-vars-to-load.patch +++ /dev/null @@ -1,45 +0,0 @@ -From a42cfebcd6c684cccf8ad33e5bd5130f7cdba135 Mon Sep 17 00:00:00 2001 -From: Cody P Schafer -Date: Thu, 27 Apr 2017 11:35:05 -0400 -Subject: [PATCH] CMakeDetermineSystem: use oe environment vars to load default - toolchain file in sdk - -Passing the toolchain by: - - - shell aliases does not work if cmake is called by a script - - unconditionally by a wrapper script causes cmake to believe it is - configuring things when it is not (for example, `cmake --build` breaks). - -The OE_CMAKE_TOOLCHAIN_FILE variable is only used as a default if no -toolchain is explicitly specified. - -Setting the CMAKE_TOOLCHAIN_FILE cmake variable is marked as cached -because '-D' options are cache entries themselves. - -Upstream-Status: Inappropriate [oe-core specific] -Signed-off-by: Cody P Schafer ---- - Modules/CMakeDetermineSystem.cmake | 7 +++++++ - 1 file changed, 7 insertions(+) - -diff --git a/Modules/CMakeDetermineSystem.cmake b/Modules/CMakeDetermineSystem.cmake -index f34ec5d61..bcac3ef16 100644 ---- a/Modules/CMakeDetermineSystem.cmake -+++ b/Modules/CMakeDetermineSystem.cmake -@@ -74,6 +74,13 @@ else() - endif() - endif() - -+if(NOT DEFINED CMAKE_TOOLCHAIN_FILE) -+ if(DEFINED ENV{OE_CMAKE_TOOLCHAIN_FILE}) -+ set(CMAKE_TOOLCHAIN_FILE "$ENV{OE_CMAKE_TOOLCHAIN_FILE}" CACHE FILEPATH "toolchain file") -+ message(STATUS "Toolchain file defaulted to '${CMAKE_TOOLCHAIN_FILE}'") -+ endif() -+endif() -+ - # if a toolchain file is used, the user wants to cross compile. - # in this case read the toolchain file and keep the CMAKE_HOST_SYSTEM_* - # variables around so they can be used in CMakeLists.txt. --- -2.12.2 - diff --git a/meta-agl-profile-core/recipes-devtools/packagegroups/packagegroup-agl-core-devel.bb b/meta-agl-profile-core/recipes-devtools/packagegroups/packagegroup-agl-core-devel.bb index 576f62c8e..09f652036 100644 --- a/meta-agl-profile-core/recipes-devtools/packagegroups/packagegroup-agl-core-devel.bb +++ b/meta-agl-profile-core/recipes-devtools/packagegroups/packagegroup-agl-core-devel.bb @@ -15,7 +15,6 @@ RDEPENDS_${PN} = "\ perf \ htop \ powertop \ - latencytop \ systemtap \ screen \ usbutils \ diff --git a/meta-agl-profile-core/recipes-devtools/rpm/files/0001-Factor-out-and-unify-setting-CLOEXEC.patch b/meta-agl-profile-core/recipes-devtools/rpm/files/0001-Factor-out-and-unify-setting-CLOEXEC.patch deleted file mode 100644 index cfddec6da..000000000 --- a/meta-agl-profile-core/recipes-devtools/rpm/files/0001-Factor-out-and-unify-setting-CLOEXEC.patch +++ /dev/null @@ -1,140 +0,0 @@ -From 0a66176074560303bf0870957464239e9757d891 Mon Sep 17 00:00:00 2001 -From: Kir Kolyshkin -Date: Tue, 29 May 2018 17:37:05 -0700 -Subject: [PATCH 1/3] Factor out and unify setting CLOEXEC - -Commit 7a7c31f5 ("Set FD_CLOEXEC on opened files before exec from -lua script is called") copied the code that sets CLOEXEC flag on all -possible file descriptors from lib/rpmscript.c to luaext/lposix.c, -essentially creating two copies of the same code (modulo comments -and the unused assignment). - -This commit moves the functionality into its own function, without -any code modifications, using the version from luaext/lposix.c. - -Signed-off-by: Kir Kolyshkin -(cherry picked from commit 9c3e5de3240554c8ea1b29d52eeadee4840fefac) ---- - lib/rpmscript.c | 17 ++--------------- - luaext/lposix.c | 13 ++----------- - rpmio/rpmio.c | 14 ++++++++++++++ - rpmio/rpmio_internal.h | 6 ++++++ - 4 files changed, 24 insertions(+), 26 deletions(-) - -diff --git a/lib/rpmscript.c b/lib/rpmscript.c -index 98d3f42..61dff83 100644 ---- a/lib/rpmscript.c -+++ b/lib/rpmscript.c -@@ -18,6 +18,7 @@ - - #include "rpmio/rpmlua.h" - #include "lib/rpmscript.h" -+#include "rpmio/rpmio_internal.h" - - #include "lib/rpmplugins.h" /* rpm plugins hooks */ - -@@ -161,25 +162,11 @@ static const char * const SCRIPT_PATH = "PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr - static void doScriptExec(ARGV_const_t argv, ARGV_const_t prefixes, - FD_t scriptFd, FD_t out) - { -- int flag; -- int fdno; - int xx; -- int open_max; - - (void) signal(SIGPIPE, SIG_DFL); - -- /* XXX Force FD_CLOEXEC on all inherited fdno's. */ -- open_max = sysconf(_SC_OPEN_MAX); -- if (open_max == -1) { -- open_max = 1024; -- } -- for (fdno = 3; fdno < open_max; fdno++) { -- flag = fcntl(fdno, F_GETFD); -- if (flag == -1 || (flag & FD_CLOEXEC)) -- continue; -- xx = fcntl(fdno, F_SETFD, FD_CLOEXEC); -- /* XXX W2DO? debug msg for inheirited fdno w/o FD_CLOEXEC */ -- } -+ rpmSetCloseOnExec(); - - if (scriptFd != NULL) { - int sfdno = Fileno(scriptFd); -diff --git a/luaext/lposix.c b/luaext/lposix.c -index 0a7c26c..5d7ad3c 100644 ---- a/luaext/lposix.c -+++ b/luaext/lposix.c -@@ -27,6 +27,7 @@ - #include - #include - #include -+#include "rpmio/rpmio_internal.h" - - #define MYNAME "posix" - #define MYVERSION MYNAME " library for " LUA_VERSION " / Nov 2003" -@@ -335,21 +336,11 @@ static int Pexec(lua_State *L) /** exec(path,[args]) */ - const char *path = luaL_checkstring(L, 1); - int i,n=lua_gettop(L); - char **argv; -- int flag, fdno, open_max; - - if (!have_forked) - return luaL_error(L, "exec not permitted in this context"); - -- open_max = sysconf(_SC_OPEN_MAX); -- if (open_max == -1) { -- open_max = 1024; -- } -- for (fdno = 3; fdno < open_max; fdno++) { -- flag = fcntl(fdno, F_GETFD); -- if (flag == -1 || (flag & FD_CLOEXEC)) -- continue; -- fcntl(fdno, F_SETFD, FD_CLOEXEC); -- } -+ rpmSetCloseOnExec(); - - argv = malloc((n+1)*sizeof(char*)); - if (argv==NULL) return luaL_error(L,"not enough memory"); -diff --git a/rpmio/rpmio.c b/rpmio/rpmio.c -index 0b90984..747bf3c 100644 ---- a/rpmio/rpmio.c -+++ b/rpmio/rpmio.c -@@ -1477,4 +1477,18 @@ void fdFiniDigest(FD_t fd, int hashalgo, - } - } - -+void rpmSetCloseOnExec(void) -+{ -+ int flag, fdno, open_max; - -+ open_max = sysconf(_SC_OPEN_MAX); -+ if (open_max == -1) { -+ open_max = 1024; -+ } -+ for (fdno = 3; fdno < open_max; fdno++) { -+ flag = fcntl(fdno, F_GETFD); -+ if (flag == -1 || (flag & FD_CLOEXEC)) -+ continue; -+ fcntl(fdno, F_SETFD, FD_CLOEXEC); -+ } -+} -diff --git a/rpmio/rpmio_internal.h b/rpmio/rpmio_internal.h -index 8c9f1a8..da39250 100644 ---- a/rpmio/rpmio_internal.h -+++ b/rpmio/rpmio_internal.h -@@ -37,6 +37,12 @@ void fdFiniDigest(FD_t fd, int hashalgo, - int rpmioSlurp(const char * fn, - uint8_t ** bp, ssize_t * blenp); - -+/** -+ * Set close-on-exec flag for all opened file descriptors, except -+ * stdin/stdout/stderr. -+ */ -+void rpmSetCloseOnExec(void); -+ - #ifdef __cplusplus - } - #endif --- -2.7.4 - diff --git a/meta-agl-profile-core/recipes-devtools/rpm/files/0002-Optimize-rpmSetCloseOnExec.patch b/meta-agl-profile-core/recipes-devtools/rpm/files/0002-Optimize-rpmSetCloseOnExec.patch deleted file mode 100644 index 9354dd6e0..000000000 --- a/meta-agl-profile-core/recipes-devtools/rpm/files/0002-Optimize-rpmSetCloseOnExec.patch +++ /dev/null @@ -1,102 +0,0 @@ -From 6f56aa01a357bbcf9401d79a378ae380f5f939d4 Mon Sep 17 00:00:00 2001 -From: Kir Kolyshkin -Date: Tue, 29 May 2018 17:52:56 -0700 -Subject: [PATCH 2/3] Optimize rpmSetCloseOnExec - -In case maximum number of open files limit is set too high, both -luaext/Pexec() and lib/doScriptExec() spend way too much time -trying to set FD_CLOEXEC flag for all those file descriptors, -resulting in severe increase of time it takes to execute say -rpm or dnf. - -This becomes increasingly noticeable when running with e.g. under -Docker, the reason being: - -> $ docker run fedora ulimit -n -> 1048576 - -One obvious fix is to use procfs to get the actual list of opened fds -and iterate over it. My quick-n-dirty benchmark shows the /proc approach -is about 10x faster than iterating through a list of just 1024 fds, -so it's an improvement even for default ulimit values. - -Note that the old method is still used in case /proc is not available. - -While at it, - - 1. fix the function by making sure we modify (rather than set) - the existing flags. As the only known flag is FD_CLOEXEC, - this change is currently purely aesthetical, but in case - other flags will appear it will become a real bug fix. - - 2. get rid of magic number 3; use STDERR_FILENO - -Signed-off-by: Kir Kolyshkin - -Fixes #444 - -(cherry picked from commit 5e6f05cd8dad6c1ee6bd1e6e43f176976c9c3416) ---- - rpmio/rpmio.c | 43 ++++++++++++++++++++++++++++++++++--------- - 1 file changed, 34 insertions(+), 9 deletions(-) - -diff --git a/rpmio/rpmio.c b/rpmio/rpmio.c -index 747bf3c..8148aa2 100644 ---- a/rpmio/rpmio.c -+++ b/rpmio/rpmio.c -@@ -1477,18 +1477,43 @@ void fdFiniDigest(FD_t fd, int hashalgo, - } - } - -+static void set_cloexec(int fd) -+{ -+ int flags = fcntl(fd, F_GETFD); -+ -+ if (flags == -1 || (flags & FD_CLOEXEC)) -+ return; -+ -+ fcntl(fd, F_SETFD, flags | FD_CLOEXEC); -+} -+ - void rpmSetCloseOnExec(void) - { -- int flag, fdno, open_max; -+ const int min_fd = STDERR_FILENO; /* don't touch stdin/out/err */ -+ int fd; -+ -+ DIR *dir = opendir("/proc/self/fd"); -+ if (dir == NULL) { /* /proc not available */ -+ /* iterate over all possible fds, might be slow */ -+ int open_max = sysconf(_SC_OPEN_MAX); -+ if (open_max == -1) -+ open_max = 1024; - -- open_max = sysconf(_SC_OPEN_MAX); -- if (open_max == -1) { -- open_max = 1024; -+ for (fd = min_fd + 1; fd < open_max; fd++) -+ set_cloexec(fd); -+ -+ return; - } -- for (fdno = 3; fdno < open_max; fdno++) { -- flag = fcntl(fdno, F_GETFD); -- if (flag == -1 || (flag & FD_CLOEXEC)) -- continue; -- fcntl(fdno, F_SETFD, FD_CLOEXEC); -+ -+ /* iterate over fds obtained from /proc */ -+ struct dirent *entry; -+ while ((entry = readdir(dir)) != NULL) { -+ fd = atoi(entry->d_name); -+ if (fd > min_fd) -+ set_cloexec(fd); - } -+ -+ closedir(dir); -+ -+ return; - } --- -2.7.4 - diff --git a/meta-agl-profile-core/recipes-devtools/rpm/files/0003-rpmSetCloseOnExec-use-getrlimit.patch b/meta-agl-profile-core/recipes-devtools/rpm/files/0003-rpmSetCloseOnExec-use-getrlimit.patch deleted file mode 100644 index d9b813ece..000000000 --- a/meta-agl-profile-core/recipes-devtools/rpm/files/0003-rpmSetCloseOnExec-use-getrlimit.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 1f5438d677dca330642158ec0b1c0366c6a65725 Mon Sep 17 00:00:00 2001 -From: Kir Kolyshkin -Date: Tue, 29 May 2018 18:09:27 -0700 -Subject: [PATCH 3/3] rpmSetCloseOnExec: use getrlimit() - -In case /proc is not available to get the actual list of opened fds, -we fall back to iterating through the list of all possible fds. - -It is possible that during the course of the program execution the limit -on number of open file descriptors might be lowered, so using the -current limit, as returned by sysconf(_SC_OPEN_MAX), might omit some -fds. Therefore, it is better to use rlim_max from the structure -filled in by gertlimit(RLIMIT_NOFILE) to make sure we're checking -all fds. - -This slows down the function, but only in the case /proc is not -available, which should be rare in practice. - -Signed-off-by: Kir Kolyshkin -(cherry picked from commit 307e28b4cb08b05bc044482058eeebc9f59bb9a9) ---- - rpmio/rpmio.c | 10 +++++++++- - 1 file changed, 9 insertions(+), 1 deletion(-) - -diff --git a/rpmio/rpmio.c b/rpmio/rpmio.c -index 8148aa2..0698e53 100644 ---- a/rpmio/rpmio.c -+++ b/rpmio/rpmio.c -@@ -10,6 +10,7 @@ - #include - #endif - #include -+#include - - #include - #include -@@ -1495,7 +1496,14 @@ void rpmSetCloseOnExec(void) - DIR *dir = opendir("/proc/self/fd"); - if (dir == NULL) { /* /proc not available */ - /* iterate over all possible fds, might be slow */ -- int open_max = sysconf(_SC_OPEN_MAX); -+ struct rlimit rl; -+ int open_max; -+ -+ if (getrlimit(RLIMIT_NOFILE, &rl) == 0 && rl.rlim_max != RLIM_INFINITY) -+ open_max = rl.rlim_max; -+ else -+ open_max = sysconf(_SC_OPEN_MAX); -+ - if (open_max == -1) - open_max = 1024; - --- -2.7.4 - diff --git a/meta-agl-profile-core/recipes-devtools/rpm/rpm_%.bbappend b/meta-agl-profile-core/recipes-devtools/rpm/rpm_%.bbappend deleted file mode 100644 index 1333a97c0..000000000 --- a/meta-agl-profile-core/recipes-devtools/rpm/rpm_%.bbappend +++ /dev/null @@ -1,7 +0,0 @@ -FILESEXTRAPATHS_append := ":${THISDIR}/files" - -SRC_URI_append = "\ - file://0001-Factor-out-and-unify-setting-CLOEXEC.patch \ - file://0002-Optimize-rpmSetCloseOnExec.patch \ - file://0003-rpmSetCloseOnExec-use-getrlimit.patch \ -" diff --git a/meta-agl-profile-core/recipes-devtools/run-postinsts/run-postinsts/ldconfig-wait.conf b/meta-agl-profile-core/recipes-devtools/run-postinsts/run-postinsts/ldconfig-wait.conf new file mode 100644 index 000000000..d706cc5f7 --- /dev/null +++ b/meta-agl-profile-core/recipes-devtools/run-postinsts/run-postinsts/ldconfig-wait.conf @@ -0,0 +1,2 @@ +[Unit] +After=ldconfig.service diff --git a/meta-agl-profile-core/recipes-devtools/run-postinsts/run-postinsts_%.bbappend b/meta-agl-profile-core/recipes-devtools/run-postinsts/run-postinsts_%.bbappend index fc327b6ef..4cc2edf86 100644 --- a/meta-agl-profile-core/recipes-devtools/run-postinsts/run-postinsts_%.bbappend +++ b/meta-agl-profile-core/recipes-devtools/run-postinsts/run-postinsts_%.bbappend @@ -1,5 +1,14 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +SRC_URI += "file://ldconfig-wait.conf" + do_configure_append() { if ! grep -q StandardOutput= ${WORKDIR}/run-postinsts.service; then sed -i '/ExecStart=/iStandardOutput=journal+console' ${WORKDIR}/run-postinsts.service fi } + +do_install_append() { + install -d ${D}${sysconfdir}/systemd/system/run-postinsts.service.d + install -m 0644 ${WORKDIR}/ldconfig-wait.conf ${D}${sysconfdir}/systemd/system/run-postinsts.service.d +} diff --git a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0001-Remove-tests-that-fail-to-build-on-some-PPC32-config.patch b/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0001-Remove-tests-that-fail-to-build-on-some-PPC32-config.patch deleted file mode 100644 index a78e1953f..000000000 --- a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0001-Remove-tests-that-fail-to-build-on-some-PPC32-config.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 9762fd23e1f1db66d4b977c694a17d3bca3fe99a Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin -Date: Fri, 8 Jan 2016 16:36:29 +0200 -Subject: [PATCH] Remove tests that fail to build on some PPC32 configurations - -Failures are documented here: -http://errors.yoctoproject.org/Errors/Search/?items=10&query=862d702fbb99e484631315aa44b9e46f8fc567da&filter=valgrind&type=recipe - -Signed-off-by: Alexander Kanavin -Upstream-Status: Pending ---- - memcheck/tests/ppc32/Makefile.am | 2 +- - none/tests/ppc32/Makefile.am | 4 ++-- - 2 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/memcheck/tests/ppc32/Makefile.am b/memcheck/tests/ppc32/Makefile.am -index 26b95a2..8f05743 100644 ---- a/memcheck/tests/ppc32/Makefile.am -+++ b/memcheck/tests/ppc32/Makefile.am -@@ -10,7 +10,7 @@ EXTRA_DIST = $(noinst_SCRIPTS) \ - power_ISA2_07.stderr.exp power_ISA2_07.vgtest - - check_PROGRAMS = \ -- power_ISA2_05 power_ISA2_07 -+ power_ISA2_07 - - power_ISA2_05_CFLAGS = $(AM_CFLAGS) $(WERROR) -Winline -Wall -Wshadow -g \ - -I$(top_srcdir)/include @FLAG_M32@ -diff --git a/none/tests/ppc32/Makefile.am b/none/tests/ppc32/Makefile.am -index 196239e..0fe3425 100644 ---- a/none/tests/ppc32/Makefile.am -+++ b/none/tests/ppc32/Makefile.am -@@ -50,13 +50,13 @@ EXTRA_DIST = \ - - check_PROGRAMS = \ - allexec \ -- lsw jm-insns round \ -+ lsw \ - test_isa_2_06_part1 test_isa_2_06_part2 test_isa_2_06_part3 \ - test_dfp1 test_dfp2 test_dfp3 test_dfp4 test_dfp5 \ - test_isa_2_07_part1 test_isa_2_07_part2 \ - test_tm test_touch_tm ldst_multiple data-cache-instructions \ - test_fx test_gx \ -- testVMX twi tw xlc_dbl_u32 power5+_round power6_bcmp \ -+ twi tw xlc_dbl_u32 power6_bcmp \ - bug129390-ppc32 bug139050-ppc32 \ - ldstrev mftocrf mcrfs - --- -2.6.4 - diff --git a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0001-makefiles-Drop-setting-mcpu-to-cortex-a8-on-arm-arch.patch b/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0001-makefiles-Drop-setting-mcpu-to-cortex-a8-on-arm-arch.patch deleted file mode 100644 index 9f1da7bac..000000000 --- a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0001-makefiles-Drop-setting-mcpu-to-cortex-a8-on-arm-arch.patch +++ /dev/null @@ -1,108 +0,0 @@ -From 715cf122388f3527afa5649cebf9f1522c240693 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Thu, 20 Apr 2017 10:11:16 -0700 -Subject: [PATCH] makefiles: Drop setting -mcpu to cortex-a8 on arm - architecture - -We can not assume that all arches armv7+ are cortex-a8 only -it fails to build for rpi which is armv7ve based (cortex-a8) cpu -implementation. -Fixes -| cc1: warning: switch -mcpu=cortex-a8 conflicts with -march=armv7ve switch - -Upstream-Status: Pending - -Signed-off-by: Khem Raj ---- - Makefile.all.am | 6 +++--- - helgrind/tests/Makefile.am | 6 +++--- - none/tests/arm/Makefile.am | 18 +++++++++--------- - 3 files changed, 15 insertions(+), 15 deletions(-) - -diff --git a/Makefile.all.am b/Makefile.all.am -index 02059a3..c7c4700 100644 ---- a/Makefile.all.am -+++ b/Makefile.all.am -@@ -197,11 +197,11 @@ AM_CCASFLAGS_PPC64LE_LINUX = @FLAG_M64@ -g - - AM_FLAG_M3264_ARM_LINUX = @FLAG_M32@ - AM_CFLAGS_ARM_LINUX = @FLAG_M32@ \ -- $(AM_CFLAGS_BASE) -marm -mcpu=cortex-a8 -+ $(AM_CFLAGS_BASE) -marm - AM_CFLAGS_PSO_ARM_LINUX = @FLAG_M32@ $(AM_CFLAGS_BASE) \ -- -marm -mcpu=cortex-a8 $(AM_CFLAGS_PSO_BASE) -+ -marm $(AM_CFLAGS_PSO_BASE) - AM_CCASFLAGS_ARM_LINUX = @FLAG_M32@ \ -- -marm -mcpu=cortex-a8 -g -+ -marm -g - - AM_FLAG_M3264_ARM64_LINUX = @FLAG_M64@ - AM_CFLAGS_ARM64_LINUX = @FLAG_M64@ $(AM_CFLAGS_BASE) -diff --git a/helgrind/tests/Makefile.am b/helgrind/tests/Makefile.am -index df82169..07eb66a 100644 ---- a/helgrind/tests/Makefile.am -+++ b/helgrind/tests/Makefile.am -@@ -189,9 +189,9 @@ if ! VGCONF_PLATFORMS_INCLUDE_X86_DARWIN - endif - - if VGCONF_PLATFORMS_INCLUDE_ARM_LINUX --annotate_hbefore_CFLAGS = $(AM_CFLAGS) -mcpu=cortex-a8 --tc07_hbl1_CFLAGS = $(AM_CFLAGS) -mcpu=cortex-a8 --tc08_hbl2_CFLAGS = $(AM_CFLAGS) -mcpu=cortex-a8 -+annotate_hbefore_CFLAGS = $(AM_CFLAGS) -+tc07_hbl1_CFLAGS = $(AM_CFLAGS) -+tc08_hbl2_CFLAGS = $(AM_CFLAGS) - else - annotate_hbefore_CFLAGS = $(AM_CFLAGS) - tc07_hbl1_CFLAGS = $(AM_CFLAGS) -diff --git a/none/tests/arm/Makefile.am b/none/tests/arm/Makefile.am -index 024eb6d..ccecb90 100644 ---- a/none/tests/arm/Makefile.am -+++ b/none/tests/arm/Makefile.am -@@ -52,10 +52,10 @@ allexec_CFLAGS = $(AM_CFLAGS) @FLAG_W_NO_NONNULL@ - # need special helping w.r.t -mfpu and -mfloat-abi, though. - # Also force -O0 since -O takes hundreds of MB of memory - # for v6intThumb.c. --v6intARM_CFLAGS = $(AM_CFLAGS) -g -O0 -mcpu=cortex-a8 -marm --v6intThumb_CFLAGS = $(AM_CFLAGS) -g -O0 -mcpu=cortex-a8 -mthumb -+v6intARM_CFLAGS = $(AM_CFLAGS) -g -O0 -marm -+v6intThumb_CFLAGS = $(AM_CFLAGS) -g -O0 -mthumb - --v6media_CFLAGS = $(AM_CFLAGS) -g -O0 -mcpu=cortex-a8 -mthumb -+v6media_CFLAGS = $(AM_CFLAGS) -g -O0 -mthumb - - v8crypto_a_CFLAGS = $(AM_CFLAGS) -g -O0 -mfpu=crypto-neon-fp-armv8 -marm - v8crypto_t_CFLAGS = $(AM_CFLAGS) -g -O0 -mfpu=crypto-neon-fp-armv8 -mthumb -@@ -65,23 +65,23 @@ v8memory_a_CFLAGS = $(AM_CFLAGS) -g -O0 \ - v8memory_t_CFLAGS = $(AM_CFLAGS) -g -O0 \ - -march=armv8-a -mfpu=crypto-neon-fp-armv8 -mthumb - --vfp_CFLAGS = $(AM_CFLAGS) -g -O0 -mcpu=cortex-a8 \ -+vfp_CFLAGS = $(AM_CFLAGS) -g -O0 \ - -mfpu=neon \ - -mthumb - - --neon128_CFLAGS = $(AM_CFLAGS) -g -O0 -mcpu=cortex-a8 \ -+neon128_CFLAGS = $(AM_CFLAGS) -g -O0 \ - -mfpu=neon \ - -mthumb - --neon64_CFLAGS = $(AM_CFLAGS) -g -O0 -mcpu=cortex-a8 \ -+neon64_CFLAGS = $(AM_CFLAGS) -g -O0 \ - -mfpu=neon \ - -mthumb - - intdiv_CFLAGS = $(AM_CFLAGS) -g -march=armv7ve -mcpu=cortex-a15 -mthumb --ldrt_CFLAGS = $(AM_CFLAGS) -g -mcpu=cortex-a8 -mthumb --ldrt_arm_CFLAGS = $(AM_CFLAGS) -g -mcpu=cortex-a8 -marm -+ldrt_CFLAGS = $(AM_CFLAGS) -g -mthumb -+ldrt_arm_CFLAGS = $(AM_CFLAGS) -g -marm - --vcvt_fixed_float_VFP_CFLAGS = $(AM_CFLAGS) -g -mcpu=cortex-a8 -mfpu=vfpv3 -+vcvt_fixed_float_VFP_CFLAGS = $(AM_CFLAGS) -g -mfpu=vfpv3 - - vfpv4_fma_CFLAGS = $(AM_CFLAGS) -g -O0 -march=armv7ve -mcpu=cortex-a15 -mfpu=vfpv4 -marm --- -2.12.2 - diff --git a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0001-memcheck-arm64-Define-__THROW-if-not-already-defined.patch b/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0001-memcheck-arm64-Define-__THROW-if-not-already-defined.patch deleted file mode 100644 index a48d7db07..000000000 --- a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0001-memcheck-arm64-Define-__THROW-if-not-already-defined.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 3409dc35c15bb14c8a525239806322648e079ab1 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Wed, 5 Jul 2017 17:12:43 -0700 -Subject: [PATCH 1/3] memcheck/arm64: Define __THROW if not already defined - -Helps compiling with musl where __THROW is not available - -Signed-off-by: Khem Raj ---- -Upstream-Status: Submitted - - memcheck/tests/arm64-linux/scalar.h | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/memcheck/tests/arm64-linux/scalar.h b/memcheck/tests/arm64-linux/scalar.h -index 9008816..8ef050f 100644 ---- a/memcheck/tests/arm64-linux/scalar.h -+++ b/memcheck/tests/arm64-linux/scalar.h -@@ -12,6 +12,10 @@ - #include - #include - -+#ifndef __THROW -+#define __THROW -+#endif -+ - // Since we use vki_unistd.h, we can't include . So we have to - // declare this ourselves. - extern long int syscall (long int __sysno, ...) __THROW; --- -2.13.2 - diff --git a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0001-memcheck-tests-Use-ucontext_t-instead-of-struct-ucon.patch b/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0001-memcheck-tests-Use-ucontext_t-instead-of-struct-ucon.patch deleted file mode 100644 index bf16a1adf..000000000 --- a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0001-memcheck-tests-Use-ucontext_t-instead-of-struct-ucon.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 629ac492b1d9bc709d17337eb9b1c28603eca250 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Wed, 28 Jun 2017 11:01:25 -0700 -Subject: [PATCH] memcheck/tests: Use ucontext_t instead of struct ucontext - -glibc 2.26 does not expose struct ucontext anymore - -Upstream-Status: Submitted [https://bugs.kde.org/show_bug.cgi?id=381769] - -Signed-off-by: Khem Raj ---- - memcheck/tests/linux/stack_changes.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/memcheck/tests/linux/stack_changes.c b/memcheck/tests/linux/stack_changes.c -index ffb49c6..acc4109 100644 ---- a/memcheck/tests/linux/stack_changes.c -+++ b/memcheck/tests/linux/stack_changes.c -@@ -11,7 +11,7 @@ - // checks that Valgrind notices their stack changes properly. - - #ifdef __GLIBC__ --typedef struct ucontext mycontext; -+typedef ucontext_t mycontext; - - mycontext ctx1, ctx2, oldc; - int count; --- -2.13.2 - diff --git a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0001-sigqueue-Rename-_sifields-to-__si_fields-on-musl.patch b/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0001-sigqueue-Rename-_sifields-to-__si_fields-on-musl.patch deleted file mode 100644 index 27366153f..000000000 --- a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0001-sigqueue-Rename-_sifields-to-__si_fields-on-musl.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 64ad2744acfb4fa40b1c114633a053f87125a203 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Sat, 10 Jun 2017 00:46:39 -0700 -Subject: [PATCH 1/6] sigqueue: Rename _sifields to __si_fields on musl - -Upstream-Status: Pending - -Signed-off-by: Khem Raj ---- - memcheck/tests/linux/sigqueue.c | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/memcheck/tests/linux/sigqueue.c b/memcheck/tests/linux/sigqueue.c -index d18bd72..acb7cba 100644 ---- a/memcheck/tests/linux/sigqueue.c -+++ b/memcheck/tests/linux/sigqueue.c -@@ -8,6 +8,11 @@ - #include - #include - -+/* musl libc defines siginfo_t __si_fields instead of _sifields */ -+#if defined(__linux__) && !defined(__GLIBC__) -+#define _sifields __si_fields -+#endif -+ - int main(int argc, char **argv) - { - siginfo_t *si; --- -2.13.1 - diff --git a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0001-str_tester.c-Limit-rawmemchr-test-to-glibc.patch b/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0001-str_tester.c-Limit-rawmemchr-test-to-glibc.patch deleted file mode 100644 index 185b8f9e6..000000000 --- a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0001-str_tester.c-Limit-rawmemchr-test-to-glibc.patch +++ /dev/null @@ -1,39 +0,0 @@ -From de692e359801a1f0488c76267e4f904dd2efe754 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Sat, 10 Jun 2017 00:39:07 -0700 -Subject: [PATCH] str_tester.c: Limit rawmemchr() test to glibc - -rawmemchr() is a GNU extention therefore mark it so - -Signed-off-by: Khem Raj ---- -Upstream-Status: Pending - - memcheck/tests/str_tester.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/memcheck/tests/str_tester.c b/memcheck/tests/str_tester.c -index 9f7790a..47e4b4a 100644 ---- a/memcheck/tests/str_tester.c -+++ b/memcheck/tests/str_tester.c -@@ -504,7 +504,7 @@ test_strchrnul (void) - #endif - - // DDD: better done by testing for the function. --#if !defined(__APPLE__) && !defined(__sun) -+#if !defined(__APPLE__) && !defined(__sun) && defined(__GLIBC__) - static void - test_rawmemchr (void) - { -@@ -1442,7 +1442,7 @@ main (void) - test_strchrnul (); - # endif - --# if !defined(__APPLE__) && !defined(__sun) -+# if !defined(__APPLE__) && !defined(__sun) && defined(__GLIBC__) - /* rawmemchr. */ - test_rawmemchr (); - # endif --- -2.13.1 - diff --git a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0002-context-APIs-are-not-available-on-musl.patch b/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0002-context-APIs-are-not-available-on-musl.patch deleted file mode 100644 index ccf404d0d..000000000 --- a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0002-context-APIs-are-not-available-on-musl.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 862b807076d57f2f58ed9d572ddac8bb402774a2 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Sat, 10 Jun 2017 01:01:10 -0700 -Subject: [PATCH 2/6] context APIs are not available on musl - -Upstream-Status: Pending - -Signed-off-by: Khem Raj ---- - memcheck/tests/linux/stack_changes.c | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -diff --git a/memcheck/tests/linux/stack_changes.c b/memcheck/tests/linux/stack_changes.c -index a978fc2..ffb49c6 100644 ---- a/memcheck/tests/linux/stack_changes.c -+++ b/memcheck/tests/linux/stack_changes.c -@@ -10,6 +10,7 @@ - // This test is checking the libc context calls (setcontext, etc.) and - // checks that Valgrind notices their stack changes properly. - -+#ifdef __GLIBC__ - typedef ucontext_t mycontext; - - mycontext ctx1, ctx2, oldc; -@@ -51,9 +52,11 @@ int init_context(mycontext *uc) - - return ret; - } -+#endif - - int main(int argc, char **argv) - { -+#ifdef __GLIBC__ - int c1 = init_context(&ctx1); - int c2 = init_context(&ctx2); - -@@ -66,6 +69,8 @@ int main(int argc, char **argv) - //free(ctx1.uc_stack.ss_sp); - VALGRIND_STACK_DEREGISTER(c2); - //free(ctx2.uc_stack.ss_sp); -- -+#else -+ printf("libc context call APIs e.g. getcontext() are deprecated by posix\n"); -+#endif - return 0; - } - diff --git a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0002-memcheck-x86-Define-__THROW-if-not-defined.patch b/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0002-memcheck-x86-Define-__THROW-if-not-defined.patch deleted file mode 100644 index 543347229..000000000 --- a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0002-memcheck-x86-Define-__THROW-if-not-defined.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 67d199dbdcbb3feff5f8928f87725fc64c0307d7 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Wed, 5 Jul 2017 17:36:42 -0700 -Subject: [PATCH 2/3] memcheck/x86: Define __THROW if not defined - -musl does not have __THROW, therefore make it null - -Signed-off-by: Khem Raj ---- -Upstream-Status: Submitted - - memcheck/tests/x86-linux/scalar.h | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/memcheck/tests/x86-linux/scalar.h b/memcheck/tests/x86-linux/scalar.h -index ef28b03..52f742e 100644 ---- a/memcheck/tests/x86-linux/scalar.h -+++ b/memcheck/tests/x86-linux/scalar.h -@@ -11,6 +11,10 @@ - #include - #include - -+#ifndef __THROW -+#define __THROW -+#endif -+ - // Since we use vki_unistd.h, we can't include . So we have to - // declare this ourselves. - extern long int syscall (long int __sysno, ...) __THROW; --- -2.13.2 - diff --git a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0002-remove-rpath.patch b/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0002-remove-rpath.patch deleted file mode 100644 index e9112da0c..000000000 --- a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0002-remove-rpath.patch +++ /dev/null @@ -1,35 +0,0 @@ -From f96cf1f4eaa72860ab8b5e18ad10fdc704d78c5f Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin -Date: Tue, 15 Dec 2015 15:01:34 +0200 -Subject: [PATCH 2/5] remove rpath - -Upstream-Status: Inappropriate [embedded config] -Signed-off-by: Saul Wold ---- - none/tests/Makefile.am | 3 +-- - 1 file changed, 1 insertion(+), 2 deletions(-) - -diff --git a/none/tests/Makefile.am b/none/tests/Makefile.am -index 54f2a7e..25b0f49 100644 ---- a/none/tests/Makefile.am -+++ b/none/tests/Makefile.am -@@ -326,7 +326,6 @@ threadederrno_CFLAGS += --std=c99 - endif - tls_SOURCES = tls.c tls2.c - tls_DEPENDENCIES = tls.so tls2.so --tls_LDFLAGS = -Wl,-rpath,$(abs_top_builddir)/none/tests - tls_LDADD = tls.so tls2.so -lpthread - tls_so_SOURCES = tls_so.c - tls_so_DEPENDENCIES = tls2.so -@@ -334,7 +333,7 @@ if VGCONF_OS_IS_DARWIN - tls_so_LDFLAGS = -dynamic -dynamiclib -all_load -fpic - tls_so_LDADD = `pwd`/tls2.so - else -- tls_so_LDFLAGS = -Wl,-rpath,$(abs_top_builddir)/none/tests -shared -fPIC -+ tls_so_LDFLAGS = -shared -fPIC - tls_so_LDADD = tls2.so - endif - tls_so_CFLAGS = $(AM_CFLAGS) -fPIC --- -2.6.2 - diff --git a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0003-correct-include-directive-path-for-config.h.patch b/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0003-correct-include-directive-path-for-config.h.patch deleted file mode 100644 index c2965c40d..000000000 --- a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0003-correct-include-directive-path-for-config.h.patch +++ /dev/null @@ -1,45 +0,0 @@ -From ecbdea7bd8b08205f1bc3f6b72d4b4a80f313fcb Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Sat, 10 Jun 2017 01:03:17 -0700 -Subject: [PATCH 3/6] correct include directive path for config.h - -when building out of source tree, it can not find -the generated config.h otherwise - -Upstream-Status: Pending - -Signed-off-by: Khem Raj ---- - memcheck/tests/linux/syscalls-2007.c | 2 +- - memcheck/tests/linux/syslog-syscall.c | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/memcheck/tests/linux/syscalls-2007.c b/memcheck/tests/linux/syscalls-2007.c -index b61c6d5..cc3fd62 100644 ---- a/memcheck/tests/linux/syscalls-2007.c -+++ b/memcheck/tests/linux/syscalls-2007.c -@@ -10,7 +10,7 @@ - - #define _GNU_SOURCE - --#include "../../config.h" -+#include "config.h" - #include - #include - #include -diff --git a/memcheck/tests/linux/syslog-syscall.c b/memcheck/tests/linux/syslog-syscall.c -index 1143722..21e758b 100644 ---- a/memcheck/tests/linux/syslog-syscall.c -+++ b/memcheck/tests/linux/syslog-syscall.c -@@ -6,7 +6,7 @@ - * klogctl(). - */ - --#include "../../config.h" -+#include "config.h" - #include - #if defined(HAVE_SYS_KLOG_H) - #include --- -2.13.1 - diff --git a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0003-tests-seg_override-Replace-__modify_ldt-with-syscall.patch b/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0003-tests-seg_override-Replace-__modify_ldt-with-syscall.patch deleted file mode 100644 index fa1344c85..000000000 --- a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0003-tests-seg_override-Replace-__modify_ldt-with-syscall.patch +++ /dev/null @@ -1,68 +0,0 @@ -From d103475875858ab8a2e6b53ce178bb2f63883d4c Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Wed, 5 Jul 2017 17:37:56 -0700 -Subject: [PATCH 3/3] tests/seg_override: Replace __modify_ldt() with syscall() - -__modify_ldt() is specific to glibc, replacing it with syscall() -makes it more portable. - -Signed-off-by: Khem Raj ---- -Upstream-Status: Submitted - - none/tests/x86-linux/seg_override.c | 15 ++++++--------- - 1 file changed, 6 insertions(+), 9 deletions(-) - -diff --git a/none/tests/x86-linux/seg_override.c b/none/tests/x86-linux/seg_override.c -index b7619c9..c89874b 100644 ---- a/none/tests/x86-linux/seg_override.c -+++ b/none/tests/x86-linux/seg_override.c -@@ -2,6 +2,8 @@ - #include - #include - #include -+#include -+#include - - /* Stuff from Wine. */ - -@@ -52,14 +54,11 @@ inline static unsigned int wine_ldt_get_limit( const LDT_ENTRY *ent ) - /* our copy of the ldt */ - LDT_ENTRY ldt_copy[8192]; - --/* System call to set LDT entry. */ --//extern int __modify_ldt (int, struct modify_ldt_ldt_s *, size_t); --extern int __modify_ldt (int, void *, size_t); -- - void print_ldt ( void ) - { - int res; -- res = __modify_ldt( 0, ldt_copy, 8192*sizeof(LDT_ENTRY) ); -+ /* System call to set LDT entry. */ -+ res = syscall(SYS_modify_ldt, 0, ldt_copy, 8192*sizeof(LDT_ENTRY) ); - printf("got %d bytes\n", res ); - perror("error is"); - } -@@ -83,9 +82,6 @@ struct modify_ldt_ldt_s - unsigned int empty:25; - }; - --/* System call to set LDT entry. */ --//extern int __modify_ldt (int, struct modify_ldt_ldt_s *, size_t); -- - void set_ldt1 ( void* base ) - { - int stat; -@@ -102,7 +98,8 @@ void set_ldt1 ( void* base ) - ldt_entry.read_exec_only = 0; - ldt_entry.limit_in_pages = 0; - ldt_entry.seg_not_present = 0; -- stat = __modify_ldt (1, &ldt_entry, sizeof (ldt_entry)); -+ /* System call to set LDT entry. */ -+ stat = syscall(SYS_modify_ldt, 1, &ldt_entry, sizeof (ldt_entry)); - printf("stat = %d\n", stat); - } - --- -2.13.2 - diff --git a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0004-Fix-out-of-tree-builds.patch b/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0004-Fix-out-of-tree-builds.patch deleted file mode 100644 index e3b03c95c..000000000 --- a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0004-Fix-out-of-tree-builds.patch +++ /dev/null @@ -1,189 +0,0 @@ -From 739421e253e6eba3eb6438651822f80fa9c0502a Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin -Date: Tue, 15 Dec 2015 15:31:50 +0200 -Subject: [PATCH 1/2] Fix out of tree builds. - -The paths to these files need to be fully specified in -the out of tree build case. glibc-2.X.supp is a generated file so the full path -is deliberately not specified in that case. - -RP 2013/03/23 - -Upstream-Status: Pending -Signed-off-by: Alexander Kanavin - ---- - configure.ac | 68 ++++++++++++++++++++++++++++++------------------------------ - 1 file changed, 34 insertions(+), 34 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 3874296fde0b..7a5ba2c8557e 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -373,50 +373,50 @@ case "${host_os}" in - 9.*) - AC_MSG_RESULT([Darwin 9.x (${kernel}) / Mac OS X 10.5 Leopard]) - AC_DEFINE([DARWIN_VERS], DARWIN_10_5, [Darwin / Mac OS X version]) -- DEFAULT_SUPP="darwin9.supp ${DEFAULT_SUPP}" -- DEFAULT_SUPP="darwin9-drd.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/darwin9.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/darwin9-drd.supp ${DEFAULT_SUPP}" - ;; - 10.*) - AC_MSG_RESULT([Darwin 10.x (${kernel}) / Mac OS X 10.6 Snow Leopard]) - AC_DEFINE([DARWIN_VERS], DARWIN_10_6, [Darwin / Mac OS X version]) -- DEFAULT_SUPP="darwin10.supp ${DEFAULT_SUPP}" -- DEFAULT_SUPP="darwin10-drd.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/darwin10.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/darwin10-drd.supp ${DEFAULT_SUPP}" - ;; - 11.*) - AC_MSG_RESULT([Darwin 11.x (${kernel}) / Mac OS X 10.7 Lion]) - AC_DEFINE([DARWIN_VERS], DARWIN_10_7, [Darwin / Mac OS X version]) -- DEFAULT_SUPP="darwin11.supp ${DEFAULT_SUPP}" -- DEFAULT_SUPP="darwin10-drd.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/darwin11.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/darwin10-drd.supp ${DEFAULT_SUPP}" - ;; - 12.*) - AC_MSG_RESULT([Darwin 12.x (${kernel}) / Mac OS X 10.8 Mountain Lion]) - AC_DEFINE([DARWIN_VERS], DARWIN_10_8, [Darwin / Mac OS X version]) -- DEFAULT_SUPP="darwin12.supp ${DEFAULT_SUPP}" -- DEFAULT_SUPP="darwin10-drd.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/darwin12.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/darwin10-drd.supp ${DEFAULT_SUPP}" - ;; - 13.*) - AC_MSG_RESULT([Darwin 13.x (${kernel}) / Mac OS X 10.9 Mavericks]) - AC_DEFINE([DARWIN_VERS], DARWIN_10_9, [Darwin / Mac OS X version]) -- DEFAULT_SUPP="darwin13.supp ${DEFAULT_SUPP}" -- DEFAULT_SUPP="darwin10-drd.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/darwin13.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/darwin10-drd.supp ${DEFAULT_SUPP}" - ;; - 14.*) - AC_MSG_RESULT([Darwin 14.x (${kernel}) / Mac OS X 10.10 Yosemite]) - AC_DEFINE([DARWIN_VERS], DARWIN_10_10, [Darwin / Mac OS X version]) -- DEFAULT_SUPP="darwin14.supp ${DEFAULT_SUPP}" -- DEFAULT_SUPP="darwin10-drd.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/darwin14.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/darwin10-drd.supp ${DEFAULT_SUPP}" - ;; - 15.*) - AC_MSG_RESULT([Darwin 15.x (${kernel}) / Mac OS X 10.11 El Capitan]) - AC_DEFINE([DARWIN_VERS], DARWIN_10_11, [Darwin / Mac OS X version]) -- DEFAULT_SUPP="darwin15.supp ${DEFAULT_SUPP}" -- DEFAULT_SUPP="darwin10-drd.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/darwin15.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/darwin10-drd.supp ${DEFAULT_SUPP}" - ;; - 16.*) - AC_MSG_RESULT([Darwin 16.x (${kernel}) / macOS 10.12 Sierra]) - AC_DEFINE([DARWIN_VERS], DARWIN_10_12, [Darwin / Mac OS X version]) -- DEFAULT_SUPP="darwin16.supp ${DEFAULT_SUPP}" -- DEFAULT_SUPP="darwin10-drd.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/darwin16.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/darwin10-drd.supp ${DEFAULT_SUPP}" - ;; - *) - AC_MSG_RESULT([unsupported (${kernel})]) -@@ -457,10 +457,10 @@ case "${host_os}" in - uname_v=$( uname -v ) - case "$uname_v" in - 11.4.*) -- DEFAULT_SUPP="solaris12.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/solaris12.supp ${DEFAULT_SUPP}" - ;; - *) -- DEFAULT_SUPP="solaris11.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/solaris11.supp ${DEFAULT_SUPP}" - ;; - esac - ;; -@@ -468,7 +468,7 @@ case "${host_os}" in - solaris2.12*) - AC_MSG_RESULT([ok (${host_os})]) - VGCONF_OS="solaris" -- DEFAULT_SUPP="solaris12.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/solaris12.supp ${DEFAULT_SUPP}" - ;; - - *) -@@ -982,29 +982,29 @@ AC_MSG_CHECKING([the glibc version]) - case "${GLIBC_VERSION}" in - 2.2) - AC_MSG_RESULT(${GLIBC_VERSION} family) -- DEFAULT_SUPP="glibc-2.2.supp ${DEFAULT_SUPP}" -- DEFAULT_SUPP="glibc-2.2-LinuxThreads-helgrind.supp ${DEFAULT_SUPP}" -- DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/glibc-2.2.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/glibc-2.2-LinuxThreads-helgrind.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/glibc-2.X-drd.supp ${DEFAULT_SUPP}" - ;; - 2.[[3-6]]) - AC_MSG_RESULT(${GLIBC_VERSION} family) -- DEFAULT_SUPP="glibc-${GLIBC_VERSION}.supp ${DEFAULT_SUPP}" -- DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" -- DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/glibc-${GLIBC_VERSION}.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/glibc-2.X-drd.supp ${DEFAULT_SUPP}" - ;; - 2.[[7-9]]) - AC_MSG_RESULT(${GLIBC_VERSION} family) - DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}" -- DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" -- DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/glibc-2.X-drd.supp ${DEFAULT_SUPP}" - ;; - 2.10|2.11) - AC_MSG_RESULT(${GLIBC_VERSION} family) - AC_DEFINE([GLIBC_MANDATORY_STRLEN_REDIRECT], 1, - [Define to 1 if strlen() has been optimized heavily (amd64 glibc >= 2.10)]) - DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}" -- DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" -- DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/glibc-2.X-drd.supp ${DEFAULT_SUPP}" - ;; - 2.*) - AC_MSG_RESULT(${GLIBC_VERSION} family) -@@ -1013,8 +1013,8 @@ case "${GLIBC_VERSION}" in - AC_DEFINE([GLIBC_MANDATORY_INDEX_AND_STRLEN_REDIRECT], 1, - [Define to 1 if index() and strlen() have been optimized heavily (x86 glibc >= 2.12)]) - DEFAULT_SUPP="glibc-2.X.supp ${DEFAULT_SUPP}" -- DEFAULT_SUPP="glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" -- DEFAULT_SUPP="glibc-2.X-drd.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/glibc-2.34567-NPTL-helgrind.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/glibc-2.X-drd.supp ${DEFAULT_SUPP}" - ;; - darwin) - AC_MSG_RESULT(Darwin) -@@ -1024,7 +1024,7 @@ case "${GLIBC_VERSION}" in - bionic) - AC_MSG_RESULT(Bionic) - AC_DEFINE([BIONIC_LIBC], 1, [Define to 1 if you're using Bionic]) -- DEFAULT_SUPP="bionic.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/bionic.supp ${DEFAULT_SUPP}" - ;; - solaris) - AC_MSG_RESULT(Solaris) -@@ -1051,11 +1051,11 @@ if test "$VGCONF_OS" != "solaris"; then - # attempt to detect whether such libraries are installed on the - # build machine (or even if any X facilities are present); just - # add the suppressions antidisirregardless. -- DEFAULT_SUPP="xfree-4.supp ${DEFAULT_SUPP}" -- DEFAULT_SUPP="xfree-3.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/xfree-4.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/xfree-3.supp ${DEFAULT_SUPP}" - - # Add glibc and X11 suppressions for exp-sgcheck -- DEFAULT_SUPP="exp-sgcheck.supp ${DEFAULT_SUPP}" -+ DEFAULT_SUPP="$srcdir/exp-sgcheck.supp ${DEFAULT_SUPP}" - fi - - --- -2.13.2.3.g44cd85c14 - diff --git a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0004-pth_atfork1.c-Define-error-API-for-musl.patch b/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0004-pth_atfork1.c-Define-error-API-for-musl.patch deleted file mode 100644 index 1cb706254..000000000 --- a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0004-pth_atfork1.c-Define-error-API-for-musl.patch +++ /dev/null @@ -1,37 +0,0 @@ -From fb77fef4f866dac7bcc6d1ae025da60564869f84 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Sat, 10 Jun 2017 01:06:11 -0700 -Subject: [PATCH 4/6] pth_atfork1.c: Define error() API for musl - -Upstream-Status: Pending - -Signed-off-by: Khem Raj ---- - none/tests/pth_atfork1.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/none/tests/pth_atfork1.c b/none/tests/pth_atfork1.c -index 34201ef..b7f5f2d 100644 ---- a/none/tests/pth_atfork1.c -+++ b/none/tests/pth_atfork1.c -@@ -18,7 +18,7 @@ - Boston, MA 02111-1307, USA. */ - - #include --#if !defined(__APPLE__) && !defined(__sun) -+#if !defined(__APPLE__) && !defined(__sun) && defined(__GLIBC__) - # include - #endif - #include -@@ -27,7 +27,7 @@ - #include - #include - --#if defined(__APPLE__) || defined(__sun) -+#if defined(__APPLE__) || defined(__sun) || (defined(__linux__) && !defined(__GLIBC__)) - #include /* strerror */ - static void error (int status, int errnum, char* msg) - { --- -2.13.1 - diff --git a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0005-Modify-vg_test-wrapper-to-support-PTEST-formats.patch b/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0005-Modify-vg_test-wrapper-to-support-PTEST-formats.patch deleted file mode 100644 index 7985308e4..000000000 --- a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0005-Modify-vg_test-wrapper-to-support-PTEST-formats.patch +++ /dev/null @@ -1,252 +0,0 @@ -From f49f27f1bc67d07440b0ac9a7d767a8ea1589bfe Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin -Date: Tue, 15 Dec 2015 15:50:44 +0200 -Subject: [PATCH 5/5] Modify vg_test wrapper to support PTEST formats - -Change the valgrind regression test script vg_regtest to -support the yocto ptest stdout reporting format. The commit adds -'--yocto-ptest' as an optional argument to vg_regtest, which alters -the output to use the ptest infrastructure reporting format: - "[PASS|SKIP|FAIL]: testname" -instead of valgrind's internal test reporting format. Without the added -option, --yocto-ptest, the valgrind regression test output is unchanged. - -Enforce 30 seconds limit for the test. -This resume execution of the remaining tests when valgrind hangs. - -Upstream-Status: Pending - -Signed-off-by: Dave Lerner -Signed-off-by: Tudor Florea -Signed-off-by: Alexander Kanavin ---- - tests/vg_regtest.in | 75 +++++++++++++++++++++++++++++++++++++++-------------- - 1 file changed, 55 insertions(+), 20 deletions(-) - -diff --git a/tests/vg_regtest.in b/tests/vg_regtest.in -index a441f42..cb05b52 100755 ---- a/tests/vg_regtest.in -+++ b/tests/vg_regtest.in -@@ -47,6 +47,7 @@ - # --loop-till-fail: loops on the test(s) till one fail, then exit - # This is useful to obtain detailed trace or --keep-unfiltered - # output of a non deterministic test failure -+# --yocto-ptest: output in yocto ptest format - # - # The easiest way is to run all tests in valgrind/ with (assuming you installed - # in $PREFIX): -@@ -139,7 +140,7 @@ my $usage="\n" - . "Usage:\n" - . " vg_regtest [--all, --valgrind, --valgrind-lib, --keep-unfiltered\n" - . " --outer-valgrind, --outer-tool, --outer-args\n" -- . " --loop-till-fail]\n" -+ . " --loop-till-fail, --yocto-ptest]\n" - . " Use EXTRA_REGTEST_OPTS to supply extra args for all tests\n" - . "\n"; - -@@ -186,6 +187,7 @@ my $outer_args; - my $valgrind_lib = "$tests_dir/.in_place"; - my $keepunfiltered = 0; - my $looptillfail = 0; -+my $yoctoptest = 0; - - # default filter is the one named "filter_stderr" in the test's directory - my $default_stderr_filter = "filter_stderr"; -@@ -244,6 +246,8 @@ sub process_command_line() - $keepunfiltered = 1; - } elsif ($arg =~ /^--loop-till-fail$/) { - $looptillfail = 1; -+ } elsif ($arg =~ /^--yocto-ptest$/) { -+ $yoctoptest = 1; - } else { - die $usage; - } -@@ -365,13 +369,28 @@ sub read_vgtest_file($) - #---------------------------------------------------------------------------- - # Since most of the program time is spent in system() calls, need this to - # propagate a Ctrl-C enabling us to quit. --sub mysystem($) -+# Enforce 30 seconds limit for the test. -+# This resume execution of the remaining tests if valgrind hangs. -+sub mysystem($) - { -- my $exit_code = system($_[0]); -- ($exit_code == 2) and exit 1; # 2 is SIGINT -- return $exit_code; -+ my $exit_code=0; -+ eval { -+ local $SIG{'ALRM'} = sub { die "timed out\n" }; -+ alarm(30); -+ $exit_code = system($_[0]); -+ alarm (0); -+ ($exit_code == 2) and die "SIGINT\n"; # 2 is SIGINT -+ }; -+ if ($@) { -+ if ($@ eq "timed out\n") { -+ print "timed out\n"; -+ return 1; -+ } -+ if ($@ eq "SIGINT\n") { -+ exit 1; -+ } -+ } - } -- - # if $keepunfiltered, copies $1 to $1.unfiltered.out - # renames $0 tp $1 - sub filtered_rename($$) -@@ -419,23 +438,25 @@ sub do_diffs($$$$) - # A match; remove .out and any previously created .diff files. - unlink("$name.$mid.out"); - unlink(<$name.$mid.diff*>); -- return; -+ return 0; - } - } - } - # If we reach here, none of the .exp files matched. -- print "*** $name failed ($mid) ***\n"; -+ print "*** $name failed ($mid) ***\n" if ($yoctoptest == 0) ; - push(@failures, sprintf("%-40s ($mid)", "$fullname")); - $num_failures{$mid}++; - if ($looptillfail == 1) { - print "Failure encountered, stopping to loop\n"; - exit 1 - } -+ return 1; - } - - sub do_one_test($$) - { - my ($dir, $vgtest) = @_; -+ my $diffStatus = 0; - $vgtest =~ /^(.*)\.vgtest/; - my $name = $1; - my $fullname = "$dir/$name"; -@@ -454,7 +475,11 @@ sub do_one_test($$) - } elsif (256 == $prereq_res) { - # Nb: weird Perl-ism -- exit code of '1' is seen by Perl as 256... - # Prereq failed, skip. -- printf("%-16s (skipping, prereq failed: $prereq)\n", "$name:"); -+ if ($yoctoptest == 0) { -+ printf("%-16s (skipping, prereq failed: $prereq)\n", "$name:"); -+ } else { -+ printf("SKIP: $fullname\n"); -+ } - return; - } else { - # Bad prereq; abort. -@@ -472,7 +497,7 @@ sub do_one_test($$) - } - # If there is a progB, let's start it in background: - printf("%-16s valgrind $extraopts $vgopts $prog $args (progB: $progB $argsB)\n", -- "$name:"); -+ "$name:") if ($yoctoptest == 0); - # progB.done used to detect child has finished. See below. - # Note: redirection of stdout and stderr is before $progB to allow argsB - # to e.g. redirect stdoutB to stderrB -@@ -488,7 +513,8 @@ sub do_one_test($$) - . "touch progB.done) &"); - } - } else { -- printf("%-16s valgrind $extraopts $vgopts $prog $args\n", "$name:"); -+ printf("%-16s valgrind $extraopts $vgopts $prog $args\n", "$name:") -+ if ($yoctoptest == 0); - } - - # Collect environment variables, if any. -@@ -529,7 +555,7 @@ sub do_one_test($$) - # Find all the .stdout.exp files. If none, use /dev/null. - my @stdout_exps = <$name.stdout.exp*>; - @stdout_exps = ( "/dev/null" ) if (0 == scalar @stdout_exps); -- do_diffs($fullname, $name, "stdout", \@stdout_exps); -+ $diffStatus |= do_diffs($fullname, $name, "stdout", \@stdout_exps); - - # Filter stderr - $stderr_filter_args = $name if (! defined $stderr_filter_args); -@@ -538,7 +564,7 @@ sub do_one_test($$) - # Find all the .stderr.exp files. At least one must exist. - my @stderr_exps = <$name.stderr.exp*>; - (0 != scalar @stderr_exps) or die "Could not find `$name.stderr.exp*'\n"; -- do_diffs($fullname, $name, "stderr", \@stderr_exps); -+ $diffStatus |= do_diffs($fullname, $name, "stderr", \@stderr_exps); - - if (defined $progB) { - # wait for the child to be finished -@@ -562,7 +588,7 @@ sub do_one_test($$) - # Find all the .stdoutB.exp files. If none, use /dev/null. - my @stdoutB_exps = <$name.stdoutB.exp*>; - @stdoutB_exps = ( "/dev/null" ) if (0 == scalar @stdoutB_exps); -- do_diffs($fullname, $name, "stdoutB", \@stdoutB_exps); -+ $diffStatus |= do_diffs($fullname, $name, "stdoutB", \@stdoutB_exps); - - # Filter stderr - $stderrB_filter_args = $name if (! defined $stderrB_filter_args); -@@ -571,7 +597,7 @@ sub do_one_test($$) - # Find all the .stderrB.exp files. At least one must exist. - my @stderrB_exps = <$name.stderrB.exp*>; - (0 != scalar @stderrB_exps) or die "Could not find `$name.stderrB.exp*'\n"; -- do_diffs($fullname, $name, "stderrB", \@stderrB_exps); -+ $diffStatus |= do_diffs($fullname, $name, "stderrB", \@stderrB_exps); - } - - # Maybe do post-test check -@@ -583,7 +609,7 @@ sub do_one_test($$) - # Find all the .post.exp files. If none, use /dev/null. - my @post_exps = <$name.post.exp*>; - @post_exps = ( "/dev/null" ) if (0 == scalar @post_exps); -- do_diffs($fullname, $name, "post", \@post_exps); -+ $diffStatus |= do_diffs($fullname, $name, "post", \@post_exps); - } - } - -@@ -592,6 +618,13 @@ sub do_one_test($$) - print("(cleanup operation failed: $cleanup)\n"); - } - -+ if ($yoctoptest == 1) { -+ if ($diffStatus == 0) { -+ print("PASS: $fullname\n"); -+ } else { -+ print("FAIL: $fullname\n"); -+ } -+ } - $num_tests_done++; - } - -@@ -631,7 +664,7 @@ sub test_one_dir($$) - my $found_tests = (0 != (grep { $_ =~ /\.vgtest$/ } @fs)); - - if ($found_tests) { -- print "-- Running tests in $full_dir $dashes\n"; -+ print "-- Running tests in $full_dir $dashes\n" if ($yoctoptest == 0); - } - foreach my $f (@fs) { - if (-d $f) { -@@ -641,7 +674,7 @@ sub test_one_dir($$) - } - } - if ($found_tests) { -- print "-- Finished tests in $full_dir $dashes\n"; -+ print "-- Finished tests in $full_dir $dashes\n" if ($yoctoptest == 0); - } - - chdir(".."); -@@ -667,10 +700,12 @@ sub summarise_results - $num_failures{"stdout"}, plural($num_failures{"stdout"}), - $num_failures{"stderrB"}, plural($num_failures{"stderrB"}), - $num_failures{"stdoutB"}, plural($num_failures{"stdoutB"}), -- $num_failures{"post"}, plural($num_failures{"post"})); -+ $num_failures{"post"}, plural($num_failures{"post"})) -+ if ($yoctoptest == 0); - - foreach my $failure (@failures) { -- print "$failure\n"; -+ print "$failure\n" -+ if ($yoctoptest == 0); - } - print "\n"; - } --- -2.6.2 - diff --git a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0005-tc20_verifywrap.c-Fake-__GLIBC_PREREQ-with-musl.patch b/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0005-tc20_verifywrap.c-Fake-__GLIBC_PREREQ-with-musl.patch deleted file mode 100644 index 6176640e4..000000000 --- a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0005-tc20_verifywrap.c-Fake-__GLIBC_PREREQ-with-musl.patch +++ /dev/null @@ -1,30 +0,0 @@ -From b4b9f072c22f96844e02cb9d68f7ff2408680817 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Sat, 10 Jun 2017 01:07:59 -0700 -Subject: [PATCH 5/6] tc20_verifywrap.c: Fake __GLIBC_PREREQ with musl - -similar to sun - -Upstream-Status: Pending - -Signed-off-by: Khem Raj ---- - helgrind/tests/tc20_verifywrap.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/helgrind/tests/tc20_verifywrap.c b/helgrind/tests/tc20_verifywrap.c -index c110000..a311a49 100644 ---- a/helgrind/tests/tc20_verifywrap.c -+++ b/helgrind/tests/tc20_verifywrap.c -@@ -20,7 +20,7 @@ - - #if !defined(__APPLE__) - --#if defined(__sun__) -+#if defined(__sun__) || (defined(__linux__) && !defined(__GLIBC__)) - /* Fake __GLIBC_PREREQ on Solaris. Pretend glibc >= 2.4. */ - # define __GLIBC_PREREQ - #else --- -2.13.1 - diff --git a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0006-pth_detached3.c-Dereference-pthread_t-before-adding-.patch b/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0006-pth_detached3.c-Dereference-pthread_t-before-adding-.patch deleted file mode 100644 index 05886c743..000000000 --- a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/0006-pth_detached3.c-Dereference-pthread_t-before-adding-.patch +++ /dev/null @@ -1,32 +0,0 @@ -From a6547fc17c120dbd95b852f50b0c4bdee4fedb9a Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Sat, 10 Jun 2017 01:20:32 -0700 -Subject: [PATCH 6/6] pth_detached3.c: Dereference pthread_t before adding - offset to it - -Fixes -error: invalid use of undefined type 'struct __pthread' - -Upstream-Status: Pending - -Signed-off-by: Khem Raj ---- - drd/tests/pth_detached3.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/drd/tests/pth_detached3.c b/drd/tests/pth_detached3.c -index c02eef1..35d43a6 100644 ---- a/drd/tests/pth_detached3.c -+++ b/drd/tests/pth_detached3.c -@@ -21,7 +21,7 @@ int main(int argc, char** argv) - pthread_detach(thread); - - /* Invoke pthread_detach() with an invalid thread ID. */ -- pthread_detach(thread + 8); -+ pthread_detach((pthread_t*)(&thread + 8)); - - fprintf(stderr, "Finished.\n"); - --- -2.13.1 - diff --git a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/Added-support-for-PPC-instructions-mfatbu-mfatbl.patch b/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/Added-support-for-PPC-instructions-mfatbu-mfatbl.patch deleted file mode 100644 index 07774f38a..000000000 --- a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/Added-support-for-PPC-instructions-mfatbu-mfatbl.patch +++ /dev/null @@ -1,96 +0,0 @@ -From 0bf4b0ac18d1ea41b32ad781d214b295ca1998f3 Mon Sep 17 00:00:00 2001 -From: Aneesh Bansal -Date: Mon, 21 Nov 2011 17:31:39 +0530 -Subject: [PATCH] Added support for PPC instructions mfatbu, mfatbl. - -Upstream-Status: Pending - -Signed-off-by: Aneesh Bansal ---- -Currently Valgrind 3.7.0 does not have support for PPC instructions mfatbu and mfatbl. When we run a USDPAA application with VALGRIND, the following error is given by valgrind : -dis_proc_ctl(ppc)(mfspr,SPR)(0x20F) -disInstr(ppc): unhandled instruction: 0x7C0F82A6 - - - VEX/priv/guest_ppc_defs.h | 2 ++ - VEX/priv/guest_ppc_helpers.c | 18 ++++++++++++++++++ - VEX/priv/guest_ppc_toIR.c | 22 ++++++++++++++++++++++ - 3 files changed, 42 insertions(+), 0 deletions(-) - -diff --git a/VEX/priv/guest_ppc_defs.h b/VEX/priv/guest_ppc_defs.h -index dd3c62e..11a34aa 100644 ---- a/VEX/priv/guest_ppc_defs.h -+++ b/VEX/priv/guest_ppc_defs.h -@@ -146,6 +146,8 @@ extern UInt ppc32g_dirtyhelper_MFSPR_268_269 ( UInt ); - - extern UInt ppc32g_dirtyhelper_MFSPR_287 ( void ); - -+extern UInt ppc32g_dirtyhelper_MFSPR_526_527 ( UInt ); -+ - extern void ppc32g_dirtyhelper_LVS ( VexGuestPPC32State* gst, - UInt vD_idx, UInt sh, - UInt shift_right ); -diff --git a/VEX/priv/guest_ppc_helpers.c b/VEX/priv/guest_ppc_helpers.c -index 11aa428..b49ea3f 100644 ---- a/VEX/priv/guest_ppc_helpers.c -+++ b/VEX/priv/guest_ppc_helpers.c -@@ -119,6 +119,24 @@ UInt ppc32g_dirtyhelper_MFSPR_287 ( void ) - # endif - } - -+/* CALLED FROM GENERATED CODE */ -+/* DIRTY HELPER (non-referentially transparent) */ -+UInt ppc32g_dirtyhelper_MFSPR_526_527 ( UInt r527 ) -+{ -+# if defined(__powerpc__) || defined(_AIX) -+ UInt spr; -+ if (r527) { -+ __asm__ __volatile__("mfspr %0,527" : "=b"(spr)); -+ } else { -+ __asm__ __volatile__("mfspr %0,526" : "=b"(spr)); -+ } -+ return spr; -+# else -+ return 0; -+# endif -+} -+ -+ - - /* CALLED FROM GENERATED CODE */ - /* DIRTY HELPER (reads guest state, writes guest mem) */ -diff --git a/VEX/priv/guest_ppc_toIR.c b/VEX/priv/guest_ppc_toIR.c -index f8d220d..37c8974 100644 ---- a/VEX/priv/guest_ppc_toIR.c -+++ b/VEX/priv/guest_ppc_toIR.c -@@ -5657,6 +5657,28 @@ static Bool dis_proc_ctl ( VexAbiInfo* vbi, UInt theInstr ) - break; - } - -+ -+ case 526 /* 0x20E */: -+ case 527 /* 0x20F */: { -+ UInt arg = SPR==526 ? 0 : 1; -+ IRTemp val = newTemp(Ity_I32); -+ IRExpr** args = mkIRExprVec_1( mkU32(arg) ); -+ IRDirty* d = unsafeIRDirty_1_N( -+ val, -+ 0/*regparms*/, -+ "ppc32g_dirtyhelper_MFSPR_526_527", -+ fnptr_to_fnentry -+ (vbi, &ppc32g_dirtyhelper_MFSPR_526_527), -+ args -+ ); -+ /* execute the dirty call, dumping the result in val. */ -+ stmt( IRStmt_Dirty(d) ); -+ putIReg( rD_addr, -+ mkWidenFrom32(ty, mkexpr(val), False/*unsigned*/) ); -+ DIP("mfspr r%u,%u", rD_addr, (UInt)SPR); -+ break; -+ } -+ - default: - vex_printf("dis_proc_ctl(ppc)(mfspr,SPR)(0x%x)\n", SPR); - return False; --- -1.7.0.4 diff --git a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/avoid-neon-for-targets-which-don-t-support-it.patch b/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/avoid-neon-for-targets-which-don-t-support-it.patch deleted file mode 100644 index 5fcfec001..000000000 --- a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/avoid-neon-for-targets-which-don-t-support-it.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 8facc29c3c56e6cf9cfef70986cf73876044a3fb Mon Sep 17 00:00:00 2001 -From: Andre McCurdy -Date: Tue, 19 Jan 2016 16:42:36 -0800 -Subject: [PATCH] avoid neon for targets which don't support it - -The sh-mem-random.c test app tries to use neon loads and stores to -test 64-bit float copies when building for ARM. Allow it to do so if -possible, but fallback to C when building for ARM targets which don't -support neon. - -Upstream-Status: Pending - -Signed-off-by: Andre McCurdy ---- - memcheck/tests/sh-mem-random.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/memcheck/tests/sh-mem-random.c b/memcheck/tests/sh-mem-random.c -index ae82248..816e139 100644 ---- a/memcheck/tests/sh-mem-random.c -+++ b/memcheck/tests/sh-mem-random.c -@@ -191,7 +191,7 @@ void do_test_at ( U1* arr ) - "emms" - : : "r"(arr+dst), "r"(arr+src) : "memory" - ); --#elif defined(__linux__) && defined(__arm__) && !defined(__aarch64__) -+#elif defined(__linux__) && defined(__arm__) && defined(__ARM_NEON__) && !defined(__aarch64__) - /* On arm32, many compilers generate a 64-bit float move - using two 32 bit integer registers, which completely - defeats this test. Hence force a 64-bit NEON load and --- -1.9.1 - diff --git a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/fixed-perl-path.patch b/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/fixed-perl-path.patch deleted file mode 100644 index b431d3356..000000000 --- a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/fixed-perl-path.patch +++ /dev/null @@ -1,78 +0,0 @@ -From 67e7a690107efb16d6d5aebfe420b64a552accdf Mon Sep 17 00:00:00 2001 -From: Qing He -Date: Tue, 31 Aug 2010 22:51:58 +0800 -Subject: [PATCH] valgrind: fix perl scripts - -this is a temporary patch to workaround cross compilation. -otherwise @PERL@ will be replaced to perl-native binary, -this creates unusable scripts and fails FILERDEPENDS mechanism -(esp. rpm) - -a better fix would need: - 1. configure.ac should differentiate PERL and HOSTPERL - 2. optionally remove ${STAGING_DIR} in #! line before do_install - -8/31/2010 - created by Qing He - -Upstream-Status: Inappropriate [configuration] - -Signed-off-by: Maxin B. John ---- - cachegrind/cg_annotate.in | 2 +- - cachegrind/cg_diff.in | 2 +- - massif/ms_print.in | 2 +- - perf/vg_perf.in | 2 +- - 4 files changed, 4 insertions(+), 4 deletions(-) - -diff --git a/cachegrind/cg_annotate.in b/cachegrind/cg_annotate.in -index 69365e8..978265d 100644 ---- a/cachegrind/cg_annotate.in -+++ b/cachegrind/cg_annotate.in -@@ -1,4 +1,4 @@ --#! @PERL@ -+#! /usr/bin/perl - - ##--------------------------------------------------------------------## - ##--- Cachegrind's annotator. cg_annotate.in ---## -diff --git a/cachegrind/cg_diff.in b/cachegrind/cg_diff.in -index 395460b..05873cc 100755 ---- a/cachegrind/cg_diff.in -+++ b/cachegrind/cg_diff.in -@@ -1,4 +1,4 @@ --#! @PERL@ -+#! /usr/bin/perl - - ##--------------------------------------------------------------------## - ##--- Cachegrind's differencer. cg_diff.in ---## -diff --git a/massif/ms_print.in b/massif/ms_print.in -index e6fae89..3b85b40 100755 ---- a/massif/ms_print.in -+++ b/massif/ms_print.in -@@ -1,4 +1,4 @@ --#! @PERL@ -+#! /usr/bin/perl - - ##--------------------------------------------------------------------## - ##--- Massif's results printer ms_print.in ---## -diff --git a/perf/vg_perf.in b/perf/vg_perf.in -index 7a80cb0..28f6156 100644 ---- a/perf/vg_perf.in -+++ b/perf/vg_perf.in -@@ -1,4 +1,4 @@ --#! @PERL@ -+#! /usr/bin/perl - ##--------------------------------------------------------------------## - ##--- Valgrind performance testing script vg_perf ---## - ##--------------------------------------------------------------------## -diff --git a/tests/vg_regtest.in b/tests/vg_regtest.in -index cb05b52..032e947 100755 ---- a/tests/vg_regtest.in -+++ b/tests/vg_regtest.in -@@ -1,4 +1,4 @@ --#! @PERL@ -+#! /usr/bin/perl - ##--------------------------------------------------------------------## - ##--- Valgrind regression testing script vg_regtest ---## - ##--------------------------------------------------------------------## ---- -2.4.0 diff --git a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/link-gz-tests.patch b/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/link-gz-tests.patch deleted file mode 100644 index db322398c..000000000 --- a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/link-gz-tests.patch +++ /dev/null @@ -1,27 +0,0 @@ -When checking if the compiler supports compressed debug sections we need to -actually link instead of just compile. Otherwise the compiler thinks that -they are supported, but gold does not support -gz=zlib. - -Upstream-Status: Backport (r16459) -Signed-off-by: Ross Burton - ---- a/configure.ac~ 2017-07-11 11:53:16.000000000 +0100 -+++ b/configure.ac 2017-07-11 18:16:13.674130483 +0100 -@@ -2119,7 +2119,7 @@ - safe_CFLAGS=$CFLAGS - CFLAGS="-g -gz=zlib" - --AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ ]], [[ -+AC_LINK_IFELSE([AC_LANG_PROGRAM([[ ]], [[ - return 0; - ]])], [ - ac_have_gz_zlib=yes -@@ -2139,7 +2139,7 @@ - safe_CFLAGS=$CFLAGS - CFLAGS="-g -gz=zlib-gnu" - --AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ ]], [[ -+AC_LINK_IFELSE([AC_LANG_PROGRAM([[ ]], [[ - return 0; - ]])], [ - ac_have_gz_zlib_gnu=yes diff --git a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/ppc-headers.patch b/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/ppc-headers.patch deleted file mode 100644 index 51259db00..000000000 --- a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/ppc-headers.patch +++ /dev/null @@ -1,87 +0,0 @@ -Backport a patch from upstream to fix test compilation for PPC where -system headers don't get included. - -Upstream-Status: Backport -Signed-off-by: Ross Burton - -r16450 | mjw | 2017-06-16 10:33:35 +0100 (Fri, 16 Jun 2017) | 7 lines - -ppc64 doesn't compile test_isa_2_06_partx.c without VSX support - -The #ifdef HAS_VSX guard is wrongly placed. It makes the standard -include headers not be used. Causing a build failure. Fix by moving -the #ifdef HAS_VSX after the standard includes. - -Index: none/tests/ppc32/test_isa_2_06_part3.c -=================================================================== ---- a/none/tests/ppc32/test_isa_2_06_part3.c (revision 16449) -+++ b/none/tests/ppc32/test_isa_2_06_part3.c (revision 16450) -@@ -20,17 +20,18 @@ - The GNU General Public License is contained in the file COPYING. - */ - --#ifdef HAS_VSX -- - #include - #include - #include - #include - #include --#include - #include - #include // getopt - -+#ifdef HAS_VSX -+ -+#include -+ - #ifndef __powerpc64__ - typedef uint32_t HWord_t; - #else -Index: none/tests/ppc32/test_isa_2_06_part1.c -=================================================================== ---- a/none/tests/ppc32/test_isa_2_06_part1.c (revision 16449) -+++ b/none/tests/ppc32/test_isa_2_06_part1.c (revision 16450) -@@ -20,13 +20,14 @@ - The GNU General Public License is contained in the file COPYING. - */ - --#ifdef HAS_VSX -- - #include - #include - #include - #include - #include -+ -+#ifdef HAS_VSX -+ - #include - - #ifndef __powerpc64__ -Index: none/tests/ppc32/test_isa_2_06_part2.c -=================================================================== ---- a/none/tests/ppc32/test_isa_2_06_part2.c (revision 16449) -+++ b/none/tests/ppc32/test_isa_2_06_part2.c (revision 16450) -@@ -20,17 +20,18 @@ - The GNU General Public License is contained in the file COPYING. - */ - --#ifdef HAS_VSX -- - #include - #include - #include - #include - #include --#include - #include - #include // getopt - -+#ifdef HAS_VSX -+ -+#include -+ - #ifndef __powerpc64__ - typedef uint32_t HWord_t; - #else diff --git a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/run-ptest b/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/run-ptest deleted file mode 100755 index 447d33c8c..000000000 --- a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/run-ptest +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh - -# run-ptest - 'ptest' test infrastructure shell script that -# wraps the valgrind regression script vg_regtest. -# -# Dave Lerner -############################################################### -VALGRINDLIB=@libdir@/valgrind -LOG="${VALGRINDLIB}/ptest/valgrind_ptest_$(date +%Y%m%d-%H%M%S).log" - -cd ${VALGRINDLIB}/ptest && ./tests/vg_regtest --all \ - --valgrind=/usr/bin/valgrind --valgrind-lib=$VALGRINDLIB \ - --yocto-ptest 2>&1|tee ${LOG} - -passed=`grep PASS: ${LOG}|wc -l` -failed=`grep FAIL: ${LOG}|wc -l` -skipped=`grep SKIP: ${LOG}|wc -l` -all=$((passed + failed + skipped)) - -( echo "=== Test Summary ===" - echo "TOTAL: ${all}" - echo "PASSED: ${passed}" - echo "FAILED: ${failed}" - echo "SKIPPED: ${skipped}" -) | tee -a /${LOG} diff --git a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/use-appropriate-march-mcpu-mfpu-for-ARM-test-apps.patch b/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/use-appropriate-march-mcpu-mfpu-for-ARM-test-apps.patch deleted file mode 100644 index adea40521..000000000 --- a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/use-appropriate-march-mcpu-mfpu-for-ARM-test-apps.patch +++ /dev/null @@ -1,44 +0,0 @@ -From d134dafc2f11e0d247420a0ba360bcdef77b4093 Mon Sep 17 00:00:00 2001 -From: Andre McCurdy -Date: Tue, 19 Jan 2016 16:00:00 -0800 -Subject: [PATCH] use appropriate -march/-mcpu/-mfpu for ARM test apps - -Ensure that test apps in none/tests/arm are compiled with appropriate --march/-mcpu/-mfpu flags to support the instructions being tested. -The aim is to build all tests, even ones which may not run correctly -on all target CPUs. - -For tests requiring armv7ve instructions, ensure that we set both --march=armv7ve and -mcpu=cortex-a15 (since some TUNE_CCARGS may set --march=armv7-a and adding -mcpu=cortex-a15 alone is not enough to -over-ride that). - -See similar cases in none/tests/arm/Makefile.am - -Upstream-Status: Pending - -Signed-off-by: Andre McCurdy ---- - none/tests/arm/Makefile.am | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -diff --git a/none/tests/arm/Makefile.am b/none/tests/arm/Makefile.am -index 4507a20..825290f 100644 ---- a/none/tests/arm/Makefile.am -+++ b/none/tests/arm/Makefile.am -@@ -62,8 +62,10 @@ neon64_CFLAGS = $(AM_CFLAGS) -g -O0 -mcpu=cortex-a8 \ - -mfpu=neon \ - -mthumb - --intdiv_CFLAGS = $(AM_CFLAGS) -g -mcpu=cortex-a15 -mthumb -+intdiv_CFLAGS = $(AM_CFLAGS) -g -march=armv7ve -mcpu=cortex-a15 -mthumb - ldrt_CFLAGS = $(AM_CFLAGS) -g -mcpu=cortex-a8 -mthumb - ldrt_arm_CFLAGS = $(AM_CFLAGS) -g -mcpu=cortex-a8 -marm - --vfpv4_fma_CFLAGS = $(AM_CFLAGS) -g -O0 -mcpu=cortex-a15 -mfpu=vfpv4 -marm -+vcvt_fixed_float_VFP_CFLAGS = $(AM_CFLAGS) -g -mcpu=cortex-a8 -mfpu=vfpv3 -+ -+vfpv4_fma_CFLAGS = $(AM_CFLAGS) -g -O0 -march=armv7ve -mcpu=cortex-a15 -mfpu=vfpv4 -marm --- -1.9.1 - diff --git a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/valgrind-make-ld-XXX.so-strlen-intercept-optional.patch b/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/valgrind-make-ld-XXX.so-strlen-intercept-optional.patch deleted file mode 100644 index d04297dca..000000000 --- a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind/valgrind-make-ld-XXX.so-strlen-intercept-optional.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 005bd11809a1ce65e9f2c28e884354a4741650b9 Mon Sep 17 00:00:00 2001 -From: Andre McCurdy -Date: Tue, 13 Dec 2016 11:29:55 +0800 -Subject: [PATCH] make ld-XXX.so strlen intercept optional - -Hack: Depending on how glibc was compiled (e.g. optimised for size or -built with _FORTIFY_SOURCE enabled) the strlen symbol might not be -found in ld-XXX.so. Therefore although we should still try to -intercept it, don't make it mandatory to do so. - -Upstream-Status: Inappropriate - -Signed-off-by: Andre McCurdy -Signed-off-by: Jackie Huang ---- - coregrind/m_redir.c | 13 ++++++++++++- - 1 file changed, 12 insertions(+), 1 deletion(-) - -diff --git a/coregrind/m_redir.c b/coregrind/m_redir.c -index ff35009..d7d6816 100644 ---- a/coregrind/m_redir.c -+++ b/coregrind/m_redir.c -@@ -1275,7 +1275,18 @@ static void add_hardwired_spec (const HChar* sopatt, const HChar* fnpatt, - spec->to_addr = to_addr; - spec->isWrap = False; - spec->isGlobal = False; -- spec->mandatory = mandatory; -+ -+ /* Hack: Depending on how glibc was compiled (e.g. optimised for size or -+ built with _FORTIFY_SOURCE enabled) the strlen symbol might not be found. -+ Therefore although we should still try to intercept it, don't make it -+ mandatory to do so. We over-ride "mandatory" here to avoid the need to -+ patch the many different architecture specific callers to -+ add_hardwired_spec(). */ -+ if (0==VG_(strcmp)("strlen", fnpatt)) -+ spec->mandatory = NULL; -+ else -+ spec->mandatory = mandatory; -+ - /* VARIABLE PARTS */ - spec->mark = False; /* not significant */ - spec->done = False; /* not significant */ --- -1.9.1 - diff --git a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind_git.bb b/meta-agl-profile-core/recipes-devtools/valgrind/valgrind_git.bb deleted file mode 100644 index 351499782..000000000 --- a/meta-agl-profile-core/recipes-devtools/valgrind/valgrind_git.bb +++ /dev/null @@ -1,158 +0,0 @@ -SUMMARY = "Valgrind memory debugger and instrumentation framework" -HOMEPAGE = "http://valgrind.org/" -BUGTRACKER = "http://valgrind.org/support/bug_reports.html" -LICENSE = "GPLv2 & GPLv2+ & BSD" -LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://include/pub_tool_basics.h;beginline=6;endline=29;md5=d4de0407239381463cf01dd276d7c22e \ - file://include/valgrind.h;beginline=1;endline=56;md5=ad3b317f3286b6b704575d9efe6ca5df \ - file://COPYING.DOCS;md5=24ea4c7092233849b4394699333b5c56" - -X11DEPENDS = "virtual/libx11" -DEPENDS = "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '${X11DEPENDS}', '', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 'boost', '', d)} \ - " -SRC_URI = "git://sourceware.org/git/valgrind.git;protocol=git;branch=master" -SRCREV = "2b0aa0a5b88f900e986a3360952fcb3d2513419d" -S = "${WORKDIR}/git" - -# -# - -SRC_URI += " \ - file://fixed-perl-path.patch \ - file://Added-support-for-PPC-instructions-mfatbu-mfatbl.patch \ - file://run-ptest \ - file://0002-remove-rpath.patch \ - file://0004-Fix-out-of-tree-builds.patch \ - file://0005-Modify-vg_test-wrapper-to-support-PTEST-formats.patch \ - file://0001-Remove-tests-that-fail-to-build-on-some-PPC32-config.patch \ - file://use-appropriate-march-mcpu-mfpu-for-ARM-test-apps.patch \ - file://avoid-neon-for-targets-which-don-t-support-it.patch \ - file://valgrind-make-ld-XXX.so-strlen-intercept-optional.patch \ - file://0001-makefiles-Drop-setting-mcpu-to-cortex-a8-on-arm-arch.patch \ - file://0001-str_tester.c-Limit-rawmemchr-test-to-glibc.patch \ - file://0001-sigqueue-Rename-_sifields-to-__si_fields-on-musl.patch \ - file://0002-context-APIs-are-not-available-on-musl.patch \ - file://0003-correct-include-directive-path-for-config.h.patch \ - file://0004-pth_atfork1.c-Define-error-API-for-musl.patch \ - file://0005-tc20_verifywrap.c-Fake-__GLIBC_PREREQ-with-musl.patch \ - file://0006-pth_detached3.c-Dereference-pthread_t-before-adding-.patch \ - file://0001-memcheck-arm64-Define-__THROW-if-not-already-defined.patch \ - file://0002-memcheck-x86-Define-__THROW-if-not-defined.patch \ - file://0003-tests-seg_override-Replace-__modify_ldt-with-syscall.patch \ - file://link-gz-tests.patch \ - " -SRC_URI[md5sum] = "817dd08f1e8a66336b9ff206400a5369" -SRC_URI[sha256sum] = "d76680ef03f00cd5e970bbdcd4e57fb1f6df7d2e2c071635ef2be74790190c3b" -UPSTREAM_CHECK_REGEX = "valgrind-(?P\d+(\.\d+)+)\.tar" - -COMPATIBLE_HOST = '(i.86|x86_64|arm|aarch64|mips|powerpc|powerpc64).*-linux' - -# valgrind supports armv7 and above -COMPATIBLE_HOST_armv4 = 'null' -COMPATIBLE_HOST_armv5 = 'null' -COMPATIBLE_HOST_armv6 = 'null' - -# X32 isn't supported by valgrind at this time -COMPATIBLE_HOST_linux-gnux32 = 'null' -COMPATIBLE_HOST_linux-muslx32 = 'null' - -# Disable for some MIPS variants -COMPATIBLE_HOST_mipsarchn32 = 'null' -COMPATIBLE_HOST_mipsarchr6 = 'null' - -inherit autotools ptest multilib_header - -EXTRA_OECONF = "--enable-tls --without-mpicc" -EXTRA_OECONF += "${@['--enable-only32bit','--enable-only64bit'][d.getVar('SITEINFO_BITS') != '32']}" - -# valgrind checks host_cpu "armv7*)", so we need to over-ride the autotools.bbclass default --host option -EXTRA_OECONF_append_arm = " --host=armv7${HOST_VENDOR}-${HOST_OS}" -TARGET_CC_ARCH_remove_arm = "${@get_mcpu(d)}" - -EXTRA_OEMAKE = "-w" - -CACHED_CONFIGUREVARS += "ac_cv_path_PERL='/usr/bin/env perl'" - -# valgrind likes to control its own optimisation flags. It generally defaults -# to -O2 but uses -O0 for some specific test apps etc. Passing our own flags -# (via CFLAGS) means we interfere with that. Only pass DEBUG_FLAGS to it -# which fixes build path issue in DWARF. -SELECTED_OPTIMIZATION = "${DEBUG_FLAGS}" - -def get_mcpu(d): - for arg in (d.getVar('TUNE_CCARGS') or '').split(): - if arg.startswith('-mcpu='): - return arg - else: - continue - return "" - -do_configure_prepend () { - rm -rf ${S}/config.h -} - -do_install_append () { - install -m 644 ${B}/default.supp ${D}/${libdir}/valgrind/ - oe_multilib_header valgrind/config.h -} - -TUNE = "${@strip_mcpu(d)}" - -RDEPENDS_${PN} += "perl" - -# valgrind needs debug information for ld.so at runtime in order to -# redirect functions like strlen. -RRECOMMENDS_${PN} += "${TCLIBC}-dbg" - -RDEPENDS_${PN}-ptest += " sed perl perl-module-file-glob" -RDEPENDS_${PN}-ptest_append_libc-glibc = " glibc-utils" - -# One of the tests contains a bogus interpreter path on purpose. -# Skip file dependency check -SKIP_FILEDEPS_${PN}-ptest = '1' - -do_compile_ptest() { - oe_runmake check -} - -do_install_ptest() { - chmod +x ${B}/tests/vg_regtest - - # The test application binaries are not automatically installed. - # Grab them from the build directory. - # - # The regression tests require scripts and data files that are not - # copied to the build directory. They must be copied from the - # source directory. - saved_dir=$PWD - for parent_dir in ${S} ${B} ; do - cd $parent_dir - - # exclude shell or the package won't install - rm -rf none/tests/shell* 2>/dev/null - - subdirs="tests cachegrind/tests callgrind/tests drd/tests helgrind/tests massif/tests memcheck/tests none/tests" - - # Get the vg test scripts, filters, and expected files - for dir in $subdirs ; do - find $dir | cpio -pvdu ${D}${PTEST_PATH} - done - cd $saved_dir - done - - # clean out build artifacts before building the rpm - find ${D}${PTEST_PATH} \ - \( -name "Makefile*" \ - -o -name "*.o" \ - -o -name "*.c" \ - -o -name "*.S" \ - -o -name "*.h" \) \ - -exec rm {} \; - - # needed by massif tests - cp ${B}/massif/ms_print ${D}${PTEST_PATH}/massif/ms_print - - # handle multilib - sed -i s:@libdir@:${libdir}:g ${D}${PTEST_PATH}/run-ptest -} diff --git a/meta-agl-profile-core/recipes-kernel/most/files/0010-backport-usb-setup-timer.patch b/meta-agl-profile-core/recipes-kernel/most/files/0010-backport-usb-setup-timer.patch new file mode 100644 index 000000000..ff21b2130 --- /dev/null +++ b/meta-agl-profile-core/recipes-kernel/most/files/0010-backport-usb-setup-timer.patch @@ -0,0 +1,35 @@ +From 8eaec876f732c7e4b238ada5f9304c6da2380eb1 Mon Sep 17 00:00:00 2001 +From: Andrey Shvetsov +Date: Fri, 8 Feb 2019 22:44:32 +0000 +Subject: [PATCH] backport: usb: setup_timer + +--- + driver/hdm-usb/hdm_usb.c | 7 +++---- + 1 file changed, 3 insertions(+), 4 deletions(-) + +diff --git a/hdm-usb/hdm_usb.c b/hdm-usb/hdm_usb.c +index 5b0af88..9896835 100644 +--- a/hdm-usb/hdm_usb.c ++++ b/hdm-usb/hdm_usb.c +@@ -760,9 +760,9 @@ static void hdm_request_netinfo(struct most_interface *iface, int channel, + * The handler runs in interrupt context. That's why we need to defer the + * tasks to a work queue. + */ +-static void link_stat_timer_handler(unsigned long data) ++static void link_stat_timer_handler(struct timer_list *t) + { +- struct most_dev *mdev = (struct most_dev *)data; ++ struct most_dev *mdev = from_timer(mdev, t, link_stat_timer); + + schedule_work(&mdev->poll_work_obj); + mdev->link_stat_timer.expires = jiffies + (2 * HZ); +@@ -1154,8 +1154,7 @@ hdm_probe(struct usb_interface *interface, const struct usb_device_id *id) + num_endpoints = usb_iface_desc->desc.bNumEndpoints; + mutex_init(&mdev->io_mutex); + INIT_WORK(&mdev->poll_work_obj, wq_netinfo); +- setup_timer(&mdev->link_stat_timer, link_stat_timer_handler, +- (unsigned long)mdev); ++ timer_setup(&mdev->link_stat_timer, link_stat_timer_handler, 0); + + mdev->usb_device = usb_dev; + mdev->link_stat_timer.expires = jiffies + (2 * HZ); diff --git a/meta-agl-profile-core/recipes-kernel/most/files/0011-handle-snd_pcm_lib_mmap_vmalloc-removal.patch b/meta-agl-profile-core/recipes-kernel/most/files/0011-handle-snd_pcm_lib_mmap_vmalloc-removal.patch new file mode 100644 index 000000000..8f83dbab4 --- /dev/null +++ b/meta-agl-profile-core/recipes-kernel/most/files/0011-handle-snd_pcm_lib_mmap_vmalloc-removal.patch @@ -0,0 +1,18 @@ +Handle snd_pcm_lib_mmap_vmalloc removal in 4.19 + +Upstream-Status: Pending + +Signed-off-by: Scott Murray + +diff --git a/driver/aim-sound/sound.c b/driver/aim-sound/sound.c +index 6a290ff..4b3329b 100644 +--- a/aim-sound/sound.c ++++ b/aim-sound/sound.c +@@ -463,7 +463,6 @@ static const struct snd_pcm_ops pcm_ops = { + .trigger = pcm_trigger, + .pointer = pcm_pointer, + .page = snd_pcm_lib_get_vmalloc_page, +- .mmap = snd_pcm_lib_mmap_vmalloc, + }; + + static int split_arg_list(char *buf, char **card_name, u16 *ch_num, diff --git a/meta-agl-profile-core/recipes-kernel/most/most.bbappend b/meta-agl-profile-core/recipes-kernel/most/most.bbappend index 8515d4cc8..a90210d8f 100644 --- a/meta-agl-profile-core/recipes-kernel/most/most.bbappend +++ b/meta-agl-profile-core/recipes-kernel/most/most.bbappend @@ -12,6 +12,7 @@ ORIG_KERN_VER = "${@prep_version(d)}" VANILLA_KERNEL_VERSION = "${@str(ORIG_KERN_VER.split("-")[0].split(".")[0]+ORIG_KERN_VER.split("-")[0].split(".")[1])}" APPLY = "${@str('no' if ${VANILLA_KERNEL_VERSION} > 412 else 'yes')}" +APPLY_419 = "${@str('no' if ${VANILLA_KERNEL_VERSION} < 419 else 'yes')}" SRC_URI_append = " \ file://0001-most-aim-network-backport-Kernel-API.patch;apply=${APPLY} \ @@ -23,6 +24,8 @@ SRC_URI_append = " \ file://0007-dim2-use-device-tree.patch \ file://0008-dim2-read-clock-speed-from-the-device-tree.patch \ file://0009-dim2-use-device-for-coherent-memory-allocation.patch \ + file://0010-backport-usb-setup-timer.patch \ + file://0011-handle-snd_pcm_lib_mmap_vmalloc-removal.patch;apply=${APPLY_419} \ " # Make sure we can expose KERNEL_VERSION ... do_patch[depends] += "virtual/kernel:do_populate_sysroot" diff --git a/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-10.0/0001-install-files-for-a-module-development.patch b/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-10.0/0001-install-files-for-a-module-development.patch deleted file mode 100644 index 8c5f9efd4..000000000 --- a/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-10.0/0001-install-files-for-a-module-development.patch +++ /dev/null @@ -1,78 +0,0 @@ -From 53281e2d11f84e2dae0704e0167369710ee2cb30 Mon Sep 17 00:00:00 2001 -From: Yannick Gicquel -Date: Fri, 23 Sep 2016 14:26:03 +0200 -Subject: [PATCH 1/6] install files for a module development - -Signed-off-by: Yannick Gicquel ---- - Makefile.am | 14 +++++++++++++- - configure.ac | 1 + - pulseaudio-module-devel.pc.in | 12 ++++++++++++ - 3 files changed, 26 insertions(+), 1 deletion(-) - create mode 100644 pulseaudio-module-devel.pc.in - -diff --git a/Makefile.am b/Makefile.am -index 13bc469..f0d68a2 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -53,7 +53,16 @@ dist_vapi_DATA = \ - vala/libpulse-simple.deps vala/libpulse-simple.vapi - - pkgconfigdir = $(libdir)/pkgconfig --pkgconfig_DATA = libpulse.pc libpulse-simple.pc -+pkgconfig_DATA = libpulse.pc libpulse-simple.pc pulseaudio-module-devel.pc -+ -+moduledev_DATA = pulsecore-config.h $(top_srcdir)/src/pulsecore/*.h -+moduledevdir = $(includedir)/pulsemodule/pulsecore -+ -+moduledevfilter_DATA = $(top_srcdir)/src/pulsecore/filter/*.h -+moduledevfilterdir = $(includedir)/pulsemodule/pulsecore/filter -+ -+moduledevinternal_DATA = src/pulse/internal.h src/pulse/client-conf.h src/pulse/fork-detect.h -+moduledevinternaldir = $(includedir)/pulsemodule/pulse - - if HAVE_GLIB20 - pkgconfig_DATA += \ -@@ -107,6 +116,9 @@ dist-hook: - check-daemon: - $(MAKE) -C src check-daemon - -+pulsecore-config.h: config.h -+ cp $< $@ -+ - .PHONY: homepage distcleancheck doxygen - - # see git-version-gen -diff --git a/configure.ac b/configure.ac -index 9250c05..f9201ee 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -1502,6 +1502,7 @@ man/pulse-client.conf.5.xml - man/default.pa.5.xml - man/pulse-cli-syntax.5.xml - man/start-pulseaudio-x11.1.xml -+pulseaudio-module-devel.pc - ]) - - AC_CONFIG_FILES([src/esdcompat:src/daemon/esdcompat.in], [chmod +x src/esdcompat]) -diff --git a/pulseaudio-module-devel.pc.in b/pulseaudio-module-devel.pc.in -new file mode 100644 -index 0000000..85aadbc ---- /dev/null -+++ b/pulseaudio-module-devel.pc.in -@@ -0,0 +1,12 @@ -+prefix=@prefix@ -+exec_prefix=@exec_prefix@ -+libdir=@libdir@ -+includedir=@includedir@ -+modlibexecdir=@modlibexecdir@ -+ -+Name: pulseaudio-module-devel -+Description: PulseAudio Module Development Interface -+Version: @PACKAGE_VERSION@ -+Libs: -L${libdir} -L${libdir}/pulseaudio -L${modlibexecdir} -lpulsecommon-@PA_MAJORMINOR@ -lpulsecore-@PA_MAJORMINOR@ -lprotocol-native -+Libs.private: -+Cflags: -I${includedir}/pulsemodule -D_REENTRANT --- -1.9.1 - diff --git a/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-10.0/0002-volume-ramp-additions-to-the-low-level-infra.patch b/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-10.0/0002-volume-ramp-additions-to-the-low-level-infra.patch deleted file mode 100644 index 9cee6f5de..000000000 --- a/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-10.0/0002-volume-ramp-additions-to-the-low-level-infra.patch +++ /dev/null @@ -1,566 +0,0 @@ -From 7757059ffc6e63ea20ba9013682d72d619e7aefc Mon Sep 17 00:00:00 2001 -From: Sangchul Lee -Date: Sat, 27 Aug 2016 21:33:16 +0900 -Subject: [PATCH 2/6] volume ramp: additions to the low level infra - -The original patch is - - https://review.tizen.org/git/?p=platform/upstream/pulseaudio.git;a=commit;h=df1c4275ed79e0b708c75b92f9d247e0492bc1f0 - - by Jaska Uimonen helsinki.fi> - -Signed-off-by: Sangchul Lee ---- - src/map-file | 4 + - src/pulse/def.h | 13 ++- - src/pulse/volume.c | 74 ++++++++++++- - src/pulse/volume.h | 33 ++++++ - src/pulsecore/mix.c | 310 ++++++++++++++++++++++++++++++++++++++++++++++++++++ - src/pulsecore/mix.h | 27 +++++ - 6 files changed, 459 insertions(+), 2 deletions(-) - -diff --git a/src/map-file b/src/map-file -index 93a62b8..ef9b57d 100644 ---- a/src/map-file -+++ b/src/map-file -@@ -138,6 +138,10 @@ pa_cvolume_max_mask; - pa_cvolume_merge; - pa_cvolume_min; - pa_cvolume_min_mask; -+pa_cvolume_ramp_equal; -+pa_cvolume_ramp_init; -+pa_cvolume_ramp_set; -+pa_cvolume_ramp_channel_ramp_set; - pa_cvolume_remap; - pa_cvolume_scale; - pa_cvolume_scale_mask; -diff --git a/src/pulse/def.h b/src/pulse/def.h -index 680bdc9..bc3cedd 100644 ---- a/src/pulse/def.h -+++ b/src/pulse/def.h -@@ -347,11 +347,15 @@ typedef enum pa_stream_flags { - * consider absolute when the sink is in flat volume mode, - * relative otherwise. \since 0.9.20 */ - -- PA_STREAM_PASSTHROUGH = 0x80000U -+ PA_STREAM_PASSTHROUGH = 0x80000U, - /**< Used to tag content that will be rendered by passthrough sinks. - * The data will be left as is and not reformatted, resampled. - * \since 1.0 */ - -+ PA_STREAM_START_RAMP_MUTED = 0x100000U -+ /**< Used to tag content that the stream will be started ramp volume -+ * muted so that you can nicely fade it in */ -+ - } pa_stream_flags_t; - - /** \cond fulldocs */ -@@ -380,6 +384,7 @@ typedef enum pa_stream_flags { - #define PA_STREAM_FAIL_ON_SUSPEND PA_STREAM_FAIL_ON_SUSPEND - #define PA_STREAM_RELATIVE_VOLUME PA_STREAM_RELATIVE_VOLUME - #define PA_STREAM_PASSTHROUGH PA_STREAM_PASSTHROUGH -+#define PA_STREAM_START_RAMP_MUTED PA_STREAM_START_RAMP_MUTED - - /** \endcond */ - -@@ -1047,6 +1052,12 @@ typedef enum pa_port_available { - /** \endcond */ - #endif - -+/** \cond fulldocs */ -+#define PA_VOLUMER_RAMP_TYPE_LINEAR PA_VOLUMER_RAMP_TYPE_LINEAR -+#define PA_VOLUMER_RAMP_TYPE_LOGARITHMIC PA_VOLUMER_RAMP_TYPE_LOGARITHMIC -+#define PA_VOLUMER_RAMP_TYPE_CUBIC PA_VOLUMER_RAMP_TYPE_CUBIC -+/** \endcond */ -+ - PA_C_DECL_END - - #endif -diff --git a/src/pulse/volume.c b/src/pulse/volume.c -index 1667b94..85072c1 100644 ---- a/src/pulse/volume.c -+++ b/src/pulse/volume.c -@@ -445,7 +445,10 @@ int pa_cvolume_channels_equal_to(const pa_cvolume *a, pa_volume_t v) { - unsigned c; - pa_assert(a); - -- pa_return_val_if_fail(pa_cvolume_valid(a), 0); -+ if (pa_cvolume_valid(a) == 0) -+ abort(); -+ -+ /* pa_return_val_if_fail(pa_cvolume_valid(a), 0); */ - pa_return_val_if_fail(PA_VOLUME_IS_VALID(v), 0); - - for (c = 0; c < a->channels; c++) -@@ -977,3 +980,72 @@ pa_cvolume* pa_cvolume_dec(pa_cvolume *v, pa_volume_t dec) { - - return pa_cvolume_scale(v, m); - } -+ -+int pa_cvolume_ramp_equal(const pa_cvolume_ramp *a, const pa_cvolume_ramp *b) { -+ int i; -+ pa_assert(a); -+ pa_assert(b); -+ -+ if (PA_UNLIKELY(a == b)) -+ return 1; -+ -+ if (a->channels != b->channels) -+ return 0; -+ -+ for (i = 0; i < a->channels; i++) { -+ if (a->ramps[i].type != b->ramps[i].type || -+ a->ramps[i].length != b->ramps[i].length || -+ a->ramps[i].target != b->ramps[i].target) -+ return 0; -+ } -+ -+ return 1; -+} -+ -+pa_cvolume_ramp* pa_cvolume_ramp_init(pa_cvolume_ramp *ramp) { -+ unsigned c; -+ -+ pa_assert(ramp); -+ -+ ramp->channels = 0; -+ -+ for (c = 0; c < PA_CHANNELS_MAX; c++) { -+ ramp->ramps[c].type = PA_VOLUME_RAMP_TYPE_LINEAR; -+ ramp->ramps[c].length = 0; -+ ramp->ramps[c].target = PA_VOLUME_INVALID; -+ } -+ -+ return ramp; -+} -+ -+pa_cvolume_ramp* pa_cvolume_ramp_set(pa_cvolume_ramp *ramp, unsigned channels, pa_volume_ramp_type_t type, long time, pa_volume_t vol) { -+ int i; -+ -+ pa_assert(ramp); -+ pa_assert(channels > 0); -+ pa_assert(time >= 0); -+ pa_assert(channels <= PA_CHANNELS_MAX); -+ -+ ramp->channels = (uint8_t) channels; -+ -+ for (i = 0; i < ramp->channels; i++) { -+ ramp->ramps[i].type = type; -+ ramp->ramps[i].length = time; -+ ramp->ramps[i].target = PA_CLAMP_VOLUME(vol); -+ } -+ -+ return ramp; -+} -+ -+pa_cvolume_ramp* pa_cvolume_ramp_channel_ramp_set(pa_cvolume_ramp *ramp, unsigned channel, pa_volume_ramp_type_t type, long time, pa_volume_t vol) { -+ -+ pa_assert(ramp); -+ pa_assert(channel <= ramp->channels); -+ pa_assert(time >= 0); -+ -+ ramp->ramps[channel].type = type; -+ ramp->ramps[channel].length = time; -+ ramp->ramps[channel].target = PA_CLAMP_VOLUME(vol); -+ -+ return ramp; -+} -diff --git a/src/pulse/volume.h b/src/pulse/volume.h -index 8cf4fa4..2ae3451 100644 ---- a/src/pulse/volume.h -+++ b/src/pulse/volume.h -@@ -431,6 +431,39 @@ pa_cvolume* pa_cvolume_inc(pa_cvolume *v, pa_volume_t inc); - * the channels are kept. \since 0.9.16 */ - pa_cvolume* pa_cvolume_dec(pa_cvolume *v, pa_volume_t dec); - -+/** Volume ramp type -+*/ -+typedef enum pa_volume_ramp_type { -+ PA_VOLUME_RAMP_TYPE_LINEAR = 0, /**< linear */ -+ PA_VOLUME_RAMP_TYPE_LOGARITHMIC = 1, /**< logarithmic */ -+ PA_VOLUME_RAMP_TYPE_CUBIC = 2, -+} pa_volume_ramp_type_t; -+ -+/** A structure encapsulating a volume ramp */ -+typedef struct pa_volume_ramp_t { -+ pa_volume_ramp_type_t type; -+ long length; -+ pa_volume_t target; -+} pa_volume_ramp_t; -+ -+/** A structure encapsulating a multichannel volume ramp */ -+typedef struct pa_cvolume_ramp { -+ uint8_t channels; -+ pa_volume_ramp_t ramps[PA_CHANNELS_MAX]; -+} pa_cvolume_ramp; -+ -+/** Return non-zero when *a == *b */ -+int pa_cvolume_ramp_equal(const pa_cvolume_ramp *a, const pa_cvolume_ramp *b); -+ -+/** Init volume ramp struct */ -+pa_cvolume_ramp* pa_cvolume_ramp_init(pa_cvolume_ramp *ramp); -+ -+/** Set first n channels of ramp struct to certain value */ -+pa_cvolume_ramp* pa_cvolume_ramp_set(pa_cvolume_ramp *ramp, unsigned channel, pa_volume_ramp_type_t type, long time, pa_volume_t vol); -+ -+/** Set individual channel in the channel struct */ -+pa_cvolume_ramp* pa_cvolume_ramp_channel_ramp_set(pa_cvolume_ramp *ramp, unsigned channel, pa_volume_ramp_type_t type, long time, pa_volume_t vol); -+ - PA_C_DECL_END - - #endif -diff --git a/src/pulsecore/mix.c b/src/pulsecore/mix.c -index 59622d7..1e4cc1e 100644 ---- a/src/pulsecore/mix.c -+++ b/src/pulsecore/mix.c -@@ -724,3 +724,313 @@ void pa_volume_memchunk( - - pa_memblock_release(c->memblock); - } -+ -+static void calc_linear_integer_volume_no_mapping(int32_t linear[], float volume[], unsigned nchannels) { -+ unsigned channel, padding; -+ -+ pa_assert(linear); -+ pa_assert(volume); -+ -+ for (channel = 0; channel < nchannels; channel++) -+ linear[channel] = (int32_t) lrint(volume[channel] * 0x10000U); -+ -+ for (padding = 0; padding < VOLUME_PADDING; padding++, channel++) -+ linear[channel] = linear[padding]; -+} -+ -+static void calc_linear_float_volume_no_mapping(float linear[], float volume[], unsigned nchannels) { -+ unsigned channel, padding; -+ -+ pa_assert(linear); -+ pa_assert(volume); -+ -+ for (channel = 0; channel < nchannels; channel++) -+ linear[channel] = volume[channel]; -+ -+ for (padding = 0; padding < VOLUME_PADDING; padding++, channel++) -+ linear[channel] = linear[padding]; -+} -+ -+typedef void (*pa_calc_volume_no_mapping_func_t) (void *volumes, float *volume, int channels); -+ -+static const pa_calc_volume_no_mapping_func_t calc_volume_table_no_mapping[] = { -+ [PA_SAMPLE_U8] = (pa_calc_volume_no_mapping_func_t) calc_linear_integer_volume_no_mapping, -+ [PA_SAMPLE_ALAW] = (pa_calc_volume_no_mapping_func_t) calc_linear_integer_volume_no_mapping, -+ [PA_SAMPLE_ULAW] = (pa_calc_volume_no_mapping_func_t) calc_linear_integer_volume_no_mapping, -+ [PA_SAMPLE_S16LE] = (pa_calc_volume_no_mapping_func_t) calc_linear_integer_volume_no_mapping, -+ [PA_SAMPLE_S16BE] = (pa_calc_volume_no_mapping_func_t) calc_linear_integer_volume_no_mapping, -+ [PA_SAMPLE_FLOAT32LE] = (pa_calc_volume_no_mapping_func_t) calc_linear_float_volume_no_mapping, -+ [PA_SAMPLE_FLOAT32BE] = (pa_calc_volume_no_mapping_func_t) calc_linear_float_volume_no_mapping, -+ [PA_SAMPLE_S32LE] = (pa_calc_volume_no_mapping_func_t) calc_linear_integer_volume_no_mapping, -+ [PA_SAMPLE_S32BE] = (pa_calc_volume_no_mapping_func_t) calc_linear_integer_volume_no_mapping, -+ [PA_SAMPLE_S24LE] = (pa_calc_volume_no_mapping_func_t) calc_linear_integer_volume_no_mapping, -+ [PA_SAMPLE_S24BE] = (pa_calc_volume_no_mapping_func_t) calc_linear_integer_volume_no_mapping, -+ [PA_SAMPLE_S24_32LE] = (pa_calc_volume_no_mapping_func_t) calc_linear_integer_volume_no_mapping, -+ [PA_SAMPLE_S24_32BE] = (pa_calc_volume_no_mapping_func_t) calc_linear_integer_volume_no_mapping -+}; -+ -+static const unsigned format_sample_size_table[] = { -+ [PA_SAMPLE_U8] = 1, -+ [PA_SAMPLE_ALAW] = 1, -+ [PA_SAMPLE_ULAW] = 1, -+ [PA_SAMPLE_S16LE] = 2, -+ [PA_SAMPLE_S16BE] = 2, -+ [PA_SAMPLE_FLOAT32LE] = 4, -+ [PA_SAMPLE_FLOAT32BE] = 4, -+ [PA_SAMPLE_S32LE] = 4, -+ [PA_SAMPLE_S32BE] = 4, -+ [PA_SAMPLE_S24LE] = 3, -+ [PA_SAMPLE_S24BE] = 3, -+ [PA_SAMPLE_S24_32LE] = 4, -+ [PA_SAMPLE_S24_32BE] = 4 -+}; -+ -+static float calc_volume_ramp_linear(pa_volume_ramp_int_t *ramp) { -+ pa_assert(ramp); -+ pa_assert(ramp->length > 0); -+ -+ /* basic linear interpolation */ -+ return ramp->start + (ramp->length - ramp->left) * (ramp->end - ramp->start) / (float) ramp->length; -+} -+ -+static float calc_volume_ramp_logarithmic(pa_volume_ramp_int_t *ramp) { -+ float x_val, s, e; -+ long temp; -+ -+ pa_assert(ramp); -+ pa_assert(ramp->length > 0); -+ -+ if (ramp->end > ramp->start) { -+ temp = ramp->left; -+ s = ramp->end; -+ e = ramp->start; -+ } else { -+ temp = ramp->length - ramp->left; -+ s = ramp->start; -+ e = ramp->end; -+ } -+ -+ x_val = temp == 0 ? 0.0 : powf(temp, 10); -+ -+ /* base 10 logarithmic interpolation */ -+ return s + x_val * (e - s) / powf(ramp->length, 10); -+} -+ -+static float calc_volume_ramp_cubic(pa_volume_ramp_int_t *ramp) { -+ float x_val, s, e; -+ long temp; -+ -+ pa_assert(ramp); -+ pa_assert(ramp->length > 0); -+ -+ if (ramp->end > ramp->start) { -+ temp = ramp->left; -+ s = ramp->end; -+ e = ramp->start; -+ } else { -+ temp = ramp->length - ramp->left; -+ s = ramp->start; -+ e = ramp->end; -+ } -+ -+ x_val = temp == 0 ? 0.0 : cbrtf(temp); -+ -+ /* cubic interpolation */ -+ return s + x_val * (e - s) / cbrtf(ramp->length); -+} -+ -+typedef float (*pa_calc_volume_ramp_func_t) (pa_volume_ramp_int_t *); -+ -+static const pa_calc_volume_ramp_func_t calc_volume_ramp_table[] = { -+ [PA_VOLUME_RAMP_TYPE_LINEAR] = (pa_calc_volume_ramp_func_t) calc_volume_ramp_linear, -+ [PA_VOLUME_RAMP_TYPE_LOGARITHMIC] = (pa_calc_volume_ramp_func_t) calc_volume_ramp_logarithmic, -+ [PA_VOLUME_RAMP_TYPE_CUBIC] = (pa_calc_volume_ramp_func_t) calc_volume_ramp_cubic -+}; -+ -+static void calc_volume_ramps(pa_cvolume_ramp_int *ram, float *vol) -+{ -+ int i; -+ -+ for (i = 0; i < ram->channels; i++) { -+ if (ram->ramps[i].left <= 0) { -+ if (ram->ramps[i].target == PA_VOLUME_NORM) { -+ vol[i] = 1.0; -+ } -+ } else { -+ vol[i] = ram->ramps[i].curr = calc_volume_ramp_table[ram->ramps[i].type] (&ram->ramps[i]); -+ ram->ramps[i].left--; -+ } -+ } -+} -+ -+void pa_volume_ramp_memchunk( -+ pa_memchunk *c, -+ const pa_sample_spec *spec, -+ pa_cvolume_ramp_int *ramp) { -+ -+ void *ptr; -+ volume_val linear[PA_CHANNELS_MAX + VOLUME_PADDING]; -+ float vol[PA_CHANNELS_MAX + VOLUME_PADDING]; -+ pa_do_volume_func_t do_volume; -+ long length_in_frames; -+ int i; -+ -+ pa_assert(c); -+ pa_assert(spec); -+ pa_assert(pa_frame_aligned(c->length, spec)); -+ pa_assert(ramp); -+ -+ length_in_frames = c->length / format_sample_size_table[spec->format] / spec->channels; -+ -+ if (pa_memblock_is_silence(c->memblock)) { -+ for (i = 0; i < ramp->channels; i++) { -+ if (ramp->ramps[i].length > 0) -+ ramp->ramps[i].length -= length_in_frames; -+ } -+ return; -+ } -+ -+ if (spec->format < 0 || spec->format >= PA_SAMPLE_MAX) { -+ pa_log_warn("Unable to change volume of format"); -+ return; -+ } -+ -+ do_volume = pa_get_volume_func(spec->format); -+ pa_assert(do_volume); -+ -+ ptr = (uint8_t*) pa_memblock_acquire(c->memblock) + c->index; -+ -+ for (i = 0; i < length_in_frames; i++) { -+ calc_volume_ramps(ramp, vol); -+ calc_volume_table_no_mapping[spec->format] ((void *)linear, vol, spec->channels); -+ -+ /* we only process one frame per iteration */ -+ do_volume (ptr, (void *)linear, spec->channels, format_sample_size_table[spec->format] * spec->channels); -+ -+ /* pa_log_debug("1: %d 2: %d", linear[0], linear[1]); */ -+ -+ ptr = (uint8_t*)ptr + format_sample_size_table[spec->format] * spec->channels; -+ } -+ -+ pa_memblock_release(c->memblock); -+} -+ -+pa_cvolume_ramp_int* pa_cvolume_ramp_convert(const pa_cvolume_ramp *src, pa_cvolume_ramp_int *dst, int sample_rate) { -+ -+ int i, j, channels, remaining_channels; -+ float temp; -+ -+ if (dst->channels < src->channels) { -+ channels = dst->channels; -+ remaining_channels = 0; -+ } -+ else { -+ channels = src->channels; -+ remaining_channels = dst->channels; -+ } -+ -+ for (i = 0; i < channels; i++) { -+ dst->ramps[i].type = src->ramps[i].type; -+ /* ms to samples */ -+ dst->ramps[i].length = src->ramps[i].length * sample_rate / 1000; -+ dst->ramps[i].left = dst->ramps[i].length; -+ dst->ramps[i].start = dst->ramps[i].end; -+ dst->ramps[i].target = src->ramps[i].target; -+ /* scale to pulse internal mapping so that when ramp is over there's no glitch in volume */ -+ temp = src->ramps[i].target / (float)0x10000U; -+ dst->ramps[i].end = temp * temp * temp; -+ } -+ -+ j = i; -+ -+ for (i--; j < remaining_channels; j++) { -+ dst->ramps[j].type = dst->ramps[i].type; -+ dst->ramps[j].length = dst->ramps[i].length; -+ dst->ramps[j].left = dst->ramps[i].left; -+ dst->ramps[j].start = dst->ramps[i].start; -+ dst->ramps[j].target = dst->ramps[i].target; -+ dst->ramps[j].end = dst->ramps[i].end; -+ } -+ -+ return dst; -+} -+ -+bool pa_cvolume_ramp_active(pa_cvolume_ramp_int *ramp) { -+ int i; -+ -+ for (i = 0; i < ramp->channels; i++) { -+ if (ramp->ramps[i].left > 0) -+ return true; -+ } -+ -+ return false; -+} -+ -+bool pa_cvolume_ramp_target_active(pa_cvolume_ramp_int *ramp) { -+ int i; -+ -+ for (i = 0; i < ramp->channels; i++) { -+ if (ramp->ramps[i].target != PA_VOLUME_NORM) -+ return true; -+ } -+ -+ return false; -+} -+ -+pa_cvolume * pa_cvolume_ramp_get_targets(pa_cvolume_ramp_int *ramp, pa_cvolume *volume) { -+ int i = 0; -+ -+ volume->channels = ramp->channels; -+ -+ for (i = 0; i < ramp->channels; i++) -+ volume->values[i] = ramp->ramps[i].target; -+ -+ return volume; -+} -+ -+pa_cvolume_ramp_int* pa_cvolume_ramp_start_from(pa_cvolume_ramp_int *src, pa_cvolume_ramp_int *dst) { -+ int i; -+ -+ for (i = 0; i < src->channels; i++) { -+ /* if new vols are invalid, copy old ramp i.e. no effect */ -+ if (dst->ramps[i].target == PA_VOLUME_INVALID) -+ dst->ramps[i] = src->ramps[i]; -+ /* if there's some old ramp still left */ -+ else if (src->ramps[i].left > 0) -+ dst->ramps[i].start = src->ramps[i].curr; -+ } -+ -+ return dst; -+} -+ -+pa_cvolume_ramp_int* pa_cvolume_ramp_int_init(pa_cvolume_ramp_int *src, pa_volume_t vol, int channels) { -+ int i; -+ float temp; -+ -+ src->channels = channels; -+ -+ for (i = 0; i < channels; i++) { -+ src->ramps[i].type = PA_VOLUME_RAMP_TYPE_LINEAR; -+ src->ramps[i].length = 0; -+ src->ramps[i].left = 0; -+ if (vol == PA_VOLUME_NORM) { -+ src->ramps[i].start = 1.0; -+ src->ramps[i].end = 1.0; -+ src->ramps[i].curr = 1.0; -+ } -+ else if (vol == PA_VOLUME_MUTED) { -+ src->ramps[i].start = 0.0; -+ src->ramps[i].end = 0.0; -+ src->ramps[i].curr = 0.0; -+ } -+ else { -+ temp = vol / (float)0x10000U; -+ src->ramps[i].start = temp * temp * temp; -+ src->ramps[i].end = src->ramps[i].start; -+ src->ramps[i].curr = src->ramps[i].start; -+ } -+ src->ramps[i].target = vol; -+ } -+ -+ return src; -+} -diff --git a/src/pulsecore/mix.h b/src/pulsecore/mix.h -index 8102bcd..0f86b6f 100644 ---- a/src/pulsecore/mix.h -+++ b/src/pulsecore/mix.h -@@ -59,4 +59,31 @@ void pa_volume_memchunk( - const pa_sample_spec *spec, - const pa_cvolume *volume); - -+typedef struct pa_volume_ramp_int_t { -+ pa_volume_ramp_type_t type; -+ long length; -+ long left; -+ float start; -+ float end; -+ float curr; -+ pa_volume_t target; -+} pa_volume_ramp_int_t; -+ -+typedef struct pa_cvolume_ramp_int { -+ uint8_t channels; -+ pa_volume_ramp_int_t ramps[PA_CHANNELS_MAX]; -+} pa_cvolume_ramp_int; -+ -+pa_cvolume_ramp_int* pa_cvolume_ramp_convert(const pa_cvolume_ramp *src, pa_cvolume_ramp_int *dst, int sample_rate); -+bool pa_cvolume_ramp_active(pa_cvolume_ramp_int *ramp); -+bool pa_cvolume_ramp_target_active(pa_cvolume_ramp_int *ramp); -+pa_cvolume_ramp_int* pa_cvolume_ramp_start_from(pa_cvolume_ramp_int *src, pa_cvolume_ramp_int *dst); -+pa_cvolume_ramp_int* pa_cvolume_ramp_int_init(pa_cvolume_ramp_int *src, pa_volume_t vol, int channels); -+pa_cvolume * pa_cvolume_ramp_get_targets(pa_cvolume_ramp_int *ramp, pa_cvolume *volume); -+ -+void pa_volume_ramp_memchunk( -+ pa_memchunk *c, -+ const pa_sample_spec *spec, -+ pa_cvolume_ramp_int *ramp); -+ - #endif --- -1.9.1 - diff --git a/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-10.0/0003-volume-ramp-adding-volume-ramping-to-sink-input.patch b/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-10.0/0003-volume-ramp-adding-volume-ramping-to-sink-input.patch deleted file mode 100644 index eb485ca7c..000000000 --- a/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-10.0/0003-volume-ramp-adding-volume-ramping-to-sink-input.patch +++ /dev/null @@ -1,189 +0,0 @@ -From e4469df7c69316b49cad93dd288badc98fa1cad5 Mon Sep 17 00:00:00 2001 -From: Sangchul Lee -Date: Sat, 27 Aug 2016 21:33:17 +0900 -Subject: [PATCH 3/6] volume ramp: adding volume ramping to sink-input - -The original patch is - - https://review.tizen.org/git/?p=platform/upstream/pulseaudio.git;a=commit;h=98042248fd67ce0ab3807c5c472c0d5d8b0f99d3 - - by Jaska Uimonen helsinki.fi> - -Signed-off-by: Sangchul Lee ---- - src/pulsecore/sink-input.c | 61 ++++++++++++++++++++++++++++++++++++++++++++++ - src/pulsecore/sink-input.h | 11 ++++++++- - 2 files changed, 71 insertions(+), 1 deletion(-) - -diff --git a/src/pulsecore/sink-input.c b/src/pulsecore/sink-input.c -index 8ec63b5..cc8953f 100644 ---- a/src/pulsecore/sink-input.c -+++ b/src/pulsecore/sink-input.c -@@ -526,6 +526,11 @@ int pa_sink_input_new( - reset_callbacks(i); - i->userdata = NULL; - -+ if (data->flags & PA_SINK_INPUT_START_RAMP_MUTED) -+ pa_cvolume_ramp_int_init(&i->ramp, PA_VOLUME_MUTED, data->sample_spec.channels); -+ else -+ pa_cvolume_ramp_int_init(&i->ramp, PA_VOLUME_NORM, data->sample_spec.channels); -+ - i->thread_info.state = i->state; - i->thread_info.attached = false; - pa_atomic_store(&i->thread_info.drained, 1); -@@ -542,6 +547,8 @@ int pa_sink_input_new( - i->thread_info.playing_for = 0; - i->thread_info.direct_outputs = pa_hashmap_new(pa_idxset_trivial_hash_func, pa_idxset_trivial_compare_func); - -+ i->thread_info.ramp = i->ramp; -+ - pa_assert_se(pa_idxset_put(core->sink_inputs, i, &i->index) == 0); - pa_assert_se(pa_idxset_put(i->sink->inputs, pa_sink_input_ref(i), NULL) == 0); - -@@ -923,6 +930,8 @@ void pa_sink_input_peek(pa_sink_input *i, size_t slength /* in sink bytes */, pa - while (tchunk.length > 0) { - pa_memchunk wchunk; - bool nvfs = need_volume_factor_sink; -+ pa_cvolume target; -+ pa_bool_t tmp; - - wchunk = tchunk; - pa_memblock_ref(wchunk.memblock); -@@ -959,6 +968,16 @@ void pa_sink_input_peek(pa_sink_input *i, size_t slength /* in sink bytes */, pa - pa_volume_memchunk(&wchunk, &i->sink->sample_spec, &i->volume_factor_sink); - } - -+ /* check for possible volume ramp */ -+ if (pa_cvolume_ramp_active(&i->thread_info.ramp)) { -+ pa_memchunk_make_writable(&wchunk, 0); -+ pa_volume_ramp_memchunk(&wchunk, &i->sink->sample_spec, &(i->thread_info.ramp)); -+ } else if ((tmp = pa_cvolume_ramp_target_active(&(i->thread_info.ramp)))) { -+ pa_memchunk_make_writable(&wchunk, 0); -+ pa_cvolume_ramp_get_targets(&i->thread_info.ramp, &target); -+ pa_volume_memchunk(&wchunk, &i->sink->sample_spec, &target); -+ } -+ - pa_memblockq_push_align(i->thread_info.render_memblockq, &wchunk); - } else { - pa_memchunk rchunk; -@@ -975,6 +994,16 @@ void pa_sink_input_peek(pa_sink_input *i, size_t slength /* in sink bytes */, pa - pa_volume_memchunk(&rchunk, &i->sink->sample_spec, &i->volume_factor_sink); - } - -+ /* check for possible volume ramp */ -+ if (pa_cvolume_ramp_active(&(i->thread_info.ramp))) { -+ pa_memchunk_make_writable(&rchunk, 0); -+ pa_volume_ramp_memchunk(&rchunk, &i->sink->sample_spec, &(i->thread_info.ramp)); -+ } else if (pa_cvolume_ramp_target_active(&(i->thread_info.ramp))) { -+ pa_memchunk_make_writable(&rchunk, 0); -+ pa_cvolume_ramp_get_targets(&i->thread_info.ramp, &target); -+ pa_volume_memchunk(&rchunk, &i->sink->sample_spec, &target); -+ } -+ - pa_memblockq_push_align(i->thread_info.render_memblockq, &rchunk); - pa_memblock_unref(rchunk.memblock); - } -@@ -1339,6 +1368,31 @@ int pa_sink_input_remove_volume_factor(pa_sink_input *i, const char *key) { - return 0; - } - -+/* Called from main thread */ -+void pa_sink_input_set_volume_ramp( -+ pa_sink_input *i, -+ const pa_cvolume_ramp *ramp, -+ pa_bool_t send_msg, -+ pa_bool_t save) { -+ -+ pa_sink_input_assert_ref(i); -+ pa_assert_ctl_context(); -+ pa_assert(PA_SINK_INPUT_IS_LINKED(i->state)); -+ pa_assert(ramp); -+ -+ pa_cvolume_ramp_convert(ramp, &i->ramp, i->sample_spec.rate); -+ -+ pa_log_debug("setting volume ramp with target vol:%d and length:%ld", -+ i->ramp.ramps[0].target, -+ i->ramp.ramps[0].length); -+ -+ -+ /* This tells the sink that volume ramp changed */ -+ if (send_msg) -+ pa_assert_se(pa_asyncmsgq_send(i->sink->asyncmsgq, PA_MSGOBJECT(i), PA_SINK_INPUT_MESSAGE_SET_VOLUME_RAMP, -+ NULL, 0, NULL) == 0); -+} -+ - /* Called from main context */ - static void set_real_ratio(pa_sink_input *i, const pa_cvolume *v) { - pa_sink_input_assert_ref(i); -@@ -1932,6 +1986,13 @@ int pa_sink_input_process_msg(pa_msgobject *o, int code, void *userdata, int64_t - } - return 0; - -+ case PA_SINK_INPUT_MESSAGE_SET_VOLUME_RAMP: -+ /* we have ongoing ramp where we take current start values */ -+ pa_cvolume_ramp_start_from(&i->thread_info.ramp, &i->ramp); -+ i->thread_info.ramp = i->ramp; -+ pa_sink_input_request_rewind(i, 0, true, false, false); -+ return 0; -+ - case PA_SINK_INPUT_MESSAGE_SET_SOFT_MUTE: - if (i->thread_info.muted != i->muted) { - i->thread_info.muted = i->muted; -diff --git a/src/pulsecore/sink-input.h b/src/pulsecore/sink-input.h -index 86deab2..6e1b211 100644 ---- a/src/pulsecore/sink-input.h -+++ b/src/pulsecore/sink-input.h -@@ -32,6 +32,7 @@ - #include - #include - #include -+#include - - typedef enum pa_sink_input_state { - PA_SINK_INPUT_INIT, /*< The stream is not active yet, because pa_sink_input_put() has not been called yet */ -@@ -58,7 +59,8 @@ typedef enum pa_sink_input_flags { - PA_SINK_INPUT_DONT_INHIBIT_AUTO_SUSPEND = 256, - PA_SINK_INPUT_NO_CREATE_ON_SUSPEND = 512, - PA_SINK_INPUT_KILL_ON_SUSPEND = 1024, -- PA_SINK_INPUT_PASSTHROUGH = 2048 -+ PA_SINK_INPUT_PASSTHROUGH = 2048, -+ PA_SINK_INPUT_START_RAMP_MUTED = 4096, - } pa_sink_input_flags_t; - - struct pa_sink_input { -@@ -121,6 +123,9 @@ struct pa_sink_input { - * this.*/ - bool save_sink:1, save_volume:1, save_muted:1; - -+ /* for volume ramps */ -+ pa_cvolume_ramp_int ramp; -+ - pa_resample_method_t requested_resample_method, actual_resample_method; - - /* Returns the chunk of audio data and drops it from the -@@ -249,6 +254,8 @@ struct pa_sink_input { - pa_usec_t requested_sink_latency; - - pa_hashmap *direct_outputs; -+ -+ pa_cvolume_ramp_int ramp; - } thread_info; - - void *userdata; -@@ -265,6 +272,7 @@ enum { - PA_SINK_INPUT_MESSAGE_SET_STATE, - PA_SINK_INPUT_MESSAGE_SET_REQUESTED_LATENCY, - PA_SINK_INPUT_MESSAGE_GET_REQUESTED_LATENCY, -+ PA_SINK_INPUT_MESSAGE_SET_VOLUME_RAMP, - PA_SINK_INPUT_MESSAGE_MAX - }; - -@@ -370,6 +378,7 @@ void pa_sink_input_set_volume(pa_sink_input *i, const pa_cvolume *volume, bool s - void pa_sink_input_add_volume_factor(pa_sink_input *i, const char *key, const pa_cvolume *volume_factor); - int pa_sink_input_remove_volume_factor(pa_sink_input *i, const char *key); - pa_cvolume *pa_sink_input_get_volume(pa_sink_input *i, pa_cvolume *volume, bool absolute); -+void pa_sink_input_set_volume_ramp(pa_sink_input *i, const pa_cvolume_ramp *ramp, pa_bool_t send_msg, pa_bool_t save); - - void pa_sink_input_set_mute(pa_sink_input *i, bool mute, bool save); - --- -1.9.1 - diff --git a/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-10.0/0004-sink-input-Code-cleanup-regarding-volume-ramping.patch b/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-10.0/0004-sink-input-Code-cleanup-regarding-volume-ramping.patch deleted file mode 100644 index 64d7b141d..000000000 --- a/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-10.0/0004-sink-input-Code-cleanup-regarding-volume-ramping.patch +++ /dev/null @@ -1,62 +0,0 @@ -From 49d8943b151a73be3dd726561a720c0f4bfdccac Mon Sep 17 00:00:00 2001 -From: Sangchul Lee -Date: Sat, 27 Aug 2016 21:33:18 +0900 -Subject: [PATCH 4/6] sink-input: Code cleanup regarding volume ramping - -Remove unused parameter of pa_sink_input_set_volume_ramp(). -Use bool instead of pa_bool_t. - -Signed-off-by: Sangchul Lee ---- - src/pulsecore/sink-input.c | 7 ++----- - src/pulsecore/sink-input.h | 2 +- - 2 files changed, 3 insertions(+), 6 deletions(-) - -diff --git a/src/pulsecore/sink-input.c b/src/pulsecore/sink-input.c -index cc8953f..e1968e0 100644 ---- a/src/pulsecore/sink-input.c -+++ b/src/pulsecore/sink-input.c -@@ -931,7 +931,6 @@ void pa_sink_input_peek(pa_sink_input *i, size_t slength /* in sink bytes */, pa - pa_memchunk wchunk; - bool nvfs = need_volume_factor_sink; - pa_cvolume target; -- pa_bool_t tmp; - - wchunk = tchunk; - pa_memblock_ref(wchunk.memblock); -@@ -972,7 +971,7 @@ void pa_sink_input_peek(pa_sink_input *i, size_t slength /* in sink bytes */, pa - if (pa_cvolume_ramp_active(&i->thread_info.ramp)) { - pa_memchunk_make_writable(&wchunk, 0); - pa_volume_ramp_memchunk(&wchunk, &i->sink->sample_spec, &(i->thread_info.ramp)); -- } else if ((tmp = pa_cvolume_ramp_target_active(&(i->thread_info.ramp)))) { -+ } else if ((pa_cvolume_ramp_target_active(&(i->thread_info.ramp)))) { - pa_memchunk_make_writable(&wchunk, 0); - pa_cvolume_ramp_get_targets(&i->thread_info.ramp, &target); - pa_volume_memchunk(&wchunk, &i->sink->sample_spec, &target); -@@ -1372,9 +1371,7 @@ int pa_sink_input_remove_volume_factor(pa_sink_input *i, const char *key) { - void pa_sink_input_set_volume_ramp( - pa_sink_input *i, - const pa_cvolume_ramp *ramp, -- pa_bool_t send_msg, -- pa_bool_t save) { -- -+ bool send_msg) { - pa_sink_input_assert_ref(i); - pa_assert_ctl_context(); - pa_assert(PA_SINK_INPUT_IS_LINKED(i->state)); -diff --git a/src/pulsecore/sink-input.h b/src/pulsecore/sink-input.h -index 6e1b211..92f61c3 100644 ---- a/src/pulsecore/sink-input.h -+++ b/src/pulsecore/sink-input.h -@@ -378,7 +378,7 @@ void pa_sink_input_set_volume(pa_sink_input *i, const pa_cvolume *volume, bool s - void pa_sink_input_add_volume_factor(pa_sink_input *i, const char *key, const pa_cvolume *volume_factor); - int pa_sink_input_remove_volume_factor(pa_sink_input *i, const char *key); - pa_cvolume *pa_sink_input_get_volume(pa_sink_input *i, pa_cvolume *volume, bool absolute); --void pa_sink_input_set_volume_ramp(pa_sink_input *i, const pa_cvolume_ramp *ramp, pa_bool_t send_msg, pa_bool_t save); -+void pa_sink_input_set_volume_ramp(pa_sink_input *i, const pa_cvolume_ramp *ramp, bool send_msg); - - void pa_sink_input_set_mute(pa_sink_input *i, bool mute, bool save); - --- -1.9.1 - diff --git a/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-10.0/0005-sink-input-volume-Add-support-for-volume-ramp-factor.patch b/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-10.0/0005-sink-input-volume-Add-support-for-volume-ramp-factor.patch deleted file mode 100644 index e371b7ec5..000000000 --- a/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-10.0/0005-sink-input-volume-Add-support-for-volume-ramp-factor.patch +++ /dev/null @@ -1,299 +0,0 @@ -From a98e78ccc4f12d6efad2832a09202651e2a8b6cd Mon Sep 17 00:00:00 2001 -From: Sangchul Lee -Date: Sat, 27 Aug 2016 21:33:19 +0900 -Subject: [PATCH 5/6] sink-input, volume: Add support for volume ramp factor - -Previously, using pa_sink_input_set_volume_ramp() is hard to manage -if there are several callers. These new volume ramp factor APIs make it -easy for caller to use and to set more than one volume ramp factor. -New volume ramp factor will be applied by the multiplication of the other -ramp factors that have been already set. - -APIs are added as below. - - pa_sink_input_add_volume_ramp_factor() - - pa_sink_input_remove_volume_ramp_factor() - - pa_cvolume_ramp_compatible() - - pa_sw_cvolume_ramp_multiply() - - pa_cvolume_ramp_valid() - -Signed-off-by: Sangchul Lee ---- - src/map-file | 3 ++ - src/pulse/volume.c | 44 ++++++++++++++++++ - src/pulse/volume.h | 9 ++++ - src/pulsecore/sink-input.c | 108 +++++++++++++++++++++++++++++++++++++++++++++ - src/pulsecore/sink-input.h | 5 +++ - 5 files changed, 169 insertions(+) - -diff --git a/src/map-file b/src/map-file -index ef9b57d..7577c14 100644 ---- a/src/map-file -+++ b/src/map-file -@@ -142,6 +142,8 @@ pa_cvolume_ramp_equal; - pa_cvolume_ramp_init; - pa_cvolume_ramp_set; - pa_cvolume_ramp_channel_ramp_set; -+pa_cvolume_ramp_compatible; -+pa_cvolume_ramp_valid; - pa_cvolume_remap; - pa_cvolume_scale; - pa_cvolume_scale_mask; -@@ -344,6 +346,7 @@ pa_sw_cvolume_divide_scalar; - pa_sw_cvolume_multiply; - pa_sw_cvolume_multiply_scalar; - pa_sw_cvolume_snprint_dB; -+pa_sw_cvolume_ramp_multiply; - pa_sw_volume_divide; - pa_sw_volume_from_dB; - pa_sw_volume_from_linear; -diff --git a/src/pulse/volume.c b/src/pulse/volume.c -index 85072c1..8d99150 100644 ---- a/src/pulse/volume.c -+++ b/src/pulse/volume.c -@@ -1049,3 +1049,47 @@ pa_cvolume_ramp* pa_cvolume_ramp_channel_ramp_set(pa_cvolume_ramp *ramp, unsigne - - return ramp; - } -+ -+int pa_cvolume_ramp_compatible(const pa_cvolume_ramp *ramp, const pa_sample_spec *ss) { -+ -+ pa_assert(ramp); -+ pa_assert(ss); -+ -+ pa_return_val_if_fail(pa_cvolume_ramp_valid(ramp), 0); -+ pa_return_val_if_fail(pa_sample_spec_valid(ss), 0); -+ -+ return ramp->channels == ss->channels; -+} -+ -+pa_cvolume_ramp *pa_sw_cvolume_ramp_multiply(pa_cvolume_ramp *dest, const pa_cvolume_ramp *a, const pa_cvolume_ramp *b) { -+ unsigned i; -+ -+ pa_assert(dest); -+ pa_assert(a); -+ pa_assert(b); -+ -+ pa_return_val_if_fail(pa_cvolume_ramp_valid(a), NULL); -+ pa_return_val_if_fail(pa_cvolume_ramp_valid(b), NULL); -+ -+ for (i = 0; i < a->channels && i < b->channels; i++) -+ dest->ramps[i].target = pa_sw_volume_multiply(a->ramps[i].target, b->ramps[i].target); -+ -+ dest->channels = (uint8_t) i; -+ -+ return dest; -+} -+ -+int pa_cvolume_ramp_valid(const pa_cvolume_ramp *ramp) { -+ unsigned c; -+ -+ pa_assert(ramp); -+ -+ if (!pa_channels_valid(ramp->channels)) -+ return 0; -+ -+ for (c = 0; c < ramp->channels; c++) -+ if (!PA_VOLUME_IS_VALID(ramp->ramps[c].target)) -+ return 0; -+ -+ return 1; -+} -diff --git a/src/pulse/volume.h b/src/pulse/volume.h -index 2ae3451..65fcb08 100644 ---- a/src/pulse/volume.h -+++ b/src/pulse/volume.h -@@ -458,12 +458,21 @@ int pa_cvolume_ramp_equal(const pa_cvolume_ramp *a, const pa_cvolume_ramp *b); - /** Init volume ramp struct */ - pa_cvolume_ramp* pa_cvolume_ramp_init(pa_cvolume_ramp *ramp); - -+/** Set the volume ramp of the first n channels to PA_VOLUME_NORM */ -+#define pa_cvolume_ramp_reset(a, n, t, l) pa_cvolume_ramp_set((a), (n), (t), (l), PA_VOLUME_NORM) -+ - /** Set first n channels of ramp struct to certain value */ - pa_cvolume_ramp* pa_cvolume_ramp_set(pa_cvolume_ramp *ramp, unsigned channel, pa_volume_ramp_type_t type, long time, pa_volume_t vol); - - /** Set individual channel in the channel struct */ - pa_cvolume_ramp* pa_cvolume_ramp_channel_ramp_set(pa_cvolume_ramp *ramp, unsigned channel, pa_volume_ramp_type_t type, long time, pa_volume_t vol); - -+int pa_cvolume_ramp_compatible(const pa_cvolume_ramp *ramp, const pa_sample_spec *ss); -+ -+int pa_cvolume_ramp_valid(const pa_cvolume_ramp *ramp); -+ -+pa_cvolume_ramp *pa_sw_cvolume_ramp_multiply(pa_cvolume_ramp *dest, const pa_cvolume_ramp *a, const pa_cvolume_ramp *b); -+ - PA_C_DECL_END - - #endif -diff --git a/src/pulsecore/sink-input.c b/src/pulsecore/sink-input.c -index e1968e0..6f89aa1 100644 ---- a/src/pulsecore/sink-input.c -+++ b/src/pulsecore/sink-input.c -@@ -53,6 +53,11 @@ struct volume_factor_entry { - pa_cvolume volume; - }; - -+struct volume_ramp_factor_entry { -+ char *key; -+ pa_cvolume_ramp ramp; -+}; -+ - static struct volume_factor_entry *volume_factor_entry_new(const char *key, const pa_cvolume *volume) { - struct volume_factor_entry *entry; - -@@ -83,6 +88,37 @@ static void volume_factor_from_hashmap(pa_cvolume *v, pa_hashmap *items, uint8_t - pa_sw_cvolume_multiply(v, v, &entry->volume); - } - -+static struct volume_ramp_factor_entry *volume_ramp_factor_entry_new(const char *key, const pa_cvolume_ramp *ramp) { -+ struct volume_ramp_factor_entry *entry; -+ -+ pa_assert(key); -+ pa_assert(ramp); -+ -+ entry = pa_xnew(struct volume_ramp_factor_entry, 1); -+ entry->key = pa_xstrdup(key); -+ -+ entry->ramp = *ramp; -+ -+ return entry; -+} -+ -+static void volume_ramp_factor_entry_free(struct volume_ramp_factor_entry *ramp_entry) { -+ pa_assert(ramp_entry); -+ -+ pa_xfree(ramp_entry->key); -+ pa_xfree(ramp_entry); -+} -+ -+static void volume_ramp_factor_from_hashmap(pa_cvolume_ramp *r, pa_hashmap *items, uint8_t channels, pa_volume_ramp_type_t type, long length) { -+ struct volume_ramp_factor_entry *entry; -+ void *state = NULL; -+ -+ pa_cvolume_ramp_reset(r, channels, type, length); -+ PA_HASHMAP_FOREACH(entry, items, state) -+ pa_sw_cvolume_ramp_multiply(r, r, &entry->ramp); -+ -+} -+ - static void sink_input_free(pa_object *o); - static void set_real_ratio(pa_sink_input *i, const pa_cvolume *v); - -@@ -500,6 +536,8 @@ int pa_sink_input_new( - i->volume_factor_sink_items = data->volume_factor_sink_items; - data->volume_factor_sink_items = NULL; - volume_factor_from_hashmap(&i->volume_factor_sink, i->volume_factor_sink_items, i->sink->sample_spec.channels); -+ i->ramp_factor_items = pa_hashmap_new_full(pa_idxset_string_hash_func, pa_idxset_string_compare_func, NULL, -+ (pa_free_cb_t) volume_ramp_factor_entry_free); - - i->real_ratio = i->reference_ratio = data->volume; - pa_cvolume_reset(&i->soft_volume, i->sample_spec.channels); -@@ -764,6 +802,9 @@ static void sink_input_free(pa_object *o) { - if (i->volume_factor_sink_items) - pa_hashmap_free(i->volume_factor_sink_items); - -+ if (i->ramp_factor_items) -+ pa_hashmap_free(i->ramp_factor_items); -+ - pa_xfree(i->driver); - pa_xfree(i); - } -@@ -1367,6 +1408,73 @@ int pa_sink_input_remove_volume_factor(pa_sink_input *i, const char *key) { - return 0; - } - -+void pa_sink_input_add_volume_ramp_factor(pa_sink_input *i, const char *key, const pa_cvolume_ramp *ramp_factor, bool send_msg) { -+ struct volume_ramp_factor_entry *r; -+ -+ pa_sink_input_assert_ref(i); -+ pa_assert_ctl_context(); -+ pa_assert(PA_SINK_INPUT_IS_LINKED(i->state)); -+ pa_assert(ramp_factor); -+ pa_assert(key); -+ pa_assert(pa_cvolume_ramp_valid(ramp_factor)); -+ pa_assert(ramp_factor->channels == 1 || pa_cvolume_ramp_compatible(ramp_factor, &i->sample_spec)); -+ -+ r = volume_ramp_factor_entry_new(key, ramp_factor); -+ if (!pa_cvolume_ramp_compatible(ramp_factor, &i->sample_spec)) -+ pa_cvolume_ramp_set(&r->ramp, i->sample_spec.channels, ramp_factor->ramps[0].type, ramp_factor->ramps[0].length, ramp_factor->ramps[0].target); -+ -+ pa_assert_se(pa_hashmap_put(i->ramp_factor_items, r->key, r) >= 0); -+ if (pa_hashmap_size(i->ramp_factor_items) == 1) -+ pa_cvolume_ramp_set(&i->ramp_factor, i->sample_spec.channels, r->ramp.ramps[0].type, r->ramp.ramps[0].length, r->ramp.ramps[0].target); -+ else -+ pa_sw_cvolume_ramp_multiply(&i->ramp_factor, &i->ramp_factor, &r->ramp); -+ -+ pa_cvolume_ramp_convert(&i->ramp_factor, &i->ramp, i->sample_spec.rate); -+ -+ if (send_msg) -+ pa_assert_se(pa_asyncmsgq_send(i->sink->asyncmsgq, PA_MSGOBJECT(i), PA_SINK_INPUT_MESSAGE_SET_VOLUME_RAMP, NULL, 0, NULL) == 0); -+ -+ return 0; -+} -+ -+/* Returns 0 if an entry was removed and -1 if no entry for the given key was -+ * found. */ -+int pa_sink_input_remove_volume_ramp_factor(pa_sink_input *i, const char *key, bool send_msg) { -+ struct volume_ramp_factor_entry *r; -+ -+ pa_sink_input_assert_ref(i); -+ pa_assert(key); -+ pa_assert_ctl_context(); -+ pa_assert(PA_SINK_INPUT_IS_LINKED(i->state)); -+ -+ r = pa_hashmap_remove(i->ramp_factor_items, key); -+ if (!r) -+ return -1; -+ -+ switch (pa_hashmap_size(i->ramp_factor_items)) { -+ case 0: -+ pa_cvolume_ramp_reset(&i->ramp_factor, i->sample_spec.channels, r->ramp.ramps[0].type, r->ramp.ramps[0].length); -+ break; -+ case 1: { -+ struct volume_ramp_factor_entry *rf; -+ rf = pa_hashmap_first(i->ramp_factor_items); -+ pa_cvolume_ramp_set(&i->ramp_factor, i->sample_spec.channels, r->ramp.ramps[0].type, r->ramp.ramps[0].length, rf->ramp.ramps[0].target); -+ break; -+ } -+ default: -+ volume_ramp_factor_from_hashmap(&i->ramp_factor, i->ramp_factor_items, i->ramp_factor.channels, i->ramp_factor.ramps[0].type, i->ramp_factor.ramps[0].length); -+ } -+ -+ volume_ramp_factor_entry_free(r); -+ -+ pa_cvolume_ramp_convert(&i->ramp_factor, &i->ramp, i->sample_spec.rate); -+ -+ if (send_msg) -+ pa_assert_se(pa_asyncmsgq_send(i->sink->asyncmsgq, PA_MSGOBJECT(i), PA_SINK_INPUT_MESSAGE_SET_VOLUME_RAMP, NULL, 0, NULL) == 0); -+ -+ return 0; -+} -+ - /* Called from main thread */ - void pa_sink_input_set_volume_ramp( - pa_sink_input *i, -diff --git a/src/pulsecore/sink-input.h b/src/pulsecore/sink-input.h -index 92f61c3..5430d53 100644 ---- a/src/pulsecore/sink-input.h -+++ b/src/pulsecore/sink-input.h -@@ -113,6 +113,9 @@ struct pa_sink_input { - pa_cvolume volume_factor_sink; /* A second volume factor in format of the sink this stream is connected to. */ - pa_hashmap *volume_factor_sink_items; - -+ pa_cvolume_ramp ramp_factor; -+ pa_hashmap *ramp_factor_items; -+ - bool volume_writable:1; - - bool muted:1; -@@ -379,6 +382,8 @@ void pa_sink_input_add_volume_factor(pa_sink_input *i, const char *key, const pa - int pa_sink_input_remove_volume_factor(pa_sink_input *i, const char *key); - pa_cvolume *pa_sink_input_get_volume(pa_sink_input *i, pa_cvolume *volume, bool absolute); - void pa_sink_input_set_volume_ramp(pa_sink_input *i, const pa_cvolume_ramp *ramp, bool send_msg); -+void pa_sink_input_add_volume_ramp_factor(pa_sink_input *i, const char *key, const pa_cvolume_ramp *ramp_factor, bool send_msg); -+int pa_sink_input_remove_volume_ramp_factor(pa_sink_input *i, const char *key, bool send_msg); - - void pa_sink_input_set_mute(pa_sink_input *i, bool mute, bool save); - --- -1.9.1 - diff --git a/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-10.0/0006-sink-input-Remove-pa_sink_input_set_volume_ramp.patch b/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-10.0/0006-sink-input-Remove-pa_sink_input_set_volume_ramp.patch deleted file mode 100644 index 50110bd14..000000000 --- a/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-10.0/0006-sink-input-Remove-pa_sink_input_set_volume_ramp.patch +++ /dev/null @@ -1,63 +0,0 @@ -From ac9a99505fd768b66dd92e9091e80b576cabc00d Mon Sep 17 00:00:00 2001 -From: Sangchul Lee -Date: Sat, 27 Aug 2016 21:33:20 +0900 -Subject: [PATCH 6/6] sink-input: Remove pa_sink_input_set_volume_ramp() - -Please use pa_sink_input_add_volume_ramp_factor() or -pa_sink_input_remove_volume_ramp_factor() instead of it. - -Signed-off-by: Sangchul Lee ---- - src/pulsecore/sink-input.c | 23 ----------------------- - src/pulsecore/sink-input.h | 1 - - 2 files changed, 24 deletions(-) - -diff --git a/src/pulsecore/sink-input.c b/src/pulsecore/sink-input.c -index 6f89aa1..4c7c568 100644 ---- a/src/pulsecore/sink-input.c -+++ b/src/pulsecore/sink-input.c -@@ -1475,29 +1475,6 @@ int pa_sink_input_remove_volume_ramp_factor(pa_sink_input *i, const char *key, b - return 0; - } - --/* Called from main thread */ --void pa_sink_input_set_volume_ramp( -- pa_sink_input *i, -- const pa_cvolume_ramp *ramp, -- bool send_msg) { -- pa_sink_input_assert_ref(i); -- pa_assert_ctl_context(); -- pa_assert(PA_SINK_INPUT_IS_LINKED(i->state)); -- pa_assert(ramp); -- -- pa_cvolume_ramp_convert(ramp, &i->ramp, i->sample_spec.rate); -- -- pa_log_debug("setting volume ramp with target vol:%d and length:%ld", -- i->ramp.ramps[0].target, -- i->ramp.ramps[0].length); -- -- -- /* This tells the sink that volume ramp changed */ -- if (send_msg) -- pa_assert_se(pa_asyncmsgq_send(i->sink->asyncmsgq, PA_MSGOBJECT(i), PA_SINK_INPUT_MESSAGE_SET_VOLUME_RAMP, -- NULL, 0, NULL) == 0); --} -- - /* Called from main context */ - static void set_real_ratio(pa_sink_input *i, const pa_cvolume *v) { - pa_sink_input_assert_ref(i); -diff --git a/src/pulsecore/sink-input.h b/src/pulsecore/sink-input.h -index 5430d53..5fef3d5 100644 ---- a/src/pulsecore/sink-input.h -+++ b/src/pulsecore/sink-input.h -@@ -381,7 +381,6 @@ void pa_sink_input_set_volume(pa_sink_input *i, const pa_cvolume *volume, bool s - void pa_sink_input_add_volume_factor(pa_sink_input *i, const char *key, const pa_cvolume *volume_factor); - int pa_sink_input_remove_volume_factor(pa_sink_input *i, const char *key); - pa_cvolume *pa_sink_input_get_volume(pa_sink_input *i, pa_cvolume *volume, bool absolute); --void pa_sink_input_set_volume_ramp(pa_sink_input *i, const pa_cvolume_ramp *ramp, bool send_msg); - void pa_sink_input_add_volume_ramp_factor(pa_sink_input *i, const char *key, const pa_cvolume_ramp *ramp_factor, bool send_msg); - int pa_sink_input_remove_volume_ramp_factor(pa_sink_input *i, const char *key, bool send_msg); - --- -1.9.1 - diff --git a/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-10.0/enable-ofono-hfp-backend.patch b/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-10.0/enable-ofono-hfp-backend.patch deleted file mode 100644 index 85b1ae03d..000000000 --- a/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-10.0/enable-ofono-hfp-backend.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- pulseaudio-9.0/src/daemon/default.pa.in.orig 2017-05-17 17:26:20.415369638 +0000 -+++ pulseaudio-9.0/src/daemon/default.pa.in 2017-05-17 17:26:49.995316383 +0000 -@@ -82,7 +82,7 @@ - .endif - - .ifexists module-bluetooth-discover@PA_SOEXT@ --load-module module-bluetooth-discover -+load-module module-bluetooth-discover headset=ofono - .endif - ])dnl - diff --git a/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-12.2/0001-install-files-for-a-module-development.patch b/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-12.2/0001-install-files-for-a-module-development.patch new file mode 100644 index 000000000..f77249a23 --- /dev/null +++ b/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-12.2/0001-install-files-for-a-module-development.patch @@ -0,0 +1,70 @@ +From 53281e2d11f84e2dae0704e0167369710ee2cb30 Mon Sep 17 00:00:00 2001 +From: Yannick Gicquel +Date: Fri, 23 Sep 2016 14:26:03 +0200 +Subject: [PATCH 1/6] install files for a module development + +Signed-off-by: Yannick Gicquel +--- + +diff --git a/Makefile.am b/Makefile.am +index 275ceea..77dd7a5 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -54,7 +54,16 @@ dist_vapi_DATA = \ + vala/libpulse-simple.deps vala/libpulse-simple.vapi + + pkgconfigdir = $(libdir)/pkgconfig +-pkgconfig_DATA = libpulse.pc libpulse-simple.pc ++pkgconfig_DATA = libpulse.pc libpulse-simple.pc pulseaudio-module-devel.pc ++ ++moduledev_DATA = pulsecore-config.h $(top_srcdir)/src/pulsecore/*.h ++moduledevdir = $(includedir)/pulsemodule/pulsecore ++ ++moduledevfilter_DATA = $(top_srcdir)/src/pulsecore/filter/*.h ++moduledevfilterdir = $(includedir)/pulsemodule/pulsecore/filter ++ ++moduledevinternal_DATA = src/pulse/internal.h src/pulse/client-conf.h src/pulse/fork-detect.h ++moduledevinternaldir = $(includedir)/pulsemodule/pulse + + if HAVE_GLIB20 + pkgconfig_DATA += \ +@@ -108,6 +117,9 @@ dist-hook: + check-daemon: + $(MAKE) -C src check-daemon + ++pulsecore-config.h: config.h ++ cp $< $@ ++ + .PHONY: homepage distcleancheck doxygen + + # see git-version-gen +diff --git a/configure.ac b/configure.ac +index c9c414f..87aa9b1 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1548,6 +1548,7 @@ man/pulse-client.conf.5.xml + man/default.pa.5.xml + man/pulse-cli-syntax.5.xml + man/start-pulseaudio-x11.1.xml ++pulseaudio-module-devel.pc + ]) + + AS_IF([test "x$HAVE_ESOUND" = "x1"], +diff --git a/pulseaudio-module-devel.pc.in b/pulseaudio-module-devel.pc.in +new file mode 100644 +index 0000000..85aadbc +--- /dev/null ++++ b/pulseaudio-module-devel.pc.in +@@ -0,0 +1,12 @@ ++prefix=@prefix@ ++exec_prefix=@exec_prefix@ ++libdir=@libdir@ ++includedir=@includedir@ ++modlibexecdir=@modlibexecdir@ ++ ++Name: pulseaudio-module-devel ++Description: PulseAudio Module Development Interface ++Version: @PACKAGE_VERSION@ ++Libs: -L${libdir} -L${libdir}/pulseaudio -L${modlibexecdir} -lpulsecommon-@PA_MAJORMINOR@ -lpulsecore-@PA_MAJORMINOR@ -lprotocol-native ++Libs.private: ++Cflags: -I${includedir}/pulsemodule -D_REENTRANT diff --git a/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-12.2/0002-volume-ramp-additions-to-the-low-level-infra.patch b/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-12.2/0002-volume-ramp-additions-to-the-low-level-infra.patch new file mode 100644 index 000000000..5b2da69c9 --- /dev/null +++ b/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-12.2/0002-volume-ramp-additions-to-the-low-level-infra.patch @@ -0,0 +1,564 @@ +From c28b5faa6745b525c11d1f54d8bf52386a90fcc1 Mon Sep 17 00:00:00 2001 +From: Sangchul Lee +Date: Sat, 27 Aug 2016 21:33:16 +0900 +Subject: [PATCH 2/6] volume ramp: additions to the low level infra + +The original patch is + - https://review.tizen.org/git/?p=platform/upstream/pulseaudio.git;a=commit;h=df1c4275ed79e0b708c75b92f9d247e0492bc1f0 + - by Jaska Uimonen helsinki.fi> + +Signed-off-by: Sangchul Lee + +--- + src/map-file | 4 + + src/pulse/def.h | 13 ++- + src/pulse/volume.c | 74 ++++++++++++- + src/pulse/volume.h | 33 ++++++ + src/pulsecore/mix.c | 310 ++++++++++++++++++++++++++++++++++++++++++++++++++++ + src/pulsecore/mix.h | 27 +++++ + 6 files changed, 459 insertions(+), 2 deletions(-) + +diff --git a/src/map-file b/src/map-file +index 9b6cba2..946ab54 100644 +--- a/src/map-file ++++ b/src/map-file +@@ -138,6 +138,10 @@ pa_cvolume_max_mask; + pa_cvolume_merge; + pa_cvolume_min; + pa_cvolume_min_mask; ++pa_cvolume_ramp_equal; ++pa_cvolume_ramp_init; ++pa_cvolume_ramp_set; ++pa_cvolume_ramp_channel_ramp_set; + pa_cvolume_remap; + pa_cvolume_scale; + pa_cvolume_scale_mask; +diff --git a/src/pulse/def.h b/src/pulse/def.h +index 100df5b..b13eed7 100644 +--- a/src/pulse/def.h ++++ b/src/pulse/def.h +@@ -349,11 +349,15 @@ typedef enum pa_stream_flags { + * consider absolute when the sink is in flat volume mode, + * relative otherwise. \since 0.9.20 */ + +- PA_STREAM_PASSTHROUGH = 0x80000U ++ PA_STREAM_PASSTHROUGH = 0x80000U, + /**< Used to tag content that will be rendered by passthrough sinks. + * The data will be left as is and not reformatted, resampled. + * \since 1.0 */ + ++ PA_STREAM_START_RAMP_MUTED = 0x100000U ++ /**< Used to tag content that the stream will be started ramp volume ++ * muted so that you can nicely fade it in */ ++ + } pa_stream_flags_t; + + /** \cond fulldocs */ +@@ -382,6 +386,7 @@ typedef enum pa_stream_flags { + #define PA_STREAM_FAIL_ON_SUSPEND PA_STREAM_FAIL_ON_SUSPEND + #define PA_STREAM_RELATIVE_VOLUME PA_STREAM_RELATIVE_VOLUME + #define PA_STREAM_PASSTHROUGH PA_STREAM_PASSTHROUGH ++#define PA_STREAM_START_RAMP_MUTED PA_STREAM_START_RAMP_MUTED + + /** \endcond */ + +@@ -1070,6 +1075,12 @@ typedef enum pa_port_available { + /** \endcond */ + #endif + ++/** \cond fulldocs */ ++#define PA_VOLUMER_RAMP_TYPE_LINEAR PA_VOLUMER_RAMP_TYPE_LINEAR ++#define PA_VOLUMER_RAMP_TYPE_LOGARITHMIC PA_VOLUMER_RAMP_TYPE_LOGARITHMIC ++#define PA_VOLUMER_RAMP_TYPE_CUBIC PA_VOLUMER_RAMP_TYPE_CUBIC ++/** \endcond */ ++ + PA_C_DECL_END + + #endif +diff --git a/src/pulse/volume.c b/src/pulse/volume.c +index ead5415..83a1e05 100644 +--- a/src/pulse/volume.c ++++ b/src/pulse/volume.c +@@ -457,7 +457,10 @@ int pa_cvolume_channels_equal_to(const pa_cvolume *a, pa_volume_t v) { + unsigned c; + pa_assert(a); + +- pa_return_val_if_fail(pa_cvolume_valid(a), 0); ++ if (pa_cvolume_valid(a) == 0) ++ abort(); ++ ++ /* pa_return_val_if_fail(pa_cvolume_valid(a), 0); */ + pa_return_val_if_fail(PA_VOLUME_IS_VALID(v), 0); + + for (c = 0; c < a->channels; c++) +@@ -989,3 +992,72 @@ pa_cvolume* pa_cvolume_dec(pa_cvolume *v, pa_volume_t dec) { + + return pa_cvolume_scale(v, m); + } ++ ++int pa_cvolume_ramp_equal(const pa_cvolume_ramp *a, const pa_cvolume_ramp *b) { ++ int i; ++ pa_assert(a); ++ pa_assert(b); ++ ++ if (PA_UNLIKELY(a == b)) ++ return 1; ++ ++ if (a->channels != b->channels) ++ return 0; ++ ++ for (i = 0; i < a->channels; i++) { ++ if (a->ramps[i].type != b->ramps[i].type || ++ a->ramps[i].length != b->ramps[i].length || ++ a->ramps[i].target != b->ramps[i].target) ++ return 0; ++ } ++ ++ return 1; ++} ++ ++pa_cvolume_ramp* pa_cvolume_ramp_init(pa_cvolume_ramp *ramp) { ++ unsigned c; ++ ++ pa_assert(ramp); ++ ++ ramp->channels = 0; ++ ++ for (c = 0; c < PA_CHANNELS_MAX; c++) { ++ ramp->ramps[c].type = PA_VOLUME_RAMP_TYPE_LINEAR; ++ ramp->ramps[c].length = 0; ++ ramp->ramps[c].target = PA_VOLUME_INVALID; ++ } ++ ++ return ramp; ++} ++ ++pa_cvolume_ramp* pa_cvolume_ramp_set(pa_cvolume_ramp *ramp, unsigned channels, pa_volume_ramp_type_t type, long time, pa_volume_t vol) { ++ int i; ++ ++ pa_assert(ramp); ++ pa_assert(channels > 0); ++ pa_assert(time >= 0); ++ pa_assert(channels <= PA_CHANNELS_MAX); ++ ++ ramp->channels = (uint8_t) channels; ++ ++ for (i = 0; i < ramp->channels; i++) { ++ ramp->ramps[i].type = type; ++ ramp->ramps[i].length = time; ++ ramp->ramps[i].target = PA_CLAMP_VOLUME(vol); ++ } ++ ++ return ramp; ++} ++ ++pa_cvolume_ramp* pa_cvolume_ramp_channel_ramp_set(pa_cvolume_ramp *ramp, unsigned channel, pa_volume_ramp_type_t type, long time, pa_volume_t vol) { ++ ++ pa_assert(ramp); ++ pa_assert(channel <= ramp->channels); ++ pa_assert(time >= 0); ++ ++ ramp->ramps[channel].type = type; ++ ramp->ramps[channel].length = time; ++ ramp->ramps[channel].target = PA_CLAMP_VOLUME(vol); ++ ++ return ramp; ++} +diff --git a/src/pulse/volume.h b/src/pulse/volume.h +index 2503c3f..0b74833 100644 +--- a/src/pulse/volume.h ++++ b/src/pulse/volume.h +@@ -437,6 +437,39 @@ pa_cvolume* pa_cvolume_inc(pa_cvolume *v, pa_volume_t inc); + * the channels are kept. Returns \a v, or NULL on error. \since 0.9.16 */ + pa_cvolume* pa_cvolume_dec(pa_cvolume *v, pa_volume_t dec); + ++/** Volume ramp type ++*/ ++typedef enum pa_volume_ramp_type { ++ PA_VOLUME_RAMP_TYPE_LINEAR = 0, /**< linear */ ++ PA_VOLUME_RAMP_TYPE_LOGARITHMIC = 1, /**< logarithmic */ ++ PA_VOLUME_RAMP_TYPE_CUBIC = 2, ++} pa_volume_ramp_type_t; ++ ++/** A structure encapsulating a volume ramp */ ++typedef struct pa_volume_ramp_t { ++ pa_volume_ramp_type_t type; ++ long length; ++ pa_volume_t target; ++} pa_volume_ramp_t; ++ ++/** A structure encapsulating a multichannel volume ramp */ ++typedef struct pa_cvolume_ramp { ++ uint8_t channels; ++ pa_volume_ramp_t ramps[PA_CHANNELS_MAX]; ++} pa_cvolume_ramp; ++ ++/** Return non-zero when *a == *b */ ++int pa_cvolume_ramp_equal(const pa_cvolume_ramp *a, const pa_cvolume_ramp *b); ++ ++/** Init volume ramp struct */ ++pa_cvolume_ramp* pa_cvolume_ramp_init(pa_cvolume_ramp *ramp); ++ ++/** Set first n channels of ramp struct to certain value */ ++pa_cvolume_ramp* pa_cvolume_ramp_set(pa_cvolume_ramp *ramp, unsigned channel, pa_volume_ramp_type_t type, long time, pa_volume_t vol); ++ ++/** Set individual channel in the channel struct */ ++pa_cvolume_ramp* pa_cvolume_ramp_channel_ramp_set(pa_cvolume_ramp *ramp, unsigned channel, pa_volume_ramp_type_t type, long time, pa_volume_t vol); ++ + PA_C_DECL_END + + #endif +diff --git a/src/pulsecore/mix.c b/src/pulsecore/mix.c +index 59622d7..1e4cc1e 100644 +--- a/src/pulsecore/mix.c ++++ b/src/pulsecore/mix.c +@@ -724,3 +724,313 @@ void pa_volume_memchunk( + + pa_memblock_release(c->memblock); + } ++ ++static void calc_linear_integer_volume_no_mapping(int32_t linear[], float volume[], unsigned nchannels) { ++ unsigned channel, padding; ++ ++ pa_assert(linear); ++ pa_assert(volume); ++ ++ for (channel = 0; channel < nchannels; channel++) ++ linear[channel] = (int32_t) lrint(volume[channel] * 0x10000U); ++ ++ for (padding = 0; padding < VOLUME_PADDING; padding++, channel++) ++ linear[channel] = linear[padding]; ++} ++ ++static void calc_linear_float_volume_no_mapping(float linear[], float volume[], unsigned nchannels) { ++ unsigned channel, padding; ++ ++ pa_assert(linear); ++ pa_assert(volume); ++ ++ for (channel = 0; channel < nchannels; channel++) ++ linear[channel] = volume[channel]; ++ ++ for (padding = 0; padding < VOLUME_PADDING; padding++, channel++) ++ linear[channel] = linear[padding]; ++} ++ ++typedef void (*pa_calc_volume_no_mapping_func_t) (void *volumes, float *volume, int channels); ++ ++static const pa_calc_volume_no_mapping_func_t calc_volume_table_no_mapping[] = { ++ [PA_SAMPLE_U8] = (pa_calc_volume_no_mapping_func_t) calc_linear_integer_volume_no_mapping, ++ [PA_SAMPLE_ALAW] = (pa_calc_volume_no_mapping_func_t) calc_linear_integer_volume_no_mapping, ++ [PA_SAMPLE_ULAW] = (pa_calc_volume_no_mapping_func_t) calc_linear_integer_volume_no_mapping, ++ [PA_SAMPLE_S16LE] = (pa_calc_volume_no_mapping_func_t) calc_linear_integer_volume_no_mapping, ++ [PA_SAMPLE_S16BE] = (pa_calc_volume_no_mapping_func_t) calc_linear_integer_volume_no_mapping, ++ [PA_SAMPLE_FLOAT32LE] = (pa_calc_volume_no_mapping_func_t) calc_linear_float_volume_no_mapping, ++ [PA_SAMPLE_FLOAT32BE] = (pa_calc_volume_no_mapping_func_t) calc_linear_float_volume_no_mapping, ++ [PA_SAMPLE_S32LE] = (pa_calc_volume_no_mapping_func_t) calc_linear_integer_volume_no_mapping, ++ [PA_SAMPLE_S32BE] = (pa_calc_volume_no_mapping_func_t) calc_linear_integer_volume_no_mapping, ++ [PA_SAMPLE_S24LE] = (pa_calc_volume_no_mapping_func_t) calc_linear_integer_volume_no_mapping, ++ [PA_SAMPLE_S24BE] = (pa_calc_volume_no_mapping_func_t) calc_linear_integer_volume_no_mapping, ++ [PA_SAMPLE_S24_32LE] = (pa_calc_volume_no_mapping_func_t) calc_linear_integer_volume_no_mapping, ++ [PA_SAMPLE_S24_32BE] = (pa_calc_volume_no_mapping_func_t) calc_linear_integer_volume_no_mapping ++}; ++ ++static const unsigned format_sample_size_table[] = { ++ [PA_SAMPLE_U8] = 1, ++ [PA_SAMPLE_ALAW] = 1, ++ [PA_SAMPLE_ULAW] = 1, ++ [PA_SAMPLE_S16LE] = 2, ++ [PA_SAMPLE_S16BE] = 2, ++ [PA_SAMPLE_FLOAT32LE] = 4, ++ [PA_SAMPLE_FLOAT32BE] = 4, ++ [PA_SAMPLE_S32LE] = 4, ++ [PA_SAMPLE_S32BE] = 4, ++ [PA_SAMPLE_S24LE] = 3, ++ [PA_SAMPLE_S24BE] = 3, ++ [PA_SAMPLE_S24_32LE] = 4, ++ [PA_SAMPLE_S24_32BE] = 4 ++}; ++ ++static float calc_volume_ramp_linear(pa_volume_ramp_int_t *ramp) { ++ pa_assert(ramp); ++ pa_assert(ramp->length > 0); ++ ++ /* basic linear interpolation */ ++ return ramp->start + (ramp->length - ramp->left) * (ramp->end - ramp->start) / (float) ramp->length; ++} ++ ++static float calc_volume_ramp_logarithmic(pa_volume_ramp_int_t *ramp) { ++ float x_val, s, e; ++ long temp; ++ ++ pa_assert(ramp); ++ pa_assert(ramp->length > 0); ++ ++ if (ramp->end > ramp->start) { ++ temp = ramp->left; ++ s = ramp->end; ++ e = ramp->start; ++ } else { ++ temp = ramp->length - ramp->left; ++ s = ramp->start; ++ e = ramp->end; ++ } ++ ++ x_val = temp == 0 ? 0.0 : powf(temp, 10); ++ ++ /* base 10 logarithmic interpolation */ ++ return s + x_val * (e - s) / powf(ramp->length, 10); ++} ++ ++static float calc_volume_ramp_cubic(pa_volume_ramp_int_t *ramp) { ++ float x_val, s, e; ++ long temp; ++ ++ pa_assert(ramp); ++ pa_assert(ramp->length > 0); ++ ++ if (ramp->end > ramp->start) { ++ temp = ramp->left; ++ s = ramp->end; ++ e = ramp->start; ++ } else { ++ temp = ramp->length - ramp->left; ++ s = ramp->start; ++ e = ramp->end; ++ } ++ ++ x_val = temp == 0 ? 0.0 : cbrtf(temp); ++ ++ /* cubic interpolation */ ++ return s + x_val * (e - s) / cbrtf(ramp->length); ++} ++ ++typedef float (*pa_calc_volume_ramp_func_t) (pa_volume_ramp_int_t *); ++ ++static const pa_calc_volume_ramp_func_t calc_volume_ramp_table[] = { ++ [PA_VOLUME_RAMP_TYPE_LINEAR] = (pa_calc_volume_ramp_func_t) calc_volume_ramp_linear, ++ [PA_VOLUME_RAMP_TYPE_LOGARITHMIC] = (pa_calc_volume_ramp_func_t) calc_volume_ramp_logarithmic, ++ [PA_VOLUME_RAMP_TYPE_CUBIC] = (pa_calc_volume_ramp_func_t) calc_volume_ramp_cubic ++}; ++ ++static void calc_volume_ramps(pa_cvolume_ramp_int *ram, float *vol) ++{ ++ int i; ++ ++ for (i = 0; i < ram->channels; i++) { ++ if (ram->ramps[i].left <= 0) { ++ if (ram->ramps[i].target == PA_VOLUME_NORM) { ++ vol[i] = 1.0; ++ } ++ } else { ++ vol[i] = ram->ramps[i].curr = calc_volume_ramp_table[ram->ramps[i].type] (&ram->ramps[i]); ++ ram->ramps[i].left--; ++ } ++ } ++} ++ ++void pa_volume_ramp_memchunk( ++ pa_memchunk *c, ++ const pa_sample_spec *spec, ++ pa_cvolume_ramp_int *ramp) { ++ ++ void *ptr; ++ volume_val linear[PA_CHANNELS_MAX + VOLUME_PADDING]; ++ float vol[PA_CHANNELS_MAX + VOLUME_PADDING]; ++ pa_do_volume_func_t do_volume; ++ long length_in_frames; ++ int i; ++ ++ pa_assert(c); ++ pa_assert(spec); ++ pa_assert(pa_frame_aligned(c->length, spec)); ++ pa_assert(ramp); ++ ++ length_in_frames = c->length / format_sample_size_table[spec->format] / spec->channels; ++ ++ if (pa_memblock_is_silence(c->memblock)) { ++ for (i = 0; i < ramp->channels; i++) { ++ if (ramp->ramps[i].length > 0) ++ ramp->ramps[i].length -= length_in_frames; ++ } ++ return; ++ } ++ ++ if (spec->format < 0 || spec->format >= PA_SAMPLE_MAX) { ++ pa_log_warn("Unable to change volume of format"); ++ return; ++ } ++ ++ do_volume = pa_get_volume_func(spec->format); ++ pa_assert(do_volume); ++ ++ ptr = (uint8_t*) pa_memblock_acquire(c->memblock) + c->index; ++ ++ for (i = 0; i < length_in_frames; i++) { ++ calc_volume_ramps(ramp, vol); ++ calc_volume_table_no_mapping[spec->format] ((void *)linear, vol, spec->channels); ++ ++ /* we only process one frame per iteration */ ++ do_volume (ptr, (void *)linear, spec->channels, format_sample_size_table[spec->format] * spec->channels); ++ ++ /* pa_log_debug("1: %d 2: %d", linear[0], linear[1]); */ ++ ++ ptr = (uint8_t*)ptr + format_sample_size_table[spec->format] * spec->channels; ++ } ++ ++ pa_memblock_release(c->memblock); ++} ++ ++pa_cvolume_ramp_int* pa_cvolume_ramp_convert(const pa_cvolume_ramp *src, pa_cvolume_ramp_int *dst, int sample_rate) { ++ ++ int i, j, channels, remaining_channels; ++ float temp; ++ ++ if (dst->channels < src->channels) { ++ channels = dst->channels; ++ remaining_channels = 0; ++ } ++ else { ++ channels = src->channels; ++ remaining_channels = dst->channels; ++ } ++ ++ for (i = 0; i < channels; i++) { ++ dst->ramps[i].type = src->ramps[i].type; ++ /* ms to samples */ ++ dst->ramps[i].length = src->ramps[i].length * sample_rate / 1000; ++ dst->ramps[i].left = dst->ramps[i].length; ++ dst->ramps[i].start = dst->ramps[i].end; ++ dst->ramps[i].target = src->ramps[i].target; ++ /* scale to pulse internal mapping so that when ramp is over there's no glitch in volume */ ++ temp = src->ramps[i].target / (float)0x10000U; ++ dst->ramps[i].end = temp * temp * temp; ++ } ++ ++ j = i; ++ ++ for (i--; j < remaining_channels; j++) { ++ dst->ramps[j].type = dst->ramps[i].type; ++ dst->ramps[j].length = dst->ramps[i].length; ++ dst->ramps[j].left = dst->ramps[i].left; ++ dst->ramps[j].start = dst->ramps[i].start; ++ dst->ramps[j].target = dst->ramps[i].target; ++ dst->ramps[j].end = dst->ramps[i].end; ++ } ++ ++ return dst; ++} ++ ++bool pa_cvolume_ramp_active(pa_cvolume_ramp_int *ramp) { ++ int i; ++ ++ for (i = 0; i < ramp->channels; i++) { ++ if (ramp->ramps[i].left > 0) ++ return true; ++ } ++ ++ return false; ++} ++ ++bool pa_cvolume_ramp_target_active(pa_cvolume_ramp_int *ramp) { ++ int i; ++ ++ for (i = 0; i < ramp->channels; i++) { ++ if (ramp->ramps[i].target != PA_VOLUME_NORM) ++ return true; ++ } ++ ++ return false; ++} ++ ++pa_cvolume * pa_cvolume_ramp_get_targets(pa_cvolume_ramp_int *ramp, pa_cvolume *volume) { ++ int i = 0; ++ ++ volume->channels = ramp->channels; ++ ++ for (i = 0; i < ramp->channels; i++) ++ volume->values[i] = ramp->ramps[i].target; ++ ++ return volume; ++} ++ ++pa_cvolume_ramp_int* pa_cvolume_ramp_start_from(pa_cvolume_ramp_int *src, pa_cvolume_ramp_int *dst) { ++ int i; ++ ++ for (i = 0; i < src->channels; i++) { ++ /* if new vols are invalid, copy old ramp i.e. no effect */ ++ if (dst->ramps[i].target == PA_VOLUME_INVALID) ++ dst->ramps[i] = src->ramps[i]; ++ /* if there's some old ramp still left */ ++ else if (src->ramps[i].left > 0) ++ dst->ramps[i].start = src->ramps[i].curr; ++ } ++ ++ return dst; ++} ++ ++pa_cvolume_ramp_int* pa_cvolume_ramp_int_init(pa_cvolume_ramp_int *src, pa_volume_t vol, int channels) { ++ int i; ++ float temp; ++ ++ src->channels = channels; ++ ++ for (i = 0; i < channels; i++) { ++ src->ramps[i].type = PA_VOLUME_RAMP_TYPE_LINEAR; ++ src->ramps[i].length = 0; ++ src->ramps[i].left = 0; ++ if (vol == PA_VOLUME_NORM) { ++ src->ramps[i].start = 1.0; ++ src->ramps[i].end = 1.0; ++ src->ramps[i].curr = 1.0; ++ } ++ else if (vol == PA_VOLUME_MUTED) { ++ src->ramps[i].start = 0.0; ++ src->ramps[i].end = 0.0; ++ src->ramps[i].curr = 0.0; ++ } ++ else { ++ temp = vol / (float)0x10000U; ++ src->ramps[i].start = temp * temp * temp; ++ src->ramps[i].end = src->ramps[i].start; ++ src->ramps[i].curr = src->ramps[i].start; ++ } ++ src->ramps[i].target = vol; ++ } ++ ++ return src; ++} +diff --git a/src/pulsecore/mix.h b/src/pulsecore/mix.h +index 8102bcd..0f86b6f 100644 +--- a/src/pulsecore/mix.h ++++ b/src/pulsecore/mix.h +@@ -59,4 +59,31 @@ void pa_volume_memchunk( + const pa_sample_spec *spec, + const pa_cvolume *volume); + ++typedef struct pa_volume_ramp_int_t { ++ pa_volume_ramp_type_t type; ++ long length; ++ long left; ++ float start; ++ float end; ++ float curr; ++ pa_volume_t target; ++} pa_volume_ramp_int_t; ++ ++typedef struct pa_cvolume_ramp_int { ++ uint8_t channels; ++ pa_volume_ramp_int_t ramps[PA_CHANNELS_MAX]; ++} pa_cvolume_ramp_int; ++ ++pa_cvolume_ramp_int* pa_cvolume_ramp_convert(const pa_cvolume_ramp *src, pa_cvolume_ramp_int *dst, int sample_rate); ++bool pa_cvolume_ramp_active(pa_cvolume_ramp_int *ramp); ++bool pa_cvolume_ramp_target_active(pa_cvolume_ramp_int *ramp); ++pa_cvolume_ramp_int* pa_cvolume_ramp_start_from(pa_cvolume_ramp_int *src, pa_cvolume_ramp_int *dst); ++pa_cvolume_ramp_int* pa_cvolume_ramp_int_init(pa_cvolume_ramp_int *src, pa_volume_t vol, int channels); ++pa_cvolume * pa_cvolume_ramp_get_targets(pa_cvolume_ramp_int *ramp, pa_cvolume *volume); ++ ++void pa_volume_ramp_memchunk( ++ pa_memchunk *c, ++ const pa_sample_spec *spec, ++ pa_cvolume_ramp_int *ramp); ++ + #endif diff --git a/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-12.2/0003-volume-ramp-adding-volume-ramping-to-sink-input.patch b/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-12.2/0003-volume-ramp-adding-volume-ramping-to-sink-input.patch new file mode 100644 index 000000000..eb485ca7c --- /dev/null +++ b/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-12.2/0003-volume-ramp-adding-volume-ramping-to-sink-input.patch @@ -0,0 +1,189 @@ +From e4469df7c69316b49cad93dd288badc98fa1cad5 Mon Sep 17 00:00:00 2001 +From: Sangchul Lee +Date: Sat, 27 Aug 2016 21:33:17 +0900 +Subject: [PATCH 3/6] volume ramp: adding volume ramping to sink-input + +The original patch is + - https://review.tizen.org/git/?p=platform/upstream/pulseaudio.git;a=commit;h=98042248fd67ce0ab3807c5c472c0d5d8b0f99d3 + - by Jaska Uimonen helsinki.fi> + +Signed-off-by: Sangchul Lee +--- + src/pulsecore/sink-input.c | 61 ++++++++++++++++++++++++++++++++++++++++++++++ + src/pulsecore/sink-input.h | 11 ++++++++- + 2 files changed, 71 insertions(+), 1 deletion(-) + +diff --git a/src/pulsecore/sink-input.c b/src/pulsecore/sink-input.c +index 8ec63b5..cc8953f 100644 +--- a/src/pulsecore/sink-input.c ++++ b/src/pulsecore/sink-input.c +@@ -526,6 +526,11 @@ int pa_sink_input_new( + reset_callbacks(i); + i->userdata = NULL; + ++ if (data->flags & PA_SINK_INPUT_START_RAMP_MUTED) ++ pa_cvolume_ramp_int_init(&i->ramp, PA_VOLUME_MUTED, data->sample_spec.channels); ++ else ++ pa_cvolume_ramp_int_init(&i->ramp, PA_VOLUME_NORM, data->sample_spec.channels); ++ + i->thread_info.state = i->state; + i->thread_info.attached = false; + pa_atomic_store(&i->thread_info.drained, 1); +@@ -542,6 +547,8 @@ int pa_sink_input_new( + i->thread_info.playing_for = 0; + i->thread_info.direct_outputs = pa_hashmap_new(pa_idxset_trivial_hash_func, pa_idxset_trivial_compare_func); + ++ i->thread_info.ramp = i->ramp; ++ + pa_assert_se(pa_idxset_put(core->sink_inputs, i, &i->index) == 0); + pa_assert_se(pa_idxset_put(i->sink->inputs, pa_sink_input_ref(i), NULL) == 0); + +@@ -923,6 +930,8 @@ void pa_sink_input_peek(pa_sink_input *i, size_t slength /* in sink bytes */, pa + while (tchunk.length > 0) { + pa_memchunk wchunk; + bool nvfs = need_volume_factor_sink; ++ pa_cvolume target; ++ pa_bool_t tmp; + + wchunk = tchunk; + pa_memblock_ref(wchunk.memblock); +@@ -959,6 +968,16 @@ void pa_sink_input_peek(pa_sink_input *i, size_t slength /* in sink bytes */, pa + pa_volume_memchunk(&wchunk, &i->sink->sample_spec, &i->volume_factor_sink); + } + ++ /* check for possible volume ramp */ ++ if (pa_cvolume_ramp_active(&i->thread_info.ramp)) { ++ pa_memchunk_make_writable(&wchunk, 0); ++ pa_volume_ramp_memchunk(&wchunk, &i->sink->sample_spec, &(i->thread_info.ramp)); ++ } else if ((tmp = pa_cvolume_ramp_target_active(&(i->thread_info.ramp)))) { ++ pa_memchunk_make_writable(&wchunk, 0); ++ pa_cvolume_ramp_get_targets(&i->thread_info.ramp, &target); ++ pa_volume_memchunk(&wchunk, &i->sink->sample_spec, &target); ++ } ++ + pa_memblockq_push_align(i->thread_info.render_memblockq, &wchunk); + } else { + pa_memchunk rchunk; +@@ -975,6 +994,16 @@ void pa_sink_input_peek(pa_sink_input *i, size_t slength /* in sink bytes */, pa + pa_volume_memchunk(&rchunk, &i->sink->sample_spec, &i->volume_factor_sink); + } + ++ /* check for possible volume ramp */ ++ if (pa_cvolume_ramp_active(&(i->thread_info.ramp))) { ++ pa_memchunk_make_writable(&rchunk, 0); ++ pa_volume_ramp_memchunk(&rchunk, &i->sink->sample_spec, &(i->thread_info.ramp)); ++ } else if (pa_cvolume_ramp_target_active(&(i->thread_info.ramp))) { ++ pa_memchunk_make_writable(&rchunk, 0); ++ pa_cvolume_ramp_get_targets(&i->thread_info.ramp, &target); ++ pa_volume_memchunk(&rchunk, &i->sink->sample_spec, &target); ++ } ++ + pa_memblockq_push_align(i->thread_info.render_memblockq, &rchunk); + pa_memblock_unref(rchunk.memblock); + } +@@ -1339,6 +1368,31 @@ int pa_sink_input_remove_volume_factor(pa_sink_input *i, const char *key) { + return 0; + } + ++/* Called from main thread */ ++void pa_sink_input_set_volume_ramp( ++ pa_sink_input *i, ++ const pa_cvolume_ramp *ramp, ++ pa_bool_t send_msg, ++ pa_bool_t save) { ++ ++ pa_sink_input_assert_ref(i); ++ pa_assert_ctl_context(); ++ pa_assert(PA_SINK_INPUT_IS_LINKED(i->state)); ++ pa_assert(ramp); ++ ++ pa_cvolume_ramp_convert(ramp, &i->ramp, i->sample_spec.rate); ++ ++ pa_log_debug("setting volume ramp with target vol:%d and length:%ld", ++ i->ramp.ramps[0].target, ++ i->ramp.ramps[0].length); ++ ++ ++ /* This tells the sink that volume ramp changed */ ++ if (send_msg) ++ pa_assert_se(pa_asyncmsgq_send(i->sink->asyncmsgq, PA_MSGOBJECT(i), PA_SINK_INPUT_MESSAGE_SET_VOLUME_RAMP, ++ NULL, 0, NULL) == 0); ++} ++ + /* Called from main context */ + static void set_real_ratio(pa_sink_input *i, const pa_cvolume *v) { + pa_sink_input_assert_ref(i); +@@ -1932,6 +1986,13 @@ int pa_sink_input_process_msg(pa_msgobject *o, int code, void *userdata, int64_t + } + return 0; + ++ case PA_SINK_INPUT_MESSAGE_SET_VOLUME_RAMP: ++ /* we have ongoing ramp where we take current start values */ ++ pa_cvolume_ramp_start_from(&i->thread_info.ramp, &i->ramp); ++ i->thread_info.ramp = i->ramp; ++ pa_sink_input_request_rewind(i, 0, true, false, false); ++ return 0; ++ + case PA_SINK_INPUT_MESSAGE_SET_SOFT_MUTE: + if (i->thread_info.muted != i->muted) { + i->thread_info.muted = i->muted; +diff --git a/src/pulsecore/sink-input.h b/src/pulsecore/sink-input.h +index 86deab2..6e1b211 100644 +--- a/src/pulsecore/sink-input.h ++++ b/src/pulsecore/sink-input.h +@@ -32,6 +32,7 @@ + #include + #include + #include ++#include + + typedef enum pa_sink_input_state { + PA_SINK_INPUT_INIT, /*< The stream is not active yet, because pa_sink_input_put() has not been called yet */ +@@ -58,7 +59,8 @@ typedef enum pa_sink_input_flags { + PA_SINK_INPUT_DONT_INHIBIT_AUTO_SUSPEND = 256, + PA_SINK_INPUT_NO_CREATE_ON_SUSPEND = 512, + PA_SINK_INPUT_KILL_ON_SUSPEND = 1024, +- PA_SINK_INPUT_PASSTHROUGH = 2048 ++ PA_SINK_INPUT_PASSTHROUGH = 2048, ++ PA_SINK_INPUT_START_RAMP_MUTED = 4096, + } pa_sink_input_flags_t; + + struct pa_sink_input { +@@ -121,6 +123,9 @@ struct pa_sink_input { + * this.*/ + bool save_sink:1, save_volume:1, save_muted:1; + ++ /* for volume ramps */ ++ pa_cvolume_ramp_int ramp; ++ + pa_resample_method_t requested_resample_method, actual_resample_method; + + /* Returns the chunk of audio data and drops it from the +@@ -249,6 +254,8 @@ struct pa_sink_input { + pa_usec_t requested_sink_latency; + + pa_hashmap *direct_outputs; ++ ++ pa_cvolume_ramp_int ramp; + } thread_info; + + void *userdata; +@@ -265,6 +272,7 @@ enum { + PA_SINK_INPUT_MESSAGE_SET_STATE, + PA_SINK_INPUT_MESSAGE_SET_REQUESTED_LATENCY, + PA_SINK_INPUT_MESSAGE_GET_REQUESTED_LATENCY, ++ PA_SINK_INPUT_MESSAGE_SET_VOLUME_RAMP, + PA_SINK_INPUT_MESSAGE_MAX + }; + +@@ -370,6 +378,7 @@ void pa_sink_input_set_volume(pa_sink_input *i, const pa_cvolume *volume, bool s + void pa_sink_input_add_volume_factor(pa_sink_input *i, const char *key, const pa_cvolume *volume_factor); + int pa_sink_input_remove_volume_factor(pa_sink_input *i, const char *key); + pa_cvolume *pa_sink_input_get_volume(pa_sink_input *i, pa_cvolume *volume, bool absolute); ++void pa_sink_input_set_volume_ramp(pa_sink_input *i, const pa_cvolume_ramp *ramp, pa_bool_t send_msg, pa_bool_t save); + + void pa_sink_input_set_mute(pa_sink_input *i, bool mute, bool save); + +-- +1.9.1 + diff --git a/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-12.2/0004-sink-input-Code-cleanup-regarding-volume-ramping.patch b/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-12.2/0004-sink-input-Code-cleanup-regarding-volume-ramping.patch new file mode 100644 index 000000000..64d7b141d --- /dev/null +++ b/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-12.2/0004-sink-input-Code-cleanup-regarding-volume-ramping.patch @@ -0,0 +1,62 @@ +From 49d8943b151a73be3dd726561a720c0f4bfdccac Mon Sep 17 00:00:00 2001 +From: Sangchul Lee +Date: Sat, 27 Aug 2016 21:33:18 +0900 +Subject: [PATCH 4/6] sink-input: Code cleanup regarding volume ramping + +Remove unused parameter of pa_sink_input_set_volume_ramp(). +Use bool instead of pa_bool_t. + +Signed-off-by: Sangchul Lee +--- + src/pulsecore/sink-input.c | 7 ++----- + src/pulsecore/sink-input.h | 2 +- + 2 files changed, 3 insertions(+), 6 deletions(-) + +diff --git a/src/pulsecore/sink-input.c b/src/pulsecore/sink-input.c +index cc8953f..e1968e0 100644 +--- a/src/pulsecore/sink-input.c ++++ b/src/pulsecore/sink-input.c +@@ -931,7 +931,6 @@ void pa_sink_input_peek(pa_sink_input *i, size_t slength /* in sink bytes */, pa + pa_memchunk wchunk; + bool nvfs = need_volume_factor_sink; + pa_cvolume target; +- pa_bool_t tmp; + + wchunk = tchunk; + pa_memblock_ref(wchunk.memblock); +@@ -972,7 +971,7 @@ void pa_sink_input_peek(pa_sink_input *i, size_t slength /* in sink bytes */, pa + if (pa_cvolume_ramp_active(&i->thread_info.ramp)) { + pa_memchunk_make_writable(&wchunk, 0); + pa_volume_ramp_memchunk(&wchunk, &i->sink->sample_spec, &(i->thread_info.ramp)); +- } else if ((tmp = pa_cvolume_ramp_target_active(&(i->thread_info.ramp)))) { ++ } else if ((pa_cvolume_ramp_target_active(&(i->thread_info.ramp)))) { + pa_memchunk_make_writable(&wchunk, 0); + pa_cvolume_ramp_get_targets(&i->thread_info.ramp, &target); + pa_volume_memchunk(&wchunk, &i->sink->sample_spec, &target); +@@ -1372,9 +1371,7 @@ int pa_sink_input_remove_volume_factor(pa_sink_input *i, const char *key) { + void pa_sink_input_set_volume_ramp( + pa_sink_input *i, + const pa_cvolume_ramp *ramp, +- pa_bool_t send_msg, +- pa_bool_t save) { +- ++ bool send_msg) { + pa_sink_input_assert_ref(i); + pa_assert_ctl_context(); + pa_assert(PA_SINK_INPUT_IS_LINKED(i->state)); +diff --git a/src/pulsecore/sink-input.h b/src/pulsecore/sink-input.h +index 6e1b211..92f61c3 100644 +--- a/src/pulsecore/sink-input.h ++++ b/src/pulsecore/sink-input.h +@@ -378,7 +378,7 @@ void pa_sink_input_set_volume(pa_sink_input *i, const pa_cvolume *volume, bool s + void pa_sink_input_add_volume_factor(pa_sink_input *i, const char *key, const pa_cvolume *volume_factor); + int pa_sink_input_remove_volume_factor(pa_sink_input *i, const char *key); + pa_cvolume *pa_sink_input_get_volume(pa_sink_input *i, pa_cvolume *volume, bool absolute); +-void pa_sink_input_set_volume_ramp(pa_sink_input *i, const pa_cvolume_ramp *ramp, pa_bool_t send_msg, pa_bool_t save); ++void pa_sink_input_set_volume_ramp(pa_sink_input *i, const pa_cvolume_ramp *ramp, bool send_msg); + + void pa_sink_input_set_mute(pa_sink_input *i, bool mute, bool save); + +-- +1.9.1 + diff --git a/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-12.2/0005-sink-input-volume-Add-support-for-volume-ramp-factor.patch b/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-12.2/0005-sink-input-volume-Add-support-for-volume-ramp-factor.patch new file mode 100644 index 000000000..e371b7ec5 --- /dev/null +++ b/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-12.2/0005-sink-input-volume-Add-support-for-volume-ramp-factor.patch @@ -0,0 +1,299 @@ +From a98e78ccc4f12d6efad2832a09202651e2a8b6cd Mon Sep 17 00:00:00 2001 +From: Sangchul Lee +Date: Sat, 27 Aug 2016 21:33:19 +0900 +Subject: [PATCH 5/6] sink-input, volume: Add support for volume ramp factor + +Previously, using pa_sink_input_set_volume_ramp() is hard to manage +if there are several callers. These new volume ramp factor APIs make it +easy for caller to use and to set more than one volume ramp factor. +New volume ramp factor will be applied by the multiplication of the other +ramp factors that have been already set. + +APIs are added as below. + - pa_sink_input_add_volume_ramp_factor() + - pa_sink_input_remove_volume_ramp_factor() + - pa_cvolume_ramp_compatible() + - pa_sw_cvolume_ramp_multiply() + - pa_cvolume_ramp_valid() + +Signed-off-by: Sangchul Lee +--- + src/map-file | 3 ++ + src/pulse/volume.c | 44 ++++++++++++++++++ + src/pulse/volume.h | 9 ++++ + src/pulsecore/sink-input.c | 108 +++++++++++++++++++++++++++++++++++++++++++++ + src/pulsecore/sink-input.h | 5 +++ + 5 files changed, 169 insertions(+) + +diff --git a/src/map-file b/src/map-file +index ef9b57d..7577c14 100644 +--- a/src/map-file ++++ b/src/map-file +@@ -142,6 +142,8 @@ pa_cvolume_ramp_equal; + pa_cvolume_ramp_init; + pa_cvolume_ramp_set; + pa_cvolume_ramp_channel_ramp_set; ++pa_cvolume_ramp_compatible; ++pa_cvolume_ramp_valid; + pa_cvolume_remap; + pa_cvolume_scale; + pa_cvolume_scale_mask; +@@ -344,6 +346,7 @@ pa_sw_cvolume_divide_scalar; + pa_sw_cvolume_multiply; + pa_sw_cvolume_multiply_scalar; + pa_sw_cvolume_snprint_dB; ++pa_sw_cvolume_ramp_multiply; + pa_sw_volume_divide; + pa_sw_volume_from_dB; + pa_sw_volume_from_linear; +diff --git a/src/pulse/volume.c b/src/pulse/volume.c +index 85072c1..8d99150 100644 +--- a/src/pulse/volume.c ++++ b/src/pulse/volume.c +@@ -1049,3 +1049,47 @@ pa_cvolume_ramp* pa_cvolume_ramp_channel_ramp_set(pa_cvolume_ramp *ramp, unsigne + + return ramp; + } ++ ++int pa_cvolume_ramp_compatible(const pa_cvolume_ramp *ramp, const pa_sample_spec *ss) { ++ ++ pa_assert(ramp); ++ pa_assert(ss); ++ ++ pa_return_val_if_fail(pa_cvolume_ramp_valid(ramp), 0); ++ pa_return_val_if_fail(pa_sample_spec_valid(ss), 0); ++ ++ return ramp->channels == ss->channels; ++} ++ ++pa_cvolume_ramp *pa_sw_cvolume_ramp_multiply(pa_cvolume_ramp *dest, const pa_cvolume_ramp *a, const pa_cvolume_ramp *b) { ++ unsigned i; ++ ++ pa_assert(dest); ++ pa_assert(a); ++ pa_assert(b); ++ ++ pa_return_val_if_fail(pa_cvolume_ramp_valid(a), NULL); ++ pa_return_val_if_fail(pa_cvolume_ramp_valid(b), NULL); ++ ++ for (i = 0; i < a->channels && i < b->channels; i++) ++ dest->ramps[i].target = pa_sw_volume_multiply(a->ramps[i].target, b->ramps[i].target); ++ ++ dest->channels = (uint8_t) i; ++ ++ return dest; ++} ++ ++int pa_cvolume_ramp_valid(const pa_cvolume_ramp *ramp) { ++ unsigned c; ++ ++ pa_assert(ramp); ++ ++ if (!pa_channels_valid(ramp->channels)) ++ return 0; ++ ++ for (c = 0; c < ramp->channels; c++) ++ if (!PA_VOLUME_IS_VALID(ramp->ramps[c].target)) ++ return 0; ++ ++ return 1; ++} +diff --git a/src/pulse/volume.h b/src/pulse/volume.h +index 2ae3451..65fcb08 100644 +--- a/src/pulse/volume.h ++++ b/src/pulse/volume.h +@@ -458,12 +458,21 @@ int pa_cvolume_ramp_equal(const pa_cvolume_ramp *a, const pa_cvolume_ramp *b); + /** Init volume ramp struct */ + pa_cvolume_ramp* pa_cvolume_ramp_init(pa_cvolume_ramp *ramp); + ++/** Set the volume ramp of the first n channels to PA_VOLUME_NORM */ ++#define pa_cvolume_ramp_reset(a, n, t, l) pa_cvolume_ramp_set((a), (n), (t), (l), PA_VOLUME_NORM) ++ + /** Set first n channels of ramp struct to certain value */ + pa_cvolume_ramp* pa_cvolume_ramp_set(pa_cvolume_ramp *ramp, unsigned channel, pa_volume_ramp_type_t type, long time, pa_volume_t vol); + + /** Set individual channel in the channel struct */ + pa_cvolume_ramp* pa_cvolume_ramp_channel_ramp_set(pa_cvolume_ramp *ramp, unsigned channel, pa_volume_ramp_type_t type, long time, pa_volume_t vol); + ++int pa_cvolume_ramp_compatible(const pa_cvolume_ramp *ramp, const pa_sample_spec *ss); ++ ++int pa_cvolume_ramp_valid(const pa_cvolume_ramp *ramp); ++ ++pa_cvolume_ramp *pa_sw_cvolume_ramp_multiply(pa_cvolume_ramp *dest, const pa_cvolume_ramp *a, const pa_cvolume_ramp *b); ++ + PA_C_DECL_END + + #endif +diff --git a/src/pulsecore/sink-input.c b/src/pulsecore/sink-input.c +index e1968e0..6f89aa1 100644 +--- a/src/pulsecore/sink-input.c ++++ b/src/pulsecore/sink-input.c +@@ -53,6 +53,11 @@ struct volume_factor_entry { + pa_cvolume volume; + }; + ++struct volume_ramp_factor_entry { ++ char *key; ++ pa_cvolume_ramp ramp; ++}; ++ + static struct volume_factor_entry *volume_factor_entry_new(const char *key, const pa_cvolume *volume) { + struct volume_factor_entry *entry; + +@@ -83,6 +88,37 @@ static void volume_factor_from_hashmap(pa_cvolume *v, pa_hashmap *items, uint8_t + pa_sw_cvolume_multiply(v, v, &entry->volume); + } + ++static struct volume_ramp_factor_entry *volume_ramp_factor_entry_new(const char *key, const pa_cvolume_ramp *ramp) { ++ struct volume_ramp_factor_entry *entry; ++ ++ pa_assert(key); ++ pa_assert(ramp); ++ ++ entry = pa_xnew(struct volume_ramp_factor_entry, 1); ++ entry->key = pa_xstrdup(key); ++ ++ entry->ramp = *ramp; ++ ++ return entry; ++} ++ ++static void volume_ramp_factor_entry_free(struct volume_ramp_factor_entry *ramp_entry) { ++ pa_assert(ramp_entry); ++ ++ pa_xfree(ramp_entry->key); ++ pa_xfree(ramp_entry); ++} ++ ++static void volume_ramp_factor_from_hashmap(pa_cvolume_ramp *r, pa_hashmap *items, uint8_t channels, pa_volume_ramp_type_t type, long length) { ++ struct volume_ramp_factor_entry *entry; ++ void *state = NULL; ++ ++ pa_cvolume_ramp_reset(r, channels, type, length); ++ PA_HASHMAP_FOREACH(entry, items, state) ++ pa_sw_cvolume_ramp_multiply(r, r, &entry->ramp); ++ ++} ++ + static void sink_input_free(pa_object *o); + static void set_real_ratio(pa_sink_input *i, const pa_cvolume *v); + +@@ -500,6 +536,8 @@ int pa_sink_input_new( + i->volume_factor_sink_items = data->volume_factor_sink_items; + data->volume_factor_sink_items = NULL; + volume_factor_from_hashmap(&i->volume_factor_sink, i->volume_factor_sink_items, i->sink->sample_spec.channels); ++ i->ramp_factor_items = pa_hashmap_new_full(pa_idxset_string_hash_func, pa_idxset_string_compare_func, NULL, ++ (pa_free_cb_t) volume_ramp_factor_entry_free); + + i->real_ratio = i->reference_ratio = data->volume; + pa_cvolume_reset(&i->soft_volume, i->sample_spec.channels); +@@ -764,6 +802,9 @@ static void sink_input_free(pa_object *o) { + if (i->volume_factor_sink_items) + pa_hashmap_free(i->volume_factor_sink_items); + ++ if (i->ramp_factor_items) ++ pa_hashmap_free(i->ramp_factor_items); ++ + pa_xfree(i->driver); + pa_xfree(i); + } +@@ -1367,6 +1408,73 @@ int pa_sink_input_remove_volume_factor(pa_sink_input *i, const char *key) { + return 0; + } + ++void pa_sink_input_add_volume_ramp_factor(pa_sink_input *i, const char *key, const pa_cvolume_ramp *ramp_factor, bool send_msg) { ++ struct volume_ramp_factor_entry *r; ++ ++ pa_sink_input_assert_ref(i); ++ pa_assert_ctl_context(); ++ pa_assert(PA_SINK_INPUT_IS_LINKED(i->state)); ++ pa_assert(ramp_factor); ++ pa_assert(key); ++ pa_assert(pa_cvolume_ramp_valid(ramp_factor)); ++ pa_assert(ramp_factor->channels == 1 || pa_cvolume_ramp_compatible(ramp_factor, &i->sample_spec)); ++ ++ r = volume_ramp_factor_entry_new(key, ramp_factor); ++ if (!pa_cvolume_ramp_compatible(ramp_factor, &i->sample_spec)) ++ pa_cvolume_ramp_set(&r->ramp, i->sample_spec.channels, ramp_factor->ramps[0].type, ramp_factor->ramps[0].length, ramp_factor->ramps[0].target); ++ ++ pa_assert_se(pa_hashmap_put(i->ramp_factor_items, r->key, r) >= 0); ++ if (pa_hashmap_size(i->ramp_factor_items) == 1) ++ pa_cvolume_ramp_set(&i->ramp_factor, i->sample_spec.channels, r->ramp.ramps[0].type, r->ramp.ramps[0].length, r->ramp.ramps[0].target); ++ else ++ pa_sw_cvolume_ramp_multiply(&i->ramp_factor, &i->ramp_factor, &r->ramp); ++ ++ pa_cvolume_ramp_convert(&i->ramp_factor, &i->ramp, i->sample_spec.rate); ++ ++ if (send_msg) ++ pa_assert_se(pa_asyncmsgq_send(i->sink->asyncmsgq, PA_MSGOBJECT(i), PA_SINK_INPUT_MESSAGE_SET_VOLUME_RAMP, NULL, 0, NULL) == 0); ++ ++ return 0; ++} ++ ++/* Returns 0 if an entry was removed and -1 if no entry for the given key was ++ * found. */ ++int pa_sink_input_remove_volume_ramp_factor(pa_sink_input *i, const char *key, bool send_msg) { ++ struct volume_ramp_factor_entry *r; ++ ++ pa_sink_input_assert_ref(i); ++ pa_assert(key); ++ pa_assert_ctl_context(); ++ pa_assert(PA_SINK_INPUT_IS_LINKED(i->state)); ++ ++ r = pa_hashmap_remove(i->ramp_factor_items, key); ++ if (!r) ++ return -1; ++ ++ switch (pa_hashmap_size(i->ramp_factor_items)) { ++ case 0: ++ pa_cvolume_ramp_reset(&i->ramp_factor, i->sample_spec.channels, r->ramp.ramps[0].type, r->ramp.ramps[0].length); ++ break; ++ case 1: { ++ struct volume_ramp_factor_entry *rf; ++ rf = pa_hashmap_first(i->ramp_factor_items); ++ pa_cvolume_ramp_set(&i->ramp_factor, i->sample_spec.channels, r->ramp.ramps[0].type, r->ramp.ramps[0].length, rf->ramp.ramps[0].target); ++ break; ++ } ++ default: ++ volume_ramp_factor_from_hashmap(&i->ramp_factor, i->ramp_factor_items, i->ramp_factor.channels, i->ramp_factor.ramps[0].type, i->ramp_factor.ramps[0].length); ++ } ++ ++ volume_ramp_factor_entry_free(r); ++ ++ pa_cvolume_ramp_convert(&i->ramp_factor, &i->ramp, i->sample_spec.rate); ++ ++ if (send_msg) ++ pa_assert_se(pa_asyncmsgq_send(i->sink->asyncmsgq, PA_MSGOBJECT(i), PA_SINK_INPUT_MESSAGE_SET_VOLUME_RAMP, NULL, 0, NULL) == 0); ++ ++ return 0; ++} ++ + /* Called from main thread */ + void pa_sink_input_set_volume_ramp( + pa_sink_input *i, +diff --git a/src/pulsecore/sink-input.h b/src/pulsecore/sink-input.h +index 92f61c3..5430d53 100644 +--- a/src/pulsecore/sink-input.h ++++ b/src/pulsecore/sink-input.h +@@ -113,6 +113,9 @@ struct pa_sink_input { + pa_cvolume volume_factor_sink; /* A second volume factor in format of the sink this stream is connected to. */ + pa_hashmap *volume_factor_sink_items; + ++ pa_cvolume_ramp ramp_factor; ++ pa_hashmap *ramp_factor_items; ++ + bool volume_writable:1; + + bool muted:1; +@@ -379,6 +382,8 @@ void pa_sink_input_add_volume_factor(pa_sink_input *i, const char *key, const pa + int pa_sink_input_remove_volume_factor(pa_sink_input *i, const char *key); + pa_cvolume *pa_sink_input_get_volume(pa_sink_input *i, pa_cvolume *volume, bool absolute); + void pa_sink_input_set_volume_ramp(pa_sink_input *i, const pa_cvolume_ramp *ramp, bool send_msg); ++void pa_sink_input_add_volume_ramp_factor(pa_sink_input *i, const char *key, const pa_cvolume_ramp *ramp_factor, bool send_msg); ++int pa_sink_input_remove_volume_ramp_factor(pa_sink_input *i, const char *key, bool send_msg); + + void pa_sink_input_set_mute(pa_sink_input *i, bool mute, bool save); + +-- +1.9.1 + diff --git a/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-12.2/0006-sink-input-Remove-pa_sink_input_set_volume_ramp.patch b/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-12.2/0006-sink-input-Remove-pa_sink_input_set_volume_ramp.patch new file mode 100644 index 000000000..50110bd14 --- /dev/null +++ b/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-12.2/0006-sink-input-Remove-pa_sink_input_set_volume_ramp.patch @@ -0,0 +1,63 @@ +From ac9a99505fd768b66dd92e9091e80b576cabc00d Mon Sep 17 00:00:00 2001 +From: Sangchul Lee +Date: Sat, 27 Aug 2016 21:33:20 +0900 +Subject: [PATCH 6/6] sink-input: Remove pa_sink_input_set_volume_ramp() + +Please use pa_sink_input_add_volume_ramp_factor() or +pa_sink_input_remove_volume_ramp_factor() instead of it. + +Signed-off-by: Sangchul Lee +--- + src/pulsecore/sink-input.c | 23 ----------------------- + src/pulsecore/sink-input.h | 1 - + 2 files changed, 24 deletions(-) + +diff --git a/src/pulsecore/sink-input.c b/src/pulsecore/sink-input.c +index 6f89aa1..4c7c568 100644 +--- a/src/pulsecore/sink-input.c ++++ b/src/pulsecore/sink-input.c +@@ -1475,29 +1475,6 @@ int pa_sink_input_remove_volume_ramp_factor(pa_sink_input *i, const char *key, b + return 0; + } + +-/* Called from main thread */ +-void pa_sink_input_set_volume_ramp( +- pa_sink_input *i, +- const pa_cvolume_ramp *ramp, +- bool send_msg) { +- pa_sink_input_assert_ref(i); +- pa_assert_ctl_context(); +- pa_assert(PA_SINK_INPUT_IS_LINKED(i->state)); +- pa_assert(ramp); +- +- pa_cvolume_ramp_convert(ramp, &i->ramp, i->sample_spec.rate); +- +- pa_log_debug("setting volume ramp with target vol:%d and length:%ld", +- i->ramp.ramps[0].target, +- i->ramp.ramps[0].length); +- +- +- /* This tells the sink that volume ramp changed */ +- if (send_msg) +- pa_assert_se(pa_asyncmsgq_send(i->sink->asyncmsgq, PA_MSGOBJECT(i), PA_SINK_INPUT_MESSAGE_SET_VOLUME_RAMP, +- NULL, 0, NULL) == 0); +-} +- + /* Called from main context */ + static void set_real_ratio(pa_sink_input *i, const pa_cvolume *v) { + pa_sink_input_assert_ref(i); +diff --git a/src/pulsecore/sink-input.h b/src/pulsecore/sink-input.h +index 5430d53..5fef3d5 100644 +--- a/src/pulsecore/sink-input.h ++++ b/src/pulsecore/sink-input.h +@@ -381,7 +381,6 @@ void pa_sink_input_set_volume(pa_sink_input *i, const pa_cvolume *volume, bool s + void pa_sink_input_add_volume_factor(pa_sink_input *i, const char *key, const pa_cvolume *volume_factor); + int pa_sink_input_remove_volume_factor(pa_sink_input *i, const char *key); + pa_cvolume *pa_sink_input_get_volume(pa_sink_input *i, pa_cvolume *volume, bool absolute); +-void pa_sink_input_set_volume_ramp(pa_sink_input *i, const pa_cvolume_ramp *ramp, bool send_msg); + void pa_sink_input_add_volume_ramp_factor(pa_sink_input *i, const char *key, const pa_cvolume_ramp *ramp_factor, bool send_msg); + int pa_sink_input_remove_volume_ramp_factor(pa_sink_input *i, const char *key, bool send_msg); + +-- +1.9.1 + diff --git a/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-12.2/enable-ofono-hfp-backend.patch b/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-12.2/enable-ofono-hfp-backend.patch new file mode 100644 index 000000000..85b1ae03d --- /dev/null +++ b/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio-12.2/enable-ofono-hfp-backend.patch @@ -0,0 +1,11 @@ +--- pulseaudio-9.0/src/daemon/default.pa.in.orig 2017-05-17 17:26:20.415369638 +0000 ++++ pulseaudio-9.0/src/daemon/default.pa.in 2017-05-17 17:26:49.995316383 +0000 +@@ -82,7 +82,7 @@ + .endif + + .ifexists module-bluetooth-discover@PA_SOEXT@ +-load-module module-bluetooth-discover ++load-module module-bluetooth-discover headset=ofono + .endif + ])dnl + diff --git a/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio_10.0.bbappend b/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio_10.0.bbappend deleted file mode 100644 index f59ee89d5..000000000 --- a/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio_10.0.bbappend +++ /dev/null @@ -1,15 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/pulseaudio-10.0:" - -SRC_URI += " \ - file://0001-install-files-for-a-module-development.patch \ - file://0002-volume-ramp-additions-to-the-low-level-infra.patch \ - file://0003-volume-ramp-adding-volume-ramping-to-sink-input.patch \ - file://0004-sink-input-Code-cleanup-regarding-volume-ramping.patch \ - file://0005-sink-input-volume-Add-support-for-volume-ramp-factor.patch \ - file://0006-sink-input-Remove-pa_sink_input_set_volume_ramp.patch;apply=no \ - file://enable-ofono-hfp-backend.patch \ -" - -PACKAGES =+ " pulseaudio-module-dev" - -FILES_pulseaudio-module-dev = "${includedir}/pulsemodule/* ${libdir}/pkgconfig/pulseaudio-module-devel.pc" diff --git a/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio_12.2.bbappend b/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio_12.2.bbappend new file mode 100644 index 000000000..746100400 --- /dev/null +++ b/meta-agl-profile-core/recipes-multimedia/pulseaudio/pulseaudio_12.2.bbappend @@ -0,0 +1,15 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}-${PV}:" + +SRC_URI += " \ + file://0001-install-files-for-a-module-development.patch \ + file://0002-volume-ramp-additions-to-the-low-level-infra.patch \ + file://0003-volume-ramp-adding-volume-ramping-to-sink-input.patch \ + file://0004-sink-input-Code-cleanup-regarding-volume-ramping.patch \ + file://0005-sink-input-volume-Add-support-for-volume-ramp-factor.patch \ + file://0006-sink-input-Remove-pa_sink_input_set_volume_ramp.patch;apply=no \ + file://enable-ofono-hfp-backend.patch \ +" + +PACKAGES =+ " pulseaudio-module-dev" + +FILES_pulseaudio-module-dev = "${includedir}/pulsemodule/* ${libdir}/pkgconfig/pulseaudio-module-devel.pc" diff --git a/meta-agl-profile-core/recipes-support/opencv/opencv_3.%.bbappend b/meta-agl-profile-core/recipes-support/opencv/opencv_3.%.bbappend new file mode 100644 index 000000000..8656abf09 --- /dev/null +++ b/meta-agl-profile-core/recipes-support/opencv/opencv_3.%.bbappend @@ -0,0 +1 @@ +PACKAGECONFIG ?= "jpeg png v4l libv4l gstreamer" diff --git a/meta-agl-profile-core/recipes-support/opencv/opencv_3.3.bbappend b/meta-agl-profile-core/recipes-support/opencv/opencv_3.3.bbappend deleted file mode 100644 index 8656abf09..000000000 --- a/meta-agl-profile-core/recipes-support/opencv/opencv_3.3.bbappend +++ /dev/null @@ -1 +0,0 @@ -PACKAGECONFIG ?= "jpeg png v4l libv4l gstreamer" diff --git a/meta-agl-profile-core/recipes-test/freetype/files/0001-Makefile-dont-build-gfx-demos.patch b/meta-agl-profile-core/recipes-test/freetype/files/0001-Makefile-dont-build-gfx-demos.patch index 1f3acf28e..4d0d09aea 100644 --- a/meta-agl-profile-core/recipes-test/freetype/files/0001-Makefile-dont-build-gfx-demos.patch +++ b/meta-agl-profile-core/recipes-test/freetype/files/0001-Makefile-dont-build-gfx-demos.patch @@ -1,7 +1,7 @@ -diff -urN /tmp/ft2demos-2.6.orig/Makefile /tmp/ft2demos-2.6/Makefile ---- ft2demos-2.6.orig/Makefile 2015-06-07 07:34:19.000000000 +0000 -+++ ft2demos-2.6/Makefile 2016-06-17 14:25:37.640456725 +0000 -@@ -153,7 +153,8 @@ +diff -ur ft2demos-2.9.1.orig/Makefile ft2demos-2.9.1/Makefile +--- ft2demos-2.9.1.orig/Makefile 2018-04-22 05:41:50.000000000 -0400 ++++ ft2demos-2.9.1/Makefile 2019-02-18 23:28:59.794678736 -0500 +@@ -163,7 +163,8 @@ ifeq ($(PLATFORM),unix) CC = $(CCraw) @@ -10,8 +10,8 @@ diff -urN /tmp/ft2demos-2.6.orig/Makefile /tmp/ft2demos-2.6/Makefile + LINK_CMD = $(subst /,$(SEP),$(LIBTOOL)) \ --mode=link $(CC) \ $(subst /,$(COMPILER_SEP),$(LDFLAGS)) - LINK_LIBS = $(subst /,$(COMPILER_SEP),$(FTLIB) $(EFENCE)) -@@ -279,12 +280,12 @@ + LINK_LIBS = $(subst /,$(COMPILER_SEP),$(FTLIB) $(EFENCE)) $(LIB_CLOCK_GETTIME) +@@ -289,12 +290,12 @@ ttdebug # Comment out the next line if you don't have a graphics subsystem. diff --git a/meta-agl-profile-core/recipes-test/freetype/freetype_2.8.bbappend b/meta-agl-profile-core/recipes-test/freetype/freetype_2.8.bbappend deleted file mode 100644 index 282ce784a..000000000 --- a/meta-agl-profile-core/recipes-test/freetype/freetype_2.8.bbappend +++ /dev/null @@ -1,32 +0,0 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/files:" - -SRC_URI =+ "${SOURCEFORGE_MIRROR}/freetype/ft2demos-${PV}.tar.bz2;name=ft2demos \ - file://0001-Makefile-dont-build-gfx-demos.patch;patchdir=../ft2demos-${PV} \ - file://0001-ft2demos-Makefile-Do-not-hardcode-libtool-path.patch;patchdir=../ft2demos-${PV} \ - " -SRC_URI[ft2demos.md5sum] = "61db5831e213acb843f0fc6d10186054" -SRC_URI[ft2demos.sha256sum] = "2b6ce0d36bcb43fcc8aac07a0287982d855571ee271c3803c768e501f9c1a233" - -PACKAGES =+ "${PN}-demos" - -B = "${S}" - -do_compile_append () { - - oe_runmake -C ${WORKDIR}/ft2demos-${PV} TOP_DIR=${WORKDIR}/${BPN}-${PV}/ -} - -do_install_append () { - install -d -m 0755 ${D}/${bindir} - for x in ftbench ftdump ftlint ftvalid ttdebug; do - install -m 0755 ${WORKDIR}/ft2demos-${PV}/bin/.libs/$x ${D}/${bindir} - done -} - -FILES_${PN}-demos = "\ - ${bindir}/ftbench \ - ${bindir}/ftdump \ - ${bindir}/ftlint \ - ${bindir}/ftvalid \ - ${bindir}/ttdebug \ -" diff --git a/meta-agl-profile-core/recipes-test/freetype/freetype_2.9.1.bbappend b/meta-agl-profile-core/recipes-test/freetype/freetype_2.9.1.bbappend new file mode 100644 index 000000000..5d4b101a0 --- /dev/null +++ b/meta-agl-profile-core/recipes-test/freetype/freetype_2.9.1.bbappend @@ -0,0 +1,32 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" + +SRC_URI =+ "${SOURCEFORGE_MIRROR}/freetype/ft2demos-${PV}.tar.bz2;name=ft2demos \ + file://0001-Makefile-dont-build-gfx-demos.patch;patchdir=../ft2demos-${PV} \ + file://0001-ft2demos-Makefile-Do-not-hardcode-libtool-path.patch;patchdir=../ft2demos-${PV} \ + " +SRC_URI[ft2demos.md5sum] = "178827156d90e07bce8f354c9565d84b" +SRC_URI[ft2demos.sha256sum] = "806eb6363ee5963174a6740f9b7893377912165899c2c1f6372c422aab818c6a" + +PACKAGES =+ "${PN}-demos" + +B = "${S}" + +do_compile_append () { + + oe_runmake -C ${WORKDIR}/ft2demos-${PV} TOP_DIR=${WORKDIR}/${BPN}-${PV}/ +} + +do_install_append () { + install -d -m 0755 ${D}/${bindir} + for x in ftbench ftdump ftlint ftvalid ttdebug; do + install -m 0755 ${WORKDIR}/ft2demos-${PV}/bin/.libs/$x ${D}/${bindir} + done +} + +FILES_${PN}-demos = "\ + ${bindir}/ftbench \ + ${bindir}/ftdump \ + ${bindir}/ftlint \ + ${bindir}/ftvalid \ + ${bindir}/ttdebug \ +" -- cgit 1.2.3-korg