mirror of
https://github.com/hardkernel/kernel_common_drivers.git
synced 2026-06-25 12:03:48 +09:00
demux: every filter use crc independently [1/1]
PD#SWPL-201729 Problem: same pid use different crc configure Solution: every filter use crc independently. Verify: verified at t5w Change-Id: I015cf30ae8ed167541ceb90892a74594e990d95f Signed-off-by: chuangcheng.peng <chuangcheng.peng@amlogic.com>
This commit is contained in:
committed by
gerrit autosubmit
parent
a76f054c5b
commit
fe5ac8a4fc
@@ -1334,9 +1334,15 @@ static int _dmx_section_feed_set(struct dmx_section_feed *feed,
|
||||
static int _dmx_section_add_filter(struct sw_demux_sec_feed *sec_feed, int i)
|
||||
{
|
||||
struct swdmx_secfilter_params params;
|
||||
struct dmx_section_filter *sec_filter;
|
||||
struct dmxdev_filter *filter;
|
||||
|
||||
params.pid = sec_feed->pid;
|
||||
params.crc32 = sec_feed->check_crc;
|
||||
|
||||
sec_filter = (struct dmx_section_filter *)
|
||||
&sec_feed->filter[i].section_filter;
|
||||
filter = (struct dmxdev_filter *)sec_filter->priv;
|
||||
params.crc32 = (filter->params.sec.flags & DMX_CHECK_CRC) ? 1 : 0;
|
||||
|
||||
memmove(&sec_feed->filter[i].section_filter.filter_value[1],
|
||||
&sec_feed->filter[i].section_filter.filter_value[3],
|
||||
@@ -1367,6 +1373,7 @@ static int _dmx_section_add_filter(struct sw_demux_sec_feed *sec_feed, int i)
|
||||
swdmx_sec_filter_add_section_cb(sec_feed->filter[i].secf, _sec_cb,
|
||||
&sec_feed->filter[i].section_filter);
|
||||
|
||||
pr_dbg("pid:0x%0x, i:%d, crc:%d\n", params.pid, i, params.crc32);
|
||||
if (swdmx_sec_filter_enable(sec_feed->filter[i].secf) != SWDMX_OK)
|
||||
return -1;
|
||||
return 0;
|
||||
@@ -1421,6 +1428,7 @@ static int _dmx_section_feed_start_filtering(struct dmx_section_feed *feed)
|
||||
feed->is_filtering = 1;
|
||||
|
||||
if (sec_feed->sec_out_elem) {
|
||||
pr_dbg("%s same pid has pid filter\n", __func__);
|
||||
mutex_unlock(demux->pmutex);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -82,6 +82,7 @@ static int sec_data(struct swdmx_pid_filter *pid_filter, u8 *p, int len)
|
||||
int n, left = len, sec_len;
|
||||
u8 *sec = pid_filter->sec_data;
|
||||
u8 crc = SWDMX_FALSE;
|
||||
u8 crc_result = SWDMX_FALSE;
|
||||
|
||||
swdmx_log("%s enter\n", __func__);
|
||||
|
||||
@@ -125,11 +126,18 @@ static int sec_data(struct swdmx_pid_filter *pid_filter, u8 *p, int len)
|
||||
if (!crc) {
|
||||
if (swdmx_crc32(pid_filter->sec_data,
|
||||
pid_filter->sec_recv)) {
|
||||
swdmx_log("section crc error");
|
||||
break;
|
||||
swdmx_log("pid:0x%0x, section crc error\n",
|
||||
pid_filter->pid);
|
||||
crc = SWDMX_TRUE;
|
||||
crc_result = SWDMX_FALSE;
|
||||
continue;
|
||||
}
|
||||
|
||||
crc = SWDMX_TRUE;
|
||||
crc_result = SWDMX_TRUE;
|
||||
} else {
|
||||
if (!crc_result)
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user