Andrew de Quincey wrote:
yes - replacing the ping by the register read transfer and checking the error code should work.finally, I have the tda10046 driver written, but: "DVB: registering frontend 1:0 (Alps TDLB7)... DVB: registering frontend 1:0 (Alps TDMB7)... tda1004x: Detected Philips TDA10046H. tda1004x: Detected Philips TD1316 tuner. DVB: registering frontend 1:0 (Philips TDA10046H)..." For some reason both ALPS frontends are registering themselves as well!
I've figured out why multiple frontends are detected. Currently the ttusb code doesn't check if a i2c transfer actually completed OK... so it always returns OK even if you try to access to a nonexistent i2c address.
I've been playing about with it, and it seems you can detect when theres an error: when an i2c transfer fails, the i2c_send_len (offset 5) and i2c_recv_len (offset 6) of the data structure returned from the nova-usb-t are both set to 0. You can test against the values supplied to the ttusb_i2c_msg() function, and if they're different, you know something has gone wrong.
Now: the problem. The ALPS TDLB7 and ALPS TDMB7 both do i2c transfers of 0 bytes to detect if the devices are present, so the above cannot catch the error. The solution would appear to be to fix those tuners so they do a transfer of 1 byte (e.g. read a register) from the frontend device so the USB i2c error detection code can work. This is whats I'm looking into now... if anyone has any suggestions, please let me know.