History log of /external/autotest/client/cros/chameleon/chameleon_audio_helper.py
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
cdc9373aa256d266a1895a8856c52670ef45328e 08-Nov-2016 Cheng-Yi Chiang <cychiang@chromium.org> [autotest] chameleon: set proper gain on internal microphone

On some board the internal microphone gain is too large. Since there is
no automatic gain control in the test, we set a proper gain before
recording to solve this problem.

BUG=chromium:661709
TEST=run audio_AudioBasicInternalMicrophone test on chell, can pass.
TEST=run audio_AudioBasicInternalMicrophone test on yuna, can not pass,
but see the gain is smaller.

Change-Id: I772ad70dd905e92ff517c8d7ea06bfc82d4e1b1e
Reviewed-on: https://chromium-review.googlesource.com/408852
Commit-Ready: Cheng-Yi Chiang <cychiang@chromium.org>
Tested-by: Cheng-Yi Chiang <cychiang@chromium.org>
Reviewed-by: Wai-Hong Tam <waihong@google.com>
/external/autotest/client/cros/chameleon/chameleon_audio_helper.py
6f03d609d380068e5ee789fed6c0bcac1f51ebf2 13-Sep-2016 Cheng-Yi Chiang <cychiang@chromium.org> [autotest] chameleon: Fix plug handler logic

Plug handler with jack plugger should only be used if it is available
and needed, otherwise, use dummy plug handler.

BUG=chromium:646004
TEST=run audio_AudioBasic{USBPlayback, USBRecord, Headphone,
ExternalMicrophone} test on cyan

Change-Id: If200f947ba7dec5961a1fa541ad7642a1aa8bd96
Reviewed-on: https://chromium-review.googlesource.com/384319
Commit-Ready: Cheng-Yi Chiang <cychiang@chromium.org>
Tested-by: Cheng-Yi Chiang <cychiang@chromium.org>
Reviewed-by: Kalin Stoyanov <kalin@chromium.org>
/external/autotest/client/cros/chameleon/chameleon_audio_helper.py
c9dba03dba81100a46fa7919e9328b206d0ab08f 05-Sep-2016 Cheng-Yi Chiang <cychiang@chromium.org> [autotest] audio_widget_arc: Add CrosOutputWidgetARCHandler

Add a handler to support playback through ARC.
It will be used if user set use_arc=True when creating widgets.

In CrosOutputWidgetARCHandler, handle format conversion from raw to wav,
which can be played by Play Music app in ARC.

BUG=chromium:644036
TEST=not used yet.

Change-Id: I8e4b09e0ca00f1edf59858fb7e100ad005c3fc47
Reviewed-on: https://chromium-review.googlesource.com/381195
Commit-Ready: Cheng-Yi Chiang <cychiang@chromium.org>
Tested-by: Cheng-Yi Chiang <cychiang@chromium.org>
Reviewed-by: Shyh-In Hwang <josephsih@chromium.org>
/external/autotest/client/cros/chameleon/chameleon_audio_helper.py
c305c8b18a44ab131883e08f0377c5106d112131 06-Sep-2016 Cheng-Yi Chiang <cychiang@chromium.org> [autotest] chameleon_audio_helper: Fix bug in input widget handler

use_arc should be checked before is_usb.
USB widget handler is used when Cros device records from USB port using
cras_test_client.
ARC widget handler is used when Cros device records through microphone
app. In this case, CRAS will handle the recording and hides the USB
detail from app.
With this change, we can enable audio recording test for ARC through
USB in the future.

BUG=b:30005964
TEST=run audio_AudioARCRecord test

Change-Id: Id45a0800f848a6e2fe634f8610f8a944f0418f3e
Reviewed-on: https://chromium-review.googlesource.com/381534
Commit-Ready: Cheng-Yi Chiang <cychiang@chromium.org>
Tested-by: Cheng-Yi Chiang <cychiang@chromium.org>
Reviewed-by: Shyh-In Hwang <josephsih@chromium.org>
/external/autotest/client/cros/chameleon/chameleon_audio_helper.py
52bfcdc9527192e527febe7eef2e2530a0000517 02-Sep-2016 Cheng-Yi Chiang <cychiang@chromium.org> [autotest] audio_widget: Remove USBPlugHandler

Since Chameleon with 4.2 kernel supports pull-up resistor control on USB
port, we don't need USBPlugHandler to control USB facade to reset USB
controller or bind/unbind driver.

