summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
authorAndree Buschmann <AndreeBuschmann@t-online.de>2010-04-11 12:33:02 +0000
committerAndree Buschmann <AndreeBuschmann@t-online.de>2010-04-11 12:33:02 +0000
commitf6cecfd91b42dabb1dc4ad50c5afd38d8c588d0f (patch)
tree1648fee3a84ec192d30c6cbb05acb020d7e0571f /firmware
parent268c6d1e7f54379f78a8a69002ad133056f7f452 (diff)
downloadrockbox-f6cecfd91b42dabb1dc4ad50c5afd38d8c588d0f.tar.gz
rockbox-f6cecfd91b42dabb1dc4ad50c5afd38d8c588d0f.zip
Minor binsize savings.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25588 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r--firmware/drivers/audio/wm8758.c20
-rw-r--r--firmware/target/arm/ipod/powermgmt-ipod-pcf.c16
2 files changed, 13 insertions, 23 deletions
diff --git a/firmware/drivers/audio/wm8758.c b/firmware/drivers/audio/wm8758.c
index 40ead0cdf2..12ca987bd7 100644
--- a/firmware/drivers/audio/wm8758.c
+++ b/firmware/drivers/audio/wm8758.c
@@ -183,19 +183,15 @@ void audiohw_set_lineout_vol(int vol_l, int vol_r)
183 183
184void audiohw_enable_lineout(bool enable) 184void audiohw_enable_lineout(bool enable)
185{ 185{
186 /* Initialize data without lineout enabling. */
187 int pwrmgmt3_data = PWRMGMT3_RMIXEN | PWRMGMT3_LMIXEN
188 | PWRMGMT3_DACENR | PWRMGMT3_DACENL;
189 /* Set lineout (OUT2), if enabled. */
186 if (enable) 190 if (enable)
187 { 191 pwrmgmt3_data |= PWRMGMT3_LOUT2EN | PWRMGMT3_ROUT2EN;
188 /* include enabling of OUT2 */ 192
189 wmcodec_write(PWRMGMT3, PWRMGMT3_LOUT2EN | PWRMGMT3_ROUT2EN 193 /* Set register. */
190 | PWRMGMT3_RMIXEN | PWRMGMT3_LMIXEN 194 wmcodec_write(PWRMGMT3, pwrmgmt3_data);
191 | PWRMGMT3_DACENR | PWRMGMT3_DACENL);
192 }
193 else
194 {
195 /* exclude enabling of OUT2 */
196 wmcodec_write(PWRMGMT3, PWRMGMT3_RMIXEN | PWRMGMT3_LMIXEN
197 | PWRMGMT3_DACENR | PWRMGMT3_DACENL);
198 }
199} 195}
200 196
201void audiohw_set_bass(int value) 197void audiohw_set_bass(int value)
diff --git a/firmware/target/arm/ipod/powermgmt-ipod-pcf.c b/firmware/target/arm/ipod/powermgmt-ipod-pcf.c
index 95f5380b92..c939f398e3 100644
--- a/firmware/target/arm/ipod/powermgmt-ipod-pcf.c
+++ b/firmware/target/arm/ipod/powermgmt-ipod-pcf.c
@@ -117,17 +117,11 @@ unsigned int battery_adc_voltage(void)
117#ifdef HAVE_ACCESSORY_SUPPLY 117#ifdef HAVE_ACCESSORY_SUPPLY
118void accessory_supply_set(bool enable) 118void accessory_supply_set(bool enable)
119{ 119{
120 if (enable) 120 /* Set accessory power supply to 3.3V, otherwise switch it off. */
121 { 121 unsigned char value = enable ? 0xf8 : 0x18;
122 /* Accessory voltage supply on */ 122
123 pcf50605_write(PCF5060X_D2REGC1, 0xf8); /* 3.3V ON */ 123 /* Write to register. */
124 } 124 pcf50605_write(PCF5060X_D2REGC1, value);
125 else
126 {
127 /* Accessory voltage supply off */
128 pcf50605_write(PCF5060X_D2REGC1, 0x18); /* OFF */
129 }
130
131} 125}
132#endif 126#endif
133 127