summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKalimochoAz <calimochoazucarado@gmail.com>2012-11-23 06:51:34 +0100
committerKalimochoAz <calimochoazucarado@gmail.com>2012-11-23 06:51:34 +0100
commit45bc4b754b3a89d39caac8f9b58b14182c67ecf6 (patch)
tree5c052d202b6c9ce9219b5c97167319677a9889f4
parent8dc38ab89576751c794f2a8a675628f38718f246 (diff)
parent214d003a47e7fe2962df667c5d65bce92a21a40e (diff)
downloaddevice_samsung_tuna-45bc4b754b3a89d39caac8f9b58b14182c67ecf6.zip
device_samsung_tuna-45bc4b754b3a89d39caac8f9b58b14182c67ecf6.tar.gz
device_samsung_tuna-45bc4b754b3a89d39caac8f9b58b14182c67ecf6.tar.bz2
Merge remote-tracking branch 'remotes/google/jb-mr1-release' into HEAD
Conflicts: audio/audio_hw.c init.tuna.rc overlay/frameworks/base/core/res/res/xml/storage_list.xml recovery/Android.mk Change-Id: I0b13c6b5e61ea709b0e9aaa1c7b798684b33873a
-rw-r--r--BoardConfig.mk6
-rw-r--r--CleanSpec.mk1
-rw-r--r--audio/audio_hw.c136
-rw-r--r--audio_effects.conf133
-rw-r--r--bluetooth/bdroid_buildcfg.h22
-rw-r--r--device.mk18
-rw-r--r--dumpstate/dumpstate.c1
-rwxr-xr-xinit.tuna.rc49
-rw-r--r--kernelbin4141660 -> 4150860 bytes
-rw-r--r--overlay/frameworks/base/core/res/res/values/config.xml8
-rw-r--r--overlay/frameworks/base/core/res/res/xml/storage_list.xml31
-rw-r--r--overlay/packages/apps/Settings/res/values-cs/arrays.xml12
-rw-r--r--overlay/packages/apps/Settings/res/values-fa/arrays.xml12
-rw-r--r--overlay/packages/apps/Settings/res/values-nb/arrays.xml8
-rw-r--r--overlay/packages/apps/Settings/res/values/bools.xml2
-rw-r--r--recovery/Android.mk2
-rw-r--r--releasetools.py2
-rw-r--r--ueventd.tuna.rc3
18 files changed, 278 insertions, 168 deletions
diff --git a/BoardConfig.mk b/BoardConfig.mk
index 5cd94ee..b8151f3 100644
--- a/BoardConfig.mk
+++ b/BoardConfig.mk
@@ -21,9 +21,14 @@ USE_CAMERA_STUB := true
# Use the non-open-source parts, if they're present
-include vendor/samsung/tuna/BoardConfigVendor.mk
+# Default values, if not overridden else where.
+TARGET_BOARD_INFO_FILE ?= device/samsung/tuna/board-info.txt
+BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR ?= device/samsung/tuna/bluetooth
+
TARGET_CPU_ABI := armeabi-v7a
TARGET_CPU_ABI2 := armeabi
TARGET_CPU_SMP := true
+TARGET_ARCH := arm
TARGET_ARCH_VARIANT := armv7-a-neon
ARCH_ARM_HAVE_TLS_REGISTER := true
@@ -41,7 +46,6 @@ TARGET_PREBUILT_KERNEL := device/samsung/tuna/kernel
TARGET_NO_RADIOIMAGE := true
TARGET_BOARD_PLATFORM := omap4
TARGET_BOOTLOADER_BOARD_NAME := tuna
-TARGET_BOARD_INFO_FILE ?= device/samsung/tuna/board-info.txt
BOARD_EGL_CFG := device/samsung/tuna/egl.cfg
BOARD_CREATE_TUNA_HDCP_KEYS_SYMLINK := true
diff --git a/CleanSpec.mk b/CleanSpec.mk
index 51b1305..0a024da 100644
--- a/CleanSpec.mk
+++ b/CleanSpec.mk
@@ -51,3 +51,4 @@ $(call add-clean-step, rm -rf $(PRODUCT_OUT)/root/default.prop)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/obj/APPS/phone_intermediates)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/etc/updatecmds/migrate_nfc.txt)
$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/lib/hw/keystore.tuna.so)
+$(call add-clean-step, rm -f $(TARGET_OUT)/build.prop)
diff --git a/audio/audio_hw.c b/audio/audio_hw.c
index d1a8a88..0ee17e1 100644
--- a/audio/audio_hw.c
+++ b/audio/audio_hw.c
@@ -128,7 +128,7 @@
/* #define to use mmap no-irq mode for playback, #undef for non-mmap irq mode */
#undef PLAYBACK_MMAP // was #define
/* short period (aka low latency) in milliseconds */
-#define SHORT_PERIOD_MS 4 // was 22
+#define SHORT_PERIOD_MS 3 // was 22
/* deep buffer short period (screen on) in milliseconds */
#define DEEP_BUFFER_SHORT_PERIOD_MS 22
/* deep buffer long period (screen off) in milliseconds */
@@ -181,6 +181,11 @@
*/
#ifdef PLAYBACK_MMAP
#define PLAYBACK_SHORT_PERIOD_COUNT 4
+/* If sample rate converter is required, then use triple-buffering to
+ * help mask the variance in cycle times. Otherwise use double-buffering.
+ */
+#elif DEFAULT_OUT_SAMPLING_RATE != MM_FULL_POWER_SAMPLING_RATE
+#define PLAYBACK_SHORT_PERIOD_COUNT 3
#else
#define PLAYBACK_SHORT_PERIOD_COUNT 2
#endif
@@ -298,6 +303,7 @@ enum tty_modes {
TTY_MODE_FULL
};
+/* deep buffer */
struct pcm_config pcm_config_mm = {
.channels = 2,
.rate = MM_FULL_POWER_SAMPLING_RATE,
@@ -308,6 +314,7 @@ struct pcm_config pcm_config_mm = {
.avail_min = DEEP_BUFFER_LONG_PERIOD_SIZE,
};
+/* low latency */
struct pcm_config pcm_config_tones = {
.channels = 2,
.rate = MM_FULL_POWER_SAMPLING_RATE,
@@ -639,7 +646,8 @@ struct tuna_audio_device {
struct mixer *mixer;
struct mixer_ctls mixer_ctls;
audio_mode_t mode;
- int devices;
+ int out_device;
+ int in_device;
struct pcm *pcm_modem_dl;
struct pcm *pcm_modem_ul;
int in_call;
@@ -869,7 +877,7 @@ static void end_call(struct tuna_audio_device *adev)
static void set_eq_filter(struct tuna_audio_device *adev)
{
/* DL1_EQ can't be used for bt */
- int dl1_eq_applicable = adev->devices & (AUDIO_DEVICE_OUT_WIRED_HEADSET |
+ int dl1_eq_applicable = adev->out_device & (AUDIO_DEVICE_OUT_WIRED_HEADSET |
AUDIO_DEVICE_OUT_WIRED_HEADPHONE | AUDIO_DEVICE_OUT_EARPIECE);
/* 4Khz LPF is used only in NB-AMR voicecall */
@@ -902,7 +910,7 @@ static void set_incall_device(struct tuna_audio_device *adev)
{
int device_type;
- switch(adev->devices & AUDIO_DEVICE_OUT_ALL) {
+ switch(adev->out_device) {
case AUDIO_DEVICE_OUT_EARPIECE:
device_type = SOUND_AUDIO_PATH_HANDSET;
break;
@@ -991,8 +999,8 @@ static void set_output_volumes(struct tuna_audio_device *adev, bool tty_volume)
int headset_volume;
int earpiece_volume;
bool toro = adev->device_is_toro;
- int headphone_on = adev->devices & AUDIO_DEVICE_OUT_WIRED_HEADPHONE;
- int speaker_on = adev->devices & AUDIO_DEVICE_OUT_SPEAKER;
+ int headphone_on = adev->out_device & AUDIO_DEVICE_OUT_WIRED_HEADPHONE;
+ int speaker_on = adev->out_device & AUDIO_DEVICE_OUT_SPEAKER;
int speaker_volume_overrange = MIXER_ABE_GAIN_0DB;
int speaker_max_db =
DB_FROM_SPEAKER_VOLUME(mixer_ctl_get_range_max(adev->mixer_ctls.speaker_volume));
@@ -1043,7 +1051,7 @@ static void set_output_volumes(struct tuna_audio_device *adev, bool tty_volume)
*/
if (headphone_on)
dl1_volume_correction = normal_headphone_volume - headset_volume;
- else if (adev->devices & AUDIO_DEVICE_OUT_WIRED_HEADSET)
+ else if (adev->out_device & AUDIO_DEVICE_OUT_WIRED_HEADSET)
dl1_volume_correction = normal_headset_volume - headset_volume;
else
dl1_volume_correction = normal_earpiece_volume - earpiece_volume;
@@ -1076,7 +1084,8 @@ static void set_output_volumes(struct tuna_audio_device *adev, bool tty_volume)
speaker_volume_overrange);
mixer_ctl_set_value(adev->mixer_ctls.tones_dl2_volume, 0,
speaker_volume_overrange + dl2_volume_correction);
- } else if (adev->mode == AUDIO_MODE_IN_COMMUNICATION) {
+ } else if ((adev->mode == AUDIO_MODE_IN_COMMUNICATION) ||
+ (adev->mode == AUDIO_MODE_RINGTONE)) {
mixer_ctl_set_value(adev->mixer_ctls.tones_dl1_volume, 0,
MIXER_ABE_GAIN_0DB);
mixer_ctl_set_value(adev->mixer_ctls.tones_dl2_volume, 0,
@@ -1132,18 +1141,18 @@ static void select_mode(struct tuna_audio_device *adev)
after the ringtone is played, but doesn't cause a route
change if a headset or bt device is already connected. If
speaker is not the only thing active, just remove it from
- the route. We'll assume it'll never be used initally during
+ the route. We'll assume it'll never be used initially during
a call. This works because we're sure that the audio policy
manager will update the output device after the audio mode
change, even if the device selection did not change. */
- if ((adev->devices & AUDIO_DEVICE_OUT_ALL) == AUDIO_DEVICE_OUT_SPEAKER)
- adev->devices = AUDIO_DEVICE_OUT_EARPIECE |
- AUDIO_DEVICE_IN_BUILTIN_MIC;
- else
- adev->devices &= ~AUDIO_DEVICE_OUT_SPEAKER;
+ if (adev->out_device == AUDIO_DEVICE_OUT_SPEAKER) {
+ adev->out_device = AUDIO_DEVICE_OUT_EARPIECE;
+ adev->in_device = AUDIO_DEVICE_IN_BUILTIN_MIC & ~AUDIO_DEVICE_BIT_IN;
+ } else
+ adev->out_device &= ~AUDIO_DEVICE_OUT_SPEAKER;
select_output_device(adev);
start_call(adev);
- adev_set_voice_volume(&adev->hw_device, adev->voice_volume);
+ ril_set_call_volume(&adev->ril, SOUND_TYPE_VOICE, adev->voice_volume);
adev->in_call = 1;
}
} else {
@@ -1180,11 +1189,11 @@ static void select_output_device(struct tuna_audio_device *adev)
channel, 0);
}
- headset_on = adev->devices & AUDIO_DEVICE_OUT_WIRED_HEADSET;
- headphone_on = adev->devices & AUDIO_DEVICE_OUT_WIRED_HEADPHONE;
- speaker_on = adev->devices & AUDIO_DEVICE_OUT_SPEAKER;
- earpiece_on = adev->devices & AUDIO_DEVICE_OUT_EARPIECE;
- bt_on = adev->devices & AUDIO_DEVICE_OUT_ALL_SCO;
+ headset_on = adev->out_device & AUDIO_DEVICE_OUT_WIRED_HEADSET;
+ headphone_on = adev->out_device & AUDIO_DEVICE_OUT_WIRED_HEADPHONE;
+ speaker_on = adev->out_device & AUDIO_DEVICE_OUT_SPEAKER;
+ earpiece_on = adev->out_device & AUDIO_DEVICE_OUT_EARPIECE;
+ bt_on = adev->out_device & AUDIO_DEVICE_OUT_ALL_SCO;
/* force rx path according to TTY mode when in call */
if (adev->mode == AUDIO_MODE_IN_CALL && !bt_on) {
@@ -1209,7 +1218,7 @@ static void select_output_device(struct tuna_audio_device *adev)
default:
/* force speaker on when in call and HDMI or S/PDIF is selected
* as voice DL audio cannot be routed there by ABE */
- if (adev->devices &
+ if (adev->out_device &
(AUDIO_DEVICE_OUT_AUX_DIGITAL |
AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET))
speaker_on = 1;
@@ -1309,18 +1318,18 @@ static void select_input_device(struct tuna_audio_device *adev)
int headset_on = 0;
int main_mic_on = 0;
int sub_mic_on = 0;
- int bt_on = adev->devices & AUDIO_DEVICE_IN_ALL_SCO;
+ int bt_on = adev->in_device & AUDIO_DEVICE_IN_ALL_SCO;
if (!bt_on) {
if ((adev->mode != AUDIO_MODE_IN_CALL) && (adev->active_input != 0)) {
/* sub mic is used for camcorder or VoIP on speaker phone */
sub_mic_on = (adev->active_input->source == AUDIO_SOURCE_CAMCORDER) ||
- ((adev->devices & AUDIO_DEVICE_OUT_SPEAKER) &&
+ ((adev->out_device & AUDIO_DEVICE_OUT_SPEAKER) &&
(adev->active_input->source == AUDIO_SOURCE_VOICE_COMMUNICATION));
}
if (!sub_mic_on) {
- headset_on = adev->devices & AUDIO_DEVICE_IN_WIRED_HEADSET;
- main_mic_on = adev->devices & AUDIO_DEVICE_IN_BUILTIN_MIC;
+ headset_on = adev->in_device & AUDIO_DEVICE_IN_WIRED_HEADSET;
+ main_mic_on = adev->in_device & AUDIO_DEVICE_IN_BUILTIN_MIC;
}
}
@@ -1389,8 +1398,7 @@ static int start_output_stream_low_latency(struct tuna_stream_out *out)
* tinyalsa.
*/
- if (adev->devices & (AUDIO_DEVICE_OUT_ALL &
- ~(AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET | AUDIO_DEVICE_OUT_AUX_DIGITAL))) {
+ if (adev->out_device & ~(AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET | AUDIO_DEVICE_OUT_AUX_DIGITAL)) {
/* Something not a dock in use */
out->config[PCM_NORMAL] = pcm_config_tones;
out->config[PCM_NORMAL].rate = MM_FULL_POWER_SAMPLING_RATE;
@@ -1398,7 +1406,7 @@ static int start_output_stream_low_latency(struct tuna_stream_out *out)
flags, &out->config[PCM_NORMAL]);
}
- if (adev->devices & AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET) {
+ if (adev->out_device & AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET) {
/* SPDIF output in use */
out->config[PCM_SPDIF] = pcm_config_tones;
out->config[PCM_SPDIF].rate = MM_FULL_POWER_SAMPLING_RATE;
@@ -1407,7 +1415,7 @@ static int start_output_stream_low_latency(struct tuna_stream_out *out)
}
/* priority is given to multichannel HDMI output */
- if ((adev->devices & AUDIO_DEVICE_OUT_AUX_DIGITAL) &&
+ if ((adev->out_device & AUDIO_DEVICE_OUT_AUX_DIGITAL) &&
(adev->outputs[OUTPUT_HDMI] == NULL || adev->outputs[OUTPUT_HDMI]->standby)) {
/* HDMI output in use */
out->config[PCM_HDMI] = pcm_config_tones;
@@ -1682,7 +1690,7 @@ static size_t out_get_buffer_size_hdmi(const struct audio_stream *stream)
return HDMI_MULTI_PERIOD_SIZE * audio_stream_frame_size((struct audio_stream *)stream);
}
-static uint32_t out_get_channels(const struct audio_stream *stream)
+static audio_channel_mask_t out_get_channels(const struct audio_stream *stream)
{
struct tuna_stream_out *out = (struct tuna_stream_out *)stream;
@@ -1786,7 +1794,7 @@ static int out_set_parameters(struct audio_stream *stream, const char *kvpairs)
val = atoi(value);
pthread_mutex_lock(&adev->lock);
pthread_mutex_lock(&out->lock);
- if (((adev->devices & AUDIO_DEVICE_OUT_ALL) != val) && (val != 0)) {
+ if ((adev->out_device != val) && (val != 0)) {
/* this is needed only when changing device on low latency output
* as other output streams are not used for voice use cases nor
* handle duplication to HDMI or SPDIF */
@@ -1805,26 +1813,25 @@ static int out_set_parameters(struct audio_stream *stream, const char *kvpairs)
* (several hundred ms of audio can be lost: e.g beginning of a ringtone. We must understand
* the root cause in audio HAL, driver or ABE.
if (((val & AUDIO_DEVICE_OUT_AUX_DIGITAL) ^
- (adev->devices & AUDIO_DEVICE_OUT_AUX_DIGITAL)) ||
+ (adev->out_device & AUDIO_DEVICE_OUT_AUX_DIGITAL)) ||
((val & AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET) ^
- (adev->devices & AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET)) ||
- (adev->devices & (AUDIO_DEVICE_OUT_AUX_DIGITAL |
+ (adev->out_device & AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET)) ||
+ (adev->out_device & (AUDIO_DEVICE_OUT_AUX_DIGITAL |
AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET)))
*/
if (((val & AUDIO_DEVICE_OUT_AUX_DIGITAL) ^
- (adev->devices & AUDIO_DEVICE_OUT_AUX_DIGITAL)) ||
+ (adev->out_device & AUDIO_DEVICE_OUT_AUX_DIGITAL)) ||
((val & AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET) ^
- (adev->devices & AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET)) ||
- (adev->devices & (AUDIO_DEVICE_OUT_AUX_DIGITAL |
+ (adev->out_device & AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET)) ||
+ (adev->out_device & (AUDIO_DEVICE_OUT_AUX_DIGITAL |
AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET)) ||
((val & AUDIO_DEVICE_OUT_SPEAKER) ^
- (adev->devices & AUDIO_DEVICE_OUT_SPEAKER)) ||
+ (adev->out_device & AUDIO_DEVICE_OUT_SPEAKER)) ||
(adev->mode == AUDIO_MODE_IN_CALL))
do_output_standby(out);
}
if (out != adev->outputs[OUTPUT_HDMI]) {
- adev->devices &= ~AUDIO_DEVICE_OUT_ALL;
- adev->devices |= val;
+ adev->out_device = val;
select_output_device(adev);
}
}
@@ -1872,7 +1879,7 @@ static char * out_get_parameters(const struct audio_stream *stream, const char *
i++;
}
str_parms_add_str(reply, AUDIO_PARAMETER_STREAM_SUP_CHANNELS, value);
- str = strdup(str_parms_to_str(reply));
+ str = str_parms_to_str(reply);
} else {
str = strdup(keys);
}
@@ -2167,8 +2174,7 @@ static int start_input_stream(struct tuna_stream_in *in)
adev->active_input = in;
if (adev->mode != AUDIO_MODE_IN_CALL) {
- adev->devices &= ~AUDIO_DEVICE_IN_ALL;
- adev->devices |= in->device;
+ adev->in_device = in->device;
select_input_device(adev);
}
@@ -2196,7 +2202,7 @@ static int start_input_stream(struct tuna_stream_in *in)
if (in->need_echo_reference && in->echo_reference == NULL)
in->echo_reference = get_echo_reference(adev,
AUDIO_FORMAT_PCM_16_BIT,
- in->config.channels,
+ popcount(in->main_channels),
in->requested_rate);
/* this assumes routing is done previously */
@@ -2241,7 +2247,7 @@ static size_t in_get_buffer_size(const struct audio_stream *stream)
popcount(in->main_channels));
}
-static uint32_t in_get_channels(const struct audio_stream *stream)
+static audio_channel_mask_t in_get_channels(const struct audio_stream *stream)
{
struct tuna_stream_in *in = (struct tuna_stream_in *)stream;
@@ -2269,7 +2275,7 @@ static int do_input_standby(struct tuna_stream_in *in)
adev->active_input = 0;
if (adev->mode != AUDIO_MODE_IN_CALL) {
- adev->devices &= ~AUDIO_DEVICE_IN_ALL;
+ adev->in_device = AUDIO_DEVICE_NONE;
select_input_device(adev);
}
@@ -2330,7 +2336,7 @@ static int in_set_parameters(struct audio_stream *stream, const char *kvpairs)
ret = str_parms_get_str(parms, AUDIO_PARAMETER_STREAM_ROUTING, value, sizeof(value));
if (ret >= 0) {
- val = atoi(value);
+ val = atoi(value) & ~AUDIO_DEVICE_BIT_IN;
if ((in->device != val) && (val != 0)) {
in->device = val;
do_standby = true;
@@ -3299,8 +3305,7 @@ static int adev_open_output_stream(struct audio_hw_device *dev,
/* FIXME: when we support multiple output devices, we will want to
* do the following:
- * adev->devices &= ~AUDIO_DEVICE_OUT_ALL;
- * adev->devices |= out->device;
+ * adev->out_device = out->device;
* select_output_device(adev);
* This is because out_set_parameters() with a route is not
* guaranteed to be called after an output stream is opened. */
@@ -3409,11 +3414,13 @@ static int adev_set_voice_volume(struct audio_hw_device *dev, float volume)
{
struct tuna_audio_device *adev = (struct tuna_audio_device *)dev;
+ pthread_mutex_lock(&adev->lock);
adev->voice_volume = volume;
if (adev->mode == AUDIO_MODE_IN_CALL)
ril_set_call_volume(&adev->ril, SOUND_TYPE_VOICE, volume);
+ pthread_mutex_unlock(&adev->lock);
return 0;
}
@@ -3529,7 +3536,7 @@ static int adev_open_input_stream(struct audio_hw_device *dev,
in->dev = ladev;
in->standby = 1;
- in->device = devices;
+ in->device = devices & ~AUDIO_DEVICE_BIT_IN;
*stream_in = &in->stream;
return 0;
@@ -3586,29 +3593,6 @@ static int adev_close(hw_device_t *device)
return 0;
}
-static uint32_t adev_get_supported_devices(const struct audio_hw_device *dev)
-{
- return (/* OUT */
- AUDIO_DEVICE_OUT_EARPIECE |
- AUDIO_DEVICE_OUT_SPEAKER |
- AUDIO_DEVICE_OUT_WIRED_HEADSET |
- AUDIO_DEVICE_OUT_WIRED_HEADPHONE |
- AUDIO_DEVICE_OUT_AUX_DIGITAL |
- AUDIO_DEVICE_OUT_ANLG_DOCK_HEADSET |
- AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET |
- AUDIO_DEVICE_OUT_ALL_SCO |
- AUDIO_DEVICE_OUT_DEFAULT |
- /* IN */
- AUDIO_DEVICE_IN_COMMUNICATION |
- AUDIO_DEVICE_IN_AMBIENT |
- AUDIO_DEVICE_IN_BUILTIN_MIC |
- AUDIO_DEVICE_IN_WIRED_HEADSET |
- AUDIO_DEVICE_IN_AUX_DIGITAL |
- AUDIO_DEVICE_IN_BACK_MIC |
- AUDIO_DEVICE_IN_ALL_SCO |
- AUDIO_DEVICE_IN_DEFAULT);
-}
-
static int adev_open(const hw_module_t* module, const char* name,
hw_device_t** device)
{
@@ -3623,11 +3607,10 @@ static int adev_open(const hw_module_t* module, const char* name,
return -ENOMEM;
adev->hw_device.common.tag = HARDWARE_DEVICE_TAG;
- adev->hw_device.common.version = AUDIO_DEVICE_API_VERSION_1_0;
+ adev->hw_device.common.version = AUDIO_DEVICE_API_VERSION_2_0;
adev->hw_device.common.module = (struct hw_module_t *) module;
adev->hw_device.common.close = adev_close;
- adev->hw_device.get_supported_devices = adev_get_supported_devices;
adev->hw_device.init_check = adev_init_check;
adev->hw_device.set_voice_volume = adev_set_voice_volume;
adev->hw_device.set_master_volume = adev_set_master_volume;
@@ -3733,7 +3716,8 @@ static int adev_open(const hw_module_t* module, const char* name,
pthread_mutex_lock(&adev->lock);
set_route_by_array(adev->mixer, defaults, 1);
adev->mode = AUDIO_MODE_NORMAL;
- adev->devices = AUDIO_DEVICE_OUT_SPEAKER | AUDIO_DEVICE_IN_BUILTIN_MIC;
+ adev->out_device = AUDIO_DEVICE_OUT_SPEAKER;
+ adev->in_device = AUDIO_DEVICE_IN_BUILTIN_MIC & ~AUDIO_DEVICE_BIT_IN;
select_output_device(adev);
adev->pcm_modem_dl = NULL;
diff --git a/audio_effects.conf b/audio_effects.conf
new file mode 100644
index 0000000..d681c69
--- /dev/null
+++ b/audio_effects.conf
@@ -0,0 +1,133 @@
+# List of effect libraries to load. Each library element must contain a "path" element
+# giving the full path of the library .so file.
+# libraries {
+# <lib name> {
+# path <lib path>
+# }
+# }
+libraries {
+ bundle {
+ path /system/lib/soundfx/libbundlewrapper.so
+ }
+ reverb {
+ path /system/lib/soundfx/libreverbwrapper.so
+ }
+ visualizer {
+ path /system/lib/soundfx/libvisualizer.so
+ }
+ pre_processing {
+ path /system/lib/soundfx/libaudiopreprocessing.so
+ }
+ downmix {
+ path /system/lib/soundfx/libdownmix.so
+ }
+}
+
+# list of effects to load. Each effect element must contain a "library" and a "uuid" element.
+# The value of the "library" element must correspond to the name of one library element in the
+# "libraries" element.
+# The name of the effect element is indicative, only the value of the "uuid" element
+# designates the effect.
+# The uuid is the implementation specific UUID as specified by the effect vendor. This is not the
+# generic effect type UUID.
+# effects {
+# <fx name> {
+# library <lib name>
+# uuid <effect uuid>
+# }
+# ...
+# }
+
+effects {
+ bassboost {
+ library bundle
+ uuid 8631f300-72e2-11df-b57e-0002a5d5c51b
+ }
+ virtualizer {
+ library bundle
+ uuid 1d4033c0-8557-11df-9f2d-0002a5d5c51b
+ }
+ equalizer {
+ library bundle
+ uuid ce772f20-847d-11df-bb17-0002a5d5c51b
+ }
+ volume {
+ library bundle
+ uuid 119341a0-8469-11df-81f9-0002a5d5c51b
+ }
+ reverb_env_aux {
+ library reverb
+ uuid 4a387fc0-8ab3-11df-8bad-0002a5d5c51b
+ }
+ reverb_env_ins {
+ library reverb
+ uuid c7a511a0-a3bb-11df-860e-0002a5d5c51b
+ }
+ reverb_pre_aux {
+ library reverb
+ uuid f29a1400-a3bb-11df-8ddc-0002a5d5c51b
+ }
+ reverb_pre_ins {
+ library reverb
+ uuid 172cdf00-a3bc-11df-a72f-0002a5d5c51b
+ }
+ visualizer {
+ library visualizer
+ uuid d069d9e0-8329-11df-9168-0002a5d5c51b
+ }
+ downmix {
+ library downmix
+ uuid 93f04452-e4fe-41cc-91f9-e475b6d1d69f
+ }
+ agc {
+ library pre_processing
+ uuid aa8130e0-66fc-11e0-bad0-0002a5d5c51b
+ }
+ aec {
+ library pre_processing
+ uuid bb392ec0-8d4d-11e0-a896-0002a5d5c51b
+ }
+ ns {
+ library pre_processing
+ uuid c06c8400-8e06-11e0-9cb6-0002a5d5c51b
+ }
+}
+# Audio preprocessor configurations.
+# The pre processor configuration consists in a list of elements each describing
+# pre processor settings for a given input source. Valid input source names are:
+# "mic", "camcorder", "voice_recognition", "voice_communication"
+# Each input source element contains a list of effects elements. The name of the effect
+# element must be the name of one of the effects in the "effects" list of the file.
+# Each effect element may optionally contain a list of parameters and their
+# default value to apply when the pre processor effect is created.
+# A parameter is defined by a "param" element and a "value" element. Each of these elements
+# consists in one or more elements specifying a type followed by a value.
+# The types defined are: "int", "short", "float", "bool" and "string"
+# When both "param" and "value" are a single int, a simple form is allowed where just
+# the param and value pair is present in the parameter description
+# pre_processing {
+# <input source name> {
+# <fx name> {
+# <param 1 name> {
+# param {
+# int|short|float|bool|string <value>
+# [ int|short|float|bool|string <value> ]
+# ...
+# }
+# value {
+# int|short|float|bool|string <value>
+# [ int|short|float|bool|string <value> ]
+# ...
+# }
+# }
+# <param 2 name > {<param> <value>}
+# ...
+# }
+# ...
+# }
+# ...
+# }
+
+#
+# TODO: add default audio pre processor configurations after debug and tuning phase
+#
diff --git a/bluetooth/bdroid_buildcfg.h b/bluetooth/bdroid_buildcfg.h
new file mode 100644
index 0000000..5c61b6c
--- /dev/null
+++ b/bluetooth/bdroid_buildcfg.h
@@ -0,0 +1,22 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * 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.
+ */
+
+#ifndef _BDROID_BUILDCFG_H
+#define _BDROID_BUILDCFG_H
+
+#define BTM_DEF_LOCAL_NAME "Galaxy Nexus 2"
+
+#endif
diff --git a/device.mk b/device.mk
index 791bd83..8420bf7 100644
--- a/device.mk
+++ b/device.mk
@@ -50,8 +50,8 @@ PRODUCT_PACKAGES += \
audio.usb.default
PRODUCT_COPY_FILES += \
- device/samsung/tuna/audio/audio_policy.conf:system/etc/audio_policy.conf
-
+ device/samsung/tuna/audio/audio_policy.conf:system/etc/audio_policy.conf \
+ device/samsung/tuna/audio_effects.conf:system/vendor/etc/audio_effects.conf
PRODUCT_PACKAGES += \
tuna_hdcp_keys
@@ -68,10 +68,6 @@ PRODUCT_COPY_FILES += \
device/samsung/tuna/media_codecs.xml:system/etc/media_codecs.xml \
device/samsung/tuna/gps.conf:system/etc/gps.conf
-# Bluetooth configuration files
-PRODUCT_COPY_FILES += \
- system/bluetooth/data/main.le.conf:system/etc/bluetooth/main.conf
-
# Wifi
ifneq ($(TARGET_PREBUILT_WIFI_MODULE),)
PRODUCT_COPY_FILES += \
@@ -138,10 +134,8 @@ PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.nfc.xml:system/etc/permissions/android.hardware.nfc.xml \
frameworks/native/data/etc/android.software.sip.voip.xml:system/etc/permissions/android.software.sip.voip.xml \
frameworks/native/data/etc/android.hardware.usb.accessory.xml:system/etc/permissions/android.hardware.usb.accessory.xml \
- frameworks/native/data/etc/android.hardware.usb.host.xml:system/etc/permissions/android.hardware.usb.host.xml
-
-PRODUCT_COPY_FILES += $(call add-to-product-copy-files-if-exists,\
-packages/wallpapers/LivePicker/android.software.live_wallpaper.xml:system/etc/permissions/android.software.live_wallpaper.xml)
+ frameworks/native/data/etc/android.hardware.usb.host.xml:system/etc/permissions/android.hardware.usb.host.xml \
+ frameworks/native/data/etc/android.hardware.audio.low_latency.xml:system/etc/permissions/android.hardware.audio.low_latency.xml
# Melfas touchscreen firmware
PRODUCT_COPY_FILES += \
@@ -181,6 +175,9 @@ PRODUCT_PROPERTY_OVERRIDES += \
PRODUCT_PROPERTY_OVERRIDES += \
ro.sf.lcd_density=320
+PRODUCT_PROPERTY_OVERRIDES += \
+ ro.hwui.disable_scissor_opt=true
+
PRODUCT_CHARACTERISTICS := nosdcard
PRODUCT_TAGS += dalvik.gc.type-precise
@@ -191,7 +188,6 @@ PRODUCT_PACKAGES += \
# Filesystem management tools
PRODUCT_PACKAGES += \
- make_ext4fs \
e2fsck \
setup_fs
diff --git a/dumpstate/dumpstate.c b/dumpstate/dumpstate.c
index 2858b2c..61602e4 100644
--- a/dumpstate/dumpstate.c
+++ b/dumpstate/dumpstate.c
@@ -38,4 +38,5 @@ void dumpstate_board()
dump_file("fsa9480 device_type", "/sys/bus/i2c/drivers/fsa9480/4-0025/device_type");
dump_file("fsa9480 control", "/sys/bus/i2c/drivers/fsa9480/4-0025/control");
dump_file("tiler 2x1 map", "/d/tiler/map/2x1");
+ dump_file("wlan", "/sys/module/bcmdhd/parameters/info_string");
};
diff --git a/init.tuna.rc b/init.tuna.rc
index fcaceda..374e425 100755
--- a/init.tuna.rc
+++ b/init.tuna.rc
@@ -1,19 +1,23 @@
import init.tuna.usb.rc
-on early-init
- export EXTERNAL_STORAGE /storage/sdcard0
- mkdir /storage 0050 system sdcard_r
- mkdir /storage/sdcard0 0000 system system
- mkdir /storage/usbdisk 0755 system system
- # for backwards compatibility
- symlink /storage/sdcard0 /sdcard
- symlink /storage/sdcard0 /mnt/sdcard
- symlink /storage/usbdisk /mnt/usbdisk
+on init
+ # See storage config details at http://source.android.com/tech/storage/
+ mkdir /mnt/shell/emulated 0700 shell shell
+ mkdir /storage/emulated 0555 root root
+
+ export EXTERNAL_STORAGE /storage/emulated/legacy
+ export EMULATED_STORAGE_SOURCE /mnt/shell/emulated
+ export EMULATED_STORAGE_TARGET /storage/emulated
+
+ # Support legacy paths
+ symlink /storage/emulated/legacy /sdcard
+ symlink /storage/emulated/legacy /mnt/sdcard
+ symlink /storage/emulated/legacy /storage/sdcard0
+ symlink /mnt/shell/emulated/0 /storage/emulated/legacy
on post-fs-data
- # we will remap this as /storage/sdcard0 with the sdcard fuse tool
- mkdir /data/media 0770 media_rw media_rw
- chown media_rw media_rw /data/media
+ mkdir /data/media 0770 media_rw media_rw
+
mkdir /data/misc/wifi 0770 wifi wifi
mkdir /data/misc/wifi/sockets 0770 wifi wifi
mkdir /data/misc/dhcp 0770 dhcp dhcp
@@ -127,15 +131,6 @@ service fRom /system/bin/fRom \
class late_start
oneshot
-service hciattach /system/bin/brcm_patchram_plus --enable_hci --no2bytes --enable_lpm \
- --tosleep 50000 --baudrate 3000000 --use_baudrate_for_download --i2s=1,1,0,1 \
- --patchram /vendor/firmware/bcm4330.hcd /dev/ttyO1
- class main
- user bluetooth
- group bluetooth net_bt_admin
- disabled
- oneshot
-
service pvrsrvctl /vendor/bin/pvrsrvctl --start --no-module
class core
user root
@@ -165,11 +160,9 @@ service smc_pa_wvdrm /system/bin/smc_pa_ctrl \
group drmrpc
oneshot
-# create virtual SD card at /storage/sdcard0, based on the /data/media directory
-# daemon will drop to user/group system/media_rw after initializing
-# underlying files in /data/media will be created with user and group media_rw (1023)
-service sdcard /system/bin/sdcard /data/media 1023 1023
- class late_start
+# virtual sdcard daemon running as media_rw (1023)
+service sdcard /system/bin/sdcard /data/media /mnt/shell/emulated 1023 1023
+ class late_start
service p2p_supplicant /system/bin/wpa_supplicant \
-iwlan0 -Dnl80211 -c/data/misc/wifi/wpa_supplicant.conf -N \
@@ -194,7 +187,7 @@ service wpa_supplicant /system/bin/wpa_supplicant \
disabled
oneshot
-service dhcpcd_wlan0 /system/bin/dhcpcd -aABKL
+service dhcpcd_wlan0 /system/bin/dhcpcd -aABDKL
class main
disabled
oneshot
@@ -209,7 +202,7 @@ service dhcpcd_bnep0 /system/bin/dhcpcd -ABKL
disabled
oneshot
-service dhcpcd_eth0 /system/bin/dhcpcd -ABKL
+service dhcpcd_eth0 /system/bin/dhcpcd -ABDKL
class main
disabled
oneshot
diff --git a/kernel b/kernel
index 6b2ae13..ceec44e 100644
--- a/kernel
+++ b/kernel
Binary files differ
diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml
index c6df363..52cd198 100644
--- a/overlay/frameworks/base/core/res/res/values/config.xml
+++ b/overlay/frameworks/base/core/res/res/values/config.xml
@@ -213,7 +213,7 @@
bluetooth interfaces. If the device doesn't want to support tethering over bluetooth this
should be empty. -->
<string-array translatable="false" name="config_tether_bluetooth_regexs">
- <item>"bnep\\d"</item>
+ <item>"bt-pan"</item>
</string-array>
<!-- Array of ConnectivityManager.TYPE_xxxx values allowable for tethering -->
@@ -241,12 +241,6 @@
<bool name="config_ui_enableFadingMarquee">false</bool>
- <!-- Package name providing network location support. -->
- <string name="config_networkLocationProviderPackageName" translatable="false">com.google.android.location</string>
-
- <!-- Package name providing geocoder API support. -->
- <string name="config_geocodeProviderPackageName" translatable="false">com.google.android.location</string>
-
<!-- Is the notification LED intrusive? Used to decide if there should be a disable option -->
<bool name="config_intrusiveNotificationLed">true</bool>
diff --git a/overlay/frameworks/base/core/res/res/xml/storage_list.xml b/overlay/frameworks/base/core/res/res/xml/storage_list.xml
index 49cc7ae..344fe1e 100644
--- a/overlay/frameworks/base/core/res/res/xml/storage_list.xml
+++ b/overlay/frameworks/base/core/res/res/xml/storage_list.xml
@@ -17,31 +17,12 @@
*/
-->
-<!-- The <device> element should contain one or more <storage> elements.
- Exactly one of these should have the attribute primary="true".
- This storage will be the primary external storage and should have path="/mnt/sdcard".
- Each storage should have both a path and description attribute set.
- The following boolean attributes are optional:
-
- primary: this storage is the primary external storage
- removable: this is removable storage (for example, a real SD card)
- emulated: the storage is emulated via the FUSE sdcard daemon
- mtp-reserve: number of megabytes of storage MTP should reserve for free storage
- (used for emulated storage that is shared with system's data partition)
-
- A storage should not have both emulated and removable set to true
--->
+<!-- See storage config details at http://source.android.com/tech/storage/ -->
<StorageList xmlns:android="http://schemas.android.com/apk/res/android">
- <storage android:mountPoint="/storage/sdcard0"
- android:storageDescription="@string/storage_internal"
- android:primary="true"
- android:emulated="true"
- android:mtpReserve="100" />
-
- <storage android:mountPoint="/storage/usbdisk"
- android:storageDescription="@string/storage_usb"
- android:primary="false"
- android:removable="true" />
-
+ <!-- internal emulated storage -->
+ <storage
+ android:storageDescription="@string/storage_internal"
+ android:emulated="true"
+ android:mtpReserve="100" />
</StorageList>
diff --git a/overlay/packages/apps/Settings/res/values-cs/arrays.xml b/overlay/packages/apps/Settings/res/values-cs/arrays.xml
index 266d10e..265da14 100644
--- a/overlay/packages/apps/Settings/res/values-cs/arrays.xml
+++ b/overlay/packages/apps/Settings/res/values-cs/arrays.xml
@@ -21,11 +21,11 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string-array name="screen_timeout_entries">
- <item msgid="5314770629356662739">"15 s."</item>
- <item msgid="8672738773876256432">"30 s."</item>
- <item msgid="465923292941002466">"1 min."</item>
- <item msgid="7955177189296850016">"2 min."</item>
- <item msgid="1244255986255344525">"5 min."</item>
- <item msgid="294890536998091748">"10 min."</item>
+ <item msgid="5314770629356662739">"15 sekund"</item>
+ <item msgid="8672738773876256432">"30 sekund"</item>
+ <item msgid="465923292941002466">"1 minuta"</item>
+ <item msgid="7955177189296850016">"2 minuty"</item>
+ <item msgid="1244255986255344525">"5 minut"</item>
+ <item msgid="294890536998091748">"10 minut"</item>
</string-array>
</resources>
diff --git a/overlay/packages/apps/Settings/res/values-fa/arrays.xml b/overlay/packages/apps/Settings/res/values-fa/arrays.xml
index bf95ca8..71915a9 100644
--- a/overlay/packages/apps/Settings/res/values-fa/arrays.xml
+++ b/overlay/packages/apps/Settings/res/values-fa/arrays.xml
@@ -21,11 +21,11 @@
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string-array name="screen_timeout_entries">
- <item msgid="5314770629356662739">"15 ثانیه"</item>
- <item msgid="8672738773876256432">"30 ثانیه"</item>
- <item msgid="465923292941002466">"1 دقیقه"</item>
- <item msgid="7955177189296850016">"2 دقیقه"</item>
- <item msgid="1244255986255344525">"5 دقیقه"</item>
- <item msgid="294890536998091748">"10 دقیقه"</item>
+ <item msgid="5314770629356662739">"۱۵ ثانیه"</item>
+ <item msgid="8672738773876256432">"۳۰ ثانیه"</item>
+ <item msgid="465923292941002466">"۱ دقیقه"</item>
+ <item msgid="7955177189296850016">"۲ دقیقه"</item>
+ <item msgid="1244255986255344525">"۵ دقیقه"</item>
+ <item msgid="294890536998091748">"۱۰ دقیقه"</item>
</string-array>
</resources>
diff --git a/overlay/packages/apps/Settings/res/values-nb/arrays.xml b/overlay/packages/apps/Settings/res/values-nb/arrays.xml
index c5db781..a365905 100644
--- a/overlay/packages/apps/Settings/res/values-nb/arrays.xml
+++ b/overlay/packages/apps/Settings/res/values-nb/arrays.xml
@@ -23,9 +23,9 @@
<string-array name="screen_timeout_entries">
<item msgid="5314770629356662739">"15 sekunder"</item>
<item msgid="8672738773876256432">"30 sekunder"</item>
- <item msgid="465923292941002466">"Ett minutt"</item>
- <item msgid="7955177189296850016">"To minutter"</item>
- <item msgid="1244255986255344525">"Fem minutter"</item>
- <item msgid="294890536998091748">"Ti minutter"</item>
+ <item msgid="465923292941002466">"1 minutt"</item>
+ <item msgid="7955177189296850016">"2 minutter"</item>
+ <item msgid="1244255986255344525">"5 minutter"</item>
+ <item msgid="294890536998091748">"10 minutter"</item>
</string-array>
</resources>
diff --git a/overlay/packages/apps/Settings/res/values/bools.xml b/overlay/packages/apps/Settings/res/values/bools.xml
index 711eb51..b5e8b7b 100644
--- a/overlay/packages/apps/Settings/res/values/bools.xml
+++ b/overlay/packages/apps/Settings/res/values/bools.xml
@@ -17,6 +17,4 @@
<resources>
<!-- Show dock settings when docked -->
<bool name="has_dock_settings">true</bool>
- <!-- Enable user management -->
- <bool name="enable_user_management">true</bool>
</resources>
diff --git a/recovery/Android.mk b/recovery/Android.mk
index 874985a..72cd80e 100644
--- a/recovery/Android.mk
+++ b/recovery/Android.mk
@@ -1,4 +1,4 @@
-ifneq (,$(findstring $(TARGET_DEVICE),tuna toro torospr maguro toroplus))
+ifneq (,$(findstring $(TARGET_DEVICE),tuna toro toroplus maguro))
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
diff --git a/releasetools.py b/releasetools.py
index 056c7dc..b9dabdb 100644
--- a/releasetools.py
+++ b/releasetools.py
@@ -102,7 +102,7 @@ def WriteRadio(info, target_radio_img, source_radio_img=None):
if tf.sha1 == sf.sha1:
print "radio image unchanged; skipping"
else:
- diff = common.Difference(tf, sf)
+ diff = common.Difference(tf, sf, diff_program="bsdiff")
common.ComputeDifferences([diff])
_, _, d = diff.GetPatch()
if d is None or len(d) > tf.size * common.OPTIONS.patch_threshold:
diff --git a/ueventd.tuna.rc b/ueventd.tuna.rc
index 23cd5ab..00a8e37 100644
--- a/ueventd.tuna.rc
+++ b/ueventd.tuna.rc
@@ -44,3 +44,6 @@
/dev/modem_br 0660 radio radio
/dev/cdma_ramdump0 0660 radio radio
/dev/lte_ramdump0 0660 radio radio
+
+#for cp log
+/dev/cdma_cplog 0660 radio radio