Remove USBPlugHandler and use DummyPlugHandler for USB widget link.

The USB facade is not removed since it might be useful to control USB
controller in other use cases.

BUG=chromium:616712
TEST=run audio_AudioBasicUSBPlayback and audio_AudioBasicUSBRecord test
on samus.

Change-Id: I543736017a4b8df75499534e87ac431b914972e1
Reviewed-on: https://chromium-review.googlesource.com/380442
Commit-Ready: Cheng-Yi Chiang <cychiang@chromium.org>
Tested-by: Cheng-Yi Chiang <cychiang@chromium.org>
Reviewed-by: Wai-Hong Tam <waihong@google.com>
/external/autotest/client/cros/chameleon/chameleon_audio_helper.py
a52584f05723aa3e1295d015f62fb2b718f24dd6 11-Aug-2016 Cheng-Yi Chiang <cychiang@chromium.org> [autotest] audio_widget_arc: Add module for widget handler through ARC

In audio widget framework, extend CrosInputWidgetHandler to
CrosInputARCWidgetHandler. Override the recording related functions to use
ARC methods provided by audio_facade.

Use that handler if widget is created with use_arc argument.

BUG=b:30005964
TEST=not used yet.

Change-Id: Ic14f519a82fbe946c434ad93c7d2ad50c21b2db0
Reviewed-on: https://chromium-review.googlesource.com/369043
Commit-Ready: Cheng-Yi Chiang <cychiang@chromium.org>
Tested-by: Cheng-Yi Chiang <cychiang@chromium.org>
Reviewed-by: Wai-Hong Tam <waihong@google.com>
/external/autotest/client/cros/chameleon/chameleon_audio_helper.py
f32c3d973d6817c4d81d64d5d0af09e5bbe6e104 22-Jun-2016 Cheng-Yi Chiang <cychiang@chromium.org> [autotest] chameleon: Move comparison method to audio_test_utils

This patch does following refactoring:
1. Move compare_recorded_result from chameleon_audio_helper to
audio_test_utils, and rename it to compare_recorded_correlation.
2. Remove 'method' argument because correlation is the only method.
There is another frequency comparison function to call.
3. Cleanup legacy frequency comparison method because now we use
spectral analysis method instead.
4. Raise error.TestFail with error messages when comparison fails.

BUG=chromium:620930
TEST=run audio_AudioBasicHDMI, audio_AudioBasicUSBPlayback,
audio_AudioBasicUSBPlaybackRecord, audio_AudioBasicUSBRecord test on
samus.

Change-Id: I5e9a4cb323e21af013314385b10b1fabc2dfa50e
Reviewed-on: https://chromium-review.googlesource.com/354892
Commit-Ready: Cheng-Yi Chiang <cychiang@chromium.org>
Tested-by: Cheng-Yi Chiang <cychiang@chromium.org>
Reviewed-by: Kalin Stoyanov <kalin@chromium.org>
/external/autotest/client/cros/chameleon/chameleon_audio_helper.py
8a47f4459b0dbac1680ee83c7a4a0303a00ec171 04-Mar-2016 Cheng-Yi Chiang <cychiang@chromium.org> [autotest] chameleon_audio_helpers: Let bind_widgets be more flexible

Let bind_widgets accept binder as None so it is easier for user to share
test logic among different paths.

BUG=chromium:591641
TEST=not used yet

Change-Id: I1f865d94be6810178e6cb1ab7d37ca805910eeb2
Reviewed-on: https://chromium-review.googlesource.com/330576
Commit-Ready: Cheng-Yi Chiang <cychiang@chromium.org>
Tested-by: Cheng-Yi Chiang <cychiang@chromium.org>
Reviewed-by: Kalin Stoyanov <kalin@chromium.org>
/external/autotest/client/cros/chameleon/chameleon_audio_helper.py
c27db0580a365096813aa03ce3d8b413d5ba1064 04-Mar-2016 Cheng-Yi Chiang <cychiang@chromium.org> [autotest] Chameleon: Encapsulate EDID and extra plug/unplug to HDMI link

Move logic of setting EDID and extra plug/unplug quirk into
HDMIWidgetLink.
Override connect/disconnect methods to set EDID and do extra plug/unplug
in connect. Restores EDID in disconnect.
The connect and disconnect of a link is in widget binder's with clause so EDID
will be restored in the end even if test fails.
This refactoring helps test user to share common test logic among
different audio devices.

