New issue
Advanced search Search tips

Issue 881724 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

CRAS underrun ops update

Project Member Reported by yuhsuan@chromium.org, Sep 7

Issue description

We are trying to make underrun ops in CRAS more effective.
See https://docs.google.com/document/d/1AxRP1-GN0Zy7T4ebfsykmJcynzoay6Xjs-gOK0poPnE/edit#heading=h.xgjl2srtytjt for more information.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Sep 14

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/adhd/+/ac429fff80faaf1768332858f0e483379ea6f1aa

commit ac429fff80faaf1768332858f0e483379ea6f1aa
Author: Yu-Hsuan Hsu <yuhsuan@chromium.org>
Date: Fri Sep 14 01:58:56 2018

CRAS: cras_alsa_io - Increase appl_ptr when underrun happens

Move appl_ptr to min_buffer_level + 1.5 * min_cb_level frames ahead
of hw_ptr instead of min_buffer_level + min_cb_level.

It is because original offset is not enough. Considering calculation
time, the total consumption might be larger than min_cb_level. It may
cause underrun happens again. We need to increase offset to see whether
the situation can be improved.

In addition, I added the new argument rate in adjust_appl_ptr function.
So that we can keep adjusting appl_ptr to min_buffer_level +
min_cb_level from leaving free run.

BUG=chromium:881724
TEST=CRAS works fine on peppy.

Change-Id: Ifef1988c79a256d85494929459214a2aae4dfbc7
Reviewed-on: https://chromium-review.googlesource.com/1212628
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Yu-Hsuan Hsu <yuhsuan@chromium.org>
Reviewed-by: Dylan Reid <dgreid@chromium.org>

[modify] https://crrev.com/ac429fff80faaf1768332858f0e483379ea6f1aa/cras/src/tests/alsa_io_unittest.cc
[modify] https://crrev.com/ac429fff80faaf1768332858f0e483379ea6f1aa/cras/src/server/cras_alsa_io.c

Sign in to add a comment