gpt4 book ai didi

android - 如何在没有 HDMI 的情况下启动 Qualcomm Snapdragon

转载 作者:行者123 更新时间:2023-12-02 21:25:11 38 4
gpt4 key购买 nike

我正在为运行 Android 的 Qualcomm Snapdragon 开发视频应用程序。我有一个应用程序,它接收视频流,对其进行处理,并根据图像发送数据流。它还可以具有将图像显示到 HDMI 的模式,但这不是必需的。我还将我的应用程序配置为在启动时自动运行。

重要的是,系统可以在没有插入 HDMI 的情况下启动。但是,在没有插入显示器的情况下启动系统时,启动过程会陷入无限循环,似乎正在尝试启动视频/音频服务,失败,然后重试。当 HDMI 插入时,系统能够完成启动,然后继续进入主屏幕。这是我通过串行获得的日志,当尝试在没有 HDMI 的情况下启动时,该日志会永远循环:

[ 22.471956] init: property_set("ro.boottime.audioserver", "22471598897") failed: property already set
[ 22.481207] init: property_set("ro.boottime.cameraserver", "22480859470") failed: property already set
[ 22.490533] init: property_set("ro.boottime.media", "22490197595") failed: property already set
[ 22.499191] init: property_set("ro.boottime.netd", "22498862751") failed: property already set
[ 22.531151] init: property_set("ro.boottime.wificond", "22530820772") failed: property already set
[ 22.983305] MSM-CPP cpp_init_hardware:1023 stream_cnt:0
[ 23.126367] init: property_set("ro.boottime.zygote", "23125974574") failed: property already set
[ 23.206157] MSM-CPP cpp_init_hardware:1023 stream_cnt:0
[ 23.561725] msm_qti_pp_get_rms_value_control, back not active to query rms be_idx:3
[ 23.573642] msm_voice_sound_focus_get: Error getting Sound Focus Params, err=-22
[ 23.580423] msm_voice_source_tracking_get: Error getting Source Tracking Params, err=-22
[ 23.588465] msm_audio_get_copp_idx_from_port_id: Invalid FE, exiting
[ 23.594484] msm_audio_sound_focus_get: Could not get copp idx for port_id=16385
[ 23.602184] msm_audio_get_copp_idx_from_port_id: Invalid FE, exiting
[ 23.608040] msm_audio_source_tracking_get: Could not get copp idx for port_id=16385
[ 23.616115] msm_voice_sound_focus_get: Error getting Sound Focus Params, err=-22
[ 23.623421] msm_voice_source_tracking_get: Error getting Source Tracking Params, err=-22
[ 23.631478] msm_audio_get_copp_idx_from_port_id: Invalid FE, exiting
[ 23.637464] msm_audio_sound_focus_get: Could not get copp idx for port_id=4101
[ 23.644995] msm_audio_get_copp_idx_from_port_id: Invalid FE, exiting
[ 23.651027] msm_audio_source_tracking_get: Could not get copp idx for port_id=4101
[ 23.658855] msm_audio_get_copp_idx_from_port_id: Invalid FE, exiting
[ 23.664939] msm_audio_sound_focus_get: Could not get copp idx for port_id=4103
[ 23.672444] msm_audio_get_copp_idx_from_port_id: Invalid FE, exiting
[ 23.678435] msm_audio_source_tracking_get: Could not get copp idx for port_id=4103
[ 23.688260] msm_pcm_volume_ctl_get substream runtime not found
[ 23.694029] msm_pcm_volume_ctl_get substream runtime not found
[ 23.699605] msm_pcm_volume_ctl_get substream runtime not found
[ 23.705037] msm_compr_audio_effects_config_get: stream or effects inactive
[ 23.712576] msm_pcm_volume_ctl_get substream runtime not found
[ 23.717709] msm_compr_audio_effects_config_get: stream or effects inactive
[ 23.725125] msm_compr_audio_effects_config_get: stream or effects inactive
[ 23.731802] msm_pcm_volume_ctl_get substream runtime not found
[ 23.737211] msm_pcm_volume_ctl_get substream or runtime not found
[ 23.744698] msm_pcm_volume_ctl_get substream runtime not found
[ 23.749964] msm_compr_audio_effects_config_get: stream or effects inactive
[ 23.757250] msm_compr_audio_effects_config_get: stream or effects inactive
[ 23.764110] msm_compr_audio_effects_config_get: stream or effects inactive
[ 23.770790] msm_compr_audio_effects_config_get: stream or effects inactive
[ 23.777327] msm_compr_audio_effects_config_get: stream or effects inactive
[ 23.784724] msm_compr_audio_effects_config_get: stream or effects inactive
[ 25.705018] init: property_set("ro.boottime.surfaceflinger", "25704640562") failed: property already set
[ 25.705499] init: Failed to bind socket 'pdx/system/vr/display/client': No such file or directory
[ 25.705779] init: Failed to bind socket 'pdx/system/vr/display/manager': No such file or directory
[ 25.706060] init: Failed to bind socket 'pdx/system/vr/display/vsync': No such file or directory
[ 26.052708] init: Unable to open '/sys/android_power/request_state': No such file or directory
[ 26.060404] init: Unable to write to '/sys/power/state': Invalid argument
[ 26.138413] init: property_set("ro.boottime.hwcomposer-2-1", "26138041187") failed: property already set
[ 26.534961] init: property_set("ro.boottime.audio-hal-2-0", "26534542802") failed: property already set
[ 27.048016] msm_qti_pp_get_rms_value_control, back not active to query rms be_idx:3
[ 27.057638] msm_voice_sound_focus_get: Error getting Sound Focus Params, err=-22
[ 27.064137] msm_voice_source_tracking_get: Error getting Source Tracking Params, err=-22
[ 27.072189] msm_audio_get_copp_idx_from_port_id: Invalid FE, exiting
[ 27.078398] msm_audio_sound_focus_get: Could not get copp idx for port_id=16385
[ 27.085828] msm_audio_get_copp_idx_from_port_id: Invalid FE, exiting
[ 27.092048] msm_audio_source_tracking_get: Could not get copp idx for port_id=16385
[ 27.099817] msm_voice_sound_focus_get: Error getting Sound Focus Params, err=-22
[ 27.107172] msm_voice_source_tracking_get: Error getting Source Tracking Params, err=-22
[ 27.115220] msm_audio_get_copp_idx_from_port_id: Invalid FE, exiting
[ 27.121482] msm_audio_sound_focus_get: Could not get copp idx for port_id=4101
[ 27.128760] msm_audio_get_copp_idx_from_port_id: Invalid FE, exiting
[ 27.135023] msm_audio_source_tracking_get: Could not get copp idx for port_id=4101
[ 27.142667] msm_audio_get_copp_idx_from_port_id: Invalid FE, exiting
[ 27.148883] msm_audio_sound_focus_get: Could not get copp idx for port_id=4103
[ 27.156218] msm_audio_get_copp_idx_from_port_id: Invalid FE, exiting
[ 27.162444] msm_audio_source_tracking_get: Could not get copp idx for port_id=4103
[ 27.171810] msm_pcm_volume_ctl_get substream runtime not found
[ 27.177051] msm_pcm_volume_ctl_get substream runtime not found
[ 27.182976] msm_pcm_volume_ctl_get substream runtime not found
[ 27.188378] msm_compr_audio_effects_config_get: stream or effects inactive
[ 27.195922] msm_pcm_volume_ctl_get substream runtime not found
[ 27.201188] msm_compr_audio_effects_config_get: stream or effects inactive
[ 27.208164] msm_compr_audio_effects_config_get: stream or effects inactive
[ 27.215088] msm_pcm_volume_ctl_get substream runtime not found
[ 27.220547] msm_pcm_volume_ctl_get substream or runtime not found
[ 27.227649] msm_pcm_volume_ctl_get substream runtime not found
[ 27.232647] msm_compr_audio_effects_config_get: stream or effects inactive
[ 27.239729] msm_compr_audio_effects_config_get: stream or effects inactive
[ 27.246622] msm_compr_audio_effects_config_get: stream or effects inactive
[ 27.253478] msm_compr_audio_effects_config_get: stream or effects inactive
[ 27.260348] msm_compr_audio_effects_config_get: stream or effects inactive
[ 27.267146] msm_compr_audio_effects_config_get: stream or effects inactive

