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

Issue 698040 link

Starred by 2 users

Issue metadata

Status: Verified
Owner:
Last visit > 30 days ago
Closed: Mar 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

Add helper function in cras_utils to get active node volume

Project Member Reported by rjahagir@chromium.org, Mar 2 2017

Issue description

From Jimmy: 

Currently there is no such API.
But you can use get_cras_nodes() function in cras_utils.

nodes = cras_utils.get_cras_nodes()

It returns nodes in a tuple.

Looping through each node in nodes, you can check
e.g.
for n in nodes:
  print n['Active']
  print n['NodeVolume']
  print n['IsInput']

Then, you write a helper function in cras_utils to get selected output node volume. (Find the nodes where Active is 1, IsInput is 0, and get its NodeVolume)
There may be multiple nodes being selected though, so the interface of the API needs to take that into consideration.
 
Components: Test
Labels: OS-Chrome
Status: Assigned (was: Untriaged)
Project Member

Comment 3 by bugdroid1@chromium.org, Mar 16 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/autotest/+/87b951b01c2e473ca5d3c35c80a7af22ff794ad5

commit 87b951b01c2e473ca5d3c35c80a7af22ff794ad5
Author: Ruchi Jahagirdar <rjahagir@google.com>
Date: Thu Mar 16 21:23:45 2017

[Autotest] Adding get_active_node_volume

Adding get_active_node_volume method to cras_utils and modifying
platform_InputVolume to use this method.

BUG= chromium:698040 
TEST=None
Change-Id: I231fe25d2f3912b2e5654c054fac7b61b3246652
Reviewed-on: https://chromium-review.googlesource.com/452762
Commit-Ready: Ruchi Jahagirdar <rjahagir@chromium.org>
Tested-by: Ruchi Jahagirdar <rjahagir@chromium.org>
Reviewed-by: Ruchi Jahagirdar <rjahagir@chromium.org>
Reviewed-by: Kalin Stoyanov <kalin@chromium.org>

[modify] https://crrev.com/87b951b01c2e473ca5d3c35c80a7af22ff794ad5/client/cros/audio/cras_utils.py
[modify] https://crrev.com/87b951b01c2e473ca5d3c35c80a7af22ff794ad5/client/site_tests/platform_InputVolume/platform_InputVolume.py

Status: Fixed (was: Assigned)
Status: Verified (was: Fixed)

Sign in to add a comment