BUG=chromium:591641
TEST=run audio_AudioBasicHDMI test on peach_pit which needs plug/unplug
quirk.

Change-Id: Icd448e028c9fee910da57b7e6106650b76286f95
Reviewed-on: https://chromium-review.googlesource.com/330482
Commit-Ready: Cheng-Yi Chiang <cychiang@chromium.org>
Tested-by: Cheng-Yi Chiang <cychiang@chromium.org>
Reviewed-by: Wai-Hong Tam <waihong@chromium.org>
/external/autotest/client/cros/chameleon/chameleon_audio_helper.py
fa029e520ff28d6caa761060e1b78d868901d67c 04-Mar-2016 Cheng-Yi Chiang <cychiang@chromium.org> [autotest] audio_widget: Add ChameleonHDMIInputWidgetHandler

Add a class ChameleonHDMIInputWidgetHandler to handle HDMI input on
Chameleon. This widget handler provides methods to set EDID on this port.
It needs access to display_facade so it can find video port and
set/restore EDID through video port.

BUG=chromium:591641
TEST=Run audi_AudioBasicHDMI test. Methods related to EDID will be used
in the next CL.

Change-Id: Ibaa56d5d207631636115a97d188da8e67a22a624
Reviewed-on: https://chromium-review.googlesource.com/330481
Commit-Ready: Cheng-Yi Chiang <cychiang@chromium.org>
Tested-by: Cheng-Yi Chiang <cychiang@chromium.org>
Reviewed-by: Wai-Hong Tam <waihong@chromium.org>
/external/autotest/client/cros/chameleon/chameleon_audio_helper.py
8bb71497c37767a62c6b34c1aacf1069fb6f650c 11-Nov-2015 Nicolas Boichat <drinkcat@google.com> Chameleon: Refactor JackPlugger as a handler

Clean up the plugger code to make it easier to extend:
- Get rid of DummyAudioJackPlugger: AudioBoard either reports a
motor plugger, or nothing
- Add JackPluggerPlugHandler to handler the motor plugger
- Remove jack_plugger parameter from AudioBusLink, instead relying
on Handlers.

BUG=chromium:554447
TEST=Run audio_AudioBasicHeadphone on a board with a motor plugger

Change-Id: Id7a74d066009bd804d84f42c8789b09fff3c7575
Reviewed-on: https://chromium-review.googlesource.com/312161
Commit-Ready: Nicolas Boichat <drinkcat@chromium.org>
Tested-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-by: Wai-Hong Tam <waihong@chromium.org>
/external/autotest/client/cros/chameleon/chameleon_audio_helper.py
38c18b0d75458170587f30d9c503a67c97b8e0d1 04-Sep-2015 Selina Liu <hsuying@google.com> audio_helper: Add 'parameters' argument to comparing functions

BUG=chromium:514541
TEST=not used yet.

Change-Id: I5a4e904c61272f257c3d28044904a271fffe2193
Reviewed-on: https://chromium-review.googlesource.com/297695
Commit-Ready: Cheng-Yi Chiang <cychiang@chromium.org>
Tested-by: Cheng-Yi Chiang <cychiang@chromium.org>
Reviewed-by: Cheng-Yi Chiang <cychiang@chromium.org>
/external/autotest/client/cros/chameleon/chameleon_audio_helper.py
d63256fb9a5744152eb3ded05a83375f6860b217 04-Sep-2015 Selina Liu <hsuying@google.com> audio_widget: Refactor, subclass and add field to store playback file data format

Refactor with method _scale_and_send_playback_data so that subclasses
like ChameleonLineOutOutputWidgetHandler can use. Add a field to store
playback file data format to ChameleonOutputWidgetHandler.

BUG=chromium:514541
TEST=not used yet.

Change-Id: I888a4ee2277f0324f46535b6d52f533085aeb36e
Reviewed-on: https://chromium-review.googlesource.com/297694
Commit-Ready: Cheng-Yi Chiang <cychiang@chromium.org>
Tested-by: Cheng-Yi Chiang <cychiang@chromium.org>
Reviewed-by: Cheng-Yi Chiang <cychiang@chromium.org>
/external/autotest/client/cros/chameleon/chameleon_audio_helper.py
f5a2383ef2feb0b00d481725085b31da01beaab7 04-Sep-2015 Selina Liu <hsuying@google.com> audio_widget: Subclass CrosInputWidgetHandler for USB

Added a new subclass CrosUSBInputWidgetHandler.

BUG=chromium:514541
TEST=not used yet.

Change-Id: Idc9f6f77b2a3f95b4227aa8894501f4bd2804366
Reviewed-on: https://chromium-review.googlesource.com/297693
Commit-Ready: Cheng-Yi Chiang <cychiang@chromium.org>
Tested-by: Cheng-Yi Chiang <cychiang@chromium.org>
Reviewed-by: Cheng-Yi Chiang <cychiang@chromium.org>
/external/autotest/client/cros/chameleon/chameleon_audio_helper.py
6912540d6887cbe7cc39171ddf9f1f3036478abd 01-Sep-2015 Selina Liu <hsuying@google.com> chameleon_audio_helper: Implement create_link for USBWidgetLinks

A USBController object is added to the factory and passed to
constructor of USBWidgetLinks. It is needed for changing
playback/capture configurations of the USB audio widget on Chameleon.

BUG=chromium:514541
TEST=not used yet.

Change-Id: I5632440fc77d91056ef9689a896305b275dbfbce
Reviewed-on: https://chromium-review.googlesource.com/296632
Commit-Ready: Cheng-Yi Chiang <cychiang@chromium.org>
Tested-by: Cheng-Yi Chiang <cychiang@chromium.org>
Reviewed-by: Cheng-Yi Chiang <cychiang@chromium.org>
/external/autotest/client/cros/chameleon/chameleon_audio_helper.py
b6b8cbe75d507c76ff69e08a9675d4b7450b96a7 01-Sep-2015 Selina Liu <hsuying@google.com> chameleon_audio_helper: Add USB Ids to AudioLinkFactory's LINK_TABLE

Corresponding types of USBWidgetLinks are specified for the widget pairs
with USB Ids.

BUG=chromium:514541
TEST=not used yet.

Change-Id: I7bd94757a850872bd3bb95dfc2d7d42a6b14142b
Reviewed-on: https://chromium-review.googlesource.com/296631
Commit-Ready: Cheng-Yi Chiang <cychiang@chromium.org>
Tested-by: Cheng-Yi Chiang <cychiang@chromium.org>
Reviewed-by: Cheng-Yi Chiang <cychiang@chromium.org>
/external/autotest/client/cros/chameleon/chameleon_audio_helper.py
fd47cd1787d54b33192beeda7a7d7a0f1983bc7e 01-Sep-2015 Selina Liu <hsuying@google.com> chameleon_audio_helper: implement create_cros_handler for USB ports

In the existing helper method _create_cros_handler, add checks for USB
audio port. If the audio port of the Cros-side widget is of USB type,
create CrosWidgetHandler with a USBPlugHandler for that widget.

BUG=chromium:514541
TEST=not used yet.

Change-Id: I99452d56b4a2ff83b11c9470671bde1d41b5a95a
Reviewed-on: https://chromium-review.googlesource.com/296247
Commit-Ready: Cheng-Yi Chiang <cychiang@chromium.org>
Tested-by: Cheng-Yi Chiang <cychiang@chromium.org>
Reviewed-by: Cheng-Yi Chiang <cychiang@chromium.org>
/external/autotest/client/cros/chameleon/chameleon_audio_helper.py
829542e9f7efb451c3550e7c49eb00450951f6de 01-Sep-2015 Selina Liu <hsuying@google.com> audio_widget: Add PlugHandler as an attribute to CrosWidgetHandler

Plug and Unplug actions of a CrosWidgetHandler object are now exclusively
handled by a dedicated PlugHandler object, which is fed to the
constructor of CrosWidgetHandler (and instances of its subclasses).

BUG=chromium:514541
TEST=not used yet.

Change-Id: Ib27564fe9de8d0544c3103140cd5268f3c13d197
Reviewed-on: https://chromium-review.googlesource.com/296246
Commit-Ready: Cheng-Yi Chiang <cychiang@chromium.org>
Tested-by: Cheng-Yi Chiang <cychiang@chromium.org>
Reviewed-by: Cheng-Yi Chiang <cychiang@chromium.org>
/external/autotest/client/cros/chameleon/chameleon_audio_helper.py
564ed0248723e84e1634cd2a39cf0a2da98292ba 01-Sep-2015 Selina Liu <hsuying@google.com> chameleon_audio_helper: Add usb_facade to AudioWidgetFactory

