Please describe your issue below:
We are using the Khadas Edge2 board for our Android Software Development.
One very important feature of the Khdadas board is for us that the Board supports multiple independent displays.
However, on Android, the HDMI display gets always mirrored to the DP display.
Installing the original prebuilt Khadas Ubuntu image prooves that the hardware is capable of driving the HDMI display and the DP display independently.
For the Edge-V board there are information how to achieve this also for Android:
1. Brief Introduction
Edge-V has three display interfaces: HDMI + MIPI + EDP. The position of the interfaces are shown below:
[C]
Edge has two LCD screen interfaces: HDMI + DP. The position of the interfaces are shown below:
[image]
Captain has two LCD screen interfaces: EDP + MIPI. The position of the interfaces are shown below:
[image]
2. (HDMI + DP) Screen Config
2.1 Configure DTS
rk3399-khadas-edge.dtsi, for example: HDMI (Main Display) + DP (Secondary Display)
2.1.1 Enable Corres…
Can you please provide information how to configure Android/HWC for Edge2 to drive two displays independently on Android?
Which system do you use? Android, Ubuntu, OOWOW or others?
Edge2 with custom built Android 12.1 (AAOS)
Which version of system do you use? Khadas official images, self built images, or others?
self built images from khadas github sources Android 12.1 (AAOS 12.1.0_r8)
Post a console log of your issue below:
1|kedge2:/ $ getprop | grep hwc
[init.svc.vendor.hwcomposer-2-1]: [running]
[init.svc_debug_pid.vendor.hwcomposer-2-1]: [345]
[ro.boottime.vendor.hwcomposer-2-1]: [5010434562]
[vendor.ghwc.version]: [HWC2-1.4.6]
[vendor.hwc.compose_policy]: [1]
[vendor.hwc.device.display-0]: [HDMI-A-1:70:connected]
[vendor.hwc.device.display-1]: [DP-1:70:connected:mirror]
[vendor.hwc.device.primary]: [HDMI-A,DP]
[vendor.hwc.hdr_state]: [NORMAL]
@jkoehler
[HDMI + DP or DSI ] config:
kernel-5.10$ git diff4
--- a/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3588s-khadas-edge2.dts
@@ -198,7 +198,7 @@
status = "okay";
};
-&dp0_in_vp0 {
+&dp0_in_vp2 {
status = "okay";
};
system/core$ git diff
--- a/init/property_service.cpp
+++ b/init/property_service.cpp
modify "HDMI-A,DP" to "HDMI-A"
modify "DSI" to "DSI,DP"
1 Like
@goenjoy Thank you so much for your prompt feedback. Works like a charm.
1 Like
How can I set DP as primary?
@jkoehler vendor.hwc.device.primary
is the main screen configuration, and vendor.hwc.device.extend
is the secondary screen configuration.
system/core$ git diff
--- a/init/property_service.cpp
+++ b/init/property_service.cpp
Assign the value of "vendor.hwc.device.primary" to "DP"
1 Like
Hi again, the sound trough DP now working, how can i enable?
goenjoy
September 12, 2023, 12:56am
7
Don’t quite understand what you’re saying?
Sorry
The sound through DP doesn’t work, how can I fix it?
goenjoy
September 12, 2023, 9:09am
9
@davrdz25 Thank you for your feedback on this issue. edge2-android-12-v220920
,I have tested this version and it does not have this issue. I also tested the Android 13 version and there was no such issue. Due to the upcoming release of Android 13 version, Android 12 version may no longer be maintained.
1 Like
Ok i’ll wait but i need how to fix cuz i’m building from source to set up DP as primary display
goenjoy
September 13, 2023, 3:21am
11
@davrdz25
hardware/rockchip/audio$ git log -p 3a071f25afdfdeb925bc39b9e98c390f8af5de83
commit 3a071f25afdfdeb925bc39b9e98c390f8af5de83 (tag: android-13.0-mid-rkr3, tag: android-13.0-mid-rkr2)
Author: shine.liu <shine.liu@rock-chips.com>
Date: Tue Nov 22 14:21:32 2022 +0800
[audio hal]: fix no sound for dp
Signed-off-by: shine.liu <shine.liu@rock-chips.com>
Change-Id: I8757705e8939afe7385c3f509ec5b49fca064573
diff --git a/spdif_1_hal/audio_hw.h b/spdif_1_hal/audio_hw.h
index 5aa85ce..c23268d 100755
--- a/spdif_1_hal/audio_hw.h
+++ b/spdif_1_hal/audio_hw.h
@@ -70,7 +70,7 @@
#define CAPTURE_START_RAMP_MS 100
/* default sampling for default output */
-#define DEFAULT_PLAYBACK_SAMPLERATE 48000
+#define DEFAULT_PLAYBACK_SAMPLERATE 44100
#define DEFAULT_PLAYBACK_CHANNELS 2
@@ -123,7 +123,7 @@ struct pcm_config pcm_config_in = {
#else
struct pcm_config pcm_config = {
.channels = 2,
- .rate = 48000,
+ .rate = 44100,
.period_size = 512,
.period_count = 6,
.format = PCM_FORMAT_S16_LE,
diff --git a/spdif_hal/audio_hw.h b/spdif_hal/audio_hw.h
index 5aa85ce..c23268d 100755
--- a/spdif_hal/audio_hw.h
+++ b/spdif_hal/audio_hw.h
@@ -70,7 +70,7 @@
#define CAPTURE_START_RAMP_MS 100
/* default sampling for default output */
-#define DEFAULT_PLAYBACK_SAMPLERATE 48000
+#define DEFAULT_PLAYBACK_SAMPLERATE 44100
#define DEFAULT_PLAYBACK_CHANNELS 2
@@ -123,7 +123,7 @@ struct pcm_config pcm_config_in = {
#else
struct pcm_config pcm_config = {
.channels = 2,
- .rate = 48000,
+ .rate = 44100,
.period_size = 512,
.period_count = 6,
.format = PCM_FORMAT_S16_LE,
1 Like