Merge "audio: Deprecate StreamSwitcher" into main

This commit is contained in:
Treehugger Robot
2024-10-10 16:08:26 +00:00
committed by Gerrit Code Review
3 changed files with 14 additions and 7 deletions

View File

@@ -62,7 +62,6 @@ cc_library {
"ModulePrimary.cpp",
"SoundDose.cpp",
"Stream.cpp",
"StreamSwitcher.cpp",
"Telephony.cpp",
"XsdcConversion.cpp",
"alsa/Mixer.cpp",
@@ -72,6 +71,7 @@ cc_library {
"bluetooth/DevicePortProxy.cpp",
"bluetooth/ModuleBluetooth.cpp",
"bluetooth/StreamBluetooth.cpp",
"deprecated/StreamSwitcher.cpp",
"primary/PrimaryMixer.cpp",
"primary/StreamPrimary.cpp",
"r_submix/ModuleRemoteSubmix.cpp",

View File

@@ -23,12 +23,12 @@
#include <error/expected_utils.h>
#include "core-impl/StreamStub.h"
#include "core-impl/StreamSwitcher.h"
#include "deprecated/StreamSwitcher.h"
using aidl::android::hardware::audio::effect::IEffect;
using aidl::android::media::audio::common::AudioDevice;
namespace aidl::android::hardware::audio::core {
namespace aidl::android::hardware::audio::core::deprecated {
StreamSwitcher::StreamSwitcher(StreamContext* context, const Metadata& metadata)
: mContext(context),
@@ -268,4 +268,4 @@ ndk::ScopedAStatus StreamSwitcher::setGain(float gain) {
return mStream->setGain(gain);
}
} // namespace aidl::android::hardware::audio::core
} // namespace aidl::android::hardware::audio::core::deprecated

View File

@@ -14,11 +14,18 @@
* limitations under the License.
*/
/**
** This class is deprecated because its use causes threading issues
** with the FMQ due to change of threads reading and writing into FMQ.
**
** DO NOT USE. These files will be removed.
**/
#pragma once
#include "Stream.h"
#include "core-impl/Stream.h"
namespace aidl::android::hardware::audio::core {
namespace aidl::android::hardware::audio::core::deprecated {
// 'StreamSwitcher' is an implementation of 'StreamCommonInterface' which allows
// dynamically switching the underlying stream implementation based on currently
@@ -192,4 +199,4 @@ class StreamSwitcher : virtual public StreamCommonInterface {
bool mBluetoothParametersUpdated = false;
};
} // namespace aidl::android::hardware::audio::core
} // namespace aidl::android::hardware::audio::core::deprecated