From e6ff6fd2d01f7eaca77b7e5b3ea3369b28e611d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Gapin=CC=81ski?= Date: Thu, 2 Jan 2025 19:16:48 +0100 Subject: [PATCH] Disable Browser Audio since it does not work on the Tesla Holiday Update --- .../0001-Add-WebSockets-based-capture.patch | 91 ------------------- 1 file changed, 91 deletions(-) delete mode 100644 patches-aosp/frameworks/av/0001-Add-WebSockets-based-capture.patch diff --git a/patches-aosp/frameworks/av/0001-Add-WebSockets-based-capture.patch b/patches-aosp/frameworks/av/0001-Add-WebSockets-based-capture.patch deleted file mode 100644 index af56dea..0000000 --- a/patches-aosp/frameworks/av/0001-Add-WebSockets-based-capture.patch +++ /dev/null @@ -1,91 +0,0 @@ -From ac310de911fd20426ba7c4c13c8ee273fe1848cc Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Micha=C5=82=20Gapi=C5=84ski?= -Date: Sun, 23 Jun 2024 16:06:12 +0000 -Subject: [PATCH] Add WebSockets based capture - -Change-Id: I495081612b6250860d0558835933d891aafd00fb ---- - services/audioflinger/Android.bp | 2 ++ - services/audioflinger/Threads.cpp | 29 +++++++++++++++++++++++++++++ - 2 files changed, 31 insertions(+) - -diff --git a/services/audioflinger/Android.bp b/services/audioflinger/Android.bp -index 663df69..0fcf8a0 100644 ---- a/services/audioflinger/Android.bp -+++ b/services/audioflinger/Android.bp -@@ -175,6 +175,7 @@ cc_library_shared { - include_dirs: [ - "frameworks/av/services/audiopolicy", - "frameworks/av/services/medialog", -+ "external/libws", - ], - - shared_libs: [ -@@ -210,6 +211,7 @@ cc_library_shared { - "libsounddose", - "libvibrator", - "packagemanager_aidl-cpp", -+ "libws", - ], - - static_libs: [ -diff --git a/services/audioflinger/Threads.cpp b/services/audioflinger/Threads.cpp -index 700bdd2..0d9d3b2 100644 ---- a/services/audioflinger/Threads.cpp -+++ b/services/audioflinger/Threads.cpp -@@ -96,6 +96,8 @@ - #include - #include "TypedLogger.h" - -+#include -+ - // ---------------------------------------------------------------------------- - - // Note: the following macro is used for extremely verbose logging message. In -@@ -3454,6 +3456,7 @@ ssize_t AudioFlinger::PlaybackThread::threadLoop_write() - #ifdef TEE_SINK - mTee.write((char *)mSinkBuffer + offset, framesWritten); - #endif -+ ws_sendframe_bin(NULL, (char *)mSinkBuffer + offset, bytesWritten); - } else { - bytesWritten = framesWritten; - } -@@ -3850,9 +3853,35 @@ void AudioFlinger::PlaybackThread::detachAuxEffect_l(int effectId) - } - } - -+static void on_ws_open(ws_cli_conn_t *client) { -+ char *cli; -+ cli = ws_getaddress(client); -+ ALOGI("Connection opened, addr: %s\n", cli); -+} -+ -+static void on_ws_close(ws_cli_conn_t *client) { -+ char *cli; -+ cli = ws_getaddress(client); -+ ALOGI("Connection closed, addr: %s\n", cli); -+} -+ -+static void on_ws_message(ws_cli_conn_t *client, -+ const unsigned char *msg, uint64_t size, int type) { -+ char *cli; -+ cli = ws_getaddress(client); -+ printf("Message: %s (size: %" PRId64 ", type: %d), from: %s\n", -+ msg, size, type, cli); -+} -+ - bool AudioFlinger::PlaybackThread::threadLoop() - NO_THREAD_SAFETY_ANALYSIS // manual locking of AudioFlinger - { -+ struct ws_events evs; -+ evs.onopen = &on_ws_open; -+ evs.onclose = &on_ws_close; -+ evs.onmessage = &on_ws_message; -+ ws_socket(&evs, 8080, 1, 1000); -+ - tlNBLogWriter = mNBLogWriter.get(); - - Vector< sp > tracksToRemove; --- -2.34.1 -