Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-Structure audio HAL #68

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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