From c9b3d4c40c723059e309518ec6f92de09347514f Mon Sep 17 00:00:00 2001 From: shla Date: Tue, 19 May 2020 11:10:56 -0700 Subject: [PATCH] AudioService: remove DEVICE_OUT_SPDIF from mFixedVolumeDevices For ATV box product, the SPDIF port should be available for audio output. But SPDIF doesn't support hotplug as HDMI, we have to leave it as an attached device inside audio_policy_configuration. This means SPDIF is always considered as connected. Spdif Built-In LoopBack And that AudioService treats DEVICE_OUT_SPDIF as fixed volume devices. int mFixedVolumeDevices = ... AudioSystem.DEVICE_OUT_SPDIF; In this case, the audio system always works as fixed volume device, and volume control can't work any more for HDMI output. We think SPDIF is very trick as it doesn't support hotplug. To support it, we have to leave it as attached device. But after that, our device will become a fixed volume device again. So, I suggest to remove SPDIF from fixed volume device. Bug: 136548998 Change-Id: I67841c6019085ce458ca496f3fd4b3b5dd12e5d3 --- services/core/java/com/android/server/audio/AudioService.java | 1 - 1 file changed, 1 deletion(-) diff --git a/services/core/java/com/android/server/audio/AudioService.java b/services/core/java/com/android/server/audio/AudioService.java index d6315ff62b3b6..14aafced527a0 100644 --- a/services/core/java/com/android/server/audio/AudioService.java +++ b/services/core/java/com/android/server/audio/AudioService.java @@ -509,7 +509,6 @@ public class AudioService extends IAudioService.Stub AudioSystem.DEVICE_OUT_DGTL_DOCK_HEADSET, AudioSystem.DEVICE_OUT_ANLG_DOCK_HEADSET, AudioSystem.DEVICE_OUT_HDMI_ARC, - AudioSystem.DEVICE_OUT_SPDIF, AudioSystem.DEVICE_OUT_AUX_LINE)); // Devices for which the volume is always max, no volume panel Set mFullVolumeDevices = new HashSet<>();