[linux-dvb] Help please; hacking m920x driver

Nick Andrew nick-linuxtv at nick-andrew.net
Wed Feb 28 21:11:11 CET 2007


I'm trying to hack the m920x driver for my "LifeView TV Walker Twin"
DVB-T USB 2.0. Having some success and some failure, cause I'm new
to this and I mostly don't know what I'm doing.

The device has an M9206, two TDA10046A, and two TDA8275A. Mine seems
to be permanently in the "warm" state now, so despite the work I did
to extract the firmware, it seems I don't need it at the moment.

I'm using the latest code from the main hg repository.

Questions :-

 - It has 2 tuners and 2 demodulators. I think I found the two
   demodulators, at addresses 0x10 and 0x16. I have no idea how to
   represent two of them in the code. You'll notice that I call
   dvb_attach twice, but it overwrites the return value.
   Does m920x_state need to be extended for this?

 - I have no idea where the two tuners are. I set up a loop to query
   all 255 addresses and the module reports failure on the first one
   then hangs trying to query the second one. The loop technique
   worked to find the demodulators at least :-)

I'm running this under vmware emulation so it doesn't break the
host machine.

I've attached my hacked m9206.c module and kernel log.

Nick.
-- 
PGP Key ID = 0x418487E7                      http://www.nick-andrew.net/
PGP Key fingerprint = B3ED 6894 8E49 1770 C24A  67E3 6266 6EB9 4184 87E7
"I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect."                  -- Linus Torvalds, Sep 2003
-------------- next part --------------
A non-text attachment was scrubbed...
Name: m920x.c
Type: text/x-csrc
Size: 15016 bytes
Desc: not available
Url : http://www.linuxtv.org/pipermail/linux-dvb/attachments/20070301/2dfd3e80/m920x.c
-------------- next part --------------
Feb 28 22:29:05 linuxdvb kernel: Entering m920x_probe:
Feb 28 22:29:05 linuxdvb kernel: check for cold 10fd 514
Feb 28 22:29:05 linuxdvb kernel: check for warm 10fd 513
Feb 28 22:29:05 linuxdvb kernel: Entering m9206_identify_state
Feb 28 22:29:05 linuxdvb kernel: Leaving m9206_identify_state: cold is 0
Feb 28 22:29:05 linuxdvb kernel: dvb-usb: found a 'LifeView TV Walker Twin DVB-T USB2.0' in warm state.
Feb 28 22:29:05 linuxdvb kernel: power control: 1
Feb 28 22:29:05 linuxdvb kernel: dvb-usb: will use the device's hardware PID filter (table count: 8).
Feb 28 22:29:05 linuxdvb kernel: all in all I will use 4096 bytes for streaming
Feb 28 22:29:05 linuxdvb kernel: allocating buffer 0
Feb 28 22:29:05 linuxdvb kernel: buffer 0: c68a6000 (dma: 109731840)
Feb 28 22:29:05 linuxdvb kernel: allocating buffer 1
Feb 28 22:29:05 linuxdvb kernel: buffer 1: c68a6200 (dma: 109732352)
Feb 28 22:29:05 linuxdvb kernel: allocating buffer 2
Feb 28 22:29:05 linuxdvb kernel: buffer 2: c68a6400 (dma: 109732864)
Feb 28 22:29:05 linuxdvb kernel: allocating buffer 3
Feb 28 22:29:05 linuxdvb kernel: buffer 3: c68a6600 (dma: 109733376)
Feb 28 22:29:05 linuxdvb kernel: allocating buffer 4
Feb 28 22:29:05 linuxdvb kernel: buffer 4: c68a6800 (dma: 109733888)
Feb 28 22:29:05 linuxdvb kernel: allocating buffer 5
Feb 28 22:29:05 linuxdvb kernel: buffer 5: c68a6a00 (dma: 109734400)
Feb 28 22:29:05 linuxdvb kernel: allocating buffer 6
Feb 28 22:29:05 linuxdvb kernel: buffer 6: c68a6c00 (dma: 109734912)
Feb 28 22:29:05 linuxdvb kernel: allocating buffer 7
Feb 28 22:29:05 linuxdvb kernel: buffer 7: c68a6e00 (dma: 109735424)
Feb 28 22:29:05 linuxdvb kernel: allocation successful
Feb 28 22:29:05 linuxdvb kernel: DVB: registering new adapter (LifeView TV Walker Twin DVB-T USB2.0).
Feb 28 22:29:05 linuxdvb kernel: Entering megasky_tda10046_attach!
Feb 28 22:29:05 linuxdvb kernel: tda1004x: Entering tda10046_attach
Feb 28 22:29:05 linuxdvb kernel: tda1004x: tda1004x_read_byte: reg=0x0
Feb 28 22:29:05 linuxdvb kernel: tda1004x: tda1004x_read_byte: success reg=0x0, data=0x46, ret=2
Feb 28 22:29:05 linuxdvb kernel: tda1004x: Leaving tda10046_attach: success
Feb 28 22:29:05 linuxdvb kernel: tda1004x: Entering tda10046_attach
Feb 28 22:29:05 linuxdvb kernel: tda1004x: tda1004x_read_byte: reg=0x0
Feb 28 22:29:05 linuxdvb kernel: tda1004x: tda1004x_read_byte: success reg=0x0, data=0x46, ret=2
Feb 28 22:29:05 linuxdvb kernel: tda1004x: Leaving tda10046_attach: success
Feb 28 22:29:05 linuxdvb kernel: megasky_tda10046_attach: attached 2 demodulators
Feb 28 22:29:05 linuxdvb kernel: dvb_register_frontend
Feb 28 22:29:05 linuxdvb kernel: DVB: registering frontend 0 (Philips TDA10046H DVB-T)...
Feb 28 22:29:05 linuxdvb kernel: Entering megasky_tda8275_tuner_attach!
Feb 28 22:29:05 linuxdvb kernel: Trying to attach tuner at i2c address 2
Feb 28 22:29:05 linuxdvb kernel: tda827x: tda827x_attach:
Feb 28 22:29:05 linuxdvb kernel: tda1004x: tda1004x_enable_tuner_i2c
Feb 28 22:29:05 linuxdvb kernel: tda1004x: tda1004x_write_mask: reg=0x7, mask=0x2, data=0x2
Feb 28 22:29:05 linuxdvb kernel: tda1004x: tda1004x_read_byte: reg=0x7
Feb 28 22:29:05 linuxdvb kernel: tda1004x: tda1004x_read_byte: success reg=0x7, data=0x1, ret=2
Feb 28 22:29:05 linuxdvb kernel: tda1004x: tda1004x_write_byteI: reg=0x7, data=0x3
Feb 28 22:29:05 linuxdvb kernel: tda1004x: tda1004x_write_byteI: success reg=0x7, data=0x3, ret=1
Feb 28 22:29:05 linuxdvb kernel: tda827x_attach: could not read from tuner at addr: 0x04
Feb 28 22:29:05 linuxdvb kernel: Trying to attach tuner at i2c address 4
Feb 28 22:29:05 linuxdvb kernel: tda827x: tda827x_attach:
Feb 28 22:29:05 linuxdvb kernel: tda1004x: tda1004x_enable_tuner_i2c
Feb 28 22:29:05 linuxdvb kernel: tda1004x: tda1004x_write_mask: reg=0x7, mask=0x2, data=0x2
Feb 28 22:29:05 linuxdvb kernel: tda1004x: tda1004x_read_byte: reg=0x7


More information about the linux-dvb mailing list