usb_facade is a USBFacadeRemoteAdapter object that will be needed
for Cros devices with USB ports to implement its Plug and Unplug.

BUG=chromium:514541
TEST=not used yet.

Change-Id: I22de1c31a5f6de20a49c0b4be65794038072873b
Reviewed-on: https://chromium-review.googlesource.com/296243
Commit-Ready: Cheng-Yi Chiang <cychiang@chromium.org>
Tested-by: Cheng-Yi Chiang <cychiang@chromium.org>
Reviewed-by: Cheng-Yi Chiang <cychiang@chromium.org>
/external/autotest/client/cros/chameleon/chameleon_audio_helper.py
d690b0a62b7b5e3732bd009eaa29369cab786c21 02-Jun-2015 Cheng-Yi Chiang <cychiang@chromium.org> chameleon: Reuse BluetoothDevice object in AudioLinkFactory

These two bluetooth links should use the same BluetoothDevice object:
1.Cros bluetooth headphone and bluetooth module Rx.
2.Cros bluetooth microphone and bluetooth module Tx.
This will be used when a test uses playback/record function of
bluetooth at the same time.

BUG=chromium:476860
TEST=not used yet.

Change-Id: I8a177184d9d1736845989162605c9dfad18bd605
Reviewed-on: https://chromium-review.googlesource.com/274698
Reviewed-by: Hung-ying Tyan <tyanh@chromium.org>
Commit-Queue: Cheng-Yi Chiang <cychiang@chromium.org>
Tested-by: Cheng-Yi Chiang <cychiang@chromium.org>
/external/autotest/client/cros/chameleon/chameleon_audio_helper.py
10cdd4337a690a4bd4d625fe1ed968c9468fbd48 30-May-2015 Cheng-Yi Chiang <cychiang@chromium.org> chameleon: Let create_binder handles multiple widgets

Adds a new class WidgetBinderChain to handle multiple binders.
Lets create_binder supports three or more widgets, e.g. To connect
Chamaleon LineIn -> Bluetooth module on audio board -> Bluetooth
microphone on Cros device, user can calls create_binder() and pass in
three widgets in correct sequence.

BUG=chromium:476860
TEST=not used yet.

Change-Id: Iea74f7677b84908923b76985fde2fb2218f33c5b
Reviewed-on: https://chromium-review.googlesource.com/274342
Reviewed-by: Hung-ying Tyan <tyanh@chromium.org>
Commit-Queue: Cheng-Yi Chiang <cychiang@chromium.org>
Tested-by: Cheng-Yi Chiang <cychiang@chromium.org>
/external/autotest/client/cros/chameleon/chameleon_audio_helper.py
d43b0a1d60be6d821d9e85fd0f2ed279e4b6e676 01-Jun-2015 Cheng-Yi Chiang <cychiang@chromium.org> chameleon: Create bluetooth widget links

Creates subclass of BluetoothWidgetLink for connections between bluetoot module
and Cros device.

BUG=chromium:476860
TEST=not used yet.

Change-Id: Ie5896132a6e9f332b804e8a003598e9f55cf392b
Reviewed-on: https://chromium-review.googlesource.com/274341
Commit-Queue: Cheng-Yi Chiang <cychiang@chromium.org>
Tested-by: Cheng-Yi Chiang <cychiang@chromium.org>
Reviewed-by: Cheng-Yi Chiang <cychiang@chromium.org>
/external/autotest/client/cros/chameleon/chameleon_audio_helper.py
e85145e19b98d2a646cdcbfcdcab6c23d0ea8c8b 01-Jun-2015 Cheng-Yi Chiang <cychiang@chromium.org> chameleon: Pass cros_host into AudioWidgetFactory and AudioLinkFactory

AudioWidgetFactory and AudioLinkFactory can use cros_host to access
chameleon board of this Cros device host. Also, AudioLinkFactory will
use this cros_host to access bluetooth adapter on the Cros device.

BUG=chromium:476860
TEST=not used yet

