summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThe Android Open Source Project <initial-contribution@android.com>2013-10-30 10:59:08 -0700
committerThe Android Open Source Project <initial-contribution@android.com>2013-10-30 10:59:08 -0700
commite39a27e473b7ffe1aedf85f4f005d0be7d8a7a9e (patch)
treeaeb19a48173b1151dfd736f4a7cdf300f30ab408
parent748e32255a7a0e9d390fb64f5deb8873e94f191f (diff)
downloadgrouper-e39a27e473b7ffe1aedf85f4f005d0be7d8a7a9e.tar.gz
Snapshot to f4f5f74b6273db81d4091632ad7cec1fc290e0f2android-4.4_r0.9
-rw-r--r--BoardConfigCommon.mk2
-rw-r--r--audio/audio_hw.c33
-rw-r--r--audio_policy.conf4
-rw-r--r--kernelbin4778176 -> 4780244 bytes
-rw-r--r--overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml4
-rw-r--r--overlay/packages/apps/Bluetooth/res/values/config.xml18
-rw-r--r--system.prop3
7 files changed, 61 insertions, 3 deletions
diff --git a/BoardConfigCommon.mk b/BoardConfigCommon.mk
index a11128c..1d04242 100644
--- a/BoardConfigCommon.mk
+++ b/BoardConfigCommon.mk
@@ -77,3 +77,5 @@ endif
NEED_WORKAROUND_CORTEX_A9_745320 := true
BOARD_USES_GROUPER_MODULES := true
+
+TARGET_RUNNING_WITHOUT_SYNC_FRAMEWORK := true
diff --git a/audio/audio_hw.c b/audio/audio_hw.c
index 1ddea03..bcec532 100644
--- a/audio/audio_hw.c
+++ b/audio/audio_hw.c
@@ -117,6 +117,7 @@ struct stream_out {
struct pcm *pcm;
struct pcm_config *pcm_config;
bool standby;
+ uint64_t written; /* total frames written, not cleared when entering standby */
struct resampler_itfe *resampler;
int16_t *buffer;
@@ -290,7 +291,7 @@ static int start_output_stream(struct stream_out *out)
pthread_mutex_unlock(&in->lock);
}
- out->pcm = pcm_open(PCM_CARD, device, PCM_OUT | PCM_NORESTART, out->pcm_config);
+ out->pcm = pcm_open(PCM_CARD, device, PCM_OUT | PCM_NORESTART | PCM_MONOTONIC, out->pcm_config);
if (out->pcm && !pcm_is_ready(out->pcm)) {
ALOGE("pcm_open(out) failed: %s", pcm_get_error(out->pcm));
@@ -747,6 +748,9 @@ static ssize_t out_write(struct audio_stream_out *stream, const void* buffer,
pthread_mutex_unlock(&out->lock);
return ret;
}
+ if (ret == 0) {
+ out->written += out_frames;
+ }
exit:
pthread_mutex_unlock(&out->lock);
@@ -781,6 +785,31 @@ static int out_get_next_write_timestamp(const struct audio_stream_out *stream,
return -EINVAL;
}
+static int out_get_presentation_position(const struct audio_stream_out *stream,
+ uint64_t *frames, struct timespec *timestamp)
+{
+ struct stream_out *out = (struct stream_out *)stream;
+ int ret = -1;
+
+ pthread_mutex_lock(&out->lock);
+
+ size_t avail;
+ if (pcm_get_htimestamp(out->pcm, &avail, timestamp) == 0) {
+ size_t kernel_buffer_size = out->pcm_config->period_size * out->pcm_config->period_count;
+ // FIXME This calculation is incorrect if there is buffering after app processor
+ int64_t signed_frames = out->written - kernel_buffer_size + avail;
+ // It would be unusual for this value to be negative, but check just in case ...
+ if (signed_frames >= 0) {
+ *frames = signed_frames;
+ ret = 0;
+ }
+ }
+
+ pthread_mutex_unlock(&out->lock);
+
+ return ret;
+}
+
/** audio_stream_in implementation **/
static uint32_t in_get_sample_rate(const struct audio_stream *stream)
{
@@ -1009,6 +1038,7 @@ static int adev_open_output_stream(struct audio_hw_device *dev,
out->stream.write = out_write;
out->stream.get_render_position = out_get_render_position;
out->stream.get_next_write_timestamp = out_get_next_write_timestamp;
+ out->stream.get_presentation_position = out_get_presentation_position;
out->dev = adev;
@@ -1017,6 +1047,7 @@ static int adev_open_output_stream(struct audio_hw_device *dev,
config->sample_rate = out_get_sample_rate(&out->stream.common);
out->standby = true;
+ /* out->written = 0; by calloc() */
*stream_out = &out->stream;
return 0;
diff --git a/audio_policy.conf b/audio_policy.conf
index aac5c66..3cc637d 100644
--- a/audio_policy.conf
+++ b/audio_policy.conf
@@ -68,7 +68,7 @@ audio_hw_modules {
r_submix {
outputs {
submix {
- sampling_rates 44100|48000
+ sampling_rates 48000
channel_masks AUDIO_CHANNEL_OUT_STEREO
formats AUDIO_FORMAT_PCM_16_BIT
devices AUDIO_DEVICE_OUT_REMOTE_SUBMIX
@@ -76,7 +76,7 @@ audio_hw_modules {
}
inputs {
submix {
- sampling_rates 44100|48000
+ sampling_rates 48000
channel_masks AUDIO_CHANNEL_IN_STEREO
formats AUDIO_FORMAT_PCM_16_BIT
devices AUDIO_DEVICE_IN_REMOTE_SUBMIX
diff --git a/kernel b/kernel
index e9b43bf..fca7960 100644
--- a/kernel
+++ b/kernel
Binary files differ
diff --git a/overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml b/overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml
index 71f9933..4e056ab 100644
--- a/overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml
+++ b/overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml
@@ -21,4 +21,8 @@
<integer name="def_screen_off_timeout">120000</integer>
<!-- Set the automatic brightness mode on by default -->
<bool name="def_screen_brightness_automatic_mode">true</bool>
+
+ <!-- Value for Settings.Global.LOW_BATTERY_SOUND_TIMEOUT:
+ Mute battery sounds on tablets after one hour with screen off -->
+ <integer name="def_low_battery_sound_timeout">3600000</integer>
</resources>
diff --git a/overlay/packages/apps/Bluetooth/res/values/config.xml b/overlay/packages/apps/Bluetooth/res/values/config.xml
new file mode 100644
index 0000000..df47017
--- /dev/null
+++ b/overlay/packages/apps/Bluetooth/res/values/config.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2009-2012 Broadcom Corporation
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<resources>
+ <!-- Whether the device support Bluetooth MAP profile -->
+ <bool name="profile_supported_map">false</bool>
+</resources>
diff --git a/system.prop b/system.prop
index befcf94..eb317ad 100644
--- a/system.prop
+++ b/system.prop
@@ -14,3 +14,6 @@ ro.sf.lcd_density=213
# don't preload OpenGL in Zygote, the Tegra drivers do not like it
ro.zygote.disable_gl_preload=true
+
+# configure PRISM
+persist.tegra.didim.video = 5