Portable device HDMI display method
By designing a reasonable HDMI chip power-on process and adaptive distribution mechanism in portable devices, the problem of rapid battery exhaustion during HDMI display in portable devices is solved, and power saving and battery life are improved.
Patent Information
- Application Number
- CN202310761779.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-26
- Publication Date
- 2024-12-27
AI Technical Summary
When using HDMI display, the battery is quickly exhausted due to power consumption problems, and the prior art has failed to effectively solve this problem.
A more reasonable HDMI chip power-on process was designed, which only powers on when the HDMI application is turned on and the source is plugged in, and powers on again by monitoring the interface level, obtaining and recording the current resolution for adaptive distribution and preview. Avoid unnecessary power consumption.
It effectively saves the battery power of portable devices, improves battery life, and avoids the problem of rapid battery exhaustion.
Smart Images

Figure CN119200792A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication equipment and maintenance, and in particular to a HDMI display method for portable equipment. Background Art
[0002] When an HDMI (High Definition Multimedia Interface) source is displayed on the screen through a connecting cable, the existing technology is concentrated in the TV field and the display field. The TV and the display can power the HDMI chip at any time. Once an HDMI source is plugged in, it will immediately power it and negotiate to obtain the correct resolution of the HDMI source, and then display the picture with the correct resolution.
[0003] However, the application scenarios of portable communication equipment are different from those of TV and monitors. TV and monitors have external power supplies, so there is no need to consider power consumption. Portable communication equipment is a battery-powered device similar to a mobile phone or tablet, so power consumption needs to be considered. If portable equipment is the same as TV and monitor, and HDMI supplies power to the chip once the HDMI source is plugged in, in many cases, the HDMI chip will continue to use the battery power and quickly run out of the battery. Summary of the invention
[0004] The present invention provides a portable device HDMI display method, which can save the power of the battery of the portable communication equipment and improve the battery life.
[0005] The present invention provides the following technical solutions:
[0006] A portable device HDMI display method, the method comprising:
[0007] S1: When the HDMI application of the portable device is opened and when the HDMI source is plugged in, the HDMI chip is powered on;
[0008] S2: The HDMI application obtains the video stream of the HDMI source and performs preview.
[0009] Further, the S1 includes:
[0010] S11: Open the HDMI application and power on the HDMI chip. If the HDMI source is plugged in, the power-on is successful, otherwise the power-on fails.
[0011] S12: monitoring the pin level of the HDMI interface, and when it is monitored that the pin level is high or the pin level changes, the HDMI application repowers on the HDMI chip.
[0012] Further, the S2 includes:
[0013] S21: when the HDMI chip is powered on successfully, obtaining the current resolution of the HDMI source, and performing stream distribution according to the current resolution;
[0014] S22: After the stream is allocated, the video stream of the HDMI source is obtained and previewed at the current resolution.
[0015] Further, the S2 includes:
[0016] S23: when the HDMI chip is powered on, pre-configuring a stream according to a default resolution;
[0017] S24: when the HDMI chip is powered on and the pre-configured stream is successfully configured, preview is not performed, and after the current resolution of the HDMI source is obtained, the pre-configured stream is terminated;
[0018] S25: Record the current resolution of the HDMI source, and re-distribute the stream according to the current resolution;
[0019] S26: After the stream is allocated, the video stream of the HDMI source is obtained and previewed at the current resolution.
[0020] Furthermore, the method further comprises:
[0021] S3: When the HDMI application is closed, shut down the HDMI chip.
[0022] Furthermore, when the HDMI chip is powered on, it is triggered by calling Open of the camera API.
[0023] Furthermore, the flow distribution or pre-distribution includes:
[0024] The resolution parameter is set to the current resolution or the default resolution through the application layer API, and the driver layer configures the resolution and format of the camera data stream according to the parameter configuration of the application layer.
[0025] Further, obtaining the current resolution of the HDMI source includes:
[0026] The driver layer obtains the current resolution of the HDMI source and notifies the HDMI application by notifying or writing a node.
[0027] The present invention has the following beneficial effects:
[0028] In the prior art, power is supplied immediately once an HDM source is plugged in. However, the present invention is different from the prior art. It does not supply power immediately after the HDM source is plugged in. Instead, a more reasonable power-on process is designed. The HDMI chip is powered on only when the HDMI application is turned on and the HDMI source is plugged in. When the application is turned on but the HDMI source is not plugged in, or when the HDMI is plugged in but the application is not turned on, the HDMI chip will not be powered on. After power-on, the video stream of the HDMI source is previewed through the HDMI application. Through the above method of the present application, the battery power of the portable communication installation and maintenance equipment can be saved and the battery life can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 The present invention is a flowchart of the portable device HDMI display method. DETAILED DESCRIPTION
[0030] In order to make the technical problems, technical solutions and advantages to be solved by the present invention more clear, a detailed description will be given below with reference to the accompanying drawings and specific embodiments.
[0031] The embodiment of the present invention provides a portable device HDMI display method, such as Figure 1 As shown, the method includes:
[0032] S1: When the HDMI application of the portable device is opened and when an HDMI source is plugged in, the HDMI chip is powered on.
[0033] S2: The HDMI application obtains the video stream of the HDMI source and previews it.
[0034] In the prior art, power is supplied immediately once an HDM source is plugged in. However, the present invention is different from the prior art. It does not supply power immediately after the HDM source is plugged in. Instead, a more reasonable power-on process is designed. The HDMI chip is powered on only when the HDMI application is turned on and the HDMI source is plugged in. When the application is turned on but the HDMI source is not plugged in, or when the HDMI is plugged in but the application is not turned on, the HDMI chip will not be powered on. After power-on, the video stream of the HDMI source is previewed through the HDMI application. Through the above method of the present application, the battery power of the portable communication installation and maintenance equipment can be saved and the battery life can be improved.
[0035] For portable communication equipment, the system is developed based on the Android system. Under the Android architecture, HDMI is connected as a special external camera, so the operation of HDMI is implemented using the system's camera API (Application Programming Interface). Therefore, in this application, when the HDMI chip is powered on, it is triggered by the Open call of the camera API.
[0036] The HDMI driver node is mounted when the computer is turned on, and the HDMI application of the portable communication equipment can be opened at any time. Regardless of whether the HDMI source actually exists, the camera device node connected to HDMI can be opened and closed normally through the camera API. However, if the HDMI source is not inserted, an error will occur when obtaining the preview stream after opening it.
[0037] There are two power-on situations of the present invention. One is to insert the HDMI source first and then open the HDMI application, and the other is to open the HDMI application first and then insert the HDMI source. To adapt to the above two situations, an example of S1 of the present invention includes:
[0038] S11: Open the HDMI application and power on the HDMI chip. If the HDMI source is plugged in, the power-on is successful, otherwise the power-on fails.
[0039] When the HDMI source is inserted first and then the HDMI application is opened, this step can be powered on successfully. When the HDMI application is opened, Open is performed. When the camera API is performing the device Open operation, the driver detects that the HDMI source already exists, and immediately HDMI powers on the chip. The HDMI application then follows the normal camera operation process to allocate the stream and preview, and you can get the stream in HDMI, and then complete the preview.
[0040] In the case where the HDMI application is opened first and then the HDMI source is inserted, the HDMI chip is powered on when the HDMI application is opened, but the HDMI source is not inserted, so the power-on is not successful. If the HDMI source is then inserted, the HDMI application will not exit and reopen during this process, that is, the HDMI chip is not closed and reopened. In this case, the HDMI power-on will not be successful. Additional logic needs to be introduced later for further operation.
[0041] S12: monitor the pin level of the HDMI interface. When the pin level is monitored to be high or the pin level changes, the HDMI application repowers the HDMI chip.
[0042] When the HDMI source is inserted, the pin level of the contact line will be pulled high. The driver monitors this level. When the pin level is monitored to be high or the pin level changes, the plug-in event monitoring can be completed. Then this event is reported to the HDMI application through the system framework. After receiving the notification, the HDMI display application re-powers on the HDMI chip.
[0043] For the HDMI application to receive the reporting event, the HDMI application must be opened. When the HDMI application is opened, the device will be opened. Therefore, when the reporting event is received, the HDMI chip is in the open state. Therefore, the HDMI chip must be turned off before powering on.
[0044] As an improvement of the embodiment of the present application, the aforementioned S2 includes:
[0045] S21: When the HDMI chip is powered on successfully, the current resolution of the HDMI source is obtained, and the stream is distributed according to the current resolution.
[0046] After the HDMI chip is powered on successfully, in order to achieve adaptive preview, the HDMI application needs to know the current real resolution of the HDMI source. After the HDMI chip is powered on, the system driver layer can obtain the current real resolution of the HDMI source. The real resolution can be notified to the HDMI application by notification or writing nodes. The HDMI application allocates the preview stream according to this resolution to complete the adaptive preview of HDMI.
[0047] Stream allocation refers to setting parameters such as resolution through the application layer API. The driver layer configures the camera data stream (such as resolution, data stream format, etc.) according to the parameter configuration of the application layer. After the stream is correctly allocated, the camera hardware can output the image preview according to the required data stream.
[0048] S22: After the stream is allocated, the video stream of the HDMI source is obtained and previewed at the current resolution.
[0049] Normally, the power-on of the HDMI chip is triggered by the call of Camera Open. After power-on, the preview is not started immediately, but the driver reports the correct resolution of the current device, and then the preview stream and other parameters are configured with the real resolution to complete the preview, which is the aforementioned S21 to S22.
[0050] However, the logic of some platforms is special, and the power-on of the HDMI chip is triggered only after the distribution of the stream. To handle the above scenario, S2 of the present invention includes:
[0051] S23: When the HDMI chip is powered on, the stream is provisioned according to the default resolution.
[0052] S24: When the HDMI chip is powered on and the stream is successfully pre-configured, preview is not performed, and after the current resolution of the HDMI source is obtained, the pre-configured stream is ended.
[0053] S25: Record the current resolution of the HDMI source and re-distribute the stream according to the current resolution.
[0054] S26: After the stream is allocated, the video stream of the HDMI source is obtained and previewed at the current resolution.
[0055] In the scenario where the power is turned on after the stream is allocated, the resolution cannot be obtained without the stream allocation. Since the resolution supported by the HDMI chip can be read through the system API after it is opened, the HDMI application first configures a default resolution to pre-allocate the stream. After the pre-allocation of the stream is completed, the HDMI chip is also powered on successfully, and the real resolution can be obtained.
[0056] If you follow the normal camera operation process, after configuring a default resolution, you need to start previewing, wait for the actual resolution to be reported, and then re-distribute the stream with the actual resolution for previewing. If you use this default resolution for previewing, the previewed image will be distorted. Because there is a time difference between the preview of the default resolution and the actual resolution, the distorted image of the previous preview will flash by before the normal image is displayed again, which will cause a poor user experience.
[0057] In this application, after pre-configuring the stream according to the default resolution and powering on successfully, previewing is not performed immediately. Instead, the pre-configuration of the stream is ended after waiting for the current resolution to be obtained, and then the stream is re-configured. Previewing is performed only after the re-configuration of the stream is successful, which solves the problem of preview deformation caused by the default resolution.
[0058] The present invention enables the application to adaptively display the HDMI source through the software flow by cooperating with the application layer software and the driver layer software, and the process is not perceived by the user.
[0059] In order to prevent the HDMI chip from being powered on all the time due to the user forgetting to unplug the cable after the HDMI application is closed, the method of the present invention further includes:
[0060] S3: When the HDMI application is closed, the HDMI chip is turned off.
[0061] The above is a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A portable device HDMI display method, characterized in that: The method comprises: S1: When the HDMI application of the portable device is opened and when the HDMI source is plugged in, the HDMI chip is powered on; S2: The HDMI application obtains the video stream of the HDMI source and performs preview.
2. The portable device HDMI display method according to claim 1, characterized in that: The S1 includes: S11: Open the HDMI application and power on the HDMI chip. If the HDMI source is plugged in, the power-on is successful, otherwise the power-on fails. S12: monitoring the pin level of the HDMI interface, and when it is monitored that the pin level is high or the pin level changes, the HDMI application repowers on the HDMI chip.
3. The portable device HDMI display method according to claim 2, characterized in that: The S2 includes: S21: when the HDMI chip is powered on successfully, obtaining the current resolution of the HDMI source, and performing stream distribution according to the current resolution; S22: After the stream is allocated, the video stream of the HDMI source is obtained and previewed at the current resolution.
4. The portable device HDMI display method according to claim 2, characterized in that: The S2 includes: S23: when the HDMI chip is powered on, pre-configuring a stream according to a default resolution; S24: when the HDMI chip is powered on and the pre-configured stream is successfully configured, preview is not performed, and after the current resolution of the HDMI source is obtained, the pre-configured stream is terminated; S25: Record the current resolution of the HDMI source, and re-distribute the stream according to the current resolution; S26: After the stream is allocated, the video stream of the HDMI source is obtained and previewed at the current resolution.
5. The portable device HDMI display method according to any one of claims 1 to 4, characterized in that: The method further comprises: S3: When the HDMI application is closed, shut down the HDMI chip.
6. The portable device HDMI display method according to claim 5, characterized in that: When the HDMI chip is powered on, it is triggered by calling Open of the camera API.
7. The portable device HDMI display method according to claim 6, characterized in that: The flow distribution or pre-distribution flow includes: The resolution parameter is set to the current resolution or the default resolution through the application layer API, and the driver layer configures the resolution and format of the camera data stream according to the parameter configuration of the application layer.
8. The portable device HDMI display method according to claim 7, characterized in that: The obtaining the current resolution of the HDMI source comprises: The driver layer obtains the current resolution of the HDMI source and notifies the HDMI application by notifying or writing a node.
