Lines Matching +full:rpmsg +full:- +full:audio +full:- +full:channel
1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * Copyright 2017-2021 NXP
6 * Communication stack of audio with rpmsg
11 * +---------------+-------------------------------+
13 * +---------------+-------------------------------+
15 * +---------------+---+---+---+---+---+---+---+---+
17 * +---------------+---+---+---+---+---+---+---+---+
19 * +---------------+---+---+---+---+---+---+---+---+
21 * +---------------+---+---+---+---+---+---+---+---+
23 * +---------------+---+---+---+---+---+---+---+---+
25 * +---------------+---+---+---+---+---+---+---+---+
27 * +---------------+---+---+---+---+---+---+---+---+
29 * +---------------+---+---+---+---+---+---+---+---+
31 * +---------------+---+---+---+---+---+---+---+---+
33 * +---------------+---+---+---+---+---+---+---+---+
35 * +---------------+---+---+---+---+---+---+---+---+
37 * +---------------+---+---+---+---+---+---+---+---+
38 * | N + 10 - 1 | DATA N-1 |
39 * +---------------+---+---+---+---+---+---+---+---+
41 * +----------+------------+------------------------------------------------+
43 * +----------+------------+------------------------------------------------+
45 * +----------+------------+------------------------------------------------+
51 * +----------+------------+------------------------------------------------+
53 * +----------+------------+------------------------------------------------+
55 * +----------+------------+------------------------------------------------+
57 * +----------+------------+------------------------------------------------+
59 * +----------+------------+------------------------------------------------+
61 * Audio control:
62 * SRTM Audio Control Category Request Command Table:
63 * +----------+---------+------+---------+-------------------------------+-----------------------+
65 * +----------+---------+------+---------+-------------------------------+-----------------------+
66 * | 0x03 | 0x0100 | 0x00 | 0x00 | Data[0]: Audio Device Index | Open a TX Instance. |
69 * | | | | | Data[3-6]: samplerate | |
70 * | | | | | Data[7-10]: buffer_addr | |
71 * | | | | | Data[11-14]: buffer_size | |
72 * | | | | | Data[15-18]: period_size | |
73 * | | | | | Data[19-22]: buffer_tail | |
74 * +----------+---------+------+---------+-------------------------------+-----------------------+
75 * | 0x03 | 0x0100 | 0x00 | 0x01 | Data[0]: Audio Device Index | Start a TX Instance. |
77 * +----------+---------+------+---------+-------------------------------+-----------------------+
78 * | 0x03 | 0x0100 | 0x00 | 0x02 | Data[0]: Audio Device Index | Pause a TX Instance. |
80 * +----------+---------+------+---------+-------------------------------+-----------------------+
81 * | 0x03 | 0x0100 | 0x00 | 0x03 | Data[0]: Audio Device Index | Resume a TX Instance. |
82 * +----------+---------+------+---------+-------------------------------+-----------------------+
83 * | 0x03 | 0x0100 | 0x00 | 0x04 | Data[0]: Audio Device Index | Stop a TX Instance. |
84 * +----------+---------+------+---------+-------------------------------+-----------------------+
85 * | 0x03 | 0x0100 | 0x00 | 0x05 | Data[0]: Audio Device Index | Close a TX Instance. |
86 * +----------+---------+------+---------+-------------------------------+-----------------------+
87 * | 0x03 | 0x0100 | 0x00 | 0x06 | Data[0]: Audio Device Index | Set Parameters for |
90 * | | | | | Data[3-6]: samplerate | |
91 * | | | | | Data[7-22]: reserved | |
92 * +----------+---------+------+---------+-------------------------------+-----------------------+
93 * | 0x03 | 0x0100 | 0x00 | 0x07 | Data[0]: Audio Device Index | Set TX Buffer. |
94 * | | | | | Data[1-6]: reserved | |
95 * | | | | | Data[7-10]: buffer_addr | |
96 * | | | | | Data[11-14]: buffer_size | |
97 * | | | | | Data[15-18]: period_size | |
98 * | | | | | Data[19-22]: buffer_tail | |
99 * +----------+---------+------+---------+-------------------------------+-----------------------+
100 * | 0x03 | 0x0100 | 0x00 | 0x08 | Data[0]: Audio Device Index | Suspend a TX Instance |
101 * +----------+---------+------+---------+-------------------------------+-----------------------+
102 * | 0x03 | 0x0100 | 0x00 | 0x09 | Data[0]: Audio Device Index | Resume a TX Instance. |
105 * | | | | | Data[3-6]: samplerate | |
106 * | | | | | Data[7-10]: buffer_addr | |
107 * | | | | | Data[11-14]: buffer_size | |
108 * | | | | | Data[15-18]: period_size | |
109 * | | | | | Data[19-22]: buffer_tail | |
110 * +----------+---------+------+---------+-------------------------------+-----------------------+
111 * | 0x03 | 0x0100 | 0x00 | 0x0A | Data[0]: Audio Device Index | Open a RX Instance. |
112 * +----------+---------+------+---------+-------------------------------+-----------------------+
113 * | 0x03 | 0x0100 | 0x00 | 0x0B | Data[0]: Audio Device Index | Start a RX Instance. |
114 * +----------+---------+------+---------+-------------------------------+-----------------------+
115 * | 0x03 | 0x0100 | 0x00 | 0x0C | Data[0]: Audio Device Index | Pause a RX Instance. |
116 * +----------+---------+------+---------+-------------------------------+-----------------------+
117 * | 0x03 | 0x0100 | 0x00 | 0x0D | Data[0]: Audio Device Index | Resume a RX Instance. |
118 * +----------+---------+------+---------+-------------------------------+-----------------------+
119 * | 0x03 | 0x0100 | 0x00 | 0x0E | Data[0]: Audio Device Index | Stop a RX Instance. |
120 * +----------+---------+------+---------+-------------------------------+-----------------------+
121 * | 0x03 | 0x0100 | 0x00 | 0x0F | Data[0]: Audio Device Index | Close a RX Instance. |
122 * +----------+---------+------+---------+-------------------------------+-----------------------+
123 * | 0x03 | 0x0100 | 0x00 | 0x10 | Data[0]: Audio Device Index | Set Parameters for |
126 * | | | | | Data[3-6]: samplerate | |
127 * | | | | | Data[7-22]: reserved | |
128 * +----------+---------+------+---------+-------------------------------+-----------------------+
129 * | 0x03 | 0x0100 | 0x00 | 0x11 | Data[0]: Audio Device Index | Set RX Buffer. |
130 * | | | | | Data[1-6]: reserved | |
131 * | | | | | Data[7-10]: buffer_addr | |
132 * | | | | | Data[11-14]: buffer_size | |
133 * | | | | | Data[15-18]: period_size | |
134 * | | | | | Data[19-22]: buffer_tail | |
135 * +----------+---------+------+---------+-------------------------------+-----------------------+
136 * | 0x03 | 0x0100 | 0x00 | 0x12 | Data[0]: Audio Device Index | Suspend a RX Instance.|
137 * +----------+---------+------+---------+-------------------------------+-----------------------+
138 * | 0x03 | 0x0100 | 0x00 | 0x13 | Data[0]: Audio Device Index | Resume a RX Instance. |
141 * | | | | | Data[3-6]: samplerate | |
142 * | | | | | Data[7-10]: buffer_addr | |
143 * | | | | | Data[11-14]: buffer_size | |
144 * | | | | | Data[15-18]: period_size | |
145 * | | | | | Data[19-22]: buffer_tail | |
146 * +----------+---------+------+---------+-------------------------------+-----------------------+
147 * | 0x03 | 0x0100 | 0x00 | 0x14 | Data[0]: Audio Device Index | Set register value |
148 * | | | | | Data[1-6]: reserved | to codec |
149 * | | | | | Data[7-10]: register | |
150 * | | | | | Data[11-14]: value | |
151 * | | | | | Data[15-22]: reserved | |
152 * +----------+---------+------+---------+-------------------------------+-----------------------+
153 * | 0x03 | 0x0100 | 0x00 | 0x15 | Data[0]: Audio Device Index | Get register value |
154 * | | | | | Data[1-6]: reserved | from codec |
155 * | | | | | Data[7-10]: register | |
156 * | | | | | Data[11-22]: reserved | |
157 * +----------+---------+------+---------+-------------------------------+-----------------------+
160 * Note 2: See <List of Audio Channels> for available value of Channels;
161 * Note 3: Sample Rate of Set Parameters for an Audio TX Instance
162 * Command and Set Parameters for an Audio RX Instance Command is
163 * in little-endian format.
165 * SRTM Audio Control Category Response Command Table:
166 * +----------+---------+------+---------+-------------------------------+-----------------------+
168 * +----------+---------+------+---------+-------------------------------+-----------------------+
169 * | 0x03 | 0x0100 | 0x01 | 0x00 | Data[0]: Audio Device Index | Reply for Open |
171 * +----------+---------+------+---------+-------------------------------+-----------------------+
172 * | 0x03 | 0x0100 | 0x01 | 0x01 | Data[0]: Audio Device Index | Reply for Start |
174 * +----------+---------+------+---------+-------------------------------+-----------------------+
175 * | 0x03 | 0x0100 | 0x01 | 0x02 | Data[0]: Audio Device Index | Reply for Pause |
177 * +----------+---------+------+---------+-------------------------------+-----------------------+
178 * | 0x03 | 0x0100 | 0x01 | 0x03 | Data[0]: Audio Device Index | Reply for Resume |
180 * +----------+---------+------+---------+-------------------------------+-----------------------+
181 * | 0x03 | 0x0100 | 0x01 | 0x04 | Data[0]: Audio Device Index | Reply for Stop |
183 * +----------+---------+------+---------+-------------------------------+-----------------------+
184 * | 0x03 | 0x0100 | 0x01 | 0x05 | Data[0]: Audio Device Index | Reply for Close |
186 * +----------+---------+------+---------+-------------------------------+-----------------------+
187 * | 0x03 | 0x0100 | 0x01 | 0x06 | Data[0]: Audio Device Index | Reply for Set Param |
189 * +----------+---------+------+---------+-------------------------------+-----------------------+
190 * | 0x03 | 0x0100 | 0x01 | 0x07 | Data[0]: Audio Device Index | Reply for Set |
192 * +----------+---------+------+---------+-------------------------------+-----------------------+
193 * | 0x03 | 0x0100 | 0x01 | 0x08 | Data[0]: Audio Device Index | Reply for Suspend |
195 * +----------+---------+------+---------+-------------------------------+-----------------------+
196 * | 0x03 | 0x0100 | 0x01 | 0x09 | Data[0]: Audio Device Index | Reply for Resume |
198 * +----------+---------+------+---------+-------------------------------+-----------------------+
199 * | 0x03 | 0x0100 | 0x01 | 0x0A | Data[0]: Audio Device Index | Reply for Open |
201 * +----------+---------+------+---------+-------------------------------+-----------------------+
202 * | 0x03 | 0x0100 | 0x01 | 0x0B | Data[0]: Audio Device Index | Reply for Start |
204 * +----------+---------+------+---------+-------------------------------+-----------------------+
205 * | 0x03 | 0x0100 | 0x01 | 0x0C | Data[0]: Audio Device Index | Reply for Pause |
207 * +----------+---------+------+---------+-------------------------------+-----------------------+
208 * | 0x03 | 0x0100 | 0x01 | 0x0D | Data[0]: Audio Device Index | Reply for Resume |
210 * +----------+---------+------+---------+-------------------------------+-----------------------+
211 * | 0x03 | 0x0100 | 0x01 | 0x0E | Data[0]: Audio Device Index | Reply for Stop |
213 * +----------+---------+------+---------+-------------------------------+-----------------------+
214 * | 0x03 | 0x0100 | 0x01 | 0x0F | Data[0]: Audio Device Index | Reply for Close |
216 * +----------+---------+------+---------+-------------------------------+-----------------------+
217 * | 0x03 | 0x0100 | 0x01 | 0x10 | Data[0]: Audio Device Index | Reply for Set Param |
219 * +----------+---------+------+---------+-------------------------------+-----------------------+
220 * | 0x03 | 0x0100 | 0x01 | 0x11 | Data[0]: Audio Device Index | Reply for Set |
222 * +----------+---------+------+---------+-------------------------------+-----------------------+
223 * | 0x03 | 0x0100 | 0x01 | 0x12 | Data[0]: Audio Device Index | Reply for Suspend |
225 * +----------+---------+------+---------+-------------------------------+-----------------------+
226 * | 0x03 | 0x0100 | 0x01 | 0x13 | Data[0]: Audio Device Index | Reply for Resume |
228 * +----------+---------+------+---------+-------------------------------+-----------------------+
229 * | 0x03 | 0x0100 | 0x01 | 0x14 | Data[0]: Audio Device Index | Reply for Set codec |
231 * +----------+---------+------+---------+-------------------------------+-----------------------+
232 * | 0x03 | 0x0100 | 0x01 | 0x15 | Data[0]: Audio Device Index | Reply for Get codec |
234 * | | | | | Data[2-6]: reserved | |
235 * | | | | | Data[7-10]: register | |
236 * | | | | | Data[11-14]: value | |
237 * | | | | | Data[15-22]: reserved | |
238 * +----------+---------+------+---------+-------------------------------+-----------------------+
240 * SRTM Audio Control Category Notification Command Table:
241 * +----------+---------+------+---------+-------------------------------+-----------------------+
243 * +----------+---------+------+---------+-------------------------------+-----------------------+
244 * | 0x03 | 0x0100 | 0x02 | 0x00 | Data[0]: Audio Device Index | Notify one TX period |
246 * +----------+---------+------+---------+-------------------------------+-----------------------+
247 * | 0x03 | 0x0100 | 0x02 | 0x01 | Data[0]: Audio Device Index | Notify one RX period |
249 * +----------+---------+------+---------+-------------------------------+-----------------------+
252 * +------------------+-----------------------+
254 * +------------------+-----------------------+
256 * +------------------+-----------------------+
258 * +------------------+-----------------------+
260 * List of Audio Channels
261 * +------------------+-----------------------+
262 * | Audio Channel | Description |
263 * +------------------+-----------------------+
264 * | 0x0 | Left Channel |
265 * +------------------+-----------------------+
266 * | 0x1 | Right Channel |
267 * +------------------+---------------- ------+
268 * | 0x2 | Left & Right Channel |
269 * +------------------+-----------------------+
282 /* RPMSG Command (TYPE A)*/
311 /* RPMSG Command (TYPE C)*/
350 /* rpmsg version */
358 * struct rpmsg_head: rpmsg header structure
377 * struct param_s: sent rpmsg parameter
379 * @audioindex: audio instance index
380 * @format: audio format
381 * @channels: audio channel number
400 * struct param_s: send rpmsg parameter
402 * @audioindex: audio instance index
434 /* Struct of rpmsg */
440 /* Struct of rpmsg for workqueue */
458 * struct rpmsg_info: rpmsg audio information
464 * @r_msg: received rpmsg
465 * @msg: array of rpmsg
468 * @rpmsg_wq: rpmsg workqueue