RK3588 HDMI IN调试

HDMI RX控制器配置:

    /* Should work with at least 128MB cma reserved above. */
    &hdmirx_ctrler {
        status = "okay";

        /* Effective level used to trigger HPD: 0-low, 1-high */
        hpd-trigger-level = <1>;
        hdmirx-det-gpios = <&gpio1 RK_PD5 GPIO_ACTIVE_LOW>;
        pinctrl-names = "default";
        pinctrl-0 = <&hdmim1_rx &hdmirx_det>;
    };
    
    hdmi {
        hdmirx_det: hdmirx-det {
            rockchip,pins = <1 RK_PD5 RK_FUNC_GPIO &pcfg_pull_up>;
        };
    };
板级配置需要与实际硬件电路连接对应:
hpd-trigger-level:触发HPD的有效电平,<1>表示RK3588控制引脚和HDMI端口HPD电平状态相
同,<0>则表示相反。

 

hdmirx-det-gpios:HDMI插入检测引脚,需要根据实际硬件连接配置GPIO和有效电平,低电平
有效时,需要配置pinctrl为内部上拉。
 
预留内存
RK3588 HDMI RX模块只能使用物理连续内存,需要预留至少128MB的CMA内存:
注:按3840x2160分辨率,RGB888图像格式,4个轮转Buffer计算。
reserved-memory {
        #address-cells = <2>;
        #size-cells = <2>;
        ranges;
        dma_trans: dma-trans@3c000000 {
            reg = <0x0 0x3c000000 0x0 0x04000000>;
        };

        /* Reserve 256MB memory for hdmirx-controller@fdee0000 */
        cma {
            compatible = "shared-dma-pool";
            reusable;
            reg = <0x0 (256 * 0x100000) 0x0 (256 * 0x100000)>;
            linux,cma-default;
        };
    };

Audio配置:

hdmiin_dc: hdmiin-dc {
        compatible = "rockchip,dummy-codec";
        #sound-dai-cells = <0>;
    };

    hdmiin-sound {
        compatible = "simple-audio-card";
        simple-audio-card,format = "i2s";
        simple-audio-card,name = "rockchip,hdmiin";
        simple-audio-card,bitclock-master = <&dailink0_master>;
        simple-audio-card,frame-master = <&dailink0_master>;
        status = "okay";
        simple-audio-card,cpu {
            sound-dai = <&i2s7_8ch>;
        };
        dailink0_master: simple-audio-card,codec {
            sound-dai = <&hdmiin_dc>;
        };
    };

&i2s7_8ch {
     status = "okay";
};

 

HDMI IN APK适配方法
packages/apps/rkCamera2 :预览apk,通过framework层与上述TV源数据服务进行交互,该APK在桌面上图标名称为 HdmiIn
SDK默认代码HDMI IN功能是关闭的,使能HDMI IN功能,需配置如下属性,开启后会编译含上述APK在内的相关模块:
diff --git a/rk3588s_t/rk3588s_t.mk b/rk3588s_t/rk3588s_t.mk
index 3ddc9f3..756fc41 100644
--- a/rk3588s_t/rk3588s_t.mk
+++ b/rk3588s_t/rk3588s_t.mk

+BOARD_HDMI_IN_SUPPORT := true
+BOARD_SHOW_HDMI_SETTING := true

 

posted @ 2024-08-23 19:20  M-kobe  阅读(311)  评论(0编辑  收藏  举报