mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 10:44:41 +00:00
Remove bluetooth.audio@2.2 interface
Bug: 204585486 Test: A2dp software/offload, le audio software offload verified pass Change-Id: Icca0d0e0f5f074fc3f68742722a8c268e8289558
This commit is contained in:
@@ -1,33 +0,0 @@
|
||||
// This file is autogenerated by hidl-gen -Landroidbp.
|
||||
|
||||
package {
|
||||
// See: http://go/android-license-faq
|
||||
// A large-scale-change added 'default_applicable_licenses' to import
|
||||
// all of the 'license_kinds' from "hardware_interfaces_license"
|
||||
// to get the below license kinds:
|
||||
// SPDX-license-identifier-Apache-2.0
|
||||
default_applicable_licenses: ["hardware_interfaces_license"],
|
||||
}
|
||||
|
||||
hidl_interface {
|
||||
name: "android.hardware.bluetooth.audio@2.2",
|
||||
root: "android.hardware",
|
||||
srcs: [
|
||||
"types.hal",
|
||||
"IBluetoothAudioPort.hal",
|
||||
"IBluetoothAudioProvider.hal",
|
||||
"IBluetoothAudioProvidersFactory.hal",
|
||||
],
|
||||
interfaces: [
|
||||
"android.hardware.audio.common@5.0",
|
||||
"android.hardware.bluetooth.audio@2.0",
|
||||
"android.hardware.bluetooth.audio@2.1",
|
||||
"android.hidl.base@1.0",
|
||||
"android.hidl.safe_union@1.0",
|
||||
],
|
||||
apex_available: [
|
||||
"//apex_available:platform",
|
||||
"com.android.bluetooth",
|
||||
],
|
||||
gen_java: false,
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
/*
|
||||
* Copyright 2021 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.bluetooth.audio@2.2;
|
||||
|
||||
import @2.0::IBluetoothAudioPort;
|
||||
import android.hardware.audio.common@5.0::SinkMetadata;
|
||||
|
||||
interface IBluetoothAudioPort extends @2.0::IBluetoothAudioPort {
|
||||
/**
|
||||
* Called when the metadata of the stream's sink has been changed.
|
||||
*
|
||||
* @param sinkMetadata Description of the audio that is recorded by the
|
||||
* clients.
|
||||
*/
|
||||
updateSinkMetadata(SinkMetadata sinkMetadata);
|
||||
};
|
||||
@@ -1,80 +0,0 @@
|
||||
/*
|
||||
* Copyright 2021 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.bluetooth.audio@2.2;
|
||||
|
||||
import @2.1::IBluetoothAudioProvider;
|
||||
import @2.2::IBluetoothAudioPort;
|
||||
import @2.0::Status;
|
||||
|
||||
/**
|
||||
* HAL interface from the Bluetooth stack to the Audio HAL
|
||||
*
|
||||
* The Bluetooth stack calls methods in this interface to start and end audio
|
||||
* sessions and sends callback events to the Audio HAL.
|
||||
*
|
||||
* Note: For HIDL APIs with a "generates" statement, the callback parameter used
|
||||
* for return value must be invoked synchronously before the API call returns.
|
||||
*/
|
||||
interface IBluetoothAudioProvider extends @2.1::IBluetoothAudioProvider {
|
||||
|
||||
/**
|
||||
* This method indicates that the Bluetooth stack is ready to stream audio.
|
||||
* It registers an instance of IBluetoothAudioPort with and provides the
|
||||
* current negotiated codec to the Audio HAL. After this method is called,
|
||||
* the Audio HAL can invoke IBluetoothAudioPort.startStream().
|
||||
*
|
||||
* Note: endSession() must be called to unregister this IBluetoothAudioPort
|
||||
*
|
||||
* @param hostIf An instance of IBluetoothAudioPort for stream control
|
||||
* @param audioConfig The audio configuration negotiated with the remote
|
||||
* device. The PCM parameters are set if software based encoding,
|
||||
* otherwise the correct codec configuration is used for hardware
|
||||
* encoding.
|
||||
*
|
||||
* @return status One of the following
|
||||
* SUCCESS if this IBluetoothAudioPort was successfully registered with
|
||||
* the Audio HAL
|
||||
* UNSUPPORTED_CODEC_CONFIGURATION if the Audio HAL cannot register this
|
||||
* IBluetoothAudioPort with the given codec configuration
|
||||
* FAILURE if the Audio HAL cannot register this IBluetoothAudioPort for
|
||||
* any other reason
|
||||
* @return dataMQ The fast message queue for audio data from/to this
|
||||
* provider. Audio data will be in PCM format as specified by the
|
||||
* audioConfig.pcmConfig parameter. Invalid if streaming is offloaded
|
||||
* from/to hardware or on failure.
|
||||
*/
|
||||
startSession_2_2(IBluetoothAudioPort hostIf, AudioConfiguration audioConfig)
|
||||
generates (Status status, fmq_sync<uint8_t> dataMQ);
|
||||
|
||||
/**
|
||||
* Called when the audio configuration of the stream has been changed.
|
||||
*
|
||||
* @param audioConfig The audio configuration negotiated with the remote
|
||||
* device. The PCM parameters are set if software based encoding,
|
||||
* otherwise the correct codec configuration is used for hardware
|
||||
* encoding.
|
||||
*/
|
||||
updateAudioConfiguration(AudioConfiguration audioConfig);
|
||||
|
||||
/**
|
||||
* Called when the supported latency mode is updated.
|
||||
*
|
||||
* @param allowed If the peripheral devices can't keep up with low latency
|
||||
* mode, the API will be called with supported is false.
|
||||
*/
|
||||
setLowLatencyModeAllowed(bool allowed);
|
||||
};
|
||||
@@ -1,73 +0,0 @@
|
||||
/*
|
||||
* Copyright 2021 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.bluetooth.audio@2.2;
|
||||
|
||||
import IBluetoothAudioProvider;
|
||||
import @2.1::IBluetoothAudioProvidersFactory;
|
||||
import @2.0::Status;
|
||||
import @2.1::SessionType;
|
||||
|
||||
/**
|
||||
* This factory allows a HAL implementation to be split into multiple
|
||||
* independent providers.
|
||||
*
|
||||
* When the Bluetooth stack is ready to create an audio session, it must first
|
||||
* obtain the IBluetoothAudioProvider for that session type by calling
|
||||
* openProvider().
|
||||
*
|
||||
* Note: For HIDL APIs with a "generates" statement, the callback parameter used
|
||||
* for return value must be invoked synchronously before the API call returns.
|
||||
*/
|
||||
interface IBluetoothAudioProvidersFactory extends @2.1::IBluetoothAudioProvidersFactory {
|
||||
/**
|
||||
* Opens an audio provider for a session type. To close the provider, it is
|
||||
* necessary to release references to the returned provider object.
|
||||
*
|
||||
* @param sessionType The session type (e.g.
|
||||
* LE_AUDIO_SOFTWARE_ENCODING_DATAPATH).
|
||||
*
|
||||
* @return status One of the following
|
||||
* SUCCESS if the Audio HAL successfully opens the provider with the
|
||||
* given session type
|
||||
* FAILURE if the Audio HAL cannot open the provider
|
||||
* @return provider The provider of the specified session type
|
||||
*/
|
||||
openProvider_2_2(SessionType sessionType)
|
||||
generates (Status status, IBluetoothAudioProvider provider);
|
||||
|
||||
/**
|
||||
* Gets a list of audio capabilities for a session type.
|
||||
*
|
||||
* For software encoding, the PCM capabilities are returned.
|
||||
* For hardware encoding, the supported codecs and their capabilities are
|
||||
* returned.
|
||||
*
|
||||
* @param sessionType The session type (e.g.
|
||||
* A2DP_SOFTWARE_ENCODING_DATAPATH).
|
||||
* @return audioCapabilities A list containing all the capabilities
|
||||
* supported by the sesson type. The capabilities is a list of
|
||||
* available options when configuring the codec for the session.
|
||||
* For software encoding it is the PCM data rate.
|
||||
* For hardware encoding it is the list of supported codecs and their
|
||||
* capabilities.
|
||||
* If a provider isn't supported, an empty list should be returned.
|
||||
* Note: Only one entry should exist per codec when using hardware
|
||||
* encoding.
|
||||
*/
|
||||
getProviderCapabilities_2_2(SessionType sessionType)
|
||||
generates (vec<AudioCapabilities> audioCapabilities);
|
||||
};
|
||||
@@ -1,127 +0,0 @@
|
||||
/*
|
||||
* Copyright 2021 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.bluetooth.audio@2.2;
|
||||
|
||||
import @2.1::Lc3Parameters;
|
||||
import @2.1::PcmParameters;
|
||||
import @2.0::CodecConfiguration;
|
||||
import @2.0::CodecCapabilities;
|
||||
import @2.1::CodecType;
|
||||
|
||||
enum LeAudioMode : uint8_t {
|
||||
UNKNOWN = 0x00,
|
||||
UNICAST = 0x01,
|
||||
BROADCAST = 0x02,
|
||||
};
|
||||
|
||||
enum AudioLocation : uint8_t {
|
||||
UNKNOWN = 0,
|
||||
FRONT_LEFT = 1,
|
||||
FRONT_RIGHT = 2,
|
||||
};
|
||||
|
||||
struct UnicastStreamMap {
|
||||
/* The connection handle used for a unicast or a broadcast group. */
|
||||
uint16_t streamHandle;
|
||||
/* Audio channel allocation is a bit field, each enabled bit means that given audio direction,
|
||||
* i.e. "left", or "right" is used. Ordering of audio channels comes from the least significant
|
||||
* bit to the most significant bit. */
|
||||
uint32_t audioChannelAllocation;
|
||||
};
|
||||
|
||||
struct BroadcastStreamMap {
|
||||
/* The connection handle used for a unicast or a broadcast group. */
|
||||
uint16_t streamHandle;
|
||||
/* Audio channel allocation is a bit field, each enabled bit means that given audio direction,
|
||||
* i.e. "left", or "right" is used. Ordering of audio channels comes from the least significant
|
||||
* bit to the most significant bit. */
|
||||
uint32_t audioChannelAllocation;
|
||||
Lc3Parameters lc3Config;
|
||||
};
|
||||
|
||||
struct UnicastConfig {
|
||||
vec<UnicastStreamMap> streamMap;
|
||||
uint32_t peerDelay;
|
||||
Lc3Parameters lc3Config;
|
||||
};
|
||||
|
||||
struct BroadcastConfig {
|
||||
vec<BroadcastStreamMap> streamMap;
|
||||
};
|
||||
|
||||
struct LeAudioConfiguration {
|
||||
/* The mode of the LE audio */
|
||||
LeAudioMode mode;
|
||||
safe_union CodecConfig {
|
||||
UnicastConfig unicastConfig;
|
||||
BroadcastConfig broadcastConfig;
|
||||
} config;
|
||||
};
|
||||
|
||||
/** Used to configure either a Hardware or Software Encoding session based on session type */
|
||||
safe_union AudioConfiguration {
|
||||
PcmParameters pcmConfig;
|
||||
CodecConfiguration codecConfig;
|
||||
LeAudioConfiguration leAudioConfig;
|
||||
};
|
||||
|
||||
/** Used to specify the capabilities of the different session types */
|
||||
safe_union AudioCapabilities {
|
||||
PcmParameters pcmCapabilities;
|
||||
CodecCapabilities codecCapabilities;
|
||||
LeAudioCodecCapabilitiesSetting leAudioCapabilities;
|
||||
};
|
||||
|
||||
/**
|
||||
* Used to specify the le audio capabilities for unicast and broadcast hardware offload.
|
||||
*/
|
||||
struct LeAudioCodecCapabilitiesSetting{
|
||||
UnicastCapability unicastEncodeCapability;
|
||||
UnicastCapability unicastDecodeCapability;
|
||||
BroadcastCapability broadcastCapability;
|
||||
};
|
||||
|
||||
/**
|
||||
* Used to specify the le audio unicast codec capabilities for hardware offload.
|
||||
*/
|
||||
struct UnicastCapability {
|
||||
CodecType codecType;
|
||||
AudioLocation supportedChannel;
|
||||
|
||||
// The number of connected device
|
||||
uint8_t deviceCount;
|
||||
|
||||
// Supported channel count for each device
|
||||
uint8_t channelCountPerDevice;
|
||||
|
||||
// Should use safe union when there is more than one codec
|
||||
Lc3Parameters capabilities;
|
||||
};
|
||||
|
||||
/**
|
||||
* Used to specify the le audio broadcast codec capabilities for hardware offload.
|
||||
*/
|
||||
struct BroadcastCapability {
|
||||
CodecType codecType;
|
||||
AudioLocation supportedChannel;
|
||||
|
||||
// Supported channel count for each stream
|
||||
uint8_t channelCountPerStream;
|
||||
|
||||
// Should use safe union when there is more than one codec
|
||||
vec<Lc3Parameters> capabilities;
|
||||
};
|
||||
@@ -133,7 +133,7 @@
|
||||
</hal>
|
||||
<hal format="hidl" optional="true">
|
||||
<name>android.hardware.bluetooth.audio</name>
|
||||
<version>2.0-2</version>
|
||||
<version>2.0-1</version>
|
||||
<interface>
|
||||
<name>IBluetoothAudioProvidersFactory</name>
|
||||
<instance>default</instance>
|
||||
|
||||
Reference in New Issue
Block a user