summaryrefslogtreecommitdiffstats
path: root/audio/2.0
diff options
context:
space:
mode:
authorKevin Rocard <krocard@google.com>2018-03-01 18:32:43 -0800
committerKevin Rocard <krocard@google.com>2018-03-06 11:30:51 -0800
commit269603006338ef4b4327c413d3ea9d89d93aa06e (patch)
tree2f4d74b0ea91b27f3913eb2f9a739a61d1af83c6 /audio/2.0
parentaf7f78daa6517f49f9c54de05dedb1f691ca883f (diff)
downloadplatform_hardware_interfaces-269603006338ef4b4327c413d3ea9d89d93aa06e.tar.gz
platform_hardware_interfaces-269603006338ef4b4327c413d3ea9d89d93aa06e.tar.bz2
platform_hardware_interfaces-269603006338ef4b4327c413d3ea9d89d93aa06e.zip
Audio V4: Move service entry point to common
The HAL audio service entry point is not version dependant and is common to core and effect. Bug: 38184704 Test: compile Change-Id: I143cf28490afc978791ccd7e8aeee2106cbb2ebd Merged-In: I143cf28490afc978791ccd7e8aeee2106cbb2ebd Cherry-picked from master Signed-off-by: Kevin Rocard <krocard@google.com>
Diffstat (limited to 'audio/2.0')
-rw-r--r--audio/2.0/default/Android.mk54
-rw-r--r--audio/2.0/default/android.hardware.audio@2.0-service.rc11
-rw-r--r--audio/2.0/default/service.cpp56
3 files changed, 0 insertions, 121 deletions
diff --git a/audio/2.0/default/Android.mk b/audio/2.0/default/Android.mk
deleted file mode 100644
index edf1761b7f..0000000000
--- a/audio/2.0/default/Android.mk
+++ /dev/null
@@ -1,54 +0,0 @@
-#
-# 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)
-
-#
-# Service
-#
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := android.hardware.audio@2.0-service
-LOCAL_INIT_RC := android.hardware.audio@2.0-service.rc
-LOCAL_MODULE_RELATIVE_PATH := hw
-LOCAL_PROPRIETARY_MODULE := true
-LOCAL_SRC_FILES := \
- service.cpp
-
-LOCAL_CFLAGS := -Wall -Werror
-
-LOCAL_SHARED_LIBRARIES := \
- libbinder \
- libhidlbase \
- libhidltransport \
- liblog \
- libutils \
- libhardware \
- android.hardware.audio@2.0 \
- android.hardware.audio.common@2.0 \
- android.hardware.audio.effect@2.0 \
- android.hardware.soundtrigger@2.0 \
- android.hardware.soundtrigger@2.1
-
-# Can not switch to Android.bp until AUDIOSERVER_MULTILIB
-# is deprecated as build config variable are not supported
-ifeq ($(strip $(AUDIOSERVER_MULTILIB)),)
-LOCAL_MULTILIB := 32
-else
-LOCAL_MULTILIB := $(AUDIOSERVER_MULTILIB)
-endif
-
-include $(BUILD_EXECUTABLE)
diff --git a/audio/2.0/default/android.hardware.audio@2.0-service.rc b/audio/2.0/default/android.hardware.audio@2.0-service.rc
deleted file mode 100644
index a76770d747..0000000000
--- a/audio/2.0/default/android.hardware.audio@2.0-service.rc
+++ /dev/null
@@ -1,11 +0,0 @@
-service vendor.audio-hal-2-0 /vendor/bin/hw/android.hardware.audio@2.0-service
- class hal
- user audioserver
- # media gid needed for /dev/fm (radio) and for /data/misc/media (tee)
- group audio camera drmrpc inet media mediadrm net_bt net_bt_admin net_bw_acct
- ioprio rt 4
- writepid /dev/cpuset/foreground/tasks /dev/stune/foreground/tasks
- # audioflinger restarts itself when it loses connection with the hal
- # and its .rc file has an "onrestart restart audio-hal" rule, thus
- # an additional auto-restart from the init process isn't needed.
- oneshot
diff --git a/audio/2.0/default/service.cpp b/audio/2.0/default/service.cpp
deleted file mode 100644
index d554481291..0000000000
--- a/audio/2.0/default/service.cpp
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * 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.
- */
-
-#define LOG_TAG "audiohalservice"
-
-#include <android/hardware/audio/2.0/IDevicesFactory.h>
-#include <android/hardware/audio/effect/2.0/IEffectsFactory.h>
-#include <android/hardware/soundtrigger/2.0/ISoundTriggerHw.h>
-#include <android/hardware/soundtrigger/2.1/ISoundTriggerHw.h>
-#include <binder/ProcessState.h>
-#include <hidl/HidlTransportSupport.h>
-#include <hidl/LegacySupport.h>
-
-using android::hardware::configureRpcThreadpool;
-using android::hardware::joinRpcThreadpool;
-using android::hardware::registerPassthroughServiceImplementation;
-
-using android::hardware::audio::effect::V2_0::IEffectsFactory;
-using android::hardware::audio::V2_0::IDevicesFactory;
-using V2_0_ISoundTriggerHw = android::hardware::soundtrigger::V2_0::ISoundTriggerHw;
-using V2_1_ISoundTriggerHw = android::hardware::soundtrigger::V2_1::ISoundTriggerHw;
-using android::hardware::registerPassthroughServiceImplementation;
-
-using android::OK;
-
-int main(int /* argc */, char* /* argv */ []) {
- android::ProcessState::initWithDriver("/dev/vndbinder");
- // start a threadpool for vndbinder interactions
- android::ProcessState::self()->startThreadPool();
- configureRpcThreadpool(16, true /*callerWillJoin*/);
- android::status_t status;
- status = registerPassthroughServiceImplementation<IDevicesFactory>();
- LOG_ALWAYS_FATAL_IF(status != OK, "Error while registering audio service: %d", status);
- status = registerPassthroughServiceImplementation<IEffectsFactory>();
- LOG_ALWAYS_FATAL_IF(status != OK, "Error while registering audio effects service: %d", status);
- // Soundtrigger might be not present.
- status = registerPassthroughServiceImplementation<V2_1_ISoundTriggerHw>();
- ALOGW_IF(status != OK, "Registering soundtrigger V2.1 service was unsuccessful: %d", status);
- status = registerPassthroughServiceImplementation<V2_0_ISoundTriggerHw>();
- ALOGW_IF(status != OK, "Registering soundtrigger V2.0 service was unsuccessful: %d", status);
- joinRpcThreadpool();
- return status;
-}