Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 330576
b: refs/heads/master
c: 39831f0
h: refs/heads/master
v: v3
  • Loading branch information
Antti Palosaari authored and Mauro Carvalho Chehab committed Aug 4, 2012
1 parent edda215 commit 50e090c
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 5 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: 15072bba796d5b0039ccaa86aba0d5632c58c9b4
refs/heads/master: 39831f094fb703412c23a1178d28e1d8d1aa4d18
2 changes: 2 additions & 0 deletions trunk/drivers/media/dvb/dvb-usb/dvb_usb.h
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,8 @@ struct dvb_usb_device_properties {
int (*identify_state) (struct dvb_usb_device *);
int (*init) (struct dvb_usb_device *);
int (*get_rc_config) (struct dvb_usb_device *, struct dvb_usb_rc *);
int (*get_usb_stream_config) (struct dvb_frontend *,
struct usb_data_stream_properties *);

struct i2c_algorithm *i2c_algo;

Expand Down
16 changes: 15 additions & 1 deletion trunk/drivers/media/dvb/dvb-usb/dvb_usb_dvb.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,22 @@ static int dvb_usb_ctrl_feed(struct dvb_demux_feed *dvbdmxfeed, int onoff)
* for reception.
*/
if (adap->feedcount == onoff && adap->feedcount > 0) {
struct usb_data_stream_properties stream_props;

/* resolve USB stream configuration */
if (adap->dev->props.get_usb_stream_config) {
ret = adap->dev->props.get_usb_stream_config(
adap->fe_adap[adap->active_fe].fe,
&stream_props);
if (ret < 0)
return ret;
} else {
stream_props = adap->props.fe[adap->active_fe].stream;
}

deb_ts("submitting all URBs\n");
usb_urb_submit(&adap->fe_adap[adap->active_fe].stream, NULL);
usb_urb_submit(&adap->fe_adap[adap->active_fe].stream,
&stream_props);

deb_ts("controlling pid parser\n");
if (adap->props.fe[adap->active_fe].caps & DVB_USB_ADAP_HAS_PID_FILTER &&
Expand Down
17 changes: 14 additions & 3 deletions trunk/drivers/media/dvb/dvb-usb/dvb_usb_urb.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,9 @@ static void dvb_usb_data_complete_raw(struct usb_data_stream *stream,
int dvb_usb_adapter_stream_init(struct dvb_usb_adapter *adap)
{
int i, ret = 0;
for (i = 0; i < adap->props.num_frontends; i++) {
struct usb_data_stream_properties stream_props;

for (i = 0; i < adap->props.num_frontends; i++) {
adap->fe_adap[i].stream.udev = adap->dev->udev;
if (adap->props.fe[i].caps & DVB_USB_ADAP_RECEIVES_204_BYTE_TS)
adap->fe_adap[i].stream.complete =
Expand All @@ -107,8 +108,18 @@ int dvb_usb_adapter_stream_init(struct dvb_usb_adapter *adap)
else
adap->fe_adap[i].stream.complete = dvb_usb_data_complete;
adap->fe_adap[i].stream.user_priv = adap;
ret = usb_urb_init(&adap->fe_adap[i].stream,
&adap->props.fe[i].stream);

/* resolve USB stream configuration */
if (adap->dev->props.get_usb_stream_config) {
ret = adap->dev->props.get_usb_stream_config(NULL,
&stream_props);
if (ret < 0)
break;
} else {
stream_props = adap->props.fe[i].stream;
}

ret = usb_urb_init(&adap->fe_adap[i].stream, &stream_props);
if (ret < 0)
break;
}
Expand Down

0 comments on commit 50e090c

Please sign in to comment.