author | Jian Xu <jian.xu@amlogic.com> | 2018-01-30 10:31:23 (GMT) |
---|---|---|
committer | Gerrit Code Review <gituser@scgit.amlogic.com> | 2018-01-30 10:31:23 (GMT) |
commit | 9d04629e77443d89117589d19065942c04c42e2c (patch) | |
tree | 8651bb05dab44be33fa539d09fb3baa75c0ad0b6 | |
parent | 908dadcd1a255e118ef7572be950fc7b56e6f240 (diff) | |
parent | d9a5234049224989dab628c94a335e5f7cfc63d7 (diff) | |
download | audio-9d04629e77443d89117589d19065942c04c42e2c.zip audio-9d04629e77443d89117589d19065942c04c42e2c.tar.gz audio-9d04629e77443d89117589d19065942c04c42e2c.tar.bz2 |
Merge "Audio: fix trembling sound when playing video or audio on Android 8.1 [2/2]" into o-mr1-amlogic
-rw-r--r-- | audio_hw.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -1705,12 +1705,13 @@ if (!(adev->out_device & AUDIO_DEVICE_OUT_ALL_SCO)) { if (out->is_tv_platform == 1) { int16_t *tmp_buffer = (int16_t *)out->audioeffect_tmp_buffer; memcpy((void *)tmp_buffer, (void *)in_buffer, out_frames * 4); - audio_effect_process(stream, tmp_buffer, out_frames); + ALOGV("Amlogic - disable audio_data_process(), and replace tmp_buffer data with in_buffer data.\n"); + //audio_effect_process(stream, tmp_buffer, out_frames); for (i = 0; i < out_frames; i ++) { out->tmp_buffer_8ch[8 * i] = ((int32_t)(in_buffer[2 * i])) << 16; out->tmp_buffer_8ch[8 * i + 1] = ((int32_t)(in_buffer[2 * i + 1])) << 16; - out->tmp_buffer_8ch[8 * i + 2] = ((int32_t)(tmp_buffer[2 * i])) << 16; - out->tmp_buffer_8ch[8 * i + 3] = ((int32_t)(tmp_buffer[2 * i + 1])) << 16; + out->tmp_buffer_8ch[8 * i + 2] = ((int32_t)(in_buffer[2 * i])) << 16; + out->tmp_buffer_8ch[8 * i + 3] = ((int32_t)(in_buffer[2 * i + 1])) << 16; out->tmp_buffer_8ch[8 * i + 4] = 0; out->tmp_buffer_8ch[8 * i + 5] = 0; out->tmp_buffer_8ch[8 * i + 6] = 0; |