Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b7326db5 authored by Michael Dooley's avatar Michael Dooley
Browse files

Revert "Adding getModelState API to sound trigger"

This reverts commit 73e63e66.

Reason for revert: fix build breakage

Change-Id: I37d33bd2536f1917ced8a1ba816f336e7c9bb4e8
parent 73e63e66
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -247,7 +247,7 @@ exit:
}

SoundTriggerHalImpl::SoundTriggerHalImpl()
    : mModuleName("primary"), mNextModelId(1), mHwDevice(NULL) {}
    : mModuleName("primary"), mHwDevice(NULL), mNextModelId(1) {}

void SoundTriggerHalImpl::onFirstRef() {
    const hw_module_t* mod;
+1 −4
Original line number Diff line number Diff line
@@ -167,11 +167,8 @@ class SoundTriggerHalImpl : public RefBase {
    static void recognitionCallback(struct sound_trigger_recognition_event* halEvent, void* cookie);

    const char* mModuleName;

    volatile atomic_uint_fast32_t mNextModelId;

   protected:
    struct sound_trigger_hw_device* mHwDevice;
    volatile atomic_uint_fast32_t mNextModelId;
    DefaultKeyedVector<int32_t, sp<SoundModelClient> > mClients;
    Mutex mLock;
};

soundtrigger/2.2/Android.bp

deleted100644 → 0
+0 −20
Original line number Diff line number Diff line
// This file is autogenerated by hidl-gen -Landroidbp.

hidl_interface {
    name: "android.hardware.soundtrigger@2.2",
    root: "android.hardware",
    vndk: {
        enabled: true,
    },
    srcs: [
        "ISoundTriggerHw.hal",
    ],
    interfaces: [
        "android.hardware.audio.common@2.0",
        "android.hardware.soundtrigger@2.0",
        "android.hardware.soundtrigger@2.1",
        "android.hidl.base@1.0",
    ],
    gen_java: false,
}
+0 −40
Original line number Diff line number Diff line
/*
 * Copyright 2018 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.
 */

package android.hardware.soundtrigger@2.2;

import @2.1::ISoundTriggerHw;
import @2.0::SoundModelHandle;
import @2.0::ISoundTriggerHwCallback.RecognitionEvent;

/**
 * SoundTrigger HAL interface. Used for hardware recognition of hotwords.
 */
interface ISoundTriggerHw extends @2.1::ISoundTriggerHw {

    /**
     * Get the state of a given model.
     * The model state is returned as a RecognitionEvent.
     * @param modelHandle The handle of the sound model to use for recognition
     * @return retval Operation completion status: 0 in case of success,
     *                -ENOSYS in case of invalid model handle,
     *                -ENOMEM in case of memory allocation failure,
     *                -ENODEV in case of initialization error.
     * @return state  RecognitionEvent in case of success
     */
    getModelState(SoundModelHandle modelHandle)
            generates (int32_t retval, RecognitionEvent state);
};
+0 −50
Original line number Diff line number Diff line
#
# Copyright (C) 2018 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)

include $(CLEAR_VARS)
LOCAL_MODULE := android.hardware.soundtrigger@2.2-impl
LOCAL_VENDOR_MODULE := true
LOCAL_MODULE_RELATIVE_PATH := hw
LOCAL_SRC_FILES := \
    SoundTriggerHw.cpp

LOCAL_CFLAGS := -Wall -Werror

LOCAL_SHARED_LIBRARIES := \
        libhardware \
        libhidlbase \
        libhidlmemory \
        libhidltransport \
        liblog \
        libutils \
        android.hardware.soundtrigger@2.2 \
        android.hardware.soundtrigger@2.1 \
        android.hardware.soundtrigger@2.0 \
        android.hardware.soundtrigger@2.0-core \
        android.hidl.allocator@1.0 \
        android.hidl.memory@1.0

LOCAL_C_INCLUDE_DIRS := $(LOCAL_PATH)

ifeq ($(strip $(AUDIOSERVER_MULTILIB)),)
LOCAL_MULTILIB := 32
else
LOCAL_MULTILIB := $(AUDIOSERVER_MULTILIB)
endif

include $(BUILD_SHARED_LIBRARY)
Loading