| // Copyright 2023 The Fuchsia Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| library fuchsia.hardware.audio; |
| |
| using zx; |
| |
| /// Plug state as returned by the driver. |
| /// If the driver reports a `plug_detect_capabilities` equal to HARDWIRED, then the driver should |
| /// respond to `WatchPlugState` only the first time it is called, with `plugged` set to true and |
| /// `plug_state_time` set to time '0'. |
| type PlugState = table { |
| /// Driver is currently plugged in. Required |
| 1: plugged bool; |
| |
| /// Timestamps the information provided in the rest of the fields of this struct. Required. |
| 2: plug_state_time zx.Time; |
| }; |
| |
| type PlugDetectCapabilities = strict enum { |
| /// Driver is hardwired (will always be plugged in). |
| HARDWIRED = 0; |
| |
| /// Driver is able to asynchronously notify of plug state changes. |
| CAN_ASYNC_NOTIFY = 1; |
| }; |