我相信应该有某种方法来编辑 init.rc 文件以防止音频/视频服务在启动时运行,然后在启动后插入 HDMI 时在 ueventd 中注册某种“热插拔”。

虽然我研究了这些事情,但我不知道如何实际实现它们,并且我不确定这是否是正确的路径。任何帮助将不胜感激!

编辑:似乎通过编辑 Android 源代码来正确执行此操作的方法远远超出了我的工资等级,但一个简单的解决方法是购买模拟 HDMI 显示器的 HDMI 虚拟插头。基本上,它的寄存器中只有 EDID 数据,并在操作系统最初查找其显示器时将其输出。

最佳答案

DisplayDevice.cpp引导我到Virtual display composition :

Virtual display composition is similar to external display composition. The difference between virtual display composition and physical display composition is that virtual displays send output to a Gralloc buffer instead of to the screen. Hardware Composer (HWC) writes the output to a buffer, provides the completion fence, and sends the buffer to a consumer (such as the video encoder, GPU, CPU, and so on). Virtual displays can use 2D/blitter or overlays if the display pipeline writes to memory.

还有Virtual displays解释一下:

SurfaceFlinger supports an internal display (built into the phone or tablet), external displays (such as a television connected through HDMI), and one or more virtual displays that make composited output available within the system. Virtual displays can be used to record the screen or send the screen over a network. Frames generated for a virtual display are written to a BufferQueue.

必须连接虚拟显示设备,才能提供预期的输出缓冲区。经过简短的研究后,我不太确定如何实现这一点,但是当查看日志时......似乎在尝试获取显示以显示启动动画时它已经搞砸了。

该虚拟显示设备需要设置为主输出缓冲区。我认为应该可以使用文件 system.prop 或某些 *.rc 文件或任何 init.*.sh 进行配置可以引用一下。 TYPE_HDMI = 2TYPE_VIRTUAL = 5 ...可在 Display.java 中找到。插入或拔出 HDMI 电缆时,您正在寻找的事件似乎是 DisplayAdapter.DISPLAY_DEVICE_EVENT_CHANGED

请随意发布更好的答案,以防您能了解其工作原理。

关于android - 如何在没有 HDMI 的情况下启动 Qualcomm Snapdragon,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58190197/

38 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com