Skip to content

Commit 55ecd93

Browse files
committed
Revert "libaudiohal: implement supportsBluetoothVariableLatency for HIDL"
This reverts commit 8ed6d79. Signed-off-by: Edwiin Kusuma Jaya <kutemeikito0905@gmail.com>
1 parent df4ce90 commit 55ecd93

File tree

5 files changed

+7
-26
lines changed

5 files changed

+7
-26
lines changed

media/libaudiohal/impl/DeviceHalAidl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -951,7 +951,7 @@ status_t DeviceHalAidl::dump(int fd, const Vector<String16>& args) {
951951
return mModule->dump(fd, Args(args).args(), args.size());
952952
}
953953

954-
status_t DeviceHalAidl::supportsBluetoothVariableLatency(bool* supports) {
954+
int32_t DeviceHalAidl::supportsBluetoothVariableLatency(bool* supports) {
955955
TIME_CHECK();
956956
if (!mModule) return NO_INIT;
957957
if (supports == nullptr) {

media/libaudiohal/impl/DeviceHalAidl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ class DeviceHalAidl : public DeviceHalInterface, public ConversionHelperAidl,
162162

163163
error::Result<audio_hw_sync_t> getHwAvSync() override;
164164

165-
status_t supportsBluetoothVariableLatency(bool* supports __unused) override;
165+
int32_t supportsBluetoothVariableLatency(bool* supports __unused) override;
166166

167167
status_t getSoundDoseInterface(const std::string& module,
168168
::ndk::SpAIBinder* soundDoseBinder) override;

media/libaudiohal/impl/DeviceHalHidl.cpp

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -681,26 +681,4 @@ status_t DeviceHalHidl::getSoundDoseInterface(const std::string& module,
681681
}
682682
#endif
683683

684-
status_t DeviceHalHidl::supportsBluetoothVariableLatency(bool* supports) {
685-
if (supports == nullptr) {
686-
return BAD_VALUE;
687-
}
688-
*supports = false;
689-
690-
String8 reply;
691-
status_t status = getParameters(
692-
String8(AUDIO_PARAMETER_BT_VARIABLE_LATENCY_SUPPORTED), &reply);
693-
if (status != NO_ERROR) {
694-
return status;
695-
}
696-
AudioParameter replyParams(reply);
697-
String8 trueOrFalse;
698-
status = replyParams.get(
699-
String8(AUDIO_PARAMETER_BT_VARIABLE_LATENCY_SUPPORTED), trueOrFalse);
700-
if (status != NO_ERROR) {
701-
return status;
702-
}
703-
*supports = trueOrFalse == AudioParameter::valueTrue;
704-
return NO_ERROR;
705-
}
706684
} // namespace android

media/libaudiohal/impl/DeviceHalHidl.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,10 @@ class DeviceHalHidl : public DeviceHalInterface, public CoreConversionHelperHidl
125125
return INVALID_OPERATION;
126126
}
127127

128-
status_t supportsBluetoothVariableLatency(bool* supports) override;
128+
int32_t supportsBluetoothVariableLatency(bool* supports __unused) override {
129+
// TODO: Implement the HAL query when moving to AIDL HAL.
130+
return INVALID_OPERATION;
131+
}
129132

130133
status_t setConnectedState(const struct audio_port_v7 *port, bool connected) override;
131134

media/libaudiohal/include/media/audiohal/DeviceHalInterface.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ class DeviceHalInterface : public virtual RefBase
142142
virtual int32_t getAAudioMixerBurstCount() = 0;
143143
virtual int32_t getAAudioHardwareBurstMinUsec() = 0;
144144

145-
virtual status_t supportsBluetoothVariableLatency(bool* supports) = 0;
145+
virtual int32_t supportsBluetoothVariableLatency(bool* supports) = 0;
146146

147147
// Update the connection status of an external device.
148148
virtual status_t setConnectedState(const struct audio_port_v7* port, bool connected) = 0;

0 commit comments

Comments
 (0)