diff options
author | Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> | 2020-11-27 16:33:10 +0100 |
---|---|---|
committer | Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> | 2020-11-27 16:59:06 +0100 |
commit | 793fd4961605352ae711d0e40a1879864655204d (patch) | |
tree | 32dffdf27fc482f59ca4709cd4bbb5aec00c49ec /audio/Android.mk | |
parent | cabace3fafc736d0d42ac9c7e89073e77c0d839c (diff) | |
download | device_samsung_midas-common-793fd4961605352ae711d0e40a1879864655204d.tar.gz device_samsung_midas-common-793fd4961605352ae711d0e40a1879864655204d.tar.bz2 device_samsung_midas-common-793fd4961605352ae711d0e40a1879864655204d.zip |
Import dragonboard audio library
The audio directory from the dragonboard git[1] is imported
as-is from the following commit:
bc02e153097048c72e86037920a19a286fb012ca
bc02e15 Snap for 6191568 from 7f47f75eaf9d475bbcdd78343e9a40cf6d986874 to rvc-release
For some reasons merely adding the following to midas.mk:
PRODUCT_PACKAGES += audio.primary.exynos4
wasn't enough to get an audio.primary.exynos4.so library in the
out/target/product/i9300 directory.
Importing this audio library here fixes that.
In addition, if we look at the audio library in audio being used in
Replicant 6 for the GT-I9300[2], in audio/ we have calls to several
functions related to the RIL, like ril_open, ril_close,
ril_register_set_wb_amr_callback, ril_set_call_audio_path, and so on.
Because of that we will most probably need to implement something
similar to make audio work in calls, so it's probably best to fork
that library anyway, at least for the GT-I9300.
References:
-----------
[1]https://android.googlesource.com/device/linaro/dragonboard
[2]https://git.replicant.us/replicant/device_samsung_i9300.git
Thanks to Joonas Kylmälä who identified that the dragonboard
audio library worked out of the box on Android 11 for the
Galaxy SIII 4G (GT-I9305).
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Diffstat (limited to 'audio/Android.mk')
-rw-r--r-- | audio/Android.mk | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/audio/Android.mk b/audio/Android.mk new file mode 100644 index 0000000..afa804f --- /dev/null +++ b/audio/Android.mk @@ -0,0 +1,41 @@ +# Copyright (C) 2016 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +LOCAL_PATH := $(call my-dir) + +# The default audio HAL module, which is a stub, that is loaded if no other +# device specific modules are present. The exact load order can be seen in +# libhardware/hardware.c +# +# The format of the name is audio.<type>.<hardware/etc>.so where the only +# required type is 'primary'. Other possibilites are 'a2dp', 'usb', etc. +include $(CLEAR_VARS) + +LOCAL_HEADER_LIBRARIES += libhardware_headers +LOCAL_MODULE := audio.primary.$(TARGET_BOARD_PLATFORM) +LOCAL_MODULE_PATH_32 := $(TARGET_OUT_VENDOR)/lib/hw +LOCAL_MODULE_PATH_64 := $(TARGET_OUT_VENDOR)/lib64/hw +LOCAL_VENDOR_MODULE := true + +LOCAL_SRC_FILES := audio_hw.c +LOCAL_SHARED_LIBRARIES := liblog libcutils libtinyalsa +LOCAL_CFLAGS := -Wno-unused-parameter +LOCAL_C_INCLUDES += \ + external/tinyalsa/include \ + external/expat/lib \ + system/media/audio_utils/include \ + system/media/audio_effects/include + +include $(BUILD_SHARED_LIBRARY) + |