I've made a first pass of supporting the Elonics 4000 tuner. The modified tuner detect code looks, in part, like this:
com.i2c.open(function() {
R820T.check(com, function(found) {
if (found) {
tuner = new R820T(com, xtalFreq, throwError);
} else {
E4K.check(com, function(found) {
if (found) {
tuner = new E4K(com, xtalFreq, throwError);
}
});
}
if (!tuner) {
throwError('Sorry, your USB dongle has an unsupported tuner chip. ' +
'Only the R820T and E4000 chips are supported.');
return;
}
So, try R820T, if it fails, try E4K. The problem is that the R820T check, when an E4K tuner is installed, fails with:
USB write failed (value 0x34 index 0x610 data [0x0]), rc=4, lastErrorMessage="Transfer stalled."
an uncatchable error that exits the extension. I don't see any code in rtlcom.js to probe for valid I2C addresses or to catch timeouts caused by operations to invalid I2C addresses.
I've swapped the order of the tests to continue my development.
I've made a first pass of supporting the Elonics 4000 tuner. The modified tuner detect code looks, in part, like this:
So, try R820T, if it fails, try E4K. The problem is that the R820T check, when an E4K tuner is installed, fails with:
USB write failed (value 0x34 index 0x610 data [0x0]), rc=4, lastErrorMessage="Transfer stalled."
an uncatchable error that exits the extension. I don't see any code in rtlcom.js to probe for valid I2C addresses or to catch timeouts caused by operations to invalid I2C addresses.
I've swapped the order of the tests to continue my development.