1/*
2 * Copyright (C) 2018 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package android.hardware.bluetooth.a2dp@1.0;
18
19/**
20 * HAL interface for Bluetooth A2DP Offload functionality where
21 * the encoding of the A2DP data packets is offloaded to platform
22 * specific encoders. The A2DP control path is maintained in the
23 * Bluetooth stack.
24 *
25 * This interface is from HAL server to HAL client.
26 *
27 * The HAL server must call into the IBluetoothAudioHost to initiate
28 * the start, suspend and stop of the streaming operation. These
29 * calls return immediately and the results, if any, are send over
30 * the IBluetoothAudioOffload interface.
31 */
32
33interface IBluetoothAudioHost {
34    /**
35     * Invoked when the start stream is requested from HAL server
36     * to HAL client. This indicates that the HAL server
37     * has initialized the platform for streaming use case, and the
38     * HAL client can proceed with the streaming procedure. The
39     * result of the operation must be provided by the HAL
40     * client using the IBluetoothAudioOffload interface.
41     */
42    oneway startStream();
43
44    /**
45     * Invoked when the suspend stream is requested from HAL server
46     * to HAL client. This indicates that the HAL server
47     * wants to suspend the streaming procedure. The result of the
48     * operation must be provided by the HAL client using the
49     * IBluetoothAudioOffload interface.
50     */
51    oneway suspendStream();
52
53    /**
54     * Invoked when the stop stream is requested from HAL server
55     * to HAL client. This indicates that the HAL server wants to
56     * stop and reset the streaming procedure. There is no result
57     * provided by the HAL client for this call.
58     */
59    oneway stopStream();
60
61};
62