diff options
-rw-r--r-- | audio/audio_hw.c | 88 | ||||
-rw-r--r-- | audio/audio_hw.h | 43 | ||||
-rw-r--r-- | configs/tiny_hw.xml | 65 | ||||
-rw-r--r-- | overlay/frameworks/base/core/res/res/xml/power_profile.xml | 22 |
4 files changed, 143 insertions, 75 deletions
diff --git a/audio/audio_hw.c b/audio/audio_hw.c index 8473841..80a5ecc 100644 --- a/audio/audio_hw.c +++ b/audio/audio_hw.c @@ -96,6 +96,8 @@ struct m0_audio_device { int in_device; struct pcm *pcm_modem_dl; struct pcm *pcm_modem_ul; + struct pcm *pcm_bt_dl; + struct pcm *pcm_bt_ul; int in_call; float voice_volume; struct m0_stream_in *active_input; @@ -351,7 +353,7 @@ void select_devices(struct m0_audio_device *adev) static int start_call(struct m0_audio_device *adev) { - ALOGE("Opening modem PCMs"); + ALOGV("Opening modem PCMs"); int bt_on; bt_on = adev->out_device & AUDIO_DEVICE_OUT_ALL_SCO; @@ -359,9 +361,7 @@ static int start_call(struct m0_audio_device *adev) /* Open modem PCM channels */ if (adev->pcm_modem_dl == NULL) { - if (bt_on) - adev->pcm_modem_dl = pcm_open(CARD_DEFAULT, PORT_BT, PCM_OUT, &pcm_config_vx); - else + ALOGD("Opening PCM modem DL stream"); adev->pcm_modem_dl = pcm_open(CARD_DEFAULT, PORT_MODEM, PCM_OUT, &pcm_config_vx); if (!pcm_is_ready(adev->pcm_modem_dl)) { ALOGE("cannot open PCM modem DL stream: %s", pcm_get_error(adev->pcm_modem_dl)); @@ -370,6 +370,7 @@ static int start_call(struct m0_audio_device *adev) } if (adev->pcm_modem_ul == NULL) { + ALOGD("Opening PCM modem UL stream"); adev->pcm_modem_ul = pcm_open(CARD_DEFAULT, PORT_MODEM, PCM_IN, &pcm_config_vx); if (!pcm_is_ready(adev->pcm_modem_ul)) { ALOGE("cannot open PCM modem UL stream: %s", pcm_get_error(adev->pcm_modem_ul)); @@ -377,34 +378,88 @@ static int start_call(struct m0_audio_device *adev) } } + ALOGD("Starting PCM modem streams"); pcm_start(adev->pcm_modem_dl); pcm_start(adev->pcm_modem_ul); + /* Open bluetooth PCM channels */ + if (bt_on) { + ALOGV("Opening bluetooth PCMs"); + + if (adev->pcm_bt_dl == NULL) { + ALOGD("Opening PCM bluetooth DL stream"); + adev->pcm_bt_dl = pcm_open(CARD_DEFAULT, PORT_BT, PCM_OUT, &pcm_config_vx); + if (!pcm_is_ready(adev->pcm_bt_dl)) { + ALOGE("cannot open PCM bluetooth DL stream: %s", pcm_get_error(adev->pcm_bt_dl)); + goto err_open_dl; + } + } + + if (adev->pcm_bt_ul == NULL) { + ALOGD("Opening PCM bluetooth UL stream"); + adev->pcm_bt_ul = pcm_open(CARD_DEFAULT, PORT_BT, PCM_IN, &pcm_config_vx); + if (!pcm_is_ready(adev->pcm_bt_ul)) { + ALOGE("cannot open PCM bluetooth UL stream: %s", pcm_get_error(adev->pcm_bt_ul)); + goto err_open_ul; + } + } + ALOGD("Starting PCM bluetooth streams"); + pcm_start(adev->pcm_bt_dl); + pcm_start(adev->pcm_bt_ul); + } + return 0; err_open_ul: pcm_close(adev->pcm_modem_ul); adev->pcm_modem_ul = NULL; + pcm_close(adev->pcm_bt_ul); + adev->pcm_bt_ul = NULL; err_open_dl: pcm_close(adev->pcm_modem_dl); adev->pcm_modem_dl = NULL; + pcm_close(adev->pcm_bt_dl); + adev->pcm_bt_dl = NULL; return -ENOMEM; } static void end_call(struct m0_audio_device *adev) { - ALOGE("Closing modem PCMs"); - pcm_stop(adev->pcm_modem_dl); - pcm_stop(adev->pcm_modem_ul); - pcm_close(adev->pcm_modem_dl); - pcm_close(adev->pcm_modem_ul); + int bt_on; + bt_on = adev->out_device & AUDIO_DEVICE_OUT_ALL_SCO; + + if (adev->pcm_modem_dl != NULL) { + ALOGD("Stopping modem DL PCM"); + pcm_stop(adev->pcm_modem_dl); + ALOGV("Closing modem DL PCM"); + pcm_close(adev->pcm_modem_dl); + } + if (adev->pcm_modem_ul != NULL) { + ALOGD("Stopping modem UL PCM"); + pcm_stop(adev->pcm_modem_ul); + ALOGV("Closing modem UL PCM"); + pcm_close(adev->pcm_modem_ul); + } adev->pcm_modem_dl = NULL; adev->pcm_modem_ul = NULL; - /* re-enable +30db boost on mics */ - mixer_ctl_set_value(adev->mixer_ctls.mixinl_in1l_volume, 0, 1); - mixer_ctl_set_value(adev->mixer_ctls.mixinl_in2l_volume, 0, 1); + if (bt_on) { + if (adev->pcm_bt_dl != NULL) { + ALOGD("Stopping bluetooth DL PCM"); + pcm_stop(adev->pcm_bt_dl); + ALOGV("Closing bluetooth DL PCM"); + pcm_close(adev->pcm_bt_dl); + } + if (adev->pcm_bt_ul != NULL) { + ALOGD("Stopping bluetooth UL PCM"); + pcm_stop(adev->pcm_bt_ul); + ALOGV("Closing bluetooth UL PCM"); + pcm_close(adev->pcm_bt_ul); + } + } + adev->pcm_bt_dl = NULL; + adev->pcm_bt_ul = NULL; } static void set_eq_filter(struct m0_audio_device *adev) @@ -2615,6 +2670,13 @@ static int adev_open_input_stream(struct audio_hw_device *dev, struct m0_audio_device *ladev = (struct m0_audio_device *)dev; struct m0_stream_in *in; int ret; + + /* Respond with a request for stereo if a different format is given. */ + if (config->channel_mask != AUDIO_CHANNEL_IN_STEREO) { + config->channel_mask = AUDIO_CHANNEL_IN_STEREO; + return -EINVAL; + } + int channel_count = popcount(config->channel_mask); *stream_in = NULL; @@ -3008,6 +3070,8 @@ static int adev_open(const hw_module_t* module, const char* name, adev->pcm_modem_dl = NULL; adev->pcm_modem_ul = NULL; + adev->pcm_bt_dl = NULL; + adev->pcm_bt_ul = NULL; adev->voice_volume = 1.0f; adev->tty_mode = TTY_MODE_OFF; adev->bluetooth_nrec = true; diff --git a/audio/audio_hw.h b/audio/audio_hw.h index ba9b9d1..d909104 100644 --- a/audio/audio_hw.h +++ b/audio/audio_hw.h @@ -119,8 +119,6 @@ struct route_setting struct route_setting voicecall_default[] = { { .ctl_name = "AIF2 Mode", .intval = 0, }, - { .ctl_name = "MainMicBias Mode", .intval = 3, }, - { .ctl_name = "SubMicBias Mode", .intval = 3, }, { .ctl_name = "DAC1L Mixer AIF1.1 Switch", .intval = 1, }, { .ctl_name = "DAC1R Mixer AIF1.1 Switch", .intval = 1, }, { .ctl_name = "DAC1L Mixer AIF2 Switch", .intval = 1, }, @@ -134,10 +132,8 @@ struct route_setting voicecall_default_disable[] = { { .ctl_name = "DAC1L Mixer AIF2 Switch", .intval = 0, }, { .ctl_name = "DAC1R Mixer AIF2 Switch", .intval = 0, }, { .ctl_name = "AIF2DAC Mux", .strval = "AIF3DACDAT", }, - { .ctl_name = "MainMicBias Mode", .intval = 2, }, - { .ctl_name = "SubMicBias Mode", .intval = 2, }, { .ctl_name = "Main Mic Switch", .intval = 0, }, - { .ctl_name = "MIXINL IN1L Switch", .intval = 0, }, + { .ctl_name = "MIXINL IN2L Switch", .intval = 0, }, { .ctl_name = "Sub Mic Switch", .intval = 0, }, { .ctl_name = "MIXINR IN1R Switch", .intval = 0, }, { .ctl_name = NULL, }, @@ -149,17 +145,15 @@ struct route_setting default_input[] = { { .ctl_name = "IN2L Volume", .intval = 28, }, { .ctl_name = "MIXINL IN2L Switch", .intval = 1, }, { .ctl_name = "MIXINL IN2L Volume", .intval = 0, }, - { .ctl_name = "AIF1ADC1 HPF Mode", .intval = 1, }, + { .ctl_name = "AIF1ADC1 HPF Mode", .intval = 0, }, { .ctl_name = "AIF1ADC1 HPF Switch", .intval = 1, }, { .ctl_name = NULL, }, }; struct route_setting default_input_disable[] = { { .ctl_name = "Main Mic Switch", .intval = 0, }, - { .ctl_name = "MainMicBias Mode", .intval = 0, }, { .ctl_name = "IN2L Volume", .intval = 4, }, { .ctl_name = "MIXINL IN2L Switch", .intval = 0, }, - { .ctl_name = "MIXINL IN2L Volume", .intval = 0, }, { .ctl_name = "AIF1ADC1 HPF Switch", .intval = 0, }, { .ctl_name = NULL, }, }; @@ -183,9 +177,9 @@ struct route_setting noise_suppression_disable[] = { struct route_setting headset_input[] = { { .ctl_name = "MIXINL IN2L Switch", .intval = 0, }, - { .ctl_name = "MIXINR IN1R Switch", .intval = 0, }, + { .ctl_name = "MIXINR IN1R Switch", .intval = 0, }, { .ctl_name = "Headset Mic Switch", .intval = 1, }, - { .ctl_name = "IN1L Volume", .intval = 24, }, + { .ctl_name = "IN1L Volume", .intval = 18, }, { .ctl_name = "MIXINL IN1L Switch", .intval = 1, }, { .ctl_name = "MIXINL IN1L Volume", .intval = 0, }, { .ctl_name = "AIF1ADC1 HPF Mode", .intval = 1, }, @@ -198,28 +192,26 @@ struct route_setting headset_input[] = { struct route_setting headset_input_disable[] = { { .ctl_name = "Headset Mic Switch", .intval = 0, }, - { .ctl_name = "IN1L Volume", .intval = 11, }, { .ctl_name = "MIXINL IN1L Switch", .intval = 0, }, - { .ctl_name = "MIXINL IN1L Volume", .intval = 0, }, { .ctl_name = "AIF1ADC1 HPF Mode", .intval = 0, }, { .ctl_name = "AIF1ADC1 HPF Switch", .intval = 0, }, { .ctl_name = NULL, }, }; struct route_setting bt_output[] = { + { .ctl_name = "AIF1DAC1 Volume", .intval = 96, }, + { .ctl_name = "AIF1 Boost Volume", .intval = 0, }, + { .ctl_name = "DAC2 Volume", .intval = 96, }, + { .ctl_name = "AIF2ADC Volume", .intval = 96, }, { .ctl_name = "DAC1L Mixer AIF1.1 Switch", .intval = 1, }, { .ctl_name = "DAC1R Mixer AIF1.1 Switch", .intval = 1, }, { .ctl_name = "AIF3ADC Mux", .intval = 1, }, { .ctl_name = "AIF2DAC2L Mixer AIF1.1 Switch", .intval = 1, }, { .ctl_name = "AIF2DAC2R Mixer AIF1.1 Switch", .intval = 1, }, - { .ctl_name = "AIF1DAC1 Volume", .intval = 96, }, - { .ctl_name = "DAC2 Volume", .intval = 96, }, - { .ctl_name = "AIF2ADC Volume", .intval = 96, }, { .ctl_name = "AIF2DAC Volume", .intval = 96, }, - { .ctl_name = "MIXINL IN2L Volume", .intval = 1, }, - { .ctl_name = "IN1L Volume", .intval = 25, }, - { .ctl_name = "IN1R Volume", .intval = 25, }, - { .ctl_name = "AIF1 Boost Volume", .intval = 0, }, + { .ctl_name = "MIXINL IN1L Volume", .intval = 1, }, + { .ctl_name = "IN2L Volume", .intval = 25, }, + { .ctl_name = "IN1R Volume", .intval = 25, }, { .ctl_name = "LINEOUT1N Switch", .intval = 0, }, { .ctl_name = "LINEOUT1P Switch", .intval = 0, }, { .ctl_name = "AIF1ADC1 HPF Switch", .intval = 0, }, @@ -245,8 +237,12 @@ struct route_setting bt_input[] = { }; struct route_setting bt_disable[] = { + { .ctl_name = "AIF1DAC1 Volume", .intval = 96, }, + { .ctl_name = "AIF1 Boost Volume", .intval = 0, }, + { .ctl_name = "DAC2 Volume", .intval = 96, }, + { .ctl_name = "AIF2ADC Volume", .intval = 96, }, { .ctl_name = "AIF2ADC Mux", .intval = 0, }, - { .ctl_name = "MIXINL IN2L Volume", .intval = 0, }, + { .ctl_name = "MIXINL IN1L Volume", .intval = 0, }, { .ctl_name = "LINEOUT1N Switch", .intval = 1, }, { .ctl_name = "LINEOUT1P Switch", .intval = 1, }, { .ctl_name = "AIF2ADC HPF Mode", .intval = 0, }, @@ -255,10 +251,5 @@ struct route_setting bt_disable[] = { { .ctl_name = "AIF2DAC2L Mixer AIF2 Switch", .intval = 0, }, { .ctl_name = "AIF1ADC1R Mixer AIF2 Switch", .intval = 0, }, { .ctl_name = "AIF1ADC1L Mixer AIF2 Switch", .intval = 0, }, - { .ctl_name = "AIF1DAC1 Volume", .intval = 96, }, - { .ctl_name = "AIF1 Boost Volume", .intval = 0, }, - { .ctl_name = "DAC2 Volume", .intval = 96, }, - { .ctl_name = "AIF2DAC Volume", .intval = 96, }, - { .ctl_name = "AIF2ADC Volume", .intval = 96, }, { .ctl_name = NULL, }, -};
\ No newline at end of file +}; diff --git a/configs/tiny_hw.xml b/configs/tiny_hw.xml index 7531b70..335102e 100644 --- a/configs/tiny_hw.xml +++ b/configs/tiny_hw.xml @@ -4,15 +4,13 @@ We are able to have most of our routing static so do that --> <path> - <!-- don't change adc&dac source of AIF --> + <!-- do not change the adc & dac source of AIF2 --> <ctl name="AIF2DACL Source" val="0"/> <ctl name="AIF2DACR Source" val="0"/> <ctl name="AIF2ADCL Source" val="0"/> - <ctl name="AIF2ADCR Source" val="1"/> - - <!-- AIF1->DAC1 --> - <ctl name="DAC1 Switch" val="1"/> + <ctl name="AIF2ADCR Source" val="1"/> + <!-- general --> <ctl name="IN1L ZC Switch" val="0"/> <ctl name="IN1R ZC Switch" val="0"/> <ctl name="IN2L ZC Switch" val="0"/> @@ -126,13 +124,11 @@ We are able to have most of our routing static so do that <ctl name="AIF1DAC1 Volume" val="96"/> <ctl name="AIF1 Boost Volume" val="0"/> <ctl name="DAC1 Volume" val="96"/> - <ctl name="Left Output Mixer DAC Volume" val="7"/> - <ctl name="Right Output Mixer DAC Volume" val="7"/> <ctl name="SPKL DAC1 Volume" val="1"/> <ctl name="SPKR DAC1 Volume" val="1"/> <ctl name="Speaker Mixer Volume" val="3"/> <ctl name="Speaker Boost Volume" val="4"/> - <ctl name="Speaker Volume" val="57"/> + <ctl name="Speaker Volume" val="55"/> <ctl name="AIF1DAC1 EQ Switch" val="1"/> <ctl name="AIF1DAC1 EQ1 Volume" val="9"/> <ctl name="AIF1DAC1 EQ2 Volume" val="7"/> @@ -161,9 +157,8 @@ We are able to have most of our routing static so do that <ctl name="DAC1 Volume" val="96"/> <ctl name="Left Output Mixer DAC Volume" val="7"/> <ctl name="Right Output Mixer DAC Volume" val="7"/> - <ctl name="Output Volume" val="57"/> + <ctl name="Output Volume" val="55"/> <ctl name="Earpiece Volume" val="1"/> - <ctl name="Speaker Mixer Volume" val="1"/> </path> <path name="off"> <ctl name="RCV Switch" val="0"/> @@ -196,22 +191,31 @@ We are able to have most of our routing static so do that <path name="off"> <ctl name="HP Switch" val="0"/> <ctl name="AIF1DAC1 EQ Switch" val="0"/> + <ctl name="Left Output Mixer DAC Volume" val="7"/> + <ctl name="Right Output Mixer DAC Volume" val="7"/> </path> </device> <device name="sco-out"> <path name="on"> + <ctl name="AIF1DAC1 Volume" val="96"/> + <ctl name="AIF1 Boost Volume" val="0"/> <ctl name="AIF3ADC Mux" val="1"/> + <ctl name="AIF2ADC HPF Mode" val="3"/> + <ctl name="AIF2ADC HPF Switch" val="1"/> <ctl name="AIF2DAC2L Mixer AIF1.1 Switch" val="1"/> <ctl name="AIF2DAC2R Mixer AIF1.1 Switch" val="1"/> <ctl name="AIF2DAC Volume" val="96"/> + <ctl name="AIF2ADC Volume" val="96"/> <ctl name="DAC2 Volume" val="96"/> <ctl name="AIF2ADC Volume" val="96"/> - <ctl name="Speaker Mixer Volume" val="1"/> </path> <path name="off"> + <ctl name="AIF1DAC1 Volume" val="96"/> + <ctl name="AIF1 Boost Volume" val="0"/> + <ctl name="DAC2 Volume" val="96"/> + <ctl name="AIF2ADC Volume" val="96"/> <ctl name="AIF2DAC2L Mixer AIF1.1 Switch" val="0"/> <ctl name="AIF2DAC2R Mixer AIF1.1 Switch" val="0"/> - <ctl name="Speaker Mixer Volume" val="1"/> </path> </device> <device name="analog-dock"> @@ -219,6 +223,7 @@ We are able to have most of our routing static so do that <ctl name="LINEOUT2N Switch" val="1"/> <ctl name="LINEOUT2P Switch" val="1"/> <ctl name="LINEOUT2N Mixer Left Output Switch" val="1"/> + <ctl name="LINEOUT2N Mixer Right Output Switch" val="1"/> <ctl name="LINEOUT2P Mixer Right Output Switch" val="1"/> <ctl name="LINE Switch" val="1"/> <ctl name="AIF1DAC1 Volume" val="96"/> @@ -227,7 +232,8 @@ We are able to have most of our routing static so do that <ctl name="Left Output Mixer DAC Volume" val="7"/> <ctl name="Right Output Mixer DAC Volume" val="7"/> <ctl name="Output Volume" val="55"/> - <ctl name="Earpiece Volume" val="1"/> + <ctl name="LINEOUT2 Volume" val="1"/> + <ctl name="LineoutSwitch Mode" val="1"/> </path> <path name="off"> <ctl name="LINEOUT2N Switch" val="0"/> @@ -240,6 +246,7 @@ We are able to have most of our routing static so do that <ctl name="Right Output Mixer DAC Volume" val="7"/> <ctl name="Output Volume" val="57"/> <ctl name="LINEOUT2 Volume" val="1"/> + <ctl name="LineoutSwitch Mode" val="0"/> </path> </device> <device name="digital-dock"> @@ -250,9 +257,9 @@ We are able to have most of our routing static so do that <ctl name="AIF1DAC1 Volume" val="96"/> </path> <path name="off"> - <ctl name="LINEOUT1N Switch" val="1"/> - <ctl name="LINEOUT1P Switch" val="1"/> - <ctl name="HDMI Switch" val="1"/> + <ctl name="LINEOUT1N Switch" val="0"/> + <ctl name="LINEOUT1P Switch" val="0"/> + <ctl name="HDMI Switch" val="0"/> <ctl name="AIF1DAC1 Volume" val="96"/> <ctl name="AIF1 Boost Volume" val="0"/> <ctl name="DAC1 Volume" val="96"/> @@ -266,9 +273,9 @@ We are able to have most of our routing static so do that <path name="on"> <ctl name="Main Mic Switch" val="1"/> <ctl name="MainMicBias Mode" val="1"/> - <ctl name="IN2L Volume" val="22"/> + <ctl name="IN2L Volume" val="28"/> <ctl name="MIXINL IN2L Switch" val="1"/> - <ctl name="MIXINL IN2L Volume" val="1"/> + <ctl name="MIXINL IN2L Volume" val="0"/> <ctl name="AIF1ADCL Source" val="0"/> <ctl name="AIF1ADC1 HPF Mode" val="0"/> <ctl name="AIF1ADC1 HPF Switch" val="1"/> @@ -279,16 +286,16 @@ We are able to have most of our routing static so do that <ctl name="MainMicBias Mode" val="0"/> <ctl name="MIXINL IN2L Switch" val="0"/> <ctl name="MIXINL IN2L Volume" val="0"/> - <ctl name="IN2L Volume" val="10"/> + <ctl name="IN2L Volume" val="4"/> </path> </device> <device name="back-mic"> <path name="on"> <ctl name="Sub Mic Switch" val="1"/> <ctl name="SubMicBias Mode" val="1"/> - <ctl name="IN1R Volume" val="22"/> + <ctl name="IN1R Volume" val="25"/> <ctl name="MIXINR IN1R Switch" val="1"/> - <ctl name="MIXINR IN1R Volume" val="1"/> + <ctl name="MIXINR IN1R Volume" val="0"/> <ctl name="AIF1ADCR Source" val="1"/> <ctl name="AIF1ADC1 HPF Mode" val="1"/> <ctl name="AIF1ADC1 HPF Switch" val="1"/> @@ -298,16 +305,18 @@ We are able to have most of our routing static so do that <ctl name="Sub Mic Switch" val="0"/> <ctl name="SubMicBias Mode" val="0"/> <ctl name="MIXINR IN1R Switch" val="0"/> - <ctl name="IN1R Volume" val="10"/> + <ctl name="IN1R Volume" val="11"/> </path> </device> <device name="headset-in"> <path name="on"> - <ctl name="MIXINL IN1L Switch" val="0"/> + <ctl name="MIXINL IN2L Switch" val="0"/> <ctl name="Headset Mic Switch" val="1"/> - <ctl name="IN1L Volume" val="22"/> + <ctl name="IN1L Volume" val="24"/> <ctl name="MIXINL IN1L Switch" val="1"/> - <ctl name="MIXINL IN1L Volume" val="1"/> + <ctl name="MIXINL IN1L Volume" val="0"/> + <ctl name="AIF2ADC HPF Mode" val="1"/> + <ctl name="AIF2ADC HPF Switch" val="1"/> <ctl name="AIF1ADC1 HPF Mode" val="1"/> <ctl name="AIF1ADC1 HPF Switch" val="1"/> <ctl name="AIF1ADC1 Volume" val="96"/> @@ -316,7 +325,7 @@ We are able to have most of our routing static so do that </path> <path name="off"> <ctl name="Headset Mic Switch" val="0"/> - <ctl name="IN1L Volume" val="10"/> + <ctl name="IN1L Volume" val="11"/> <ctl name="MIXINL IN1L Switch" val="0"/> <ctl name="MIXINL IN1L Volume" val="0"/> <ctl name="AIF1ADC1 HPF Mode" val="0"/> @@ -327,6 +336,10 @@ We are able to have most of our routing static so do that <device name="sco-in"> <path name="on"> <ctl name="AIF2ADC Mux" val="1"/> + <ctl name="AIF2ADC HPF Mode" val="3"/> + <ctl name="AIF2ADC HPF Switch" val="1"/> + <ctl name="AIF1ADCL Source" val="0"/> + <ctl name="AIF1ADCR Source" val="1"/> <ctl name="AIF1ADC1R Mixer AIF2 Switch" val="1"/> <ctl name="AIF1ADC1L Mixer AIF2 Switch" val="1"/> <ctl name="AIF1ADC1 Volume" val="96"/> diff --git a/overlay/frameworks/base/core/res/res/xml/power_profile.xml b/overlay/frameworks/base/core/res/res/xml/power_profile.xml index c2c653f..3501baa 100644 --- a/overlay/frameworks/base/core/res/res/xml/power_profile.xml +++ b/overlay/frameworks/base/core/res/res/xml/power_profile.xml @@ -20,19 +20,19 @@ <device name="Android"> <!-- All values are in mAh except as noted --> <item name="none">0</item> - <item name="screen.on">49</item> - <item name="bluetooth.active">142</item> + <item name="screen.on">71</item> + <item name="bluetooth.active">17</item> <item name="bluetooth.on">0.3</item> <item name="bluetooth.at">35690</item> - <item name="screen.full">260</item> - <item name="wifi.on">4</item> - <item name="wifi.active">120</item> - <item name="wifi.scan">220</item> - <item name="dsp.audio">88</item> - <item name="dsp.video">88</item> - <item name="radio.active">185</item> + <item name="screen.full">380</item> + <item name="wifi.on">0.3</item> + <item name="wifi.active">96</item> + <item name="wifi.scan">70</item> + <item name="dsp.audio">44</item> + <item name="dsp.video">280</item> + <item name="radio.active">250</item> <!-- The current consumed by the radio when it is scanning for a signal --> - <item name="radio.scanning">88</item> + <item name="radio.scanning">82</item> <item name="gps.on">50</item> <!-- Current consumed by the radio at different signal strengths, when paging --> <array name="radio.on"> <!-- Strength 0 to BINS-1 --> @@ -51,7 +51,7 @@ <value>1600000</value> </array> <!-- Power consumption when CPU is idle --> - <item name="cpu.idle">1.4</item> + <item name="cpu.idle">4</item> <!-- Power consumption due to wake lock held --> <item name="cpu.awake">44</item> <!-- Power consumption at different speeds --> |