summaryrefslogtreecommitdiffstats
path: root/ATTIC/meta-audio-4a-framework/recipes-multimedia/agl-service-audio-4a
diff options
context:
space:
mode:
authorJan-Simon Möller <jsmoeller@linuxfoundation.org>2020-02-21 16:32:33 +0100
committerJan-Simon Möller <jsmoeller@linuxfoundation.org>2020-02-21 16:32:33 +0100
commiteaeded3d05c033a1011ed86219c678ef3c72240f (patch)
tree17fada653f21428f6ed20a519ade132d580aedbd /ATTIC/meta-audio-4a-framework/recipes-multimedia/agl-service-audio-4a
parent3a788ab8e1f5b076e09a694ba225f7132c6171bf (diff)
parent2938eb34a55ebb4cb0427314151b30fd97ef6e78 (diff)
Merge remote-tracking branch 'agl/next'
* agl/next: meta-speech-framework: enable building Alexa voiceagent against zeus Declare layer compatibility with zeus Change-Id: I9c717cde0b51635c14f683b8d1d66a563ec3d7ed
Diffstat (limited to 'ATTIC/meta-audio-4a-framework/recipes-multimedia/agl-service-audio-4a')
-rw-r--r--ATTIC/meta-audio-4a-framework/recipes-multimedia/agl-service-audio-4a/agl-service-audio-4a_git.bb58
-rwxr-xr-xATTIC/meta-audio-4a-framework/recipes-multimedia/agl-service-audio-4a/files/4a_wait_bt.sh83
2 files changed, 0 insertions, 141 deletions
diff --git a/ATTIC/meta-audio-4a-framework/recipes-multimedia/agl-service-audio-4a/agl-service-audio-4a_git.bb b/ATTIC/meta-audio-4a-framework/recipes-multimedia/agl-service-audio-4a/agl-service-audio-4a_git.bb
deleted file mode 100644
index 014fe119..00000000
--- a/ATTIC/meta-audio-4a-framework/recipes-multimedia/agl-service-audio-4a/agl-service-audio-4a_git.bb
+++ /dev/null
@@ -1,58 +0,0 @@
-SUMMARY = "4A - High Level Audio API Service"
-DESCRIPTION = "High Level Audio API service used in 4A (AGL Advanced Audio Agent)"
-HOMEPAGE = "https://git.automotivelinux.org/apps/agl-service-audio-4a/"
-SECTION = "apps"
-
-LICENSE = "Apache-2.0"
-LIC_FILES_CHKSUM = "file://Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
-
-SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/agl-service-audio-4a;protocol=https;branch=${AGL_BRANCH}"
-SRCREV = "${AGL_APP_REVISION}"
-
-PV = "0.1+git${SRCPV}"
-S = "${WORKDIR}/git"
-
-inherit cmake aglwgt pkgconfig
-
-DEPENDS += "alsa-lib json-c systemd af-binder glib-2.0 lua libappcontroller"
-
-do_aglwgt_deploy_append() {
- cat <<'EOF' >${D}/${sysconfdir}/agl-postinsts/99_4A_service_patch.sh
-N=600
-svcfile="/usr/local/lib/systemd/*/afm-service-agl-service-audio-4a*.service"
-set -x
-echo "-- TMP 4A INSTALL FIX from meta-agl/meta-app-framework/recipes-multimedia/agl-service-audio-4a/agl-service-audio-4a_git.bb - MUST BE REMOVED !!!"
-while ! ls $svcfile > /dev/null; do
- if [ $N = 0 ]; then echo "-- TMP 4A INSTALL NOT FIXED"; exit 0; fi
- echo .
- sleep 0.2
- N=$(expr $N - 1)
-done
-sed -i '/\[Unit\]/ a Before=pulseaudio.service' $svcfile;
-sed -i '/\[Unit\]/ a ConditionPathExistsGlob=/dev/snd/control*' $svcfile;
-sed -i '/ExecStartPre=/ a Environment=LIBASOUND_THREAD_SAFE=0' $svcfile;
-
-sed -i -e 's|/usr/bin/afb-daemon\>|& --ldpath=/usr/libexec/agl/4a-alsa-core/lib:/usr/libexec/agl/4a-hal/lib:/usr/libexec/agl/smixer/lib|' $svcfile
-
-# binder name matters: it must match "afbd-4a-*" => the config file (controller json file) that will be searched will be "policy-4a-*.json"
-sed -i -e 's|--name afbd-agl-\(.*\)|--name afbd-4a-\1|' $svcfile
-
-# workaround for SPEC-1762
-sed -i -e 's|/usr/bin/afb-daemon\>|/usr/bin/4a_wait_bt.sh &|' $svcfile
-
-echo "-- TMP 4A INSTALL FIX END"
-
-EOF
- chmod a+x ${D}/${sysconfdir}/agl-postinsts/99_4A_service_patch.sh
-}
-
-##############################################
-# workaround for SPEC-1762/SPEC-1763
-RDEPENDS_${PN} += "bash"
-SRC_URI += "file://4a_wait_bt.sh"
-do_install_append() {
- install -d ${D}${bindir}
- install -m 0755 ${WORKDIR}/4a_wait_bt.sh ${D}${bindir}/
-}
-#
-##############################################
diff --git a/ATTIC/meta-audio-4a-framework/recipes-multimedia/agl-service-audio-4a/files/4a_wait_bt.sh b/ATTIC/meta-audio-4a-framework/recipes-multimedia/agl-service-audio-4a/files/4a_wait_bt.sh
deleted file mode 100755
index 9dec4350..00000000
--- a/ATTIC/meta-audio-4a-framework/recipes-multimedia/agl-service-audio-4a/files/4a_wait_bt.sh
+++ /dev/null
@@ -1,83 +0,0 @@
-#!/bin/bash
-
-###############################################################
-# This is a workaround for SPEC-1762/SPEC-1763
-#
-# THIS SCRIPT MUST BE REMOVED ONCE THE ABOVE ISSUES ARE SOLVED
-#
-# Source recipe is:
-#
-# meta-audio-4a-framework/
-# recipes-multimedia/
-# agl-service-audio-4a/
-# agl-service-audio-4a_git.bb
-#
-# Signed-off-by: Stephane Desneux <stephane.desneux@iot.bzh>
-###############################################################
-
-# time from script startup
-LIMIT=20
-ts0=0
-function ts() { echo $(( $(date +%s) - ts0 )); }
-ts0=$(ts)
-function havetime() { [[ $(ts) -le ${1:-$LIMIT} ]] || return 1; }
-
-function waitloop() {
- # ensure bt modules are loaded (delay: 5s)
- while havetime 4; do
- [[ -d /sys/module/bluetooth ]] && {
- echo "bluetooth kernel module detected"
- break
- }
- echo "waiting for bluetooth kernel module to be up"
- sleep 0.2
- done
- havetime 4 || { echo "TIMEOUT REACHED"; return 1; }
-
- # check that we have at least one controller
- HCIDEV=
- while havetime 8; do
- echo "detecting hci devices..."
- for x in $(ls /sys/class/bluetooth/hci* 2>/dev/null); do
- [[ -z "$HCIDEV" ]] && HCIDEV=$(basename $x)
- done
- [[ -n "$HCIDEV" ]] && {
- echo "found HCI controller: $HCIDEV"
- break
- }
- sleep 0.2
- done
- havetime 8 || { echo "TIMEOUT REACHED"; return 1; }
-
- # wait for controller to be up and running
- while havetime 15; do
- state=$(hciconfig $HCIDEV | grep -A 2 ^hci0 | tail -1)
- [[ $state =~ UP ]] && [[ $state =~ RUNNING ]] && {
- echo "HCI controller $HCIDEV state: $state"
- break
- }
- echo "HCI controller $HCIDEV state: $state ... waiting for UP RUNNING"
- sleep 0.2
- done
- havetime 15 || { echo "TIMEOUT REACHED"; return 1; }
- echo "HCI device up and running after $(ts) seconds"
-
- # wait for bluetooth-service to return something
- while havetime; do
- res=$(afb-client-demo -d unix:/run/user/$UID/apis/ws/Bluetooth-Manager adapter_state true)
- [[ "$res" =~ \"response\":(.*)}$ ]] && res=${BASH_REMATCH[1]}
- [[ "$res" =~ \"powered\":true ]] && {
- echo "Bluetooth-Manager/power: $res"
- break
- }
- echo "Bluetooth-Manager/power: not ready yet ($res)"
- sleep 0.2
- done
- echo "Bluetooth-Manager ready after $(ts) seconds"
-
- echo "4A now starting..."
-}
-
-waitloop 2>&1 | sed 's/^/4AWAITBT /' >&2
-exec "$@"
-