diff options
author | Malcolm Priestley <tvboxspy@gmail.com> | 2011-04-16 12:30:32 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-05-20 08:28:53 -0400 |
commit | c8b7ced3460934cb31464463d7f909fef5db9391 (patch) | |
tree | bfb2634685f11169d0c4fb34b55366d4023e72f8 /drivers/media/dvb/dvb-usb | |
parent | 6f030abf9a77f10213bc5a2da2eff478d4d4e0c3 (diff) |
[media] dvb-usb return device errors to demuxer
Return device errors to demuxer from on/off streamming and
pid filtering.
Please test this patch with all dvb-usb devices.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb/dvb-usb')
-rw-r--r-- | drivers/media/dvb/dvb-usb/dvb-usb-dvb.c | 32 |
1 files changed, 21 insertions, 11 deletions
diff --git a/drivers/media/dvb/dvb-usb/dvb-usb-dvb.c b/drivers/media/dvb/dvb-usb/dvb-usb-dvb.c index df1ec3e69f4a..965698b2d974 100644 --- a/drivers/media/dvb/dvb-usb/dvb-usb-dvb.c +++ b/drivers/media/dvb/dvb-usb/dvb-usb-dvb.c | |||
@@ -12,7 +12,7 @@ | |||
12 | static int dvb_usb_ctrl_feed(struct dvb_demux_feed *dvbdmxfeed, int onoff) | 12 | static int dvb_usb_ctrl_feed(struct dvb_demux_feed *dvbdmxfeed, int onoff) |
13 | { | 13 | { |
14 | struct dvb_usb_adapter *adap = dvbdmxfeed->demux->priv; | 14 | struct dvb_usb_adapter *adap = dvbdmxfeed->demux->priv; |
15 | int newfeedcount,ret; | 15 | int newfeedcount, ret; |
16 | 16 | ||
17 | if (adap == NULL) | 17 | if (adap == NULL) |
18 | return -ENODEV; | 18 | return -ENODEV; |
@@ -24,9 +24,12 @@ static int dvb_usb_ctrl_feed(struct dvb_demux_feed *dvbdmxfeed, int onoff) | |||
24 | deb_ts("stop feeding\n"); | 24 | deb_ts("stop feeding\n"); |
25 | usb_urb_kill(&adap->stream); | 25 | usb_urb_kill(&adap->stream); |
26 | 26 | ||
27 | if (adap->props.streaming_ctrl != NULL) | 27 | if (adap->props.streaming_ctrl != NULL) { |
28 | if ((ret = adap->props.streaming_ctrl(adap,0))) | 28 | ret = adap->props.streaming_ctrl(adap, 0); |
29 | err("error while stopping stream."); | 29 | err("error while stopping stream."); |
30 | if (ret < 0) | ||
31 | return ret; | ||
32 | } | ||
30 | } | 33 | } |
31 | 34 | ||
32 | adap->feedcount = newfeedcount; | 35 | adap->feedcount = newfeedcount; |
@@ -49,17 +52,24 @@ static int dvb_usb_ctrl_feed(struct dvb_demux_feed *dvbdmxfeed, int onoff) | |||
49 | 52 | ||
50 | deb_ts("controlling pid parser\n"); | 53 | deb_ts("controlling pid parser\n"); |
51 | if (adap->props.caps & DVB_USB_ADAP_HAS_PID_FILTER && | 54 | if (adap->props.caps & DVB_USB_ADAP_HAS_PID_FILTER && |
52 | adap->props.caps & DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF && | 55 | adap->props.caps & |
53 | adap->props.pid_filter_ctrl != NULL) | 56 | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF && |
54 | if (adap->props.pid_filter_ctrl(adap,adap->pid_filtering) < 0) | 57 | adap->props.pid_filter_ctrl != NULL) { |
58 | ret = adap->props.pid_filter_ctrl(adap, | ||
59 | adap->pid_filtering); | ||
60 | if (ret < 0) { | ||
55 | err("could not handle pid_parser"); | 61 | err("could not handle pid_parser"); |
56 | 62 | return ret; | |
63 | } | ||
64 | } | ||
57 | deb_ts("start feeding\n"); | 65 | deb_ts("start feeding\n"); |
58 | if (adap->props.streaming_ctrl != NULL) | 66 | if (adap->props.streaming_ctrl != NULL) { |
59 | if (adap->props.streaming_ctrl(adap,1)) { | 67 | ret = adap->props.streaming_ctrl(adap, 1); |
68 | if (ret < 0) { | ||
60 | err("error while enabling fifo."); | 69 | err("error while enabling fifo."); |
61 | return -ENODEV; | 70 | return ret; |
62 | } | 71 | } |
72 | } | ||
63 | 73 | ||
64 | } | 74 | } |
65 | return 0; | 75 | return 0; |