demux: provide ioctl to clear dmx cache [2/2]

PD#SWPL-169716

Problem:
provide ioctl to clear dmx cache

Solution:
provide ioctl to clear dmx cache

Verify:
verified at T5W

Change-Id: I3968204db100248664c2944ed893c959bef4618a
Signed-off-by: chuangcheng.peng <chuangcheng.peng@amlogic.com>
This commit is contained in:
chuangcheng.peng
2024-05-17 15:16:11 +08:00
committed by Dongjin Kim
parent 6436439723
commit ccbf59edb9
3 changed files with 18 additions and 0 deletions

View File

@@ -1225,6 +1225,13 @@ static int dvb_demux_do_ioctl(struct file *file,
}
ret = dmx_ext->decode_info(dmxdev->demux, parg);
break;
case DMX_SET_COMMAND:
if (!dmx_ext->dmx_set_command) {
ret = -EINVAL;
break;
}
ret = dmx_ext->dmx_set_command(dmxdev->demux, parg);
break;
#endif
case DMX_ADD_PID:

View File

@@ -30,6 +30,8 @@ struct dmx_demux_ext {
u16 pids[2]);
int (*decode_info)(struct dmx_demux *demux,
void *info);
int (*dmx_set_command)(struct dmx_demux *demux,
void *info);
};
#endif

View File

@@ -197,6 +197,14 @@ struct decoder_mem_info {
__u32 rp_phy;
};
/*for set command to dmx*/
#define DMX_CLEAR_CACHE 0
struct dmx_set_command_info {
__u32 command;
__u32 reserved0;
__u32 reserved1;
};
/* amlogic define end */
/* amlogic define */
@@ -210,6 +218,7 @@ struct decoder_mem_info {
#define DMX_GET_DVR_MEM _IOR('o', 86, struct dvr_mem_info)
#define DMX_REMAP_PID _IOR('o', 87, __u16[2])
#define DMX_SET_DECODE_INFO _IOW('o', 88, struct decoder_mem_info)
#define DMX_SET_COMMAND _IOW('o', 89, struct dmx_set_command_info)
/* amlogic define end */
#endif