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

Commit 1b881b9b authored by Jakub Tyszkowski's avatar Jakub Tyszkowski Committed by Automerger Merge Worker
Browse files

LeAudio: Add empty audio provider implementation am: ccceb2f3 am: 9b2313d1

parents b14843f4 9b2313d1
Loading
Loading
Loading
Loading
+114 −0
Original line number Diff line number Diff line
@@ -187,6 +187,120 @@ ndk::ScopedAStatus BluetoothAudioProvider::getA2dpConfiguration(
  return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT);
}

ndk::ScopedAStatus BluetoothAudioProvider::setCodecPriority(
    const ::aidl::android::hardware::bluetooth::audio::CodecId& in_codecId,
    int32_t in_priority) {
  /* TODO: Implement */
  (void)in_codecId;
  (void)in_priority;
  return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
};

ndk::ScopedAStatus BluetoothAudioProvider::getLeAudioAseConfiguration(
    const std::optional<std::vector<std::optional<
        ::aidl::android::hardware::bluetooth::audio::IBluetoothAudioProvider::
            LeAudioDeviceCapabilities>>>& in_remoteSinkAudioCapabilities,
    const std::optional<std::vector<std::optional<
        ::aidl::android::hardware::bluetooth::audio::IBluetoothAudioProvider::
            LeAudioDeviceCapabilities>>>& in_remoteSourceAudioCapabilities,
    const std::vector<
        ::aidl::android::hardware::bluetooth::audio::IBluetoothAudioProvider::
            LeAudioConfigurationRequirement>& in_requirements,
    std::vector<::aidl::android::hardware::bluetooth::audio::
                    IBluetoothAudioProvider::LeAudioAseConfigurationSetting>*
        _aidl_return) {
  /* TODO: Implement */
  (void)in_remoteSinkAudioCapabilities;
  (void)in_remoteSourceAudioCapabilities;
  (void)in_requirements;
  (void)_aidl_return;
  return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
};

ndk::ScopedAStatus BluetoothAudioProvider::getLeAudioAseQosConfiguration(
    const ::aidl::android::hardware::bluetooth::audio::IBluetoothAudioProvider::
        LeAudioAseQosConfigurationRequirement& in_qosRequirement,
    ::aidl::android::hardware::bluetooth::audio::IBluetoothAudioProvider::
        LeAudioAseQosConfigurationPair* _aidl_return) {
  /* TODO: Implement */
  (void)in_qosRequirement;
  (void)_aidl_return;
  return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
};

ndk::ScopedAStatus BluetoothAudioProvider::getLeAudioAseDatapathConfiguration(
    const ::aidl::android::hardware::bluetooth::audio::AudioContext& in_context,
    const std::vector<::aidl::android::hardware::bluetooth::audio::
                          LeAudioConfiguration::StreamMap>& in_streamMap,
    ::aidl::android::hardware::bluetooth::audio::IBluetoothAudioProvider::
        LeAudioDataPathConfigurationPair* _aidl_return) {
  /* TODO: Implement */
  (void)in_context;
  (void)in_streamMap;
  (void)_aidl_return;
  return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
}

ndk::ScopedAStatus BluetoothAudioProvider::onSinkAseMetadataChanged(
    ::aidl::android::hardware::bluetooth::audio::IBluetoothAudioProvider::
        AseState in_state,
    int32_t cigId, int32_t cisId,
    const std::optional<std::vector<std::optional<
        ::aidl::android::hardware::bluetooth::audio::MetadataLtv>>>&
        in_metadata) {
  /* TODO: Implement */
  (void)in_state;
  (void)cigId;
  (void)cisId;
  (void)in_metadata;
  return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
};

ndk::ScopedAStatus BluetoothAudioProvider::onSourceAseMetadataChanged(
    ::aidl::android::hardware::bluetooth::audio::IBluetoothAudioProvider::
        AseState in_state,
    int32_t cigId, int32_t cisId,
    const std::optional<std::vector<std::optional<
        ::aidl::android::hardware::bluetooth::audio::MetadataLtv>>>&
        in_metadata) {
  /* TODO: Implement */
  (void)in_state;
  (void)cigId;
  (void)cisId;
  (void)in_metadata;
  return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
};

ndk::ScopedAStatus BluetoothAudioProvider::getLeAudioBroadcastConfiguration(
    const std::optional<std::vector<std::optional<
        ::aidl::android::hardware::bluetooth::audio::IBluetoothAudioProvider::
            LeAudioDeviceCapabilities>>>& in_remoteSinkAudioCapabilities,
    const ::aidl::android::hardware::bluetooth::audio::IBluetoothAudioProvider::
        LeAudioBroadcastConfigurationRequirement& in_requirement,
    ::aidl::android::hardware::bluetooth::audio::IBluetoothAudioProvider::
        LeAudioBroadcastConfigurationSetting* _aidl_return) {
  /* TODO: Implement */
  (void)in_remoteSinkAudioCapabilities;
  (void)in_requirement;
  (void)_aidl_return;
  return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
};

