Merge "audio: mux audio from AIF2 for BT mic/uplink" into jb-mr1-dev
diff --git a/audio/audio_hw.c b/audio/audio_hw.c
index 0e3c11f..5ecf398 100644
--- a/audio/audio_hw.c
+++ b/audio/audio_hw.c
@@ -69,6 +69,14 @@
.format = PCM_FORMAT_S16_LE,
};
+struct pcm_config pcm_config_in = {
+ .channels = 2,
+ .rate = 44100,
+ .period_size = 1024,
+ .period_count = 2,
+ .format = PCM_FORMAT_S16_LE,
+};
+
struct pcm_config pcm_config_sco = {
.channels = 1,
.rate = 8000,
@@ -538,7 +546,7 @@
{
struct audio_device *adev = in->dev;
- in->pcm = pcm_open(PCM_CARD, PCM_DEVICE, PCM_IN, &pcm_config);
+ in->pcm = pcm_open(PCM_CARD, PCM_DEVICE, PCM_IN, &pcm_config_in);
if (in->pcm && !pcm_is_ready(in->pcm)) {
ALOGE("pcm_open() failed: %s", pcm_get_error(in->pcm));
@@ -630,7 +638,7 @@
* multiple of 16 frames, as audioflinger expects audio buffers to
* be a multiple of 16 frames
*/
- size = (pcm_config.period_size * sample_rate) / pcm_config.rate;
+ size = (pcm_config_in.period_size * sample_rate) / pcm_config_in.rate;
size = ((size + 15) / 16) * 16;
return size * channel_count * audio_bytes_per_sample(format);
@@ -658,7 +666,7 @@
if (in->frames_in == 0) {
in->read_status = pcm_read(in->pcm,
(void*)in->buffer,
- pcm_frames_to_bytes(in->pcm, pcm_config.period_size));
+ pcm_frames_to_bytes(in->pcm, pcm_config_in.period_size));
if (in->read_status != 0) {
ALOGE("get_next_buffer() pcm_read error %d", in->read_status);
buffer->raw = NULL;
@@ -666,7 +674,7 @@
return in->read_status;
}
- in->frames_in = pcm_config.period_size;
+ in->frames_in = pcm_config_in.period_size;
/* Do stereo to mono conversion in place by discarding right channel */
for (i = 1; i < in->frames_in; i++)
@@ -675,7 +683,7 @@
buffer->frame_count = (buffer->frame_count > in->frames_in) ?
in->frames_in : buffer->frame_count;
- buffer->i16 = in->buffer + (pcm_config.period_size - in->frames_in);
+ buffer->i16 = in->buffer + (pcm_config_in.period_size - in->frames_in);
return in->read_status;
@@ -1399,7 +1407,7 @@
in->requested_rate = config->sample_rate;
in->input_source = AUDIO_SOURCE_DEFAULT;
- in->buffer = malloc(pcm_config.period_size * pcm_config.channels
+ in->buffer = malloc(pcm_config_in.period_size * pcm_config_in.channels
* audio_stream_frame_size(&in->stream.common));
if (!in->buffer) {
@@ -1407,11 +1415,11 @@
goto err_malloc;
}
- if (in->requested_rate != pcm_config.rate) {
+ if (in->requested_rate != pcm_config_in.rate) {
in->buf_provider.get_next_buffer = get_next_buffer;
in->buf_provider.release_buffer = release_buffer;
- ret = create_resampler(pcm_config.rate,
+ ret = create_resampler(pcm_config_in.rate,
in->requested_rate,
1,
RESAMPLER_QUALITY_DEFAULT,
diff --git a/init.manta.rc b/init.manta.rc
index bf36ac1..82f3004 100644
--- a/init.manta.rc
+++ b/init.manta.rc
@@ -5,19 +5,17 @@
# See storage config details at http://source.android.com/tech/storage/
mkdir /mnt/shell/emulated 0700 shell shell
- mkdir /storage/emulated 0000 root root
- mkdir /storage/emulated_legacy 0000 root root
+ mkdir /storage/emulated 0555 root root
- export EXTERNAL_STORAGE /storage/emulated_legacy
- export ADB_EXTERNAL_STORAGE /mnt/shell/emulated/0
-
+ 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 /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
mkdir /data/media 0770 media_rw media_rw
diff --git a/init.smdk5250.rc b/init.smdk5250.rc
index c5f316b..9a5dc56 100644
--- a/init.smdk5250.rc
+++ b/init.smdk5250.rc
@@ -3,19 +3,17 @@
on init
# See storage config details at http://source.android.com/tech/storage/
mkdir /mnt/shell/emulated 0700 shell shell
- mkdir /storage/emulated 0000 root root
- mkdir /storage/emulated_legacy 0000 root root
+ mkdir /storage/emulated 0555 root root
- export EXTERNAL_STORAGE /storage/emulated_legacy
- export ADB_EXTERNAL_STORAGE /mnt/shell/emulated/0
-
+ 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 /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
mkdir /data/media 0770 media_rw media_rw
diff --git a/kernel b/kernel
index a733b22..e143477 100644
--- a/kernel
+++ b/kernel
Binary files differ