Change-Id: I578f0185d2c0006481163e3bd260d7a6f7cc235e
Reviewed-on: https://chromium-review.googlesource.com/274339
Reviewed-by: Hung-ying Tyan <tyanh@chromium.org>
Commit-Queue: Cheng-Yi Chiang <cychiang@chromium.org>
Tested-by: Cheng-Yi Chiang <cychiang@chromium.org>
/external/autotest/client/cros/chameleon/chameleon_audio_helper.py
0669885c512b300cbd9337c935977b1862989e45 30-May-2015 Cheng-Yi Chiang <cychiang@chromium.org> chameleon: Add PeripheralWidget and use it for peripheral widget

Peripheral widgets should use PeripheralWidget class. The main usage of
this class is to identify the link type and do the real work on the
link.

BUG=chromium:476860
TEST=not used yet

Change-Id: I145e87556ff31e6598d3a32980613e125ef1e3d1
Reviewed-on: https://chromium-review.googlesource.com/274337
Reviewed-by: Cheng-Yi Chiang <cychiang@chromium.org>
Commit-Queue: Cheng-Yi Chiang <cychiang@chromium.org>
Tested-by: Cheng-Yi Chiang <cychiang@chromium.org>
/external/autotest/client/cros/chameleon/chameleon_audio_helper.py
9d0e978be4befaa0f6a6877016a19059b094b4ae 01-Jun-2015 Cheng-Yi Chiang <cychiang@chromium.org> chameleon: Add link support between bluetooth module and Chameleon

1. Add endpoint definition in AudioBus so audio path can be routed
between Chameleon and bluetooth module.
2. Create link for connection between Chameleon and bluetooth module.

BUG=chromium:476860
TEST=not used yet

Change-Id: I0ed510282af89661ed860588ad44c09b7eaff814
Reviewed-on: https://chromium-review.googlesource.com/274335
Commit-Queue: Cheng-Yi Chiang <cychiang@chromium.org>
Tested-by: Cheng-Yi Chiang <cychiang@chromium.org>
Reviewed-by: Cheng-Yi Chiang <cychiang@chromium.org>
/external/autotest/client/cros/chameleon/chameleon_audio_helper.py
1ccbce5a61c231a4de13f1a9309759c683cfbff5 22-May-2015 Cheng-Yi Chiang <cychiang@chromium.org> chameleon: Fix a typo in AudioLinkFactory

BUG=None
TEST=not used yet

Change-Id: I10a4d7b3c8cbf1447a66a6bc29ae5a1fccf02289
Reviewed-on: https://chromium-review.googlesource.com/273147
Reviewed-by: Hung-ying Tyan <tyanh@chromium.org>
Commit-Queue: Cheng-Yi Chiang <cychiang@chromium.org>
Tested-by: Cheng-Yi Chiang <cychiang@chromium.org>
/external/autotest/client/cros/chameleon/chameleon_audio_helper.py
a441b7806135e244f5ede62a3f797cc70f31c972 10-Apr-2015 Cheng-Yi Chiang <cychiang@chromium.org> chameleon: Integrate audio jack plugger into audio widget framework

When widget link plugs/unplugs a widget of host "Cros", check if there
is audio jack plugger to actually plug/unplug audio jack using motor in
the audio box. For those configuration with audio board but without
audio box, assume audio jack is connected permanently.

BUG=chromium:472906
TEST=run audio_AudioBasicExternalMicrophone and
audio_AudioBasicHeadphone test with audio box.

Change-Id: Ifa4c68e8c8494158ef0db82d17b955902afe4273
Reviewed-on: https://chromium-review.googlesource.com/265211
Reviewed-by: Cheng-Yi Chiang <cychiang@chromium.org>
Tested-by: Cheng-Yi Chiang <cychiang@chromium.org>
Commit-Queue: Cheng-Yi Chiang <cychiang@chromium.org>
/external/autotest/client/cros/chameleon/chameleon_audio_helper.py
d2deb76417253c62ab77f1c1c651c4a32e96cb0f 26-Mar-2015 Cheng-Yi Chiang <cychiang@chromium.org> chameleon: Add link type for Peripheral MIC to Chameleon LineIn

This will be used in internal speaker test, where Chameleon records
audio using peripheral mic to test internal speaker function on Cros
device.

