Loading bluetooth/audio/2.1/types.hal +57 −9 Original line number Diff line number Diff line Loading @@ -16,13 +16,14 @@ package android.hardware.bluetooth.audio@2.1; import @2.0::PcmParameters; import @2.0::SessionType; import @2.0::SampleRate; import @2.0::ChannelMode; import @2.0::BitsPerSample; import @2.0::CodecConfiguration; import @2.0::ChannelMode; import @2.0::CodecCapabilities; import @2.0::CodecConfiguration; import @2.0::CodecType; import @2.0::PcmParameters; import @2.0::SampleRate; import @2.0::SessionType; enum SessionType : @2.0::SessionType { /** Used when encoded by Bluetooth Stack and streaming to LE Audio device */ Loading @@ -35,6 +36,10 @@ enum SessionType : @2.0::SessionType { LE_AUDIO_HARDWARE_OFFLOAD_DECODING_DATAPATH, }; enum CodecType : @2.0::CodecType { LC3 = 0x20, }; enum SampleRate : @2.0::SampleRate { RATE_8000 = 0x100, RATE_32000 = 0x200, Loading @@ -49,14 +54,57 @@ struct PcmParameters { uint32_t dataIntervalUs; }; /** Used to configure either a Hardware or Software Encoding session based on session type */ safe_union AudioConfiguration { PcmParameters pcmConfig; CodecConfiguration codecConfig; enum Lc3FrameDuration : uint8_t { DURATION_10000US = 0x00, DURATION_7500US = 0x01, }; /** * Used for Hardware Encoding/Decoding LC3 codec parameters. */ struct Lc3Parameters { /* PCM is Input for encoder, Output for decoder */ BitsPerSample pcmBitDepth; /* codec-specific parameters */ SampleRate samplingFrequency; Lc3FrameDuration frameDuration; /* length in octets of a codec frame */ uint32_t octetsPerFrame; /* Number of blocks of codec frames per single SDU (Service Data Unit) */ uint8_t blocksPerSdu; }; /** * Used to specify the capabilities of the LC3 codecs supported by Hardware Encoding. */ struct Lc3CodecCapabilities { /* This is bitfield, if bit N is set, HW Offloader supports N+1 channels at the same time. * Example: 0x27 = 0b00100111: One, two, three or six channels supported.*/ uint8_t supportedChannelCounts; Lc3Parameters lc3Capabilities; }; /** Used to specify the capabilities of the different session types */ safe_union AudioCapabilities { PcmParameters pcmCapabilities; CodecCapabilities codecCapabilities; Lc3CodecCapabilities leAudioCapabilities; }; /** * Used to configure a LC3 Hardware Encoding session. */ struct Lc3CodecConfiguration { /* This is also bitfield, specifying how the channels are ordered in the outgoing media packet. * Bit meaning is defined in Bluetooth Assigned Numbers. */ uint32_t audioChannelAllocation; Lc3Parameters lc3Config; }; /** Used to configure either a Hardware or Software Encoding session based on session type */ safe_union AudioConfiguration { PcmParameters pcmConfig; CodecConfiguration codecConfig; Lc3CodecConfiguration leAudioCodecConfig; }; No newline at end of file contexthub/1.2/IContexthub.hal +0 −12 Original line number Diff line number Diff line Loading @@ -50,18 +50,6 @@ interface IContexthub extends @1.1::IContexthub { */ registerCallback_1_2(uint32_t hubId, IContexthubCallback cb) generates (Result result); /** * Send a message to a hub * * @param hubId identifier for hub to send message to * @param msg message to be sent * * @return result OK if successful, error code otherwise * BAD_VALUE if parameters are not valid * TRANSACTION_FAILED if message send failed */ sendMessageToHub_1_2(uint32_t hubId, ContextHubMsg msg) generates (Result result); /** * Notification sent by the framework to indicate that the user * has changed a setting. Loading contexthub/1.2/default/Contexthub.cpp +0 −6 Original line number Diff line number Diff line Loading @@ -80,12 +80,6 @@ Return<Result> Contexthub::registerCallback_1_2(uint32_t hubId, return Result::BAD_PARAMS; } // We don't expose any nanoapps, therefore all nanoapp-related API calls return with BAD_PARAMS Return<Result> Contexthub::sendMessageToHub_1_2(uint32_t /* hubId */, const ContextHubMsg& /* msg */) { return Result::BAD_PARAMS; } Return<void> Contexthub::onSettingChanged(SettingV1_1 /*setting*/, SettingValue /*newValue*/) { return Void(); } Loading contexthub/1.2/default/Contexthub.h +0 −2 Original line number Diff line number Diff line Loading @@ -55,8 +55,6 @@ class Contexthub Return<Result> registerCallback_1_2(uint32_t hubId, const sp<V1_2::IContexthubCallback>& cb) override; Return<Result> sendMessageToHub_1_2(uint32_t hubId, const ContextHubMsg& msg) override; private: sp<IContextHubCallbackWrapperBase> mCallback; }; Loading contexthub/1.2/types.hal +2 −5 Original line number Diff line number Diff line Loading @@ -45,11 +45,8 @@ struct ContextHubMsg { @1.0::ContextHubMsg msg_1_0; /** * The list of Android permissions that the sender of this message has at * the time the message was sent. * * The HAL MUST drop messages to nanoapps if this list of permissions is not * a superset of those of the receiving nanoapp(s). * The list of Android permissions held by the sending nanoapp at the time * the message was sent. * * The framework MUST drop messages to host apps that don't have a superset * of the permissions that the sending nanoapp is using. Loading Loading
bluetooth/audio/2.1/types.hal +57 −9 Original line number Diff line number Diff line Loading @@ -16,13 +16,14 @@ package android.hardware.bluetooth.audio@2.1; import @2.0::PcmParameters; import @2.0::SessionType; import @2.0::SampleRate; import @2.0::ChannelMode; import @2.0::BitsPerSample; import @2.0::CodecConfiguration; import @2.0::ChannelMode; import @2.0::CodecCapabilities; import @2.0::CodecConfiguration; import @2.0::CodecType; import @2.0::PcmParameters; import @2.0::SampleRate; import @2.0::SessionType; enum SessionType : @2.0::SessionType { /** Used when encoded by Bluetooth Stack and streaming to LE Audio device */ Loading @@ -35,6 +36,10 @@ enum SessionType : @2.0::SessionType { LE_AUDIO_HARDWARE_OFFLOAD_DECODING_DATAPATH, }; enum CodecType : @2.0::CodecType { LC3 = 0x20, }; enum SampleRate : @2.0::SampleRate { RATE_8000 = 0x100, RATE_32000 = 0x200, Loading @@ -49,14 +54,57 @@ struct PcmParameters { uint32_t dataIntervalUs; }; /** Used to configure either a Hardware or Software Encoding session based on session type */ safe_union AudioConfiguration { PcmParameters pcmConfig; CodecConfiguration codecConfig; enum Lc3FrameDuration : uint8_t { DURATION_10000US = 0x00, DURATION_7500US = 0x01, }; /** * Used for Hardware Encoding/Decoding LC3 codec parameters. */ struct Lc3Parameters { /* PCM is Input for encoder, Output for decoder */ BitsPerSample pcmBitDepth; /* codec-specific parameters */ SampleRate samplingFrequency; Lc3FrameDuration frameDuration; /* length in octets of a codec frame */ uint32_t octetsPerFrame; /* Number of blocks of codec frames per single SDU (Service Data Unit) */ uint8_t blocksPerSdu; }; /** * Used to specify the capabilities of the LC3 codecs supported by Hardware Encoding. */ struct Lc3CodecCapabilities { /* This is bitfield, if bit N is set, HW Offloader supports N+1 channels at the same time. * Example: 0x27 = 0b00100111: One, two, three or six channels supported.*/ uint8_t supportedChannelCounts; Lc3Parameters lc3Capabilities; }; /** Used to specify the capabilities of the different session types */ safe_union AudioCapabilities { PcmParameters pcmCapabilities; CodecCapabilities codecCapabilities; Lc3CodecCapabilities leAudioCapabilities; }; /** * Used to configure a LC3 Hardware Encoding session. */ struct Lc3CodecConfiguration { /* This is also bitfield, specifying how the channels are ordered in the outgoing media packet. * Bit meaning is defined in Bluetooth Assigned Numbers. */ uint32_t audioChannelAllocation; Lc3Parameters lc3Config; }; /** Used to configure either a Hardware or Software Encoding session based on session type */ safe_union AudioConfiguration { PcmParameters pcmConfig; CodecConfiguration codecConfig; Lc3CodecConfiguration leAudioCodecConfig; }; No newline at end of file
contexthub/1.2/IContexthub.hal +0 −12 Original line number Diff line number Diff line Loading @@ -50,18 +50,6 @@ interface IContexthub extends @1.1::IContexthub { */ registerCallback_1_2(uint32_t hubId, IContexthubCallback cb) generates (Result result); /** * Send a message to a hub * * @param hubId identifier for hub to send message to * @param msg message to be sent * * @return result OK if successful, error code otherwise * BAD_VALUE if parameters are not valid * TRANSACTION_FAILED if message send failed */ sendMessageToHub_1_2(uint32_t hubId, ContextHubMsg msg) generates (Result result); /** * Notification sent by the framework to indicate that the user * has changed a setting. Loading
contexthub/1.2/default/Contexthub.cpp +0 −6 Original line number Diff line number Diff line Loading @@ -80,12 +80,6 @@ Return<Result> Contexthub::registerCallback_1_2(uint32_t hubId, return Result::BAD_PARAMS; } // We don't expose any nanoapps, therefore all nanoapp-related API calls return with BAD_PARAMS Return<Result> Contexthub::sendMessageToHub_1_2(uint32_t /* hubId */, const ContextHubMsg& /* msg */) { return Result::BAD_PARAMS; } Return<void> Contexthub::onSettingChanged(SettingV1_1 /*setting*/, SettingValue /*newValue*/) { return Void(); } Loading
contexthub/1.2/default/Contexthub.h +0 −2 Original line number Diff line number Diff line Loading @@ -55,8 +55,6 @@ class Contexthub Return<Result> registerCallback_1_2(uint32_t hubId, const sp<V1_2::IContexthubCallback>& cb) override; Return<Result> sendMessageToHub_1_2(uint32_t hubId, const ContextHubMsg& msg) override; private: sp<IContextHubCallbackWrapperBase> mCallback; }; Loading
contexthub/1.2/types.hal +2 −5 Original line number Diff line number Diff line Loading @@ -45,11 +45,8 @@ struct ContextHubMsg { @1.0::ContextHubMsg msg_1_0; /** * The list of Android permissions that the sender of this message has at * the time the message was sent. * * The HAL MUST drop messages to nanoapps if this list of permissions is not * a superset of those of the receiving nanoapp(s). * The list of Android permissions held by the sending nanoapp at the time * the message was sent. * * The framework MUST drop messages to host apps that don't have a superset * of the permissions that the sending nanoapp is using. Loading