Example #1
0
static int vp702x_init_pid_filter(struct dvb_usb_adapter *adap)
{
	struct vp702x_adapter_state *st = adap->priv;
	struct vp702x_device_state *dst = adap->dev->priv;
	int i;
	u8 *b;

	st->pid_filter_count = 8;
	st->pid_filter_can_bypass = 1;
	st->pid_filter_state = 0x00;

	vp702x_set_pld_mode(adap, 1); /* bypass */

	for (i = 0; i < st->pid_filter_count; i++)
		vp702x_set_pid(adap, 0xffff, i, 1);

	mutex_lock(&dst->buf_mutex);
	b = dst->buf;
	memset(b, 0, 10);
	vp702x_usb_in_op(adap->dev, 0xb5, 3, 0, b, 10);
	vp702x_usb_in_op(adap->dev, 0xb5, 0, 0, b, 10);
	vp702x_usb_in_op(adap->dev, 0xb5, 1, 0, b, 10);
	mutex_unlock(&dst->buf_mutex);
	/*vp702x_set_pld_mode(d, 0); // filter */

	return 0;
}
Example #2
0
static int vp702x_init_pid_filter(struct dvb_usb_adapter *adap)
{
	struct vp702x_state *st = adap->priv;
	int i;
	u8 b[10] = { 0 };

	st->pid_filter_count = 8;
	st->pid_filter_can_bypass = 1;
	st->pid_filter_state = 0x00;

	vp702x_set_pld_mode(adap, 1); 

	for (i = 0; i < st->pid_filter_count; i++)
		vp702x_set_pid(adap, 0xffff, i, 1);

	vp702x_usb_in_op(adap->dev, 0xb5, 3, 0, b, 10);
	vp702x_usb_in_op(adap->dev, 0xb5, 0, 0, b, 10);
	vp702x_usb_in_op(adap->dev, 0xb5, 1, 0, b, 10);

	
	return 0;
}