forked from len0rd/rockbox
Minor binsize savings.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25588 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
268c6d1e7f
commit
f6cecfd91b
2 changed files with 13 additions and 23 deletions
|
@ -183,19 +183,15 @@ void audiohw_set_lineout_vol(int vol_l, int vol_r)
|
|||
|
||||
void audiohw_enable_lineout(bool enable)
|
||||
{
|
||||
/* Initialize data without lineout enabling. */
|
||||
int pwrmgmt3_data = PWRMGMT3_RMIXEN | PWRMGMT3_LMIXEN
|
||||
| PWRMGMT3_DACENR | PWRMGMT3_DACENL;
|
||||
/* Set lineout (OUT2), if enabled. */
|
||||
if (enable)
|
||||
{
|
||||
/* include enabling of OUT2 */
|
||||
wmcodec_write(PWRMGMT3, PWRMGMT3_LOUT2EN | PWRMGMT3_ROUT2EN
|
||||
| PWRMGMT3_RMIXEN | PWRMGMT3_LMIXEN
|
||||
| PWRMGMT3_DACENR | PWRMGMT3_DACENL);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* exclude enabling of OUT2 */
|
||||
wmcodec_write(PWRMGMT3, PWRMGMT3_RMIXEN | PWRMGMT3_LMIXEN
|
||||
| PWRMGMT3_DACENR | PWRMGMT3_DACENL);
|
||||
}
|
||||
pwrmgmt3_data |= PWRMGMT3_LOUT2EN | PWRMGMT3_ROUT2EN;
|
||||
|
||||
/* Set register. */
|
||||
wmcodec_write(PWRMGMT3, pwrmgmt3_data);
|
||||
}
|
||||
|
||||
void audiohw_set_bass(int value)
|
||||
|
|
|
@ -117,17 +117,11 @@ unsigned int battery_adc_voltage(void)
|
|||
#ifdef HAVE_ACCESSORY_SUPPLY
|
||||
void accessory_supply_set(bool enable)
|
||||
{
|
||||
if (enable)
|
||||
{
|
||||
/* Accessory voltage supply on */
|
||||
pcf50605_write(PCF5060X_D2REGC1, 0xf8); /* 3.3V ON */
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Accessory voltage supply off */
|
||||
pcf50605_write(PCF5060X_D2REGC1, 0x18); /* OFF */
|
||||
}
|
||||
|
||||
/* Set accessory power supply to 3.3V, otherwise switch it off. */
|
||||
unsigned char value = enable ? 0xf8 : 0x18;
|
||||
|
||||
/* Write to register. */
|
||||
pcf50605_write(PCF5060X_D2REGC1, value);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue