Lines Matching refs:widget

31                  an output widget.
33 input widget.
45 widget, and it will remains the same until the sink widget is connected
46 to a different link. This is to make sure sink widget knows the channel
72 # Sets channel map of link to the sink widget so
73 # sink widget knows the channel map of recorded data.
124 occupied: True if this widget is occupied by a widget binder.
135 def _check_widget_id(self, port_id, widget):
136 """Checks that the port id of a widget is expected.
139 @param widget: An AudioWidget object.
141 @raises: WidgetLinkError if the port id of widget is not expected.
143 if widget.audio_port.port_id != port_id:
145 'Link %s expects a %s widget, but gets a %s widget' % (
146 self.name, port_id, widget.audio_port.port_id))
150 """Connects source widget to sink widget.
161 """Disconnects source widget from sink widget.
172 """The abstraction of widget link using audio bus on audio board.
176 2. Plug/unplug jack using the widget handler on the DUT side.
179 Cros device. So plugging/unplugging headphone widget will also affect
198 def _plug_input(self, widget):
199 """Plugs input of audio bus to the widget.
201 @param widget: An AudioWidget object.
204 if widget.audio_port.host == 'Cros':
205 widget.handler.plug()
207 self._audio_bus.connect(widget.audio_port.port_id)
211 self._audio_bus.bus_index, widget.audio_port)
214 def _unplug_input(self, widget):
215 """Unplugs input of audio bus from the widget.
217 @param widget: An AudioWidget object.
220 if widget.audio_port.host == 'Cros':
221 widget.handler.unplug()
223 self._audio_bus.disconnect(widget.audio_port.port_id)
227 self._audio_bus.bus_index, widget.audio_port)
230 def _plug_output(self, widget):
231 """Plugs output of audio bus to the widget.
233 @param widget: An AudioWidget object.
236 if widget.audio_port.host == 'Cros':
237 widget.handler.plug()
239 self._audio_bus.connect(widget.audio_port.port_id)
243 self._audio_bus.bus_index, widget.audio_port)
246 def _unplug_output(self, widget):
247 """Unplugs output of audio bus from the widget.
249 @param widget: An AudioWidget object.
252 if widget.audio_port.host == 'Cros':
253 widget.handler.unplug()
255 self._audio_bus.disconnect(widget.audio_port.port_id)
258 self._audio_bus.bus_index, widget.audio_port)
356 """Connects source widget to sink widget.
358 This method first identifies the Chameleon widget and plug it first so
359 that it is visible to the Cros host for it to plug in the Cros widget.
376 """Disconnects source widget from sink widget.
378 This method first identifies the Cros widget and unplugs it first while
379 the Chameleon widget is still visible for the Cros host to know which
380 USB port to unplug Cros widget from.
431 def _plug_input(self, widget):
432 """Plugs input of HDMI cable to the widget using widget handler.
434 @param widget: An AudioWidget object.
437 self._check_widget_id(ids.CrosIds.HDMI, widget)
443 def _unplug_input(self, widget):
444 """Unplugs input of HDMI cable from the widget using widget handler.
449 self._check_widget_id(ids.CrosIds.HDMI, widget)
455 def _plug_output(self, widget):
456 """Plugs output of HDMI cable to the widget using widget handler.
458 @param widget: An AudioWidget object.
460 @raises: WidgetLinkError if widget handler interface is not HDMI.
462 self._check_widget_id(ids.ChameleonIds.HDMI, widget)
466 widget.handler.plug()
470 def _unplug_output(self, widget):
471 """Unplugs output of HDMI cable from the widget using widget handler.
473 @param widget: An AudioWidget object.
475 @raises: WidgetLinkError if widget handler interface is not HDMI.
477 self._check_widget_id(ids.ChameleonIds.HDMI, widget)
481 widget.handler.unplug()
507 """Customizes the connecting sequence for bluetooth widget link.
525 """Customizes the disconnecting sequence for bluetooth widget link.