ndk::ScopedAStatus
BluetoothAudioProvider::getLeAudioBroadcastDatapathConfiguration(
    const ::aidl::android::hardware::bluetooth::audio::AudioContext& in_context,
    const std::vector<::aidl::android::hardware::bluetooth::audio::
                          LeAudioBroadcastConfiguration::BroadcastStreamMap>&
        in_streamMap,
    ::aidl::android::hardware::bluetooth::audio::IBluetoothAudioProvider::
        LeAudioDataPathConfiguration* _aidl_return) {
  /* TODO: Implement */
  (void)in_context;
  (void)in_streamMap;
  (void)_aidl_return;
  return ndk::ScopedAStatus::fromExceptionCode(EX_UNSUPPORTED_OPERATION);
}

}  // namespace audio
}  // namespace bluetooth
}  // namespace hardware
+60 −0
Original line number Diff line number Diff line
@@ -49,6 +49,66 @@ class BluetoothAudioProvider : public BnBluetoothAudioProvider {
  ndk::ScopedAStatus updateAudioConfiguration(
      const AudioConfiguration& audio_config);
  ndk::ScopedAStatus setLowLatencyModeAllowed(bool allowed);
  ndk::ScopedAStatus setCodecPriority(
      const ::aidl::android::hardware::bluetooth::audio::CodecId& in_codecId,
      int32_t in_priority) override;
  ndk::ScopedAStatus getLeAudioAseConfiguration(
      const std::optional<std::vector<std::optional<
          ::aidl::android::hardware::bluetooth::audio::IBluetoothAudioProvider::
              LeAudioDeviceCapabilities>>>& in_remoteSinkAudioCapabilities,
      const std::optional<std::vector<std::optional<
          ::aidl::android::hardware::bluetooth::audio::IBluetoothAudioProvider::
              LeAudioDeviceCapabilities>>>& in_remoteSourceAudioCapabilities,
      const std::vector<
          ::aidl::android::hardware::bluetooth::audio::IBluetoothAudioProvider::
              LeAudioConfigurationRequirement>& in_requirements,
      std::vector<::aidl::android::hardware::bluetooth::audio::
                      IBluetoothAudioProvider::LeAudioAseConfigurationSetting>*
          _aidl_return) override;
  ndk::ScopedAStatus getLeAudioAseQosConfiguration(
      const ::aidl::android::hardware::bluetooth::audio::
          IBluetoothAudioProvider::LeAudioAseQosConfigurationRequirement&
              in_qosRequirement,
      ::aidl::android::hardware::bluetooth::audio::IBluetoothAudioProvider::
          LeAudioAseQosConfigurationPair* _aidl_return) override;
  ndk::ScopedAStatus getLeAudioAseDatapathConfiguration(
      const ::aidl::android::hardware::bluetooth::audio::AudioContext&
          in_context,
      const std::vector<::aidl::android::hardware::bluetooth::audio::
                            LeAudioConfiguration::StreamMap>& in_streamMap,
      ::aidl::android::hardware::bluetooth::audio::IBluetoothAudioProvider::
          LeAudioDataPathConfigurationPair* _aidl_return) override;
  ndk::ScopedAStatus onSinkAseMetadataChanged(
      ::aidl::android::hardware::bluetooth::audio::IBluetoothAudioProvider::
          AseState in_state,
      int32_t cigId, int32_t cisId,
      const std::optional<std::vector<std::optional<
          ::aidl::android::hardware::bluetooth::audio::MetadataLtv>>>&
          in_metadata) override;
  ndk::ScopedAStatus onSourceAseMetadataChanged(
      ::aidl::android::hardware::bluetooth::audio::IBluetoothAudioProvider::
          AseState in_state,
      int32_t cigId, int32_t cisId,
      const std::optional<std::vector<std::optional<
          ::aidl::android::hardware::bluetooth::audio::MetadataLtv>>>&
          in_metadata) override;
  ndk::ScopedAStatus getLeAudioBroadcastConfiguration(
      const std::optional<std::vector<std::optional<
          ::aidl::android::hardware::bluetooth::audio::IBluetoothAudioProvider::
              LeAudioDeviceCapabilities>>>& in_remoteSinkAudioCapabilities,
      const ::aidl::android::hardware::bluetooth::audio::
          IBluetoothAudioProvider::LeAudioBroadcastConfigurationRequirement&
              in_requirement,
      ::aidl::android::hardware::bluetooth::audio::IBluetoothAudioProvider::
          LeAudioBroadcastConfigurationSetting* _aidl_return) override;
  ndk::ScopedAStatus getLeAudioBroadcastDatapathConfiguration(
      const ::aidl::android::hardware::bluetooth::audio::AudioContext&
          in_context,
      const std::vector<::aidl::android::hardware::bluetooth::audio::
                            LeAudioBroadcastConfiguration::BroadcastStreamMap>&
          in_streamMap,
      ::aidl::android::hardware::bluetooth::audio::IBluetoothAudioProvider::
          LeAudioDataPathConfiguration* _aidl_return) override;

  ndk::ScopedAStatus parseA2dpConfiguration(
      const CodecId& codec_id, const std::vector<uint8_t>& configuration,