blob: b805ca95198d3e24554ba6754918cf221547e2c4 [file] [log] [blame] [view]
<link rel="stylesheet" href="../style.css" />
[TOC]
# fuchsia.bluetooth.a2dp
<div class="fidl-version-div"><span class="fidl-attribute fidl-version">Added: 7</span></div>
## **PROTOCOLS**
## AudioMode {#AudioMode}
*Defined in [fuchsia.bluetooth.a2dp/audio_mode.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.a2dp/audio_mode.fidl;l=18)*
<p>A protocol for specifying which A2DP role this device should operate.</p>
### SetRole {#AudioMode.SetRole}
<p>Switch the device to act as the specified A2DP Role. If the device is already
set to the requested role, calling this method is a no-op.</p>
<p>When this method returns, a client can depend on the following:</p>
<ol>
<li>If the role was switched, the previous profile has requested removal
from the hosts' SDP databases, and all L2CAP channels associated with
the previous profile have initiated or completed the process of closing.</li>
<li>The device is in the requested A2DP role.</li>
</ol>
<p>If the role cannot be set due to an internal error, the server will close
the channel.</p>
#### Request {#AudioMode.SetRole_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>role</code></td>
<td>
<code><a class='link' href='#Role'>Role</a></code>
</td>
</tr>
</table>
#### Response {#AudioMode.SetRole_Response}
&lt;EMPTY&gt;
## **ENUMS**
### Role [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#Role data-text="Role"}
Type: <code>uint32</code>
*Defined in [fuchsia.bluetooth.a2dp/audio_mode.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.bluetooth.a2dp/audio_mode.fidl;l=9)*
<p>Enum corresponding to the A2DP SRC/SNK roles as defined in the
A2DP v1.3.2 profile specification, section 2.2.</p>
<table>
<tr><th>Name</th><th>Value</th><th>Description</th></tr>
<tr id="Role.SOURCE">
<td><h3 id="Role.SOURCE" class="add-link hide-from-toc">SOURCE</h3></td>
<td><code>1</code></td>
<td><p>Act as a source of digital audio streams, sending audio to peers.</p>
</td>
</tr>
<tr id="Role.SINK">
<td><h3 id="Role.SINK" class="add-link hide-from-toc">SINK</h3></td>
<td><code>2</code></td>
<td><p>Act as a sink of digital audio streams and play audio sent from peers.</p>
</td>
</tr>
</table>