New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 643039 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Feature



Sign in to add a comment

Audio use cases support

Project Member Reported by chinyue@chromium.org, Sep 1 2016

Issue description

The requirement is that we can handle different processing for different audio use cases. Important use cases so far are:

- multimedia
- voice communication
- speech recognition
- pro audio


This is a meta bug for all required changes. Changes needed are:
(this is an in-complete list, only listed what I can think of now)

- CRAS to support multiple stream types. We already have it but don't really use it and it's probably broken.

- Multiple ALSA UCM configs support. Currently there's only one UCM being used. We need to able to apply different UCM config for different use case.

- Re-work how DSP is applied. CRAS only applies DSP in the output path. For some use cases we probably need DSP applied to input path as well.

 
Input DSP worked in the past, we had a setup for Beamer that used a LADSPA plugin on the input path to downmix mics.
Also need to plumb this to Chrome, once their multimedia streams changes are more defined.
Project Member

Comment 3 by bugdroid1@chromium.org, Oct 26 2016

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

commit 492ef0c27628a4b7725644998d5bf721aadb1da3
Author: Chinyue Chen <chinyue@chromium.org>
Date: Mon Oct 17 09:44:49 2016

CRAS: Support more stream types.

When a client opens a stream, CRAS can know from the stream type
specified to configure audio hardware by using corresponding UCM config
and apply DSP processing if needed.

This is the very first step to support audio use cases in CRAS.

BUG=chromium:643039
TEST=FEATURES="test" emerge-${BOARD} -v media-sound/adhd

Change-Id: I998eb2fba0c3a92b0012940db36539c7865fd498
Reviewed-on: https://chromium-review.googlesource.com/398942
Commit-Ready: Chinyue Chen <chinyue@chromium.org>
Tested-by: Chinyue Chen <chinyue@chromium.org>
Reviewed-by: Dylan Reid <dgreid@chromium.org>

[modify] https://crrev.com/492ef0c27628a4b7725644998d5bf721aadb1da3/cras/src/tests/rstream_unittest.cc
[modify] https://crrev.com/492ef0c27628a4b7725644998d5bf721aadb1da3/cras/src/server/cras_rstream.c
[modify] https://crrev.com/492ef0c27628a4b7725644998d5bf721aadb1da3/cras/src/common/cras_types.h

Project Member

Comment 4 by bugdroid1@chromium.org, Dec 9 2016

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

commit 9b631e24e0943ab1690cb93ffb916ffe23afe410
Author: Chinyue Chen <chinyue@chromium.org>
Date: Thu Dec 01 08:29:50 2016

CRAS: UCM - Introduce cras_use_case_mgr wrapper.

The cras_use_case_mgr wraps the ALSA snd_use_case_mgr and can hold the
selected use case for the ALSA card.  The benefit is that the use case
verb can be looked up from cras_use_case_mgr and doesn't need to be
passed around or hard-coded.  Following commits will make use of the new
wrapper.

BUG=chromium:643039
TEST=make check

Change-Id: I0ffe94e6d635c8c0b62aa5f9ccc40bf49808d1a3
Reviewed-on: https://chromium-review.googlesource.com/415749
Commit-Ready: Chinyue Chen <chinyue@chromium.org>
Tested-by: Chinyue Chen <chinyue@chromium.org>
Reviewed-by: Dylan Reid <dgreid@chromium.org>

[modify] https://crrev.com/9b631e24e0943ab1690cb93ffb916ffe23afe410/cras/src/tests/alsa_io_unittest.cc
[modify] https://crrev.com/9b631e24e0943ab1690cb93ffb916ffe23afe410/cras/src/tests/alsa_ucm_unittest.cc
[modify] https://crrev.com/9b631e24e0943ab1690cb93ffb916ffe23afe410/cras/src/tests/alsa_jack_unittest.cc
[modify] https://crrev.com/9b631e24e0943ab1690cb93ffb916ffe23afe410/cras/src/tests/alsa_card_unittest.cc
[modify] https://crrev.com/9b631e24e0943ab1690cb93ffb916ffe23afe410/cras/src/server/cras_alsa_jack.c
[modify] https://crrev.com/9b631e24e0943ab1690cb93ffb916ffe23afe410/cras/src/server/cras_alsa_ucm.c
[modify] https://crrev.com/9b631e24e0943ab1690cb93ffb916ffe23afe410/cras/src/server/cras_alsa_card.c
[modify] https://crrev.com/9b631e24e0943ab1690cb93ffb916ffe23afe410/cras/src/server/cras_alsa_jack.h
[modify] https://crrev.com/9b631e24e0943ab1690cb93ffb916ffe23afe410/cras/src/server/cras_alsa_ucm.h
[modify] https://crrev.com/9b631e24e0943ab1690cb93ffb916ffe23afe410/cras/src/server/cras_alsa_io.c
[modify] https://crrev.com/9b631e24e0943ab1690cb93ffb916ffe23afe410/cras/src/server/cras_alsa_io.h

Project Member

Comment 5 by bugdroid1@chromium.org, Dec 9 2016

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

commit fa88cc31818bb74c9b7832d9bcba9b025a69a845
Author: Chinyue Chen <chinyue@chromium.org>
Date: Mon Dec 05 08:51:42 2016

CRAS: UCM - Extract and expose ucm_set_use_case function.

The new ucm_set_ues_case function will be used later to change use case
in run-time.  It checks if the UCM config for the requested use case is
availalble, and uses default use case if not.

BUG=chromium:643039
TEST=make check

