[RK3399][Android7.1] 調試筆記 --- 播放音樂沒有聲音

調試RK3399時,啓動系統後,播放音樂,沒有聲音,日誌出現瞭如下錯誤:

03-25 09:45:24.743 +0000   251   338 D alsa_route: route_info->sound_card 0, route_info->devices 0  
03-25 09:45:24.743 +0000   251   338 D alsa_route: route_set_controls() set route 26
03-25 09:45:24.743 +0000   251   338 D alsa_route: route_set_controls() set route 27
03-25 09:45:24.743 +0000   251   338 D alsa_route: route_set_controls() set route 24
03-25 09:45:24.747 +0000   251   338 D alsa_route: route_set_controls() set route 11
03-25 09:45:24.753 +0000   251   338 E AudioHardwareTiny: pcm_open(PCM_CARD_HDMI) failed: cannot open device '/dev/snd/pcmC4294967295D0p': No such file or directory

通過測試發現只要接UVC的攝像頭,就會有這種錯誤,拔掉攝像頭,則錯誤消失。查閱資料,原來是系統啓動時,攝像頭佔用了Audio資源,通過如下配置可屏蔽UVC攝像頭的Audio,配置如下:

kris@eco:~/rk3399/kernel$ g df
diff --git a/arch/arm64/configs/rockchip_ecovacs_defconfig b/arch/arm64/configs/rockchip_eco_defconfig
index 7e66b90..0c482c2 100644
@@ -504,7 +504,7 @@ CONFIG_SND_VERBOSE_PRINTK=y
 # CONFIG_SND_PCI is not set
 # CONFIG_SND_SPI is not set
 #Kris, 180709, Avoid opening wrong audio device.
-CONFIG_SND_USB_AUDIO=y
+#CONFIG_SND_USB_AUDIO=y
 CONFIG_SND_SOC=y
 CONFIG_SND_SOC_ROCKCHIP=y
 CONFIG_SND_SOC_ROCKCHIP_SPDIF=y

參考鏈接:https://blog.csdn.net/kris_fei/article/details/81014523

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章