Edge-V Dual screen abnormal display/different touch function

Dual screen abnormal display/different touch function

1. Overview

In view of the more and more extensive application of Dual screen abnormal display/different touch function in such projects as advertisement machine, game machine, cash register and KTV machine, this paper based on Edge-V board makes a description of dual-screen heterodyne function from the perspective of hardware and software to facilitate the development of subsequent customers.

2. Dual screen abnormal display introduction

image
Two LCDC controllers are integrated in the SOC of RK3399, which provides a basis for the realization of dual-screen display function. Then the realization of software is to create two different buffers to correspond to the external physical screen. Then each buffer is sent to the corresponding screen by different LCDC, which realizes the function of double screen display.

The Edge-V board supports dual display device display, It includes two schemes: Android Presentation and RK dualscreen.

  • Android Presentation is a dual-screen solution provided by Google, which implements VOP distribution at the View level. The logic is controlled on the same APP. Please refer to the official documents of Google for development. Presentation is suitable for in-depth customization of its own needs, and the current dual-screen non-contact function is based on the adaptation of this scheme;

  • RK dualscreen implements VOP distribution at the APP level. The two distinct parts are different APPs. RK dualscreen supports rapid integration of multiple APPs and functional integration under the in-depth customization scheme. At present, dual-screen display and dual-tone function is based on the adaptation of this scheme. Customers should choose the corresponding scheme according to product requirements. The following table is a brief description of the two schemes.


  • Demonstration steps
    1,Edge-V firmware supports Dual screen abnormal display, connected to HDMI display + DP display
    2,Download and Installation DualVideoScreen.apk
    3,Copy an MP4 video to / sdcard / directory, named 123. mp4
    4,Open the DualVideoScreen application and display the video on the secondary screen. The main screen can operate other applications normally
    5,Click on DualVideoScreen again to turn off the dual-screen display

  • Video demonstration of Dual screen abnormal display

3. Dual screen different touch introduction

image
In native Android system code, the event entity touched already contains a member called displayId. This shows that Android is basically a two-touch framework. If the displayId of the touch event corresponds to the home screen, it will send the event to the TouchdedWindow of the home screen. Similarly, if the displayId of the touch event corresponds to the secondary screen, it will send the event to the TouchedWindow of the secondary screen. So the key point is how the displayId is assigned. In the inputflinger code of Eventhub. cpp, the openDeviceLocked function obtains device information through IOCTL (), judges the type of device according to the information obtained, and assigns the corresponding attribute in device. classes, where INPUT_DEVICE_C LASS_EXTERNAL identifies whether the device is an external device. When there is a touch screen with USB or Bluetooth interface, the touch device will set the INPUT_DEVICE_CLASS_EXTERNAL attribute, according to which the input framework will eventually send its event to the TouchedWindow of the secondary screen.
image
So if you use touch screen, the home screen uses I2C interface, and the secondary screen uses USB or Bluetooth interface, then you can achieve double touch. If both of them use I2C, or both use USB (Bluetooth), as long as the code is modified to ensure that the touch device on the main screen does not have INPUT_DEVICE_CLASS_EXTERNAL attribute, and the touch device on the secondary screen with this attribute, dual touch function can also be realized.

  • Demonstration steps
    1,Edge-V firmware supports Dual screen different touch, connected to HDMI display + DP display(Touch screen with USB)
    2,Download and Installation demo.apk
    3,Open the Presentation application, where the SHOW_MR and SHOW_DM buttons can achieve Dual screen abnormal display, and The Click button is displayed on the second display for the Dual screen different touch function test.

  • Video demonstration of dual screen different touch

  • Note: This patch only applies to dual screen abnormal display of Android Presentation scheme, which has been verified under I2C + USB and dual USB TP mode.

5 Likes

Thank you for your support !

I am implementing dual screen application using khadas vim3 board and MIPI-DSI touch screen.
The DualVideoScreen App seems to be a good reference,
can you provide the source code of the DualVideoScreen application?

We don’t have code either.

We don’t have code either.

Thank you for answer.