Change-Id: I499e2be999ad74c2996ee26d56e42e39892a02ee
Reviewed-on: https://chromium-review.googlesource.com/416531
Commit-Ready: Chinyue Chen <chinyue@chromium.org>
Tested-by: Chinyue Chen <chinyue@chromium.org>
Reviewed-by: Dylan Reid <dgreid@chromium.org>

[modify] https://crrev.com/fa88cc31818bb74c9b7832d9bcba9b025a69a845/cras/src/server/cras_alsa_ucm.c
[modify] https://crrev.com/fa88cc31818bb74c9b7832d9bcba9b025a69a845/cras/src/tests/alsa_ucm_unittest.cc
[modify] https://crrev.com/fa88cc31818bb74c9b7832d9bcba9b025a69a845/cras/src/server/cras_alsa_ucm.h

Project Member

Comment 6 by bugdroid1@chromium.org, Dec 12 2016

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

commit 50ce492b098eaf39afee087b894920fb0b3dafaa
Author: Chinyue Chen <chinyue@chromium.org>
Date: Mon Dec 05 09:28:01 2016

CRAS: UCM - Derive use case verb from cras_use_case_mgr.

The change eliminates the hard-coded use case verb and uses the
corresponding verb of the selected use case in snd_use_case_xxx
calls.

BUG=chromium:643039
TEST=make check && verify correct playback on DUT

Change-Id: Ide36b089abc62ae337387a1b48c364602aa2dcba
Reviewed-on: https://chromium-review.googlesource.com/416532
Commit-Ready: Chinyue Chen <chinyue@chromium.org>
Tested-by: Chinyue Chen <chinyue@chromium.org>
Reviewed-by: Hsinyu Chao <hychao@chromium.org>
Reviewed-by: Dylan Reid <dgreid@chromium.org>

[modify] https://crrev.com/50ce492b098eaf39afee087b894920fb0b3dafaa/cras/src/server/cras_alsa_ucm.c
[modify] https://crrev.com/50ce492b098eaf39afee087b894920fb0b3dafaa/cras/src/tests/alsa_ucm_unittest.cc

Project Member

Comment 7 by bugdroid1@chromium.org, Dec 12 2016

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

commit 50ce492b098eaf39afee087b894920fb0b3dafaa
Author: Chinyue Chen <chinyue@chromium.org>
Date: Mon Dec 05 09:28:01 2016

CRAS: UCM - Derive use case verb from cras_use_case_mgr.

The change eliminates the hard-coded use case verb and uses the
corresponding verb of the selected use case in snd_use_case_xxx
calls.

BUG=chromium:643039
TEST=make check && verify correct playback on DUT

Change-Id: Ide36b089abc62ae337387a1b48c364602aa2dcba
Reviewed-on: https://chromium-review.googlesource.com/416532
Commit-Ready: Chinyue Chen <chinyue@chromium.org>
Tested-by: Chinyue Chen <chinyue@chromium.org>
Reviewed-by: Hsinyu Chao <hychao@chromium.org>
Reviewed-by: Dylan Reid <dgreid@chromium.org>

[modify] https://crrev.com/50ce492b098eaf39afee087b894920fb0b3dafaa/cras/src/server/cras_alsa_ucm.c
[modify] https://crrev.com/50ce492b098eaf39afee087b894920fb0b3dafaa/cras/src/tests/alsa_ucm_unittest.cc

Project Member

Comment 8 by bugdroid1@chromium.org, Apr 25 2017

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

commit 8c14662b903b2cd16358ebdc060dce77a6fc98d7
Author: Chinyue Chen <chinyue@google.com>
Date: Tue Apr 25 21:04:03 2017

CRAS: test_client - Add option to specify stream type.

This makes it easy to create different type of streams to test audio use
cases.

BUG=chromium:643039
TEST=cras_test_client --playback_file /dev/urandom --stream_type 1

Change-Id: I379b87293ae5fbeca8534d271ab6f47c2e3149d6
Reviewed-on: https://chromium-review.googlesource.com/479495
Commit-Ready: Chinyue Chen <chinyue@chromium.org>
Tested-by: Chinyue Chen <chinyue@chromium.org>
Reviewed-by: Dylan Reid <dgreid@chromium.org>

[modify] https://crrev.com/8c14662b903b2cd16358ebdc060dce77a6fc98d7/cras/src/tests/cras_test_client.c

Project Member

Comment 9 by bugdroid1@chromium.org, May 3 2017

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

commit 5082f2462775c1e215d187496cc8fda3058ddd86
Author: Chinyue Chen <chinyue@google.com>
Date: Wed May 03 10:31:29 2017

CRAS: test_client - Display stream type in audio thread info.

BUG=chromium:643039
TEST=Start playback and verify the stream type is displayed in
     cras_test_client --dump_a output.

Change-Id: I4eb0d9835260a01fc7c07b56e19b41ffbbd61131
Reviewed-on: https://chromium-review.googlesource.com/479515
Commit-Ready: Chinyue Chen <chinyue@chromium.org>
Tested-by: Chinyue Chen <chinyue@chromium.org>
Reviewed-by: Chinyue Chen <chinyue@chromium.org>

[modify] https://crrev.com/5082f2462775c1e215d187496cc8fda3058ddd86/cras/src/tests/cras_test_client.c
[modify] https://crrev.com/5082f2462775c1e215d187496cc8fda3058ddd86/cras/src/server/audio_thread.c
[modify] https://crrev.com/5082f2462775c1e215d187496cc8fda3058ddd86/cras/src/common/cras_types.h

Owner: cychiang@chromium.org

Sign in to add a comment