Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 285343
b: refs/heads/master
c: 9c1133c
h: refs/heads/master
i:
  285341: 8458560
  285339: f88fdbc
  285335: 41699e3
  285327: 37baa37
  285311: 938aa4a
v: v3
  • Loading branch information
Malcolm Priestley authored and Mauro Carvalho Chehab committed Dec 11, 2011
1 parent e9f3efc commit 1c4eab0
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 6 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: 48763e2c6e76fbaa64229219593c1a456fd32c67
refs/heads/master: 9c1133c7c89266d4969e36527ce7be958d1b93c6
28 changes: 23 additions & 5 deletions trunk/drivers/media/dvb/dvb-usb/it913x.c
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,13 @@ static int it913x_rc_query(struct dvb_usb_device *d)

return ret;
}

#define TS_MPEG_PKT_SIZE 188
#define EP_LOW 21
#define TS_BUFFER_SIZE_PID (EP_LOW*TS_MPEG_PKT_SIZE)
#define EP_HIGH 348
#define TS_BUFFER_SIZE_MAX (EP_HIGH*TS_MPEG_PKT_SIZE)

static int it913x_identify_state(struct usb_device *udev,
struct dvb_usb_device_properties *props,
struct dvb_usb_device_description **desc,
Expand Down Expand Up @@ -374,6 +381,17 @@ static int it913x_identify_state(struct usb_device *udev,
info("Dual mode=%x Remote=%x Tuner Type=%x", it913x_config.dual_mode
, remote, it913x_config.tuner_id_0);

/* Select Stream Buffer Size */
if (pid_filter)
props->adapter[0].fe[0].stream.u.bulk.buffersize =
TS_BUFFER_SIZE_MAX;
else
props->adapter[0].fe[0].stream.u.bulk.buffersize =
TS_BUFFER_SIZE_PID;
if (it913x_config.dual_mode)
props->adapter[1].fe[0].stream.u.bulk.buffersize =
props->adapter[0].fe[0].stream.u.bulk.buffersize;

if (firm_no > 0) {
*cold = 0;
return 0;
Expand Down Expand Up @@ -511,7 +529,7 @@ static int it913x_frontend_attach(struct dvb_usb_adapter *adap)
struct usb_device *udev = adap->dev->udev;
int ret = 0;
u8 adap_addr = I2C_BASE_ADDR + (adap->id << 5);
u16 ep_size = adap->props.fe[0].stream.u.bulk.buffersize;
u16 ep_size = adap->props.fe[0].stream.u.bulk.buffersize / 4;
u8 pkt_size = 0x80;

if (adap->dev->udev->speed != USB_SPEED_HIGH)
Expand Down Expand Up @@ -610,8 +628,8 @@ static struct dvb_usb_device_properties it913x_properties = {
.endpoint = 0x04,
.u = {/* Keep Low if PID filter on */
.bulk = {
.buffersize = 3584,

.buffersize =
TS_BUFFER_SIZE_PID,
}
}
}
Expand All @@ -635,8 +653,8 @@ static struct dvb_usb_device_properties it913x_properties = {
.endpoint = 0x05,
.u = {
.bulk = {
.buffersize = 3584,

.buffersize =
TS_BUFFER_SIZE_PID,
}
}
}
Expand Down

0 comments on commit 1c4eab0

Please sign in to comment.