This is the bug/patch tracker for Rockbox. Click here for more information.
Quick links: Bugs · Patches · Rockbox frontpage
FS#11714 - tea5767 tuner detection
Attached to Project:
Rockbox
Opened by Bertrik Sikken (bertrik) - Tuesday, 02 November 2010, 20:35 GMT+2
Last edited by Bertrik Sikken (bertrik) - Friday, 05 November 2010, 18:05 GMT+2
Opened by Bertrik Sikken (bertrik) - Tuesday, 02 November 2010, 20:35 GMT+2
Last edited by Bertrik Sikken (bertrik) - Friday, 05 November 2010, 18:05 GMT+2
|
DetailsCurrently the TEA5767 tuner driver does not support detection of the presence of the tuner chip, it simply assumes that it's always present. For some targets (HDD16x0 / HDD63x0 for example) this means that the radio can be "detected" even when not present.
This patch adds detection support for the tea5767. Detection is done by looking if there is an i2c device responding at all during initialisation and by checking the chipid field in the data read back from the tuner (should be 0). If you have a target with a tea5767 tuner chip (see http://www.rockbox.org/wiki/FmTunerHardware#TEA5767), please try if the radio is still detected. |
This task depends upon
Closed by Bertrik Sikken (bertrik)
Friday, 05 November 2010, 18:05 GMT+2
Reason for closing: Accepted
Additional comments about closing: Variant of last patch committed as SVN r28493.
Friday, 05 November 2010, 18:05 GMT+2
Reason for closing: Accepted
Additional comments about closing: Variant of last patch committed as SVN r28493.
* considers bit 0 to also be part of the chip id, the datasheet says this should always be 0
* pre-init the i2c read buffer with a 0xFF value so it will NOT be recognised as a tea5767 in case fmradio_i2c_read fails silently (it seems to do so on PP targets)
Hopefully this improves detection.
Edit: Readouts are really random - fourth byte can be: 0x01, 0x02, 0xA7, 0xE7, but it is good enough.
Curiously, all read values being the same (as seen by Szymon in some cases) is one of the methods the linux tea5767 driver uses to exclude the presence of the tea5767.