MT2523 API Reference  LinkIt SDK v4
bt_codec.h
1 /* Copyright Statement:
2  *
3  * (C) 2005-2017 MediaTek Inc. All rights reserved.
4  *
5  * This software/firmware and related documentation ("MediaTek Software") are
6  * protected under relevant copyright laws. The information contained herein
7  * is confidential and proprietary to MediaTek Inc. ("MediaTek") and/or its licensors.
8  * Without the prior written permission of MediaTek and/or its licensors,
9  * any reproduction, modification, use or disclosure of MediaTek Software,
10  * and information contained herein, in whole or in part, shall be strictly prohibited.
11  * You may only use, reproduce, modify, or distribute (as applicable) MediaTek Software
12  * if you have agreed to and been bound by the applicable license agreement with
13  * MediaTek ("License Agreement") and been granted explicit permission to do so within
14  * the License Agreement ("Permitted User"). If you are not a Permitted User,
15  * please cease any access or use of MediaTek Software immediately.
16  * BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
17  * THAT MEDIATEK SOFTWARE RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES
18  * ARE PROVIDED TO RECEIVER ON AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL
19  * WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
20  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
21  * NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
22  * SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
23  * SUPPLIED WITH MEDIATEK SOFTWARE, AND RECEIVER AGREES TO LOOK ONLY TO SUCH
24  * THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. RECEIVER EXPRESSLY ACKNOWLEDGES
25  * THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES
26  * CONTAINED IN MEDIATEK SOFTWARE. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE FOR ANY MEDIATEK
27  * SOFTWARE RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR
28  * STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND
29  * CUMULATIVE LIABILITY WITH RESPECT TO MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
30  * AT MEDIATEK'S OPTION, TO REVISE OR REPLACE MEDIATEK SOFTWARE AT ISSUE,
31  * OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY RECEIVER TO
32  * MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
33  */
34 
35 #ifndef __BT_CODEC_H__
36 #define __BT_CODEC_H__
37 
191 #ifdef __cplusplus
192 extern "C" {
193 #endif
194 
195 #include <stdint.h>
196 #include <stdbool.h>
197 #include "bt_hfp.h"
198 #include "bt_a2dp.h"
199 
206 #define BT_CODEC_MEDIA_EVENT_START (120)
209 typedef enum {
216 
217 
219 typedef enum {
230 
231 
233 typedef enum {
240 
242 typedef enum {
246 
247 
248 typedef enum {
253 
254 
265 typedef enum {
270 
281 typedef struct {
282  uint8_t *buffer_base;
283  int32_t buffer_size;
284  int32_t write;
285  int32_t read;
286  void *param;
288 
290 typedef int32_t (*bt_codec_get_data)(volatile uint16_t *buf, uint32_t len);
291 
293 typedef int32_t (*bt_codec_get_data_count)(void);
294 
295 
297 typedef struct _bt_media_handle_t {
300  bool underflow;
301  bool waiting;
302  uint16_t audio_id;
304  void (*handler)(struct _bt_media_handle_t *handle, bt_codec_media_event_t event_id);
305  void (*set_buffer)(struct _bt_media_handle_t *handle, uint8_t *buffer, uint32_t length);
308  void (*get_write_buffer)(struct _bt_media_handle_t *handle, uint8_t **buffer, uint32_t *length);
309  void (*get_read_buffer)(struct _bt_media_handle_t *handle, uint8_t **buffer, uint32_t *length);
310  void (*write_data_done)(struct _bt_media_handle_t *handle, uint32_t length);
311  void (*finish_write_data)(struct _bt_media_handle_t *handle);
312  void (*reset_share_buffer)(struct _bt_media_handle_t *handle);
313  void (*read_data_done)(struct _bt_media_handle_t *handle, uint32_t length);
314  int32_t (*get_free_space)(struct _bt_media_handle_t *handle);
315  int32_t (*get_data_count)(struct _bt_media_handle_t *handle);
319  uint32_t (*query_memory_size)(struct _bt_media_handle_t *handle);
320  uint32_t (*set_bit_rate)(struct _bt_media_handle_t *handle, uint32_t bit_rate);
321  uint32_t (*get_payload)(struct _bt_media_handle_t *handle, uint8_t *buffer, uint32_t buffer_size, uint32_t *sample_count);
322  void (*get_payload_done)(struct _bt_media_handle_t *handle);
323  void (*query_payload_size)(struct _bt_media_handle_t *handle, uint32_t *minimum, uint32_t *total);
329 
330 
334 typedef struct {
335  uint8_t min_bit_pool;
336  uint8_t max_bit_pool;
337  uint8_t block_length;
338  uint8_t subband_num;
339  uint8_t alloc_method;
340  uint8_t sample_rate;
341  uint8_t channel_mode;
343 
347 typedef struct {
348  bool vbr;
349  uint8_t object_type;
350  uint8_t channels;
351  uint16_t sample_rate;
352  uint32_t bit_rate;
354 
358 typedef union {
361 } bt_codec_t;
362 
366 typedef struct {
370 
371 
373 typedef struct {
377 
379 typedef struct {
382 
384 typedef struct {
385  uint32_t sample_count;
386  uint32_t sampling_rate;
388 
390 typedef struct {
391  uint32_t sample_count;
392  uint32_t byte_count;
394 
396 typedef struct {
397  uint8_t *buffer;
398  uint32_t byte_count;
400 
407 
408 
416 
417 
432 
439 
446 
458 
465 
466 
467 
477 
478 
487 
488 
489 
495 
496 
504 
505 
506 
514 bt_codec_media_status_t bt_codec_hfp_read_stream_in(void *buffer, uint32_t sample_count);
515 
516 
525 
531 
539 
547 bt_codec_media_status_t bt_codec_hfp_read_stream_out(void *buffer, uint32_t sample_count);
548 
549 
558 
564 
572 
573 
574 
583 
584 
593 
594 
595 
601 
609 
610 
611 
618 
626 
633 
641 
648 
656 
664 
673 
682 
690 
698 
706 bt_codec_media_status_t bt_codec_a2dp_aws_get_audio_latency(bt_media_handle_t *handle, uint32_t sampling_rate, uint32_t *latency_us);
707 
708 
715 
721 
728 
729 #ifdef __cplusplus
730 }
731 #endif
732 
739 #endif /* __BT_CODEC_H__ */
740 
bt_codec_aac_t aac
AAC codec.
Definition: bt_codec.h:360
bt_codec_media_status_t bt_codec_hfp_unregister_customer_enhancement_function_callback(void)
Unregister customer enhancement callback function.
bt_codec_media_status_t bt_codec_hfp_unregister_mix_stream_out_data_callback(void)
This function unregisters the callback function for mix stream out data.
Invalid parameters.
Definition: bt_codec.h:237
uint8_t channel_mode
b0: joint stereo, b1: stereo, b2: dual channel, b3: mono.
Definition: bt_codec.h:341
void(* bt_codec_a2dp_callback_t)(bt_media_handle_t *handle, bt_codec_media_event_t event_id)
This defines the A2DP codec callback function prototype.
Definition: bt_codec.h:406
The stream out and stream in path of HFP is to/from internal ABB.
Definition: bt_codec.h:266
bt_codec_media_status_t bt_codec_hfp_set_customer_enhanced_stream_in_data(void *buffer, uint32_t sample_count)
set enhanced stream in data stream in.
void(* set_buffer)(struct _bt_media_handle_t *handle, uint8_t *buffer, uint32_t length)
Set the shared buffer for bitstream.
Definition: bt_codec.h:305
The Bluetooth codec is terminated.
Definition: bt_codec.h:225
bt_codec_media_status_t bt_codec_a2dp_close(bt_media_handle_t *handle)
This function closes the A2DP audio codec.
uint8_t bt_a2dp_role_t
The type of A2DP role.
Definition: bt_a2dp.h:229
Maintain original stream out.
Definition: bt_codec.h:249
void * param
Extended parameter or information.
Definition: bt_codec.h:286
bt_codec_media_status_t bt_codec_hfp_register_mix_stream_out_data_callback(bt_codec_hfp_mix_stream_out_data_callback_t callback, void *user_data)
This function registers a callback function for mixing stream out data.
uint8_t * buffer
Buffer pointer.
Definition: bt_codec.h:397
bt_codec_get_data directly_access_dsp_function
Set function to access DSP buffer directly.
Definition: bt_codec.h:316
bt_codec_media_status_t bt_codec_hfp_get_stream_out_sample_count(uint32_t *sample_count)
Query the sample_count of stream in buffer.
uint8_t subband_num
b0: 8, b1: 4.
Definition: bt_codec.h:338
int32_t(* bt_codec_get_data)(volatile uint16_t *buf, uint32_t len)
A2DP direct access to DSP buffer function type.
Definition: bt_codec.h:290
bt_codec_media_status_t bt_codec_hfp_get_mix_stream_out_sample_count(uint32_t *sample_count)
This function queries the sample_count of mix stream out buffer.
uint8_t bt_hfp_audio_codec_type_t
This structure defines the HFP codec type.
Definition: bt_hfp.h:257
Successful.
Definition: bt_codec.h:235
void(* query_payload_size)(struct _bt_media_handle_t *handle, uint32_t *minimum, uint32_t *total)
Get minimum payload size and current total payload size .
Definition: bt_codec.h:323
int32_t buffer_size
Size of the ring buffer.
Definition: bt_codec.h:283
uint32_t(* query_memory_size)(struct _bt_media_handle_t *handle)
Query A2DP source total memory usage.
Definition: bt_codec.h:319
uint8_t channels
b0: 2, b1: 1.
Definition: bt_codec.h:350
uint8_t max_bit_pool
The maximum bit pool.
Definition: bt_codec.h:336
bt_codec_media_status_t bt_codec_hfp_read_stream_out(void *buffer, uint32_t sample_count)
Recieve data from stream in.
bt_codec_media_status_t(* process)(struct _bt_media_handle_t *handle, bt_codec_media_event_t event_id)
The Bluetooth codec process function.
Definition: bt_codec.h:326
The Bluetooth codec is ready to play the media.
Definition: bt_codec.h:211
The A2DP audio codec bitstream information structure.
Definition: bt_codec.h:390
void(* handler)(struct _bt_media_handle_t *handle, bt_codec_media_event_t event_id)
The Bluetooth codec handler.
Definition: bt_codec.h:304
Successful.
Definition: bt_codec.h:221
bt_codec_media_status_t bt_codec_hfp_unregister_get_stream_in_data_callback(void)
This function unregisters the callback function that receives streamed in data.
int32_t(* get_data_count)(struct _bt_media_handle_t *handle)
Get the available data amount of the shared buffer.
Definition: bt_codec.h:315
void(* write_data_done)(struct _bt_media_handle_t *handle, uint32_t length)
Update the write pointer to the shared buffer.
Definition: bt_codec.h:310
bt_media_handle_t * bt_codec_hfp_open(bt_codec_hfp_callback_t callback, const bt_codec_hfp_audio_t *param)
This function opens the HFP audio codec.
The base of the status.
Definition: bt_codec.h:234
bt_hfp_audio_codec_type_t type
1: CVSD, 2: mSBC.
Definition: bt_codec.h:380
bt_codec_hfp_device_path_t
Bluetooth codec HFP device path.
Definition: bt_codec.h:265
A2dp source notification for payload.
Definition: bt_codec.h:228
bt_codec_media_status_t bt_codec_a2dp_aws_set_flag(bt_media_handle_t *handle, bool flag)
This function sets the advanced wireless stereo flag.
bool vbr
Indicates if VBR is supported or not.
Definition: bt_codec.h:348
bt_codec_state_t
Bluetooth codec state.
Definition: bt_codec.h:209
bt_codec_media_status_t bt_codec_hfp_get_stream_in_sample_count(uint32_t *sample_count)
This function queries the sample_count of the streamed in buffer.
bt_codec_media_status_t bt_codec_a2dp_aws_fill_silence_frame(bt_media_handle_t *handle, bt_codec_a2dp_buffer_t *data, uint32_t frame_count)
This function fills the advanced wireless stereo silence frames to target data buffer.
void(* get_write_buffer)(struct _bt_media_handle_t *handle, uint8_t **buffer, uint32_t *length)
Get the available length to write into a shared buffer and a pointer to the shared buffer...
Definition: bt_codec.h:308
bt_codec_sbc_t sbc
SBC codec.
Definition: bt_codec.h:359
bt_codec_media_status_t bt_codec_a2dp_aws_set_clock_skew(bool flag)
This function sets the clock skew flag.
uint8_t sample_rate
b0: 48000, b1: 44100, b2: 32000, b3: 16000.
Definition: bt_codec.h:340
bt_codec_capability_t codec_cap
The capabilities of Bluetooth codec.
Definition: bt_codec.h:374
This structure defines the A2DP codec capability.
Definition: bt_codec.h:366
bt_codec_media_status_t bt_codec_hfp_unregister_get_stream_out_data_callback(void)
Unregister the callback function for getting stream out data.
bt_codec_media_status_t bt_codec_hfp_register_get_stream_out_data_callback(bt_codec_hfp_get_stream_out_data_callback_t callback, void *user_data)
Register the callback function for get stream out data.
uint8_t min_bit_pool
The minimum bit pool.
Definition: bt_codec.h:335
bt_a2dp_codec_type_t type
Codec type.
Definition: bt_codec.h:367
The Bluetooth codec AWS clock skew is compensating.
Definition: bt_codec.h:244
uint32_t sample_count
One pair of L / R counts as one sample.
Definition: bt_codec.h:385
bt_codec_media_status_t(* stop)(struct _bt_media_handle_t *handle)
The Bluetooth codec stop function.
Definition: bt_codec.h:327
#define BT_CODEC_MEDIA_EVENT_START
Defines the codec media event.
Definition: bt_codec.h:206
The Bluetooth codec reported an error.
Definition: bt_codec.h:213
This structure defines the AAC codec details.
Definition: bt_codec.h:347
bool waiting
The Bluetooth codec is waiting to fill data.
Definition: bt_codec.h:301
int32_t write
Index of the ring buffer to write the data.
Definition: bt_codec.h:284
void(* bt_codec_hfp_customer_enhancement_function_callback_t)(void *user_data)
This defines the HFP codec hfp customer enhancement callback function prototype.
Definition: bt_codec.h:438
bt_codec_media_status_t bt_codec_hfp_register_customer_enhancement_function_callback(bt_codec_hfp_customer_enhancement_function_callback_t callback, void *user_data)
Register customer enhancement function.
void(* get_read_buffer)(struct _bt_media_handle_t *handle, uint8_t **buffer, uint32_t *length)
Get the available length to read from a shared buffer and a pointer to the shared buffer...
Definition: bt_codec.h:309
uint8_t bt_a2dp_codec_type_t
The type of A2DP codec.
Definition: bt_a2dp.h:219
bt_codec_media_hfp_mix_stream_out_method_t
Definition: bt_codec.h:248
This structure defines the A2DP codec.
Definition: bt_codec.h:373
uint32_t sampling_rate
Sampling rate, unit: Hz.
Definition: bt_codec.h:386
Advanced wireless stereo underflow-checking mechanism is triggered.
Definition: bt_codec.h:226
bt_codec_media_status_t
This structure defines the Bluetooth codec API return status.
Definition: bt_codec.h:233
Advanced wireless stereo clock-skew-checking mechanism is triggered.
Definition: bt_codec.h:227
uint32_t bit_rate
Constant/peak bits per second in 23 bit UiMsbf.
Definition: bt_codec.h:352
void(* bt_codec_hfp_get_stream_out_data_callback_t)(bt_codec_media_event_t event, void *user_data)
This defines the HFP codec hfp mix stream out callback function prototype.
Definition: bt_codec.h:431
bt_codec_media_status_t(* play)(struct _bt_media_handle_t *handle)
The Bluetooth codec play function.
Definition: bt_codec.h:325
The Bluetooth codec AWS clock skew is inactive.
Definition: bt_codec.h:243
void(* set_get_data_function)(struct _bt_media_handle_t *handle, bt_codec_get_data func)
Set the callback function for bitstream.
Definition: bt_codec.h:306
uint8_t alloc_method
b0: loudness, b1: SNR.
Definition: bt_codec.h:339
uint8_t object_type
b4: M4-scalable, b5: M4-LTP, b6: M4-LC, b7: M2-LC.
Definition: bt_codec.h:349
The end of the status.
Definition: bt_codec.h:238
A2DP audio handle structure type.
Definition: bt_codec.h:297
bt_codec_t codec
Codec information.
Definition: bt_codec.h:368
bt_a2dp_role_t role
The Bluetooth codec roles.
Definition: bt_codec.h:375
Bitstreaming request from the user.
Definition: bt_codec.h:223
int32_t(* bt_codec_get_data_count)(void)
A2DP get data count function type.
Definition: bt_codec.h:293
The stream out and stream in path of HFP is from MASTER I2S, note stream out also can be to internal ...
Definition: bt_codec.h:267
bt_codec_media_status_t bt_codec_hfp_mix_stream_out(bt_codec_media_hfp_mix_stream_out_method_t mix_method, void *buffer, uint32_t sample_count)
This function mixes a tone to the stream out tone.
Not supported.
Definition: bt_codec.h:268
Weighted mean.
Definition: bt_codec.h:251
struct _bt_media_handle_t bt_media_handle_t
A2DP audio handle structure type.
bt_codec_media_status_t bt_codec_a2dp_set_sw_aac_flag(bool flag)
This function sets the software AAC DECODER for Bluetooth A2DP.
uint16_t audio_id
The audio ID of the Bluetooth codec.
Definition: bt_codec.h:302
bt_codec_get_data_count get_data_count_function
Set function to get available data amount of the uplayer total buffer size.
Definition: bt_codec.h:317
int32_t(* get_free_space)(struct _bt_media_handle_t *handle)
Get the free space length available in the shared buffer.
Definition: bt_codec.h:314
void(* bt_codec_hfp_get_stream_in_data_callback_t)(bt_codec_media_event_t event, void *user_data)
This defines the HFP codec HFP mix stream in callback function prototype.
Definition: bt_codec.h:424
The bitstreaming is underflow and the codec output is on silent.
Definition: bt_codec.h:222
void(* bt_codec_hfp_mix_stream_out_data_callback_t)(bt_codec_media_event_t event, void *user_data)
This defines the HFP codec HFP mix stream out callback function prototype.
Definition: bt_codec.h:415
void(* reset_share_buffer)(struct _bt_media_handle_t *handle)
Reset the shared buffer&#39;s information.
Definition: bt_codec.h:312
bt_codec_media_status_t bt_codec_a2dp_aws_get_silence_frame_information(bt_media_handle_t *handle, bt_codec_a2dp_bitstream_t *information)
This function gets the advanced wireless stereo silence frame information for one silence frame...
bt_audio_buffer_t buffer_info
The shared buffer information for the Bluetooth codec.
Definition: bt_codec.h:299
uint32_t(* set_bit_rate)(struct _bt_media_handle_t *handle, uint32_t bit_rate)
For A2DP source runtime change bit rate.
Definition: bt_codec.h:320
void(* get_payload_done)(struct _bt_media_handle_t *handle)
Prepare for next BT_CODEC_MEDIA_GET_PAYLOAD notification.
Definition: bt_codec.h:322
bt_codec_media_status_t bt_codec_a2dp_aws_set_clock_skew_compensation_value(bt_media_handle_t *handle, int32_t sample_count)
This function sets the advanced wireless stereo clock skew compensation value.
int32_t read
Index of the ring buffer to read the data.
Definition: bt_codec.h:285
bt_codec_media_status_t bt_codec_a2dp_aws_get_consumed_data_count(bt_media_handle_t *handle, bt_codec_a2dp_data_count_t *information)
This function gets the advanced wireless stereo consumed data count.
The Bluetooth codec is inactive.
Definition: bt_codec.h:210
bt_codec_media_event_t
This structure defines the Bluetooth codec media events.
Definition: bt_codec.h:219
bt_codec_media_status_t bt_codec_hfp_set_device_path(bt_codec_hfp_device_path_t device_path)
This function sets the HFP device path.
bool bt_codec_a2dp_get_sw_aac_flag(void)
This function gets the software AAC DECODER for Bluetooth A2DP.
The start of the Media events.
Definition: bt_codec.h:220
This union defines the A2DP codec.
Definition: bt_codec.h:358
uint8_t * buffer_base
Pointer to the ring buffer.
Definition: bt_codec.h:282
bt_codec_media_status_t bt_codec_hfp_close(bt_media_handle_t *handle)
This function closes the HFP codec.
This structure defines the SBC codec details.
Definition: bt_codec.h:334
bt_codec_media_status_t bt_codec_a2dp_aws_parse_data_information(bt_media_handle_t *handle, bt_codec_a2dp_buffer_t *data, bt_codec_a2dp_bitstream_t *information)
This function parses the advanced wireless stereo packet data information.
bt_codec_aws_clock_skew_status_t
Bluetooth codec AWS clock skew status.
Definition: bt_codec.h:242
bt_codec_media_status_t bt_codec_hfp_register_get_stream_in_data_callback(bt_codec_hfp_get_stream_in_data_callback_t callback, void *user_data)
This function registers the callback function that receives streamed in data.
The A2DP audio codec buffer information structure.
Definition: bt_codec.h:396
bt_codec_media_status_t bt_codec_hfp_get_customer_enhanced_stream_in_sample_count(uint32_t *sample_count)
Query the sample count of enhanced stream in buffer that customer need feedback.
This structure defines the HFP codec.
Definition: bt_codec.h:379
Replace original stream out.
Definition: bt_codec.h:250
The Bluetooth codec is in a playing state.
Definition: bt_codec.h:212
Bitstreaming notification to the user.
Definition: bt_codec.h:224
bt_media_handle_t * bt_codec_a2dp_open(bt_codec_a2dp_callback_t callback, const bt_codec_a2dp_audio_t *param)
This function opens the A2DP audio codec.
uint32_t(* get_payload)(struct _bt_media_handle_t *handle, uint8_t *buffer, uint32_t buffer_size, uint32_t *sample_count)
Get payload for A2DP source.
Definition: bt_codec.h:321
bool underflow
The Bluetooth codec data underflow occurred.
Definition: bt_codec.h:300
void(* finish_write_data)(struct _bt_media_handle_t *handle)
Indicate the last data transfer.
Definition: bt_codec.h:311
void(* read_data_done)(struct _bt_media_handle_t *handle, uint32_t length)
Update the read pointer to the shared buffer.
Definition: bt_codec.h:313
uint32_t sample_count
One pair of L / R counts as one sample.
Definition: bt_codec.h:391
uint16_t sample_rate
b0~b11: 96000,88200,64000,48000,44100,32000,24000,22050,16000,12000,11025,8000.
Definition: bt_codec.h:351
void(* set_get_data_count_function)(struct _bt_media_handle_t *handle, bt_codec_get_data_count func)
Set the callback function for bitstream.
Definition: bt_codec.h:307
Error.
Definition: bt_codec.h:236
uint32_t byte_count
Byte count.
Definition: bt_codec.h:392
uint8_t block_length
b0: 16, b1: 12, b2: 8, b3: 4.
Definition: bt_codec.h:337
The Bluetooth codec has stopped.
Definition: bt_codec.h:214
void(* bt_codec_hfp_callback_t)(bt_media_handle_t *handle, bt_codec_media_event_t event_id)
This defines the HFP codec callback function prototype.
Definition: bt_codec.h:445
bt_codec_media_status_t bt_codec_a2dp_aws_set_initial_sync(bt_media_handle_t *handle)
This function sets the advanced wireless stereo initial synchronization.
This structure defines the shared buffer structure.
Definition: bt_codec.h:281
uint32_t byte_count
Buffer byte count.
Definition: bt_codec.h:398
bt_codec_media_status_t bt_codec_hfp_read_stream_in(void *buffer, uint32_t sample_count)
This function receives the streamed in data.
The A2DP audio codec data count structure.
Definition: bt_codec.h:384
bt_codec_state_t state
The Bluetooth codec state.
Definition: bt_codec.h:298
bt_codec_media_status_t bt_codec_a2dp_aws_get_clock_skew_status(bt_media_handle_t *handle, bt_codec_aws_clock_skew_status_t *status)
This function gets the advanced wireless stereo clock skew status.
bt_codec_media_status_t bt_codec_a2dp_aws_get_audio_latency(bt_media_handle_t *handle, uint32_t sampling_rate, uint32_t *latency_us)
This function gets the advanced wireless stereo audio latency.