mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-09 21:22:39 -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
|
|
@ -28,7 +28,7 @@
|
|||
#include "logf.h"
|
||||
|
||||
static int cur_fsel = HW_FREQ_48;
|
||||
static int cur_power_mode = 0;
|
||||
static int cur_power_mode = SOUND_HIGH_POWER;
|
||||
|
||||
static void set_ak_freqmode(void)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -154,7 +154,7 @@ void audiohw_set_filter_roll_off(int value)
|
|||
void audiohw_set_power_mode(int mode)
|
||||
{
|
||||
enum es9218_amp_mode new_amp_mode;
|
||||
if(mode == 0)
|
||||
if(mode == SOUND_HIGH_POWER)
|
||||
new_amp_mode = ES9218_AMP_MODE_2VRMS;
|
||||
else
|
||||
new_amp_mode = ES9218_AMP_MODE_1VRMS;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue