Re: [linux-dvb] m920x device: Genius TVGo DVB-T02Q
...| 00e0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff || 00f0 ff ff 76 ff ff 3f ff ff ff ff ff ff ff ff ff ff |..v..?..| 0100 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff || * 0150 fd ff ff ff ff ff ff ff ff ff ff ff ff ff ff bf || 0160 ff ff 93 ff ff ff e6 ff ff ff ff ff ff ff ff ff || 0170 ff 3f ff ff ff ff ff ff 47 c0 12 fe 00 61 5a 6e |.?..GaZn| 0180 01 2d e3 28 b8 00 0c 22 d4 d8 61 1f fa d4 b2 15 |.-.(..."..a.| 0190 00 00 01 00 00 10 f3 4d 7b 73 70 61 08 45 4c 20 |...M{spa.EL | 01a0 46 4c 59 45 52 6e bd 61 67 61 7a 69 6e 65 20 27 |FLYERn.agazine '| 01b0 75 73 69 63 61 6c 3a 20 4e 6f 74 d8 63 69 61 73 |usical: Not.cias| 01c0 91 20 41 67 65 6e 64 61 20 7c 65 20 63 6f 6e 63 |. Agenda |e conc| 01d0 69 65 72 74 6f 33 2c 20 52 65 70 6f 72 5e 61 6a |ierto3, Repor^aj| 01e0 65 20 45 73 70 65 63 69 61 6c 20 43 72 61 69 67 |e Especial Craig| 01f0 20 44 61 76 69 64 2c 20 54 75 6c 73 61 20 79 20 | David, Tulsa y | 0200 57 6f 6e 64 65 72 66 6f 6f 6c 20 43 6f 73 6d 65 |Wonderfool Cosme| 0210 74 69 63 73 4e 74 00 73 70 61 00 6e 4d 61 67 61 |ticsNt.spa.nMaga| 0220 7a 69 6e 65 20 6d 75 73 69 63 61 6c 3a 20 4e 6f |zine musical: No| 0230 74 69 63 69 |tici| 0234 What you can see near the end is the EPG from the spanish channel Fly Music, if I'm right. Last (but not least ;-), here are the parameters I used during this test (remember, USB 2.0 is disabled): .stream = { .type = USB_ISOC, .count = 6, .endpoint = 0x81, .u = { .isoc = { .framesperurb = 1, .framesize = 564, .interval = 150, } } }, Be aware that lsusb -v (without ehci_usb) lists 1023 as the maximum packet size, as opposed to 564 (the value with ehci_usb loaded), but changing that parameter didn't make any difference. Also note the value in .interval: I only got some success with values between 100 and 200, approximately. I'm not an expert but they seem very strange values to me. Didn't have any success at all with ehci_usb loaded. Well, these are my discoveries until now, as a newbie on this field. Let me see what you think. Regards -- Román 2007/12/4, Román <[EMAIL PROTECTED]>: > Hi, Aapo, Pere and everybody else interested > > I tried the parameters you recommended me in your last message, without > success: > > 2007/12/2, Aapo Tahkola <[EMAIL PROTECTED]>: > > These parameters worked for me back in the days megasky used firmware > > with isoc transfer mode: > > .stream = { > > .type = USB_ISOC, > > .count = 8, > > .endpoint = 0x81, > > .u = { > > .isoc = { > > .framesperurb = 1, > > .framesize = 564, > > .interval = 1, > > } > > } > > }, > > > > You should know that m9206 isochronous mode might not play well with > > some usb host controllers(VIA). I such cases you should be able to get > > it working by removing ehci_hcd module before plugging your device. This > > should disable usb 2.0 support in most systems. usb 1.0 hub > > or even 2.0 hub might also help. You could also test this just to make > > sure the pid filters are working correctly. > > > Also, I tested every other possible combination that came to my mind. > I tried, for instance, .framesperurb = 3 (as 564 == 188 * 3), with and > without the hardware pid filters, with usb 2.0 and with usb 1.1 (rmmod > ehci_hcd), with and without the code for the remote control (BTW I > don't have it here, so I haven't tested it yet), and so on. I even > tried to change the endpoint address, but then -ironically, this is > the most positive result- the drivers complained about it: "dvb-usb: > could not submit URB no. 0 - get them all back" (this happened when I > launched "scan", and that msg appeared in dmesg or syslog between two > calls to dvb_dmxdev_filter_set; nothing shows up in between if the > endpoint address is set to 0x81). > > The result is always the same: nothing comes through dvr0. I wish I > knew more about the USB protocol (maybe the snoopy pro logs will tell > me more). Any further ideas? What else could I do? Is there something > I forgot to configure? If you need more info, don't hesitate to ask > me, I have plenty of logs :). > > -- > >Román > ___ linux-dvb mailing list linux-dvb@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
Re: [linux-dvb] m920x device: Genius TVGo DVB-T02Q
Hi, Aapo, It's nice to hear from you ;-) 2007/12/2, Aapo Tahkola <[EMAIL PROTECTED]>: > Hi, > > Here are some tips that might help: > - check that endpoint, buffersize and type match "lsusb -v" output and > usbsnoop logs if you are not sure what endpoint is being used (...) > If none of this helps, there might be some problem with zl10353 > sending data to m9206. You can also use "cat /dev/dvb/adapter0/dvr0" to > do quick checks. > I though the problem was what you said on your last point: cat /dev/dvb/adapter0/dvr0 gives no byte, so usbsnoop and such are useless tools at this point. Anyway I've tried them, but they gave me no results. On the other side, I'm embarrassed because I never thought of running "lsusb -v" again, after the firmware was uploaded :-$. Thanks for the tip! Below you'll find the result of that command. Correct me if I'm wrong, but the problem might be I'm configuring the device for bulk transfers, when it wants to do isochronous ones (also, what about *MaxPacketSize* values?). Il try to play a little with that and post the results... Bus 005 Device 006: ID 0458:702b KYE Systems Corp. (Mouse Systems) Device Descriptor: bLength18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass0 (Defined at Interface level) bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize064 idVendor 0x0458 KYE Systems Corp. (Mouse Systems) idProduct 0x702b bcdDevice 80.95 iManufacturer 1 ULi Electronics iProduct2 TVGoDVB-T02Q iSerial 0 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 41 bNumInterfaces 1 bConfigurationValue 1 iConfiguration 0 bmAttributes 0xc0 Self Powered MaxPower 100mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber0 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 255 Vendor Specific Class bInterfaceSubClass255 Vendor Specific Subclass bInterfaceProtocol255 Vendor Specific Protocol iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes1 Transfer TypeIsochronous Synch Type None Usage Type Data wMaxPacketSize 0x 1x 0 bytes bInterval 1 Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber0 bAlternateSetting 1 bNumEndpoints 1 bInterfaceClass 255 Vendor Specific Class bInterfaceSubClass255 Vendor Specific Subclass bInterfaceProtocol255 Vendor Specific Protocol iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes1 Transfer TypeIsochronous Synch Type None Usage Type Data wMaxPacketSize 0x0234 1x 564 bytes bInterval 1 Device Qualifier (for other device speed): bLength10 bDescriptorType 6 bcdUSB 2.00 bDeviceClass0 (Defined at Interface level) bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize064 bNumConfigurations 1 Device Status: 0x0001 Self Powered -- Román ___ linux-dvb mailing list linux-dvb@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
Re: [linux-dvb] m920x device: Genius TVGo DVB-T02Q
Hi everybody, I need some help. It's the first time I try to hack a kernel module. Pere Blay and I are trying to get a Genius DVB-T device (TVGo t02q) working, and we're almost done (I think), but I'm stalled right now. As I didn't get any responses from Aapo, I was wondering if some of the more experinced hackers on this list could give us any advices. Chips on this device include zl10353, mt2060 and m9206. I have what appears to be a functional firmware, and with our patches to m920x.c and friends the capturer seems to be tuning correctly, but for some reason I can't get any data from /dev/dvb/adapterX/demux0 nor from dvr0. I've attached some logs I've posted before (BTW you can read our previous messages on this list, where there's also the firmware and the patchwork :-). Any ideas? Thanks in advance. Regards, -- Román > > dmesg > > [35961.500458] usb 5-6: new high speed USB device using ehci_hcd and address > 30 > [35961.573610] usb 5-6: configuration #1 chosen from 1 choice > [35961.573731] dvb-usb: found a 'Genius TVGo DVB-T02Q' in cold state, > will try to load a firmware > [35961.583198] dvb-usb: downloading firmware from file 'dvb-usb-t02q-02.fw' > [35962.008972] dvb_usb_m920x: probe of 5-6:1.0 failed with error 64 > [35962.009146] usb 5-6: USB disconnect, address 30 > [35962.067424] usb 5-6: new high speed USB device using ehci_hcd and address > 31 > [35962.156124] usb 5-6: configuration #1 chosen from 1 choice > [35962.156253] dvb-usb: found a 'Genius TVGo DVB-T02Q' in warm state. > [35962.156326] i2c-adapter i2c-4: SMBus Quick command not supported, > can't probe for chips > [35962.156332] dvb-usb: will pass the complete MPEG2 transport stream > to the software demuxer. > [35962.156459] DVB: registering new adapter (Genius TVGo DVB-T02Q) > [35962.205619] DVB: registering frontend 0 (Zarlink ZL10353 DVB-T)... > [35962.208747] MT2060: successfully identified (IF1 = 1220) > [35962.522187] input: IR-receiver inside an USB DVB receiver as > /class/input/input21 > [35962.522237] dvb-usb: schedule remote query interval to 100 msecs. > [35962.522245] dvb-usb: Genius TVGo DVB-T02Q successfully initialized > and connected. > > > > $ tzap -r test_channel_1 > > using '/dev/dvb/adapter0/frontend0' and '/dev/dvb/adapter0/demux0' > tuning to 69000 Hz > video pid 0x012d, audio pid 0x012e > status 00 | signal a4a4 | snr | ber | unc | > status 1e | signal bb5c | snr 9292 | ber | unc 0013 | FE_HAS_LOCK > status 1e | signal bb28 | snr 9393 | ber | unc | FE_HAS_LOCK > status 1e | signal baf0 | snr 9292 | ber | unc | FE_HAS_LOCK > status 1e | signal bad4 | snr 9393 | ber | unc | FE_HAS_LOCK > status 1e | signal bab8 | snr 9393 | ber | unc | FE_HAS_LOCK > status 1e | signal baf0 | snr 9292 | ber fc02 | unc | FE_HAS_LOCK > status 1e | signal bacc | snr 9393 | ber fc02 | unc | FE_HAS_LOCK > status 1e | signal ba70 | snr 9393 | ber fc02 | unc | FE_HAS_LOCK > status 1e | signal ba78 | snr 9292 | ber fc02 | unc | FE_HAS_LOCK > status 1e | signal ba74 | snr 9292 | ber fc02 | unc | FE_HAS_LOCK > status 1e | signal ba08 | snr 9292 | ber fc02 | unc | FE_HAS_LOCK > status 1e | signal ba4c | snr 9292 | ber db13 | unc | FE_HAS_LOCK > status 1e | signal ba98 | snr 9191 | ber db13 | unc | FE_HAS_LOCK > status 1e | signal ba00 | snr 9292 | ber db13 | unc | FE_HAS_LOCK > status 1e | signal b994 | snr 9292 | ber db13 | unc | FE_HAS_LOCK > status 1e | signal b9e8 | snr 9393 | ber db13 | unc | FE_HAS_LOCK > status 1e | signal b974 | snr 9292 | ber db13 | unc | FE_HAS_LOCK > status 1e | signal b9d4 | snr 9292 | ber d99e | unc | FE_HAS_LOCK > (...) > > > > $ scan -c > > using '/dev/dvb/adapter0/frontend0' and '/dev/dvb/adapter0/demux0' > WARNING: filter timeout pid 0x0011 > WARNING: filter timeout pid 0x > dumping lists (0 services) > Done. > > > > $ scan -v -v -v -v -c > > using '/dev/dvb/adapter0/frontend0' and '/dev/dvb/adapter0/demux0' > add_filter:1377: add filter pid 0x > start_filter:1317: start filter pid 0x table_id 0x00 > update_poll_fds:1297: poll fd 4 > add_filter:1377: add filter pid 0x0011 > start_filter:1317: start filter pid 0x0011 table_id 0x42 > update_poll_fds:1297: p
Re: [linux-dvb] m920x device: Genius TVGo DVB-T02Q
2007/11/28, Pere Blay <[EMAIL PROTECTED]>: > Hi, > > I've been away for a bit long But i'm very happy to see this nice > surprise when i'm back... a good firmware!! wonderful! i never thought > the parser could need some tuning, that was a very good work! > Thank you! But it wasn't that difficult once I compared the firmware to other m920x's ones ;-) > I'm willing to test the firmware, i'll post results as soon as i try it. > > Regards, > Pere Blay > I'll wait impatiently ;-) BTW it would be interesting to have another firmware for the same device, could you please extract it from your capturer using the tweaked script (if you have the time, of course, and a windows system near you -- or a backup of the snoopy logs), and post it, or make a diff and post the results? In any case it's not crucial, I'm just curious, so don't waste your efforts on it if you don't think it would deserve it. Apart from the firmware, remember I changed .demod_addres in struct zl10353_config to 0x0f, but also be aware that I recently did another change to function mt2060_tuner_attach. Now it looks like this: static int mt2060_tuner_attach(struct dvb_usb_adapter *adap) { int if1 = 1220; return dvb_attach(mt2060_attach,adap->fe, &adap->dev->i2c_adap, &tvgot02q_mt2060_config, if1) == NULL ? -ENODEV : 0; } where you can see I've changed a 0 to a 1220, based on what other drivers do, when using a mt2060 tuner. In fact, this seems as some kind of default value, and then they read something from the eeprom to adjust it. I'm still understanding it, so take a look if you want to dib0700_devices.c or af9005-fe.c. Anyway, that change seems to give me a better signal reception. Finally, for the record, here are some logs I got. To me, it seems like the device is completely recognized and is tuning fine, but for some reason /dev/dvb/adapter0/dvr0 is not serving any data. Please, tell me your impressions. Regards, -- Román dmesg [35961.500458] usb 5-6: new high speed USB device using ehci_hcd and address 30 [35961.573610] usb 5-6: configuration #1 chosen from 1 choice [35961.573731] dvb-usb: found a 'Genius TVGo DVB-T02Q' in cold state, will try to load a firmware [35961.583198] dvb-usb: downloading firmware from file 'dvb-usb-t02q-02.fw' [35962.008972] dvb_usb_m920x: probe of 5-6:1.0 failed with error 64 [35962.009146] usb 5-6: USB disconnect, address 30 [35962.067424] usb 5-6: new high speed USB device using ehci_hcd and address 31 [35962.156124] usb 5-6: configuration #1 chosen from 1 choice [35962.156253] dvb-usb: found a 'Genius TVGo DVB-T02Q' in warm state. [35962.156326] i2c-adapter i2c-4: SMBus Quick command not supported, can't probe for chips [35962.156332] dvb-usb: will pass the complete MPEG2 transport stream to the software demuxer. [35962.156459] DVB: registering new adapter (Genius TVGo DVB-T02Q) [35962.205619] DVB: registering frontend 0 (Zarlink ZL10353 DVB-T)... [35962.208747] MT2060: successfully identified (IF1 = 1220) [35962.522187] input: IR-receiver inside an USB DVB receiver as /class/input/input21 [35962.522237] dvb-usb: schedule remote query interval to 100 msecs. [35962.522245] dvb-usb: Genius TVGo DVB-T02Q successfully initialized and connected. $ tzap -r test_channel_1 using '/dev/dvb/adapter0/frontend0' and '/dev/dvb/adapter0/demux0' tuning to 69000 Hz video pid 0x012d, audio pid 0x012e status 00 | signal a4a4 | snr | ber | unc | status 1e | signal bb5c | snr 9292 | ber | unc 0013 | FE_HAS_LOCK status 1e | signal bb28 | snr 9393 | ber | unc | FE_HAS_LOCK status 1e | signal baf0 | snr 9292 | ber | unc | FE_HAS_LOCK status 1e | signal bad4 | snr 9393 | ber | unc | FE_HAS_LOCK status 1e | signal bab8 | snr 9393 | ber | unc | FE_HAS_LOCK status 1e | signal baf0 | snr 9292 | ber fc02 | unc | FE_HAS_LOCK status 1e | signal bacc | snr 9393 | ber fc02 | unc | FE_HAS_LOCK status 1e | signal ba70 | snr 9393 | ber fc02 | unc | FE_HAS_LOCK status 1e | signal ba78 | snr 9292 | ber fc02 | unc | FE_HAS_LOCK status 1e | signal ba74 | snr 9292 | ber fc02 | unc | FE_HAS_LOCK status 1e | signal ba08 | snr 9292 | ber fc02 | unc | FE_HAS_LOCK status 1e | signal ba4c | snr 9292 | ber db13 | unc | FE_HAS_LOCK status 1e | signal ba98 | snr 9191 | ber db13 | unc | FE_HAS_LOCK status 1e | signal ba00 | snr 9292 | ber db13 | unc | FE_HAS_LOCK status 1e | signal b994 | snr 9292 | ber db13 | unc | FE_HAS_LOCK status 1e | signal b9e8 | snr 9393 | ber
Re: [linux-dvb] m920x device: Genius TVGo DVB-T02Q
E, USB_PID_GENIUS_DVBT_TVGO_T02Q) }, { } /* Terminating entry */ }; MODULE_DEVICE_TABLE (usb, m920x_table); @@ -886,6 +933,57 @@ static struct dvb_usb_device_properties } }; +static struct dvb_usb_device_properties tvgot02q_properties = { +.caps = DVB_USB_IS_AN_I2C_ADAPTER, + +.usb_ctrl = DEVICE_SPECIFIC, +.firmware = "dvb-usb-t02q-02.fw", +.download_firmware = m920x_firmware_download, + + .rc_interval = 100, + .rc_key_map = tvgot02q_rc_keys, + .rc_key_map_size = ARRAY_SIZE(tvgot02q_rc_keys), + .rc_query = m920x_rc_query, + +.size_of_priv = sizeof(struct m920x_state), + +.identify_state = m920x_identify_state, +.num_adapters = 1, +.adapter = {{ +.caps = DVB_USB_ADAP_HAS_PID_FILTER | +DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, + + .pid_filter_count = 8, + .pid_filter = m920x_pid_filter, + .pid_filter_ctrl = m920x_pid_filter_ctrl, + + .frontend_attach = tvgot02q_frontend_attach, + .tuner_attach = mt2060_tuner_attach, + + .stream = { + .type = USB_BULK, + .count = 8, + .endpoint = 0x81, + .u = { + .bulk = { + .buffersize = 512, + } + } + }, +}}, +.i2c_algo = &m920x_i2c_algo, + +.num_device_descs = 1, +.devices = { + { "Genius TVGo DVB-T02Q", +{ &m920x_table[6], NULL }, +{ NULL }, + }, +} +}; + + + static struct usb_driver m920x_driver = { #if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15) .owner = THIS_MODULE, -- Román ___ linux-dvb mailing list linux-dvb@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
Re: [linux-dvb] m920x device: Genius TVGo DVB-T02Q
Hello I'm new to the list. I've got a T02Q working (or that's what it seems, although I can't tune anything yet, but I think is a matter of signal strength). Some weeks ago my brother gave me a capturer of this model, so I started to look for linux support. I read this conversation: [linux-dvb] m920x device: Genius TVGo DVB-T02Q http://www.linuxtv.org/pipermail/linux-dvb/2007-August/019856.html There is a problem in the perl script used to parse the snoopy logs (I've got it from the wiki). You need to add a plus sign to the regexp at the function write_bytes (lines passed to it had extra spaces which caused empty values within array @bytes, thus giving extra zeros to the resultant firmware). Here's the tuned script I used: m920x_snoopypro_parser.pl --- #!/usr/bin/perl $linenum = 0; open(out,">fw") || die "Can't open fw"; sub get_tf_data { $full = ""; $line = ; $linenum++; while($line =~ m/^\S\S\S\S: ([0-9a-f ]+)/) { $full .= $1; $line = ; $linenum++; } return $full; } sub write_bytes { my($str) = @_; @bytes = split(/ +/, $str); ## look at this line foreach(@bytes){ print out pack("C", hex($_)); } } while($line = ) { $linenum++; if($line =~ m/SetupPacket:/) { $setup_linenum = $linenum; $setup = get_tf_data(); while($line = ) { $linenum++; if($line =~ m/TransferBuffer: 0x0040/) { #print "setup: " . $setup . "\n"; @bytes = split(/ /, $setup); print out pack("v", hex($bytes[3] . $bytes[2])); print out pack("v", hex($bytes[5] . $bytes[4])); print out pack("v", hex("0x40")); $lid = get_tf_data(); print "lid : " . $lid . "\n"; write_bytes($lid); last; }elsif($line =~ m/No TransferBuffer/) { last; }elsif($line =~ m/TransferBuffer:/) { last; } } } } -- I've attached the firmware I've got with it. If you're interested in the two usblogs I got with snoopypro thru a kvm-virtualized windows, let me know (my last message was bounced for being too long). They're two because the first is where the driver uploads the firmware to the device, and the second is the conversation after the device reattaches itself to the usb bus. As for the patch to m920x.c, I won't waste my time trying to get the last files on the repository again and making a diff again and getting my mail message bounced again. The job done by Pere Blay was marvelous, use that. The only important difference with mine is structure "tvgot02q_zl10353_config": .demod_address should be 0x0f, not 0x1e. That's all for now. -- Román. dvb-usb-t02q-02.fw Description: Binary data ___ linux-dvb mailing list linux-dvb@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb