blob: 17defac48a55643cd39b2f426c983821c2a5eef7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
|
/**
*******************************************************************************
*
* @file rc_hidau.h
*
* @brief Voice over HID application part
*
* Copyright (C) Atmosic 2021
*
*******************************************************************************
*/
#pragma once
#ifdef CFG_PDM_MSBC
#include "sbc_enc_wrapper.h"
#define HID_AU_REPORT_SIZE (MSBC_ENC_SIZE * 2)
#else
#define HID_AU_REPORT_SIZE 128
#endif
/**
*******************************************************************************
* @brief Start Audio search.
*******************************************************************************
*/
void rc_hidau_start_search(void);
/**
*******************************************************************************
* @brief Stop Audio search.
*******************************************************************************
*/
void rc_hidau_stop_search(void);
/**
*******************************************************************************
* @brief Get audio frame
*
* @param[out] frame Byte point of audio frame
* @return Residual number from pointer.
*******************************************************************************
*/
uint16_t rc_hidau_frame_get(uint8_t **frame);
/**
*******************************************************************************
* @brief Move audio frame pointer forward
*
* @param[in] count Byte count to move
* @return Actual moved byte count.
* @note If reach the end, rc_bta will send it out. If current frame is not
* enough, the actual moving count would be the residual number.
*******************************************************************************
*/
uint16_t rc_hidau_frame_ptr_move(uint16_t count);
/**
*******************************************************************************
* @brief Fill data to audio frame.
*
* @param[in] pcm PCM data.
* @note If reach the end of frame, rc_bta will send it out.
*******************************************************************************
*/
void rc_hidau_fill_pcm(uint8_t pcm);
/**
*******************************************************************************
* @brief Initialize ATVV environment.
*******************************************************************************
*/
void rc_hidau_init(void);
#ifdef CFG_PDM_LOCAL_TEST
/**
*******************************************************************************
* @brief ATVV test start
*
* @note This is used for ATVV flow unit test locally.
*******************************************************************************
*/
void rc_hidau_test_start(void);
/**
*******************************************************************************
* @brief Pretend the bad link situation without allocating buffers.
*
* @note This is used for ATVV flow unit test locally.
*******************************************************************************
*/
void rc_hidau_fake_bad_link(void);
#endif // CFG_PDM_LOCAL_TEST
|