[linux-dvb] dvb_usb_vp7045 "usb control message "out" went wrong". Solution!
poiux at hotmail.com
Mon Nov 5 10:32:19 CET 2007
Back in May in this mailing list there were few messages describing a problem with Twinhan Alpha USB2 DVB-T (the old device, not the new one with the same brand name which doesn't work at all in Linux, yet) device. Couple people reported (including me) that this device had problems in Linux VDR application.
DVB-T TV picture works great with the device, for a while. Every now and then the device starts to throw "usb in went wrong" and/or "usb out went wrong" error messages in dmesg log. After the the whole system started to crawl and didn't recover until the device was disconnected and re-connected in USB port (well, that breaks VDR app so it had to be restarted also).
The problem could be related to VIA EPIA mini-itx boards (I have Epia M10000 board) because on www.vdr-portal.de (in LinVDR forum section) some other people were reporting the same problem and at least one of them had EPIA board also.
Finally I have found a solution in my hardware setup. It required small modification in drivers/media/dvb/dvb-usb/vp7045.c Kernel module (Twinhan alpha2 uses dvb-usb-vp7045 module). If some of you have the same problem then maybe attached diff patch works for you too.
I don't know too much about Linux DVB API and dvb arhitechture there so the diff is just a hack. There could be easier or better solution available also. The attached diff is probably useful only for in those scenarios where this issue is giving "show stopper" problems.
Here is copy-paste of the post I did in http://www.vdr-portal.de/board/thread.php?threadid=61812&page=2 forum post.
- Mike N
Hello,This is an old topic but just wanted to share experiences and findings. I had this same issue "usb out went wrong" with Epia M10000 board and Twinhan Alpha USB2 DVB-T tuner.Mozard seems to have Epia board also and having the same kind of errors, so could be that something is non-standard in Epia USB ports."Mr. Google" didn't have an answer to this problem, only few hits to pages describing the same problem. I have built Epia based VDR and eventually I got frustrated enough to look more closely into this problem.The good news is that at least in my hardware combination I have found a solution. Maybe it helps in your situation also.I tracked down the problem into Kernel dvb-usb-vp7045 module and "hack fix" modification in the corresponding vp7045.c source file did the trick in my system (requires kernel module re-compilation).The problem was the "usb-in" error came always first and after that it started to throw "usb out went wrong" errors. I hardly ever recovered from that error until Twinhan device was disconnected and re-connected in USB port. The exact error code from failed usb command was always ETIMEDOUT (110), so the command didn't complete properly in USB device.I have Linux 18.104.22.168 kernel but I think the module I modifed is pretty much the same in more recent kernels too (and few steps older also).I modified "linux-22.214.171.124/drivers/media/dvb/dvb-usb/vp7045.c" source file in a following way:- From line 22 begins "int vp7045_usb_op" function- Few lines below in this function there are two usb_control_msg function calls (the first one is out and second one in usb command).- I added simple FOR loop to re-try the USB-IN command few times if the error code was timeout error (and increasing timeout value each time just in case until command succeeds).This "re-send the command" fix does the magic in my Epia. Jihuuu! I still get "usb in went wrong" every now and then but the driver automatically recovers from it within few secs so I don't even notice it if I don't look at dmesg log outputs.If you have problems with "usb OUT went wrong" situations in a way where IN command never failed at first then maybe similar "re-try" and timeout increase fixes that too. But, in my case I noticed that the first error message was always "usb in went wrong" and only after that it started to throw "usb out went wrong".Please see the attached diff path file for a more detailed code lines. This is "hack fix" so defintely backup the original vp7045.c file before appyling the patch.Hopefully this hack fix works for you also. For me it works great.- Mike
Connect to the next generation of MSN Messenger
-------------- next part --------------
An HTML attachment was scrubbed...
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
More information about the linux-dvb