summaryrefslogtreecommitdiff
path: root/firmware/drivers/tuner/tea5767.c
diff options
context:
space:
mode:
authorAmaury Pouly <amaury.pouly@gmail.com>2012-02-05 15:58:10 +0100
committerAmaury Pouly <amaury.pouly@gmail.com>2012-02-25 15:59:08 +0100
commit906e90eb7b036214b2ee48ad2219e1ef679ee7d1 (patch)
tree79d581f2d79a4a6ca4ad63824d0c3082c6c4d453 /firmware/drivers/tuner/tea5767.c
parent58b226edc51f260a19cf0655bbec67622ebe7cef (diff)
downloadrockbox-906e90eb7b036214b2ee48ad2219e1ef679ee7d1.tar.gz
rockbox-906e90eb7b036214b2ee48ad2219e1ef679ee7d1.zip
Move radio power handling from apps/ to drivers.
Remove direct calls to tuner_power(...) in apps/ and let the driver manage tuner power with the RADIO_SLEEP setting. Change-Id: I37cd0472e60db5d666dae1b9fe4755dd65c03edd Reviewed-on: http://gerrit.rockbox.org/84 Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
Diffstat (limited to 'firmware/drivers/tuner/tea5767.c')
-rw-r--r--firmware/drivers/tuner/tea5767.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/firmware/drivers/tuner/tea5767.c b/firmware/drivers/tuner/tea5767.c
index 3f3af68602..da12a9bb05 100644
--- a/firmware/drivers/tuner/tea5767.c
+++ b/firmware/drivers/tuner/tea5767.c
@@ -106,7 +106,11 @@ int tea5767_set(int setting, int value)
106 return -1; 106 return -1;
107 } 107 }
108 108
109 if(setting == RADIO_SLEEP && !value)
110 tuner_power(true); /* wakeup */
109 fmradio_i2c_write(I2C_ADR, write_bytes, sizeof(write_bytes)); 111 fmradio_i2c_write(I2C_ADR, write_bytes, sizeof(write_bytes));
112 if(setting == RADIO_SLEEP && value)
113 tuner_power(false); /* sleep */
110 return 1; 114 return 1;
111} 115}
112 116