Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 294993
b: refs/heads/master
c: aaa589f
h: refs/heads/master
i:
  294991: de6e998
v: v3
  • Loading branch information
Malcolm Priestley authored and Mauro Carvalho Chehab committed Mar 8, 2012
1 parent 0ec7a7b commit 871861b
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 46f3da990b8087c95613744a772cab7557b9b180
refs/heads/master: aaa589fc5e768eb8df1a7552e37f9c767ce5e384
18 changes: 16 additions & 2 deletions trunk/drivers/media/dvb/dvb-usb/it913x.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
struct it913x_state {
u8 id;
struct ite_config it913x_config;
u8 pid_filter_onoff;
};

struct ite_config it913x_config;
Expand Down Expand Up @@ -259,6 +260,7 @@ static u32 it913x_query(struct usb_device *udev, u8 pro)

static int it913x_pid_filter_ctrl(struct dvb_usb_adapter *adap, int onoff)
{
struct it913x_state *st = adap->dev->priv;
struct usb_device *udev = adap->dev->udev;
int ret;
u8 pro = (adap->id == 0) ? DEV_0_DMOD : DEV_1_DMOD;
Expand All @@ -267,7 +269,7 @@ static int it913x_pid_filter_ctrl(struct dvb_usb_adapter *adap, int onoff)

deb_info(1, "PID_C (%02x)", onoff);

ret = it913x_wr_reg(udev, pro, PID_EN, onoff);
ret = it913x_wr_reg(udev, pro, PID_EN, st->pid_filter_onoff);

mutex_unlock(&adap->dev->i2c_mutex);
return ret;
Expand All @@ -276,6 +278,7 @@ static int it913x_pid_filter_ctrl(struct dvb_usb_adapter *adap, int onoff)
static int it913x_pid_filter(struct dvb_usb_adapter *adap,
int index, u16 pid, int onoff)
{
struct it913x_state *st = adap->dev->priv;
struct usb_device *udev = adap->dev->udev;
int ret;
u8 pro = (adap->id == 0) ? DEV_0_DMOD : DEV_1_DMOD;
Expand All @@ -292,6 +295,13 @@ static int it913x_pid_filter(struct dvb_usb_adapter *adap,

ret |= it913x_wr_reg(udev, pro, PID_INX, (u8)(index & 0x1f));

if (udev->speed == USB_SPEED_HIGH && pid == 0x2000) {
ret |= it913x_wr_reg(udev, pro, PID_EN, !onoff);
st->pid_filter_onoff = !onoff;
} else
st->pid_filter_onoff =
adap->fe_adap[adap->active_fe].pid_filtering;

mutex_unlock(&adap->dev->i2c_mutex);
return 0;
}
Expand Down Expand Up @@ -599,6 +609,7 @@ static int it913x_identify_state(struct usb_device *udev,

static int it913x_streaming_ctrl(struct dvb_usb_adapter *adap, int onoff)
{
struct it913x_state *st = adap->dev->priv;
int ret = 0;
u8 pro = (adap->id == 0) ? DEV_0_DMOD : DEV_1_DMOD;

Expand All @@ -610,6 +621,9 @@ static int it913x_streaming_ctrl(struct dvb_usb_adapter *adap, int onoff)
ret = it913x_wr_reg(adap->dev->udev, pro, PID_RST, 0x1);

mutex_unlock(&adap->dev->i2c_mutex);
st->pid_filter_onoff =
adap->fe_adap[adap->active_fe].pid_filtering;

}

return ret;
Expand Down Expand Up @@ -884,5 +898,5 @@ module_usb_driver(it913x_driver);

MODULE_AUTHOR("Malcolm Priestley <tvboxspy@gmail.com>");
MODULE_DESCRIPTION("it913x USB 2 Driver");
MODULE_VERSION("1.26");
MODULE_VERSION("1.27");
MODULE_LICENSE("GPL");

0 comments on commit 871861b

Please sign in to comment.