mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-09 13:12:37 -05:00
audiohw: avoid magic numbers for DAC power mode
Define proper symbolic constants for power mode. Also allow targets to define the default power mode setting. Change-Id: Ia07cf854dce47d0a6aa88e067471f1ff9fbc45fb
This commit is contained in:
parent
18b3e91707
commit
dac3175445
6 changed files with 20 additions and 7 deletions
|
|
@ -144,8 +144,8 @@ extern void ak4376_set_filter_roll_off(int val);
|
|||
* and power-up / power-down sequences as a frequency switch, so both settings
|
||||
* are controlled by this function.
|
||||
*
|
||||
* high power mode -- use power_mode=0
|
||||
* low power mode -- use power_mode=1
|
||||
* high power mode -- use power_mode=SOUND_HIGH_POWER
|
||||
* low power mode -- use power_mode=SOUND_LOW_POWER
|
||||
*/
|
||||
extern void ak4376_set_freqmode(int fsel, int mult, int power_mode);
|
||||
|
||||
|
|
|
|||
|
|
@ -605,6 +605,12 @@ void audiohw_set_filter_roll_off(int val);
|
|||
#endif
|
||||
|
||||
#ifdef AUDIOHW_HAVE_POWER_MODE
|
||||
enum audiohw_power_mode
|
||||
{
|
||||
SOUND_HIGH_POWER = 0,
|
||||
SOUND_LOW_POWER,
|
||||
};
|
||||
|
||||
/**
|
||||
* Set DAC's power saving mode.
|
||||
* @param enable 0 - highest performance, 1 - battery saving
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue