Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 6025
b: refs/heads/master
c: 8126fdb
h: refs/heads/master
i:
  6023: fdbe87f
v: v3
  • Loading branch information
Patrick Boettcher authored and Linus Torvalds committed Aug 27, 2005
1 parent 7069ae8 commit bbf0cb3
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 8 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: 820d220de400cfaaf846a2d8b5de93f9ea5a9b80
refs/heads/master: 8126fdbc76351bdf99c6737ef4fecf88a22fa538
19 changes: 14 additions & 5 deletions trunk/drivers/media/dvb/dvb-usb/dibusb-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,22 @@ EXPORT_SYMBOL(dibusb_power_ctrl);

int dibusb2_0_streaming_ctrl(struct dvb_usb_device *d, int onoff)
{
u8 b[2];
b[0] = DIBUSB_REQ_SET_IOCTL;
b[1] = onoff ? DIBUSB_IOCTL_CMD_ENABLE_STREAM : DIBUSB_IOCTL_CMD_DISABLE_STREAM;
u8 b[3] = { 0 };
int ret;

if ((ret = dibusb_streaming_ctrl(d,onoff)) < 0)
return ret;

dvb_usb_generic_write(d,b,3);
if (onoff) {
b[0] = DIBUSB_REQ_SET_STREAMING_MODE;
b[1] = 0x00;
if ((ret = dvb_usb_generic_write(d,b,2)) < 0)
return ret;
}

return dibusb_streaming_ctrl(d,onoff);
b[0] = DIBUSB_REQ_SET_IOCTL;
b[1] = onoff ? DIBUSB_IOCTL_CMD_ENABLE_STREAM : DIBUSB_IOCTL_CMD_DISABLE_STREAM;
return dvb_usb_generic_write(d,b,3);
}
EXPORT_SYMBOL(dibusb2_0_streaming_ctrl);

Expand Down
5 changes: 3 additions & 2 deletions trunk/drivers/media/dvb/dvb-usb/dvb-usb-dvb.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ static int dvb_usb_ctrl_feed(struct dvb_demux_feed *dvbdmxfeed, int onoff)
*/
if (newfeedcount == 0) {
deb_ts("stop feeding\n");
dvb_usb_urb_kill(d);

if (d->props.streaming_ctrl != NULL)
if ((ret = d->props.streaming_ctrl(d,0)))
err("error while stopping stream.");

dvb_usb_urb_kill(d);
}

d->feedcount = newfeedcount;
Expand All @@ -44,6 +44,8 @@ static int dvb_usb_ctrl_feed(struct dvb_demux_feed *dvbdmxfeed, int onoff)
* for reception.
*/
if (d->feedcount == onoff && d->feedcount > 0) {
deb_ts("submitting all URBs\n");
dvb_usb_urb_submit(d);

deb_ts("controlling pid parser\n");
if (d->props.caps & DVB_USB_HAS_PID_FILTER &&
Expand All @@ -59,7 +61,6 @@ static int dvb_usb_ctrl_feed(struct dvb_demux_feed *dvbdmxfeed, int onoff)
return -ENODEV;
}

dvb_usb_urb_submit(d);
}
return 0;
}
Expand Down

0 comments on commit bbf0cb3

Please sign in to comment.