samus: audio_CRASFormatConversion failure |
||||||||||
Issue description
,
May 21 2018
I created a CL to fix it. Now it can pass CRASFormatConversion test reliably. https://chromium-review.googlesource.com/c/chromiumos/third_party/adhd/+/1065482
,
May 29 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/adhd/+/cf87501cd6e1ad9c441e02797e63e36f23688baa commit cf87501cd6e1ad9c441e02797e63e36f23688baa Author: Yu-hsuan Hsu <yuhsuan@google.com> Date: Tue May 29 09:24:11 2018 CRAS: cras_alsa_io - Adjust appl_ptr correctly when leave no stream If we get into leave_free_run funcion before it becomes free run state, it will do nothing and appl_ptr won't be changed. It causes we need to play all of zero samples in device buffer. The next audio stream will have very long delay. We should fix it by adjust appl_ptr to correct position. First, we can use hw_level minus zeros filled before to get how many valid samples remaining. Then we compare it with the original offset we want to set (min_cb_level + min_buffer_level). (1) If valid_sample >= min_buffer_level + min_cb_level, new offset is the same as valid_sample. (2) If valid_sample < min_buffer_level + min_cb_level, we retain original offset and fill zeros after valid samples if we don't have enough zero samples in device buffer. BUG= chromium:845051 TEST=pass audio_CRASFormatConversion test reliably. TEST=unittest Change-Id: Ia9a89f617c5f06b0da3585b816136aefb8a0f179 Reviewed-on: https://chromium-review.googlesource.com/1065482 Commit-Ready: Yu-Hsuan Hsu <yuhsuan@chromium.org> Tested-by: Yu-Hsuan Hsu <yuhsuan@chromium.org> Reviewed-by: Cheng-Yi Chiang <cychiang@chromium.org> [modify] https://crrev.com/cf87501cd6e1ad9c441e02797e63e36f23688baa/cras/src/tests/alsa_io_unittest.cc [modify] https://crrev.com/cf87501cd6e1ad9c441e02797e63e36f23688baa/cras/src/server/cras_alsa_io.c
,
Jul 3
,
Aug 21
The CL is merged for a while and it's pretty safe. Need to merge the change to R68 to fix this bug trigger by http://crrev.com/c/1053620, which is merged in R68. The bug might cause some serious audio delay. Thanks!
,
Aug 21
,
Aug 22
,
Aug 22
,
Aug 22
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/adhd/+/58fcac609dd6d7fd2835f76281f015eabd892778 commit 58fcac609dd6d7fd2835f76281f015eabd892778 Author: Yu-hsuan Hsu <yuhsuan@google.com> Date: Wed Aug 22 07:24:56 2018 CRAS: cras_alsa_io - Adjust appl_ptr correctly when leave no stream If we get into leave_free_run funcion before it becomes free run state, it will do nothing and appl_ptr won't be changed. It causes we need to play all of zero samples in device buffer. The next audio stream will have very long delay. We should fix it by adjust appl_ptr to correct position. First, we can use hw_level minus zeros filled before to get how many valid samples remaining. Then we compare it with the original offset we want to set (min_cb_level + min_buffer_level). (1) If valid_sample >= min_buffer_level + min_cb_level, new offset is the same as valid_sample. (2) If valid_sample < min_buffer_level + min_cb_level, we retain original offset and fill zeros after valid samples if we don't have enough zero samples in device buffer. BUG= chromium:845051 BUG=b:112621593 TEST=pass audio_CRASFormatConversion test reliably. TEST=unittest Change-Id: Ia9a89f617c5f06b0da3585b816136aefb8a0f179 Previous-Reviewed-on: https://chromium-review.googlesource.com/1065482 (cherry picked from commit 0b34b8cd6049f4a61102112003a37833a7d45261) Reviewed-on: https://chromium-review.googlesource.com/1184661 Reviewed-by: Bernie Thompson <bhthompson@chromium.org> Commit-Queue: Bernie Thompson <bhthompson@chromium.org> Tested-by: Bernie Thompson <bhthompson@chromium.org> [modify] https://crrev.com/58fcac609dd6d7fd2835f76281f015eabd892778/cras/src/tests/alsa_io_unittest.cc [modify] https://crrev.com/58fcac609dd6d7fd2835f76281f015eabd892778/cras/src/server/cras_alsa_io.c
,
Aug 22
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/adhd/+/72769d06de999d2be430845adc1966a2557ee7b0 commit 72769d06de999d2be430845adc1966a2557ee7b0 Author: Yu-hsuan Hsu <yuhsuan@google.com> Date: Wed Aug 22 07:24:57 2018 CRAS: cras_alsa_io - Adjust appl_ptr correctly when leave no stream If we get into leave_free_run funcion before it becomes free run state, it will do nothing and appl_ptr won't be changed. It causes we need to play all of zero samples in device buffer. The next audio stream will have very long delay. We should fix it by adjust appl_ptr to correct position. First, we can use hw_level minus zeros filled before to get how many valid samples remaining. Then we compare it with the original offset we want to set (min_cb_level + min_buffer_level). (1) If valid_sample >= min_buffer_level + min_cb_level, new offset is the same as valid_sample. (2) If valid_sample < min_buffer_level + min_cb_level, we retain original offset and fill zeros after valid samples if we don't have enough zero samples in device buffer. BUG= chromium:845051 BUG=b:112621593 TEST=pass audio_CRASFormatConversion test reliably. TEST=unittest Change-Id: Ia9a89f617c5f06b0da3585b816136aefb8a0f179 Previous-Reviewed-on: https://chromium-review.googlesource.com/1065482 (cherry picked from commit 0b34b8cd6049f4a61102112003a37833a7d45261) Reviewed-on: https://chromium-review.googlesource.com/1183660 Reviewed-by: Bernie Thompson <bhthompson@chromium.org> Reviewed-by: Yu-Hsuan Hsu <yuhsuan@chromium.org> Commit-Queue: Bernie Thompson <bhthompson@chromium.org> Tested-by: Bernie Thompson <bhthompson@chromium.org> [modify] https://crrev.com/72769d06de999d2be430845adc1966a2557ee7b0/cras/src/tests/alsa_io_unittest.cc [modify] https://crrev.com/72769d06de999d2be430845adc1966a2557ee7b0/cras/src/server/cras_alsa_io.c
,
Aug 22
,
Sep 4
Problem solved. Close the issue. |
||||||||||
►
Sign in to add a comment |
||||||||||
Comment 1 by yuhsuan@chromium.org
, May 21 2018