Skip to content

Commit

Permalink
Re-Structure audio HAL
Browse files Browse the repository at this point in the history
- Bring xml based routing logic
- Modularize BT VOIP functions
- General code re-structue using clang-format

NOTE: This code wont be enabled for compilation.
TO be replaced with current HAL once full validation
is done offline.

Tracked-On: OAM-123634
Signed-off-by: Deepa G K <[email protected]>
Signed-off-by: sgnanase <[email protected]>
  • Loading branch information
sgnanase committed Aug 21, 2024
1 parent 9a8f8c0 commit 7579f61
Show file tree
Hide file tree
Showing 8 changed files with 2,795 additions and 0 deletions.
67 changes: 67 additions & 0 deletions primary_new/Android.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Copyright (C) 2012 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.

ifeq ($(INTEL_AUDIO_HAL),audio)

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

LOCAL_SRC_FILES := \
config.c \
utils.c \
audio_hw.c

LOCAL_SHARED_LIBRARIES := \
libexpat \
liblog \
libcutils \
libaudioutils \
libtinyalsa \
libsafestring \
libaudioroute \
libdl

LOCAL_C_INCLUDES += \
external/tinyalsa/include \
$(LOCAL_PATH)/include \
$(call include-path-for, audio-utils) \
$(call include-path-for, audio-route) \
$(call include-path-for, audio-effects)

LOCAL_CFLAGS :=\
-fwrapv \
-D_FORTIFY_SOURCE=2 \
-fstack-protector-strong \
-Wno-conversion-null \
-Wnull-dereference \
-Werror \
-Warray-bounds \
-Wformat -Wformat-security \
-Werror=format-security

#Preferred paths for all vendor hals /vendor/lib/hw
LOCAL_PROPRIETARY_MODULE := true

LOCAL_HEADER_LIBRARIES += libhardware_headers

LOCAL_MODULE := audio.primary.new.$(TARGET_BOARD_PLATFORM)

LOCAL_MODULE_RELATIVE_PATH := hw

LOCAL_MODULE_TAGS := optional

include $(BUILD_SHARED_LIBRARY)

endif # INTEL_AUDIO_HAL
18 changes: 18 additions & 0 deletions primary_new/audio_dbg.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// Copyright (C) 2024 Intel Corporation
// SPDX-License-Identifier: Apache-2.0

/*#define LOG_NDEBUG 0*/

//#define DEBUG_PCM_DUMP

#ifdef DEBUG_PCM_DUMP
// To enable dumps, explicitly create "/vendor/dump/" folder and reboot device
FILE *sco_call_write = NULL;
FILE *sco_call_write_remapped = NULL;
FILE *sco_call_write_bt = NULL;
FILE *sco_call_read = NULL;
FILE *sco_call_read_remapped = NULL;
FILE *sco_call_read_bt = NULL;
FILE *out_write_dump = NULL;
FILE *in_read_dump = NULL;
#endif
Loading

0 comments on commit 7579f61

Please sign in to comment.