forked from len0rd/rockbox
tea5767: properly power up the tuner during detect
Change-Id: I5ca5c3ae28db1427e2528cb1740a9199180b9b38 Reviewed-on: http://gerrit.rockbox.org/670 Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
This commit is contained in:
parent
193753aa1f
commit
adc503302c
1 changed files with 2 additions and 0 deletions
|
@ -167,6 +167,7 @@ void tea5767_init(void)
|
||||||
|
|
||||||
/* init chipid register with 0xFF in case fmradio_i2c_read fails silently */
|
/* init chipid register with 0xFF in case fmradio_i2c_read fails silently */
|
||||||
buf[3] = 0xFF;
|
buf[3] = 0xFF;
|
||||||
|
tuner_power(true);
|
||||||
if (fmradio_i2c_read(I2C_ADR, buf, sizeof(buf)) < 0) {
|
if (fmradio_i2c_read(I2C_ADR, buf, sizeof(buf)) < 0) {
|
||||||
/* no i2c device detected */
|
/* no i2c device detected */
|
||||||
tuner_present = false;
|
tuner_present = false;
|
||||||
|
@ -175,6 +176,7 @@ void tea5767_init(void)
|
||||||
chipid = buf[3] & 0x0F;
|
chipid = buf[3] & 0x0F;
|
||||||
tuner_present = (chipid == 0);
|
tuner_present = (chipid == 0);
|
||||||
}
|
}
|
||||||
|
tuner_power(false);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue