如何在没有HDMI的情况下启动高通骁龙



我正在为运行Android的高通骁龙开发一个视频应用程序。我有一个应用程序,可以接收视频流,对其进行处理,并根据图像发送数据流。它也可以具有将图像显示到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 将我引向虚拟显示组合:

虚拟显示器组合类似于外部显示组合。虚拟显示器组合和物理显示组合之间的区别在于,虚拟显示器将输出发送到 Gralloc 缓冲区而不是屏幕。硬件编辑器 (HWC( 将输出写入缓冲区,提供完成防护,并将缓冲区发送给使用者(如视频编码器、GPU、CPU 等(。如果显示管道写入内存,虚拟显示器可以使用 2D/闪光或叠加。

虚拟显示器也解释了它:

SurfaceFlinger支持内部显示器(内置于手机或平板电脑中(、外部显示器(例如通过 HDMI 连接的电视(以及一个或多个虚拟显示器,这些显示器使合成输出在系统中可用。虚拟显示器可用于记录屏幕或通过网络发送屏幕。为虚拟显示生成的帧将写入BufferQueue

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

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

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

相关内容

  • 没有找到相关文章

最新更新