From: pengfei.liu Date: Thu, 23 Apr 2020 07:23:16 +0000 (+0800) Subject: demux: set ciplus input source [1/1] X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7b8ccb1dbaea816f46704bdb0221da54b0504edf;p=GitHub%2FLineageOS%2FG12%2Fandroid_hardware_amlogic_kernel-modules_media.git demux: set ciplus input source [1/1] PD#SWPL-23541 Problem: For CAS project, AES descrambler can *NOT* worked on dmx-1 and dmx-2 Solution: On REE side, when set descrambler source, we also need set ciplus input source. Secure OS descrambler is responsible for set the ciplus output Verify: irdeto cas verify. Signed-off-by: pengfei.liu Change-Id: I05a7df887f8785418708c8384f0ff13de7d7b63e --- diff --git a/drivers/stream_input/parser/hw_demux/aml_dmx.c b/drivers/stream_input/parser/hw_demux/aml_dmx.c index 488f052..28473d0 100644 --- a/drivers/stream_input/parser/hw_demux/aml_dmx.c +++ b/drivers/stream_input/parser/hw_demux/aml_dmx.c @@ -2390,6 +2390,39 @@ void dsc_release(void) aml_ci_plus_disable(); } /************************* AES DESC************************************/ +void set_ciplus_input_source(struct aml_dsc *dsc) +{ + u32 data; + u32 in = 0; + + if (dsc->id != 0) { + pr_error("Ciplus set output can only work at dsc0 device\n"); + return; + } + + switch (dsc->source) { + case AM_TS_SRC_DMX0: + in = 0; + break; + case AM_TS_SRC_DMX1: + in = 1; + break; + case AM_TS_SRC_DMX2: + in = 2; + break; + default: + break; + } + + if (ciplus_out_auto_mode == 1) { + /* Set ciplus input source */ + data = READ_MPEG_REG(STB_TOP_CONFIG); + data &= ~(3<slock, flags);