Add helper function in cras_utils to get active node volume |
||||
Issue descriptionFrom 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.
,
Mar 9 2017
,
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
,
Mar 16 2017
,
Mar 28 2017
|
||||
►
Sign in to add a comment |
||||
Comment 1 by rjahagir@chromium.org
, Mar 2 2017Labels: OS-Chrome