From 43269bc71344806a761d97f7d57c6b9a9dd5f84f Mon Sep 17 00:00:00 2001 From: Mikhail Naganov Date: Mon, 4 Dec 2023 14:44:51 -0800 Subject: [PATCH] audio: Adjust after "bus" device type change The `CONNECTION_BUS` constant is deprecated. `{IN|OUT}_BUS` should be used instead of `{IN|OUT}_DEVICE` for clarity. Bug: 303926380 Test: m Change-Id: I73365abbcc16550875cf307eafa46b1200698df4 --- audio/aidl/default/primary/StreamPrimary.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/audio/aidl/default/primary/StreamPrimary.cpp b/audio/aidl/default/primary/StreamPrimary.cpp index b22ef3262f..7325a91b49 100644 --- a/audio/aidl/default/primary/StreamPrimary.cpp +++ b/audio/aidl/default/primary/StreamPrimary.cpp @@ -116,8 +116,8 @@ bool StreamInPrimary::useStubStream(const AudioDevice& device) { GetBoolProperty("ro.boot.audio.tinyalsa.simulate_input", false); return kSimulateInput || device.type.type == AudioDeviceType::IN_TELEPHONY_RX || device.type.type == AudioDeviceType::IN_FM_TUNER || - device.type.connection == AudioDeviceDescription::CONNECTION_BUS || - (device.type.type == AudioDeviceType::IN_DEVICE && device.type.connection.empty()); + device.type.connection == AudioDeviceDescription::CONNECTION_BUS /*deprecated */ || + (device.type.type == AudioDeviceType::IN_BUS && device.type.connection.empty()); } StreamSwitcher::DeviceSwitchBehavior StreamInPrimary::switchCurrentStream( @@ -188,8 +188,8 @@ bool StreamOutPrimary::useStubStream(const AudioDevice& device) { static const bool kSimulateOutput = GetBoolProperty("ro.boot.audio.tinyalsa.ignore_output", false); return kSimulateOutput || device.type.type == AudioDeviceType::OUT_TELEPHONY_TX || - device.type.connection == AudioDeviceDescription::CONNECTION_BUS || - (device.type.type == AudioDeviceType::OUT_DEVICE && device.type.connection.empty()); + device.type.connection == AudioDeviceDescription::CONNECTION_BUS /*deprecated*/ || + (device.type.type == AudioDeviceType::OUT_BUS && device.type.connection.empty()); } StreamSwitcher::DeviceSwitchBehavior StreamOutPrimary::switchCurrentStream(