RK356X Android13.0 HDMI和喇叭同时出声音

补丁适用范围:RK356X Android13.0

Android默认音频输出逻辑,不接HDMI默认喇叭音频输出,若检测到HDMI接入后,关闭喇叭输出,开启HDMI音频输出,但是BOX产品的使用场景需要插入HDMI后,喇叭仍然输出,可加入此补丁

$ vim frameworks/base/services/core/java/com/android/server/WiredAccessoryManager.java

@@ -565,8 +565,8 @@ final class WiredAccessoryManager implements WiredAccessoryCallbacks {
                 updateBit(maskAndState, BIT_LINEOUT, status, ExtconInfo.EXTCON_LINE_OUT);
             }
 
-            updateBit(maskAndState, BIT_HDMI_AUDIO,     status, "hdmi0");
-            updateBit(maskAndState, BIT_HDMI_AUDIO_1,   status, "hdmi1");
+            //updateBit(maskAndState, BIT_HDMI_AUDIO,     status, "hdmi0");
+            //updateBit(maskAndState, BIT_HDMI_AUDIO_1,   status, "hdmi1");
             updateBit(maskAndState, BIT_DP_AUDIO,       status, "dp0");
             updateBit(maskAndState, BIT_DP_AUDIO_1,     statu

你可能感兴趣的:(Audio驱动开发,RK356X,ANDROID13项目定制,音频,瑞芯微,Android)