mirror of
https://github.com/hardkernel/kernel_common_drivers.git
synced 2026-06-25 12:03:48 +09:00
demux: split dvr normal & secure with same sid [1/1]
PD#SWPL-149279 Problem: same sid record with normal & secure memory Solution: split dvr normal & secure with same sid Verify: verified at sc2 Change-Id: I95af50fab8c4454a143fea55f026b95ec42a2178 Signed-off-by: chuangcheng peng <chuangcheng.peng@amlogic.com>
This commit is contained in:
committed by
Luan Yuan
parent
b6c48eee1b
commit
b3545fa4cf
@@ -1102,7 +1102,7 @@ static int _dmx_ts_feed_set(struct dmx_ts_feed *ts_feed, u16 pid, int ts_type,
|
||||
|
||||
sec_level = (filter->params.pes.flags >> 10) & 0x7;
|
||||
|
||||
if (demux->source == INPUT_LOCAL_SEC)
|
||||
if (demux->source == INPUT_LOCAL_SEC && format != DVR_FORMAT)
|
||||
sec_level = local_sec_level;
|
||||
|
||||
feed->type = type;
|
||||
@@ -1124,7 +1124,7 @@ static int _dmx_ts_feed_set(struct dmx_ts_feed *ts_feed, u16 pid, int ts_type,
|
||||
}
|
||||
|
||||
if (format == DVR_FORMAT) {
|
||||
feed->ts_out_elem = ts_output_find_dvr(sid);
|
||||
feed->ts_out_elem = ts_output_find_dvr(sid, demux->sec_dvr_size ? 1 : 0);
|
||||
if (feed->ts_out_elem) {
|
||||
pr_dbg("find same pid elem:0x%lx\n",
|
||||
(unsigned long)(feed->ts_out_elem));
|
||||
@@ -1160,7 +1160,6 @@ static int _dmx_ts_feed_set(struct dmx_ts_feed *ts_feed, u16 pid, int ts_type,
|
||||
if (demux->sec_dvr_size != 0 && format == DVR_FORMAT) {
|
||||
ts_output_set_sec_mem(feed->ts_out_elem,
|
||||
demux->sec_dvr_buff, demux->sec_dvr_size);
|
||||
demux->sec_dvr_size = 0;
|
||||
sec_level = 1;
|
||||
}
|
||||
if (sec_level != 0)
|
||||
@@ -1777,8 +1776,10 @@ static int _dmx_release_ts_feed(struct dmx_demux *dmx,
|
||||
if (feed->pid == 0x2000)
|
||||
ts_output_remove_pid(feed->ts_out_elem, 0x1fff);
|
||||
ret = ts_output_close(feed->ts_out_elem);
|
||||
if (ret == 0)
|
||||
if (ret == 0) {
|
||||
demux->dvr_ts_output = NULL;
|
||||
demux->sec_dvr_size = 0;
|
||||
}
|
||||
} else {
|
||||
ts_output_close(feed->ts_out_elem);
|
||||
}
|
||||
|
||||
@@ -2671,7 +2671,7 @@ struct out_elem *ts_output_find_same_section_pid(int sid, int pid)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
struct out_elem *ts_output_find_dvr(int sid)
|
||||
struct out_elem *ts_output_find_dvr(int sid, int sec_level)
|
||||
{
|
||||
int i = 0;
|
||||
|
||||
@@ -2679,9 +2679,9 @@ struct out_elem *ts_output_find_dvr(int sid)
|
||||
struct out_elem *pout = &out_elem_table[i];
|
||||
|
||||
if (pout->used &&
|
||||
pout->sid == sid && pout->format == DVR_FORMAT) {
|
||||
pout->sid == sid && pout->format == DVR_FORMAT &&
|
||||
pout->pchan && pout->pchan->sec_level == sec_level)
|
||||
return pout;
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -186,7 +186,7 @@ int ts_output_add_cb(struct out_elem *pout, ts_output_cb cb, void *udata,
|
||||
int ts_output_remove_cb(struct out_elem *pout, ts_output_cb cb, void *udata,
|
||||
u8 cb_id, bool is_sec);
|
||||
|
||||
struct out_elem *ts_output_find_dvr(int sid);
|
||||
struct out_elem *ts_output_find_dvr(int sid, int sec_level);
|
||||
|
||||
int ts_output_sid_debug(void);
|
||||
int ts_output_dump_info(char *buf);
|
||||
|
||||
Reference in New Issue
Block a user