From 4236e3753fb8816da7c347ef50aa4cfac8f8e1b4 Mon Sep 17 00:00:00 2001 From: Ziyang Zhou Date: Sun, 15 Jun 2025 22:16:30 +0800 Subject: [PATCH] android-14.0.0_r75: OMX fix --- .../av/0002-NOT-skip-OMX-nodes.patch | 26 ------- .../av/0002-bring-back-OMX-nodes.patch | 76 +++++++++++++++++++ 2 files changed, 76 insertions(+), 26 deletions(-) delete mode 100644 android-14.0.0_r75/frameworks/av/0002-NOT-skip-OMX-nodes.patch create mode 100644 android-14.0.0_r75/frameworks/av/0002-bring-back-OMX-nodes.patch diff --git a/android-14.0.0_r75/frameworks/av/0002-NOT-skip-OMX-nodes.patch b/android-14.0.0_r75/frameworks/av/0002-NOT-skip-OMX-nodes.patch deleted file mode 100644 index a53d50e..0000000 --- a/android-14.0.0_r75/frameworks/av/0002-NOT-skip-OMX-nodes.patch +++ /dev/null @@ -1,26 +0,0 @@ -From be4599dcbe8cd0be837a324dacead3a47deacfc5 Mon Sep 17 00:00:00 2001 -From: Ziyang Zhou -Date: Sat, 6 Aug 2022 10:17:12 +0800 -Subject: [PATCH 2/2] NOT skip OMX nodes - -users may use legacy kernel without `ION` / `DMABUF_HEAP` enabled, -enable OMX nodes to support this. ---- - media/libstagefright/omx/OMXStore.cpp | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/media/libstagefright/omx/OMXStore.cpp b/media/libstagefright/omx/OMXStore.cpp -index b2d5a70..3be56c8 100644 ---- a/media/libstagefright/omx/OMXStore.cpp -+++ b/media/libstagefright/omx/OMXStore.cpp -@@ -161,7 +161,6 @@ void OMXStore::addPlugin(OMXPluginBase *plugin) { - } - } - if (skip) { -- continue; - } - } - --- -2.49.0 - diff --git a/android-14.0.0_r75/frameworks/av/0002-bring-back-OMX-nodes.patch b/android-14.0.0_r75/frameworks/av/0002-bring-back-OMX-nodes.patch new file mode 100644 index 0000000..e2cfdec --- /dev/null +++ b/android-14.0.0_r75/frameworks/av/0002-bring-back-OMX-nodes.patch @@ -0,0 +1,76 @@ +From 27f73e374923b4cb835f4aee7428b540a416225a Mon Sep 17 00:00:00 2001 +From: Ziyang Zhou +Date: Sat, 6 Aug 2022 10:17:12 +0800 +Subject: [PATCH 2/2] bring back OMX nodes + +users may use legacy kernel without `ION` / `DMABUF_HEAP` enabled, +enable OMX nodes to support this. +--- + media/libstagefright/omx/Android.bp | 1 - + media/libstagefright/omx/OMXStore.cpp | 1 - + services/mediacodec/Android.bp | 25 +++++++++++++++++++++++++ + 3 files changed, 25 insertions(+), 2 deletions(-) + +diff --git a/media/libstagefright/omx/Android.bp b/media/libstagefright/omx/Android.bp +index 79ab009..62ea779 100644 +--- a/media/libstagefright/omx/Android.bp ++++ b/media/libstagefright/omx/Android.bp +@@ -186,7 +186,6 @@ cc_defaults { + name: "libstagefright_softomx-defaults", + // TODO (b/316432618) Software OMX codecs are no longer used, disable building them till + // this code is removed completely. +- enabled: false, + vendor_available: true, + + cflags: [ +diff --git a/media/libstagefright/omx/OMXStore.cpp b/media/libstagefright/omx/OMXStore.cpp +index b2d5a70..3be56c8 100644 +--- a/media/libstagefright/omx/OMXStore.cpp ++++ b/media/libstagefright/omx/OMXStore.cpp +@@ -161,7 +161,6 @@ void OMXStore::addPlugin(OMXPluginBase *plugin) { + } + } + if (skip) { +- continue; + } + } + +diff --git a/services/mediacodec/Android.bp b/services/mediacodec/Android.bp +index 506b3bc..a2f17c2 100644 +--- a/services/mediacodec/Android.bp ++++ b/services/mediacodec/Android.bp +@@ -95,6 +95,31 @@ cc_binary { + "android.hidl.memory@1.0", + ], + ++ runtime_libs: [ ++ "libstagefright_soft_aacdec", ++ "libstagefright_soft_aacenc", ++ "libstagefright_soft_amrdec", ++ "libstagefright_soft_amrnbenc", ++ "libstagefright_soft_amrwbenc", ++ "libstagefright_soft_avcdec", ++ "libstagefright_soft_avcenc", ++ "libstagefright_soft_flacdec", ++ "libstagefright_soft_flacenc", ++ "libstagefright_soft_g711dec", ++ "libstagefright_soft_gsmdec", ++ "libstagefright_soft_hevcdec", ++ "libstagefright_soft_mp3dec", ++ "libstagefright_soft_mpeg2dec", ++ "libstagefright_soft_mpeg4dec", ++ "libstagefright_soft_mpeg4enc", ++ "libstagefright_soft_opusdec", ++ "libstagefright_soft_rawdec", ++ "libstagefright_soft_vorbisdec", ++ "libstagefright_soft_vpxdec", ++ "libstagefright_soft_vpxenc", ++ "libstagefright_softomx_plugin", ++ ], ++ + // OMX interfaces force this to stay in 32-bit mode; + compile_multilib: "32", + +-- +2.49.0 +