BUG=chromium:463813
TEST=not used yet
Change-Id: Ia6c2b72cc341f031f2901f70ed4740354fef4383
Reviewed-on: https://chromium-review.googlesource.com/262548
Reviewed-by: Wai-Hong Tam <waihong@chromium.org>
Commit-Queue: Cheng-Yi Chiang <cychiang@chromium.org>
Tested-by: Cheng-Yi Chiang <cychiang@chromium.org>
/external/autotest/client/cros/chameleon/chameleon_audio_helper.py
47b3f8c350c6d74a8d16c42456171f1314ccf136 26-Mar-2015 Cheng-Yi Chiang <cychiang@chromium.org> chameleon: Add widget link for peripheral speaker

Add a class AudioBusChameleonToPeripheralLink as a widget link to
peripheral speaker.
Also, fix audio_level that NO_SCALE should be 1.0 instead of None.
This change prepares the infrastructure needed for internal mic test.

BUG=chromium:463813
TEST=not used yet

Change-Id: Ic5a3ad43ea9e1a480897f67add1b9add6a11e5d0
Reviewed-on: https://chromium-review.googlesource.com/262533
Reviewed-by: Wai-Hong Tam <waihong@chromium.org>
Commit-Queue: Cheng-Yi Chiang <cychiang@chromium.org>
Tested-by: Cheng-Yi Chiang <cychiang@chromium.org>
/external/autotest/client/cros/chameleon/chameleon_audio_helper.py
13e584c34bf424dc0ef3ee4529bbed0efc9a3628 19-Mar-2015 Cheng-Yi Chiang <cychiang@chromium.org> chameleon: Always call disconnect and release in binder

When test fails, binder should still disconnect and release the link.

BUG=chromium:464661
TEST=run audio_AudioBasicHDMI test using invalid EDID, check HDMI is
unplugged after the test fails.

Change-Id: Iefa921e6bd825f29e8de525286874da54fa753d0
Reviewed-on: https://chromium-review.googlesource.com/261158
Reviewed-by: Kalin Stoyanov <kalin@chromium.org>
Reviewed-by: Wai-Hong Tam <waihong@chromium.org>
Commit-Queue: Cheng-Yi Chiang <cychiang@chromium.org>
Tested-by: Cheng-Yi Chiang <cychiang@chromium.org>
/external/autotest/client/cros/chameleon/chameleon_audio_helper.py
4488a5f409bf5d32c9cb29812800121143dada22 03-Mar-2015 Cheng-Yi Chiang <cychiang@chromium.org> chameleon_audio_ids: Rename direction to role in audio port

When connecting two widgets using a link, the role as signal source/sink
can better characterize a widget than direction input/output.
Rename direction to role in AudioPort and the user of it.

BUG=chromium:453323
TEST=Run audio_AudioBasic* tests

Change-Id: Id64ecfd2db6e03d7adcdef6f2d19f5dca77adeb7
Reviewed-on: https://chromium-review.googlesource.com/255366
Reviewed-by: Wai-Hong Tam <waihong@chromium.org>
Commit-Queue: Cheng-Yi Chiang <cychiang@chromium.org>
Tested-by: Cheng-Yi Chiang <cychiang@chromium.org>
/external/autotest/client/cros/chameleon/chameleon_audio_helper.py
2e9446a948550c9c504e60826b5118180a39a0c8 22-Feb-2015 Cheng-Yi Chiang <cychiang@chromium.org> chameleon: Use audio bus in audio widget link

Let ChameleonBoard provide an AudioBoard. Let AudioBoard provide an
AudioBus to AudioWidgetLink.
Then AudioWidgetLink can actually switch the route using audio_bus on
audio board in plug/unplug input/output methods.

BUG=chromium:453323
TEST=run audio_AudioBasicMicrophone and audio_AudioBasicHeadphone test
using audio board.

Change-Id: Ia1c77bac07a54327ac3ef74fa5220d11615f4bb6
Reviewed-on: https://chromium-review.googlesource.com/255365
Reviewed-by: Wai-Hong Tam <waihong@chromium.org>
Commit-Queue: Cheng-Yi Chiang <cychiang@chromium.org>
Tested-by: Cheng-Yi Chiang <cychiang@chromium.org>
/external/autotest/client/cros/chameleon/chameleon_audio_helper.py
7c9aa4233621a8845899dc254b7ebbeaa69bfe5d 12-Jan-2015 Cheng-Yi Chiang <cychiang@chromium.org> Chameleon: audio: Implement recording methods of CrosInputWidgetHandler

Implement start_recording and stop_recording methods of
CrosInputWidgetHandler.
Also, add AudioBusToCrosLink to abstract the link from audio bus to
Cros device.

BUG=chromium:437678
TEST=not used yet.

Change-Id: I73a53229e4e814bcf1aabc75fba6acc6303c2950
Reviewed-on: https://chromium-review.googlesource.com/240212
Reviewed-by: Wai-Hong Tam <waihong@chromium.org>
Tested-by: Cheng-Yi Chiang <cychiang@chromium.org>
Commit-Queue: Cheng-Yi Chiang <cychiang@chromium.org>
/external/autotest/client/cros/chameleon/chameleon_audio_helper.py
bb75bfce1dac3162cfbfd0966dd1de1e1809bb05 12-Jan-2015 Cheng-Yi Chiang <cychiang@chromium.org> Chameleon: audio: Add level control logic

Add a module audio_level to handle signal level difference
on different ports. Currently, there are 'Mic level',
'Line level', and 'Digital'.

1. Define _AudioLevel on ports of Cros, Peripheral, Chameleon.
2. Define AudioScale factor to balance different levels.
3. Provide a LevelController class to balance level when ports of
different levels are connected by widget link.

BUG=chromium:437678
TEST=not used yet.

Change-Id: Ia8c275f01fc9a760d5519564bfabf199e9c26c0f
Reviewed-on: https://chromium-review.googlesource.com/240108
Reviewed-by: Wai-Hong Tam <waihong@chromium.org>
Tested-by: Cheng-Yi Chiang <cychiang@chromium.org>
Commit-Queue: Cheng-Yi Chiang <cychiang@chromium.org>
/external/autotest/client/cros/chameleon/chameleon_audio_helper.py
17a2527ea44ed461cec2cf62577079f59e00a9b3 28-Nov-2014 Cheng-Yi Chiang <cychiang@chromium.org> autotest: Add audiovideo_AudioBasicHeadphone test

Adds a basic headphone test using Chameleon test framework.
This test uses fixed frequency sine wave as test data and compares
the frequency difference between recorded data and golden data.
Lets playback method to be non-blocking so in the test we can start
playback then start recording.
The audio cable connecting Cros device headphone to Chameleon Line-In
must be plugged in before the test starts.
This patch also changes how channel map setting is implemented since
different links have different channel maps.

BUG=chromium:437678
TEST=test_that --args "chameleon_host=$CHAMELEON_IP" $DUT_IP
audiovideo_AudioBasicHeadphone
TEST=test_that --args "chameleon_host=$CHAMELEON_IP" $DUT_IP
audiovideo_AudioBasicHDMI

Change-Id: Iff95799c8badc9ec292d7bbb235f88c5e0ffbc2d
Reviewed-on: https://chromium-review.googlesource.com/232258
Reviewed-by: Cheng-Yi Chiang <cychiang@chromium.org>
Tested-by: Cheng-Yi Chiang <cychiang@chromium.org>
Commit-Queue: Wai-Hong Tam <waihong@chromium.org>
/external/autotest/client/cros/chameleon/chameleon_audio_helper.py
7754cef07097ae2efd6fa835433caa39f27f979a 21-Nov-2014 Cheng-Yi Chiang <cychiang@chromium.org> Chameleon: Add Chameleon audio test framework

Moves audio utilities out of ChameleonTest into chameleon_audio_helper
module.

Now audio utilities on Chameleon and DUT are abstracted by widgets.
Audio widgets and binders are created by AudioWidgetFactory.
In autotest, we can create widget, connect/disconnect widgets using
binder, and do playback/record actions on widgets.

Refactors audiovideo_AudioBasicHDMI test to be a simple test.test.
Now the test uses widgets to control the test sequence.

BUG=chromium:429862
TEST=test_that --args "chameleon_host=$CHAMELEON_IP" $DUT_IP
audiovideo_AudioBasicHDMI

Change-Id: I1bfed3d9e93a772d5c3eeec7f5e07486c8f81b49
Reviewed-on: https://chromium-review.googlesource.com/231591
Reviewed-by: Cheng-Yi Chiang <cychiang@chromium.org>
Tested-by: Cheng-Yi Chiang <cychiang@chromium.org>
Commit-Queue: Wai-Hong Tam <waihong@chromium.org>
/external/autotest/client/cros/chameleon/chameleon_audio_helper.py