Add methods IsPlugged and Plug to CodecFlow [chromiumos/platform/chameleon : master]

0 views
Skip to first unread message

Wai-Hong Tam (Gerrit)

unread,
Oct 15, 2014, 4:45:00 PM10/15/14
to chromium-...@chromium.org
Wai-Hong Tam has uploaded a new change for review.

https://chromium-review.googlesource.com/223511

Change subject: Add methods IsPlugged and Plug to CodecFlow
......................................................................

Add methods IsPlugged and Plug to CodecFlow

These 2 methods are called from Chameleond APIs. Empty implementations
are added in this change.

BUG=chromium:417167, chromium:423173
TEST=Tested by the following Python code:
import xmlrpclib
c = xmlrpclib.ServerProxy('http://chameleon:9992')
c.Plug(5)
c.IsPlugged(5)
--> True

Change-Id: I2e9219cb31ab9dee618a282351e44b2ed9a3ae98
---
M chameleond/utils/codec_flow.py
1 file changed, 12 insertions(+), 0 deletions(-)



diff --git a/chameleond/utils/codec_flow.py b/chameleond/utils/codec_flow.py
index cacbdc3..595f9cb 100644
--- a/chameleond/utils/codec_flow.py
+++ b/chameleond/utils/codec_flow.py
@@ -77,6 +77,18 @@
' Always returns True')
return True

+ def IsPlugged(self):
+ """Returns true if audio codec is emualted plug."""
+ # TODO(cychiang): Implement this using audio board interface.
+ logging.warning('Always return True for IsPlugged on
AudioCodecInputFlow.')
+ return True
+
+ def Plug(self):
+ """Emulates plug on audio codec."""
+ # TODO(cychiang): Implement this using audio board interface.
+ logging.warning(
+ 'Plug on AudioCodecInputFlow is not implemented. Do nothing.')
+
def Unplug(self):
"""Emulates unplug on audio codec."""
# TODO(cychiang): Implement this using audio board interface.

--
To view, visit https://chromium-review.googlesource.com/223511
To unsubscribe, visit https://chromium-review.googlesource.com/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2e9219cb31ab9dee618a282351e44b2ed9a3ae98
Gerrit-PatchSet: 1
Gerrit-Project: chromiumos/platform/chameleon
Gerrit-Branch: master
Gerrit-Owner: Wai-Hong Tam <wai...@chromium.org>

Wai-Hong Tam (Gerrit)

unread,
Oct 15, 2014, 4:45:14 PM10/15/14
to chromium-...@chromium.org
Wai-Hong Tam has posted comments on this change.

Change subject: Add methods IsPlugged and Plug to CodecFlow
......................................................................


Patch Set 1: Verified+1
Gerrit-MessageType: comment
Gerrit-Change-Id: I2e9219cb31ab9dee618a282351e44b2ed9a3ae98
Gerrit-PatchSet: 1
Gerrit-Project: chromiumos/platform/chameleon
Gerrit-Branch: master
Gerrit-Owner: Wai-Hong Tam <wai...@chromium.org>
Gerrit-Reviewer: Wai-Hong Tam <wai...@chromium.org>
Gerrit-HasComments: No

Hung-ying Tyan (Gerrit)

unread,
Oct 15, 2014, 9:19:44 PM10/15/14
to Wai-Hong Tam, Cheng-Yi Chiang
Hung-ying Tyan has posted comments on this change.

Change subject: Add methods IsPlugged and Plug to CodecFlow
......................................................................


Patch Set 1: Code-Review+2
Gerrit-MessageType: comment
Gerrit-Change-Id: I2e9219cb31ab9dee618a282351e44b2ed9a3ae98
Gerrit-PatchSet: 1
Gerrit-Project: chromiumos/platform/chameleon
Gerrit-Branch: master
Gerrit-Owner: Wai-Hong Tam <wai...@chromium.org>
Gerrit-Reviewer: Cheng-Yi Chiang <cych...@chromium.org>
Gerrit-Reviewer: Hung-ying Tyan <ty...@chromium.org>

Wai-Hong Tam (Gerrit)

unread,
Oct 15, 2014, 11:33:09 PM10/15/14
to Hung-ying Tyan, Cheng-Yi Chiang
Wai-Hong Tam has posted comments on this change.

Change subject: Add methods IsPlugged and Plug to CodecFlow
......................................................................


Patch Set 1: Commit-Queue+1
Gerrit-MessageType: comment
Gerrit-Change-Id: I2e9219cb31ab9dee618a282351e44b2ed9a3ae98
Gerrit-PatchSet: 1
Gerrit-Project: chromiumos/platform/chameleon
Gerrit-Branch: master
Gerrit-Owner: Wai-Hong Tam <wai...@chromium.org>

Wai-Hong Tam (Gerrit)

unread,
Oct 17, 2014, 1:10:31 PM10/17/14
to Hung-ying Tyan, Cheng-Yi Chiang, chrome-internal-fetch
Wai-Hong Tam has posted comments on this change.

Change subject: Add methods IsPlugged and Plug to CodecFlow
......................................................................


Patch Set 1: Commit-Queue+1
Gerrit-MessageType: comment
Gerrit-Change-Id: I2e9219cb31ab9dee618a282351e44b2ed9a3ae98
Gerrit-PatchSet: 1
Gerrit-Project: chromiumos/platform/chameleon
Gerrit-Branch: master
Gerrit-Owner: Wai-Hong Tam <wai...@chromium.org>
Gerrit-Reviewer: Cheng-Yi Chiang <cych...@chromium.org>
Gerrit-Reviewer: Hung-ying Tyan <ty...@chromium.org>
Gerrit-Reviewer: Wai-Hong Tam <wai...@chromium.org>
Gerrit-Reviewer: chrome-internal-fetch <chrome-int...@google.com>
Gerrit-HasComments: No

chrome-internal-fetch (Gerrit)

unread,
Oct 17, 2014, 5:54:03 PM10/17/14
to Wai-Hong Tam, Hung-ying Tyan
chrome-internal-fetch has submitted this change and it was merged.

Change subject: Add methods IsPlugged and Plug to CodecFlow
......................................................................


Add methods IsPlugged and Plug to CodecFlow

These 2 methods are called from Chameleond APIs. Empty implementations
are added in this change.

BUG=chromium:417167, chromium:423173
TEST=Tested by the following Python code:
import xmlrpclib
c = xmlrpclib.ServerProxy('http://chameleon:9992')
c.Plug(5)
c.IsPlugged(5)
--> True

Change-Id: I2e9219cb31ab9dee618a282351e44b2ed9a3ae98
Reviewed-on: https://chromium-review.googlesource.com/223511
Tested-by: Wai-Hong Tam <wai...@chromium.org>
Reviewed-by: Hung-ying Tyan <ty...@chromium.org>
Commit-Queue: Wai-Hong Tam <wai...@chromium.org>
---
M chameleond/utils/codec_flow.py
1 file changed, 12 insertions(+), 0 deletions(-)

Approvals:
Hung-ying Tyan: Looks good to me, approved
Wai-Hong Tam: Ready; Verified
Gerrit-MessageType: merged
Gerrit-Change-Id: I2e9219cb31ab9dee618a282351e44b2ed9a3ae98
Gerrit-PatchSet: 2
Gerrit-Project: chromiumos/platform/chameleon
Gerrit-Branch: master
Gerrit-Owner: Wai-Hong Tam <wai...@chromium.org>
Reply all
Reply to author
Forward
0 new messages