El Martes, 24 de Julio de 2007, Christophe Thommeret escribió:
> Le mardi 24 juillet 2007 14:27, Jose Alberto Reguero a écrit :
> > El Martes, 24 de Julio de 2007, Torgeir Veimo escribió:
> > > On Tue, 2007-07-24 at 12:55 +0200, Jose Alberto Reguero wrote:
> > > > This patch fix Hauppauge Nova-T 500 USB disconnects.
> > >
> > > Hallelujah!
> > >
> > > Do you have some other code for the nova-t 500 up your sleeve as well,
> > > like some remote control support code? :))
> >
> > I don't have remote control support.
> >
> > Respect the patch, it works for me. I have not any disconnect in some
> > days, althought it is dificult to say that the problem is 100% solved,
> > because disconnects are random.
>
> Relying on device name seems somewhat hackish, however, and doesn't fix
> anything for nova-t stick ;)
There are other form to do the same, more easily, for all the dibcom devices,
but there is a problem: streaming state don't go off when closing the device,
althought perphaps that is not important.
See the atached patch.
Jose Alberto
diff -r 792a97818dd1 linux/drivers/media/dvb/dvb-usb/dib0700_core.c
--- a/linux/drivers/media/dvb/dvb-usb/dib0700_core.c Thu Jul 26 10:49:35 2007 -0300
+++ b/linux/drivers/media/dvb/dvb-usb/dib0700_core.c Fri Jul 27 14:03:52 2007 +0200
@@ -243,21 +243,18 @@ int dib0700_streaming_ctrl(struct dvb_us
b[2] = (0x01 << 4); /* Master mode */
b[3] = 0x00;
- deb_info("modifying (%d) streaming state for %d\n", onoff, adap->id);
-
- if (onoff)
- st->channel_state |= 1 << adap->id;
- else
- st->channel_state &= ~(1 << adap->id);
-
- b[2] |= st->channel_state;
-
- if (st->channel_state) /* if at least one channel is active */
- b[1] = (0x01 << 4) | 0x00;
-
- deb_info("data for streaming: %x %x\n",b[1],b[2]);
-
- return dib0700_ctrl_wr(adap->dev, b, 4);
+ if (onoff) {
+ if ((st->channel_state & (1 << adap->id)) == 0) {
+ deb_info("modifying (%d) streaming state for %d\n", onoff, adap->id);
+ st->channel_state |= 1 << adap->id;
+ b[1] = (0x01 << 4) | 0x00;
+ b[2] |= st->channel_state;
+ deb_info("data for streaming: %x %x\n",b[1],b[2]);
+ return dib0700_ctrl_wr(adap->dev, b, 4);
+ }
+ }
+
+ return 0;
}
static int dib0700_probe(struct usb_interface *intf,
_______________________________________________
linux-dvb mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb