DCMD_BT_ISOC_ENABLE
Enable Bluetooth connections for audio playback and capture
Synopsis:
#include <ado_pcm/dcmd_bluetooth.h>
#define DCMD_BT_ISOC_ENABLE _IOW( 'Z', 0x01, struct _bt_isoch )
Arguments to devctl():
| Argument | Value |
|---|---|
| filedes | A file descriptor that you obtained by opening the device |
| dcmd | DCMD_BT_ISOC_ENABLE |
| dev_data_ptr | A pointer to a bt_isoch_t structure |
| n_bytes | sizeof(bt_isoch_t) |
| dev_info_ptr | NULL |
Description:
This command enables Bluetooth connections for audio playback and capture. It tells the audio driver when it's allowed to accept users' connections to the device handle for audio playback/capture. The usage is:
- The application codes establishes the Bluetooth connection.
- Once the connection is established, issue the DCMD_BT_ISOC_ENABLE command to enable the audio driver interface for client use.
- The client application can then successfully call snd_pcm_plugin_params() or snd_pcm_channel_params() against the audio device handle for the CSR BT USB-Audio device.
- When the Bluetooth connection is dropped (or about to be disconnected), the application should issue the DCMD_BT_ISOC_DISABLE command to cause the driver to fail any further requests to use the audio driver until the connection is reestablished and the DCMD_BT_ISOC_ENABLE command is sent.
Note:
- If the audio interface is active when the DCDM_BT_ISOC_DISABLE command is issued, the driver makes the active stream fail with an error of SND_PCM_STATUS_ERROR (i.e., all further read/write calls to the audio interface will fail). The audio stream can't be recovered until the DCMD_BT_ISOC_ENABLE is sent.
- Any attempt to call snd_pcm_plugin_param() or snd_pcm_channel_params() the audio interface while not in the enabled state fails with an error of EAGAIN, and the why_failed member of the snd_pcm_channel_params_t structure is set to SND_PCM_PARAMS_NO_CHANNEL.
Input:
A filled-in bt_isoch_t structure:
typedef struct _bt_isoch {
uint32_t sco_hdl;
uint32_t rsvd[10];
} bt_isoch_t;
Set sco_hdl to the handle of the Bluetooth connection.
Output:
None.
See also:
snd_pcm_channel_params(), snd_pcm_channel_params_t, snd_pcm_plugin_params() in the Audio Developer's Guide
devctl() in the QNX Neutrino C Library Reference
Page updated:
