Revamp HDMI-CEC system audio mode integration with audio service.
In previous change we use setForceUse(FORCE_MEDIA, XXX) method in order to set specific audio output type, such as LINE, HDMI_ARC, and SPDIF. But it turns out that it conflicts with bluetooth a2dp which uses the same setForceUse(FORCE_MEDIA, yyy). This change is based on several conditions. 1. When other non-speaker devices are on, prevent system audio from turing on. 2. In order to keep track of other devices' connectivity and to turn off system audio if other device like bluetooth or headphone preempts current output, register OnAudioPortChangeListner to audio manager. 3. All possible system audio outputs can be merged with other outputs without priority. Change-Id: Id4e47d99db64b9f77a17c2c28c47787ab8980bf7
Loading
Please register or sign in to comment