1 /* SPDX-License-Identifier: GPL-2.0-only */
4 #include <drivers/i2c/tas5825m/tas5825m.h>
6 static int program_dsp_ram(struct device
*dev
)
10 res
= tas5825m_set_book(dev
, 0x64);
14 res
= tas5825m_set_page(dev
, 0x01);
19 const uint8_t values
[] = {
20 0x00, 0xFE, 0x00, 0x40, 0x00, 0xFC, 0x00, 0x00,
21 0x00, 0xFC, 0x00, 0x00, 0x00, 0xFC, 0x00, 0x00,
22 0x00, 0xFC, 0x00, 0x00, 0x00, 0xFC, 0x00, 0x00,
23 0x00, 0xFC, 0x00, 0x00, 0x00, 0xFC, 0x00, 0x00,
24 0x00, 0xFC, 0x50, 0x00, 0x00, 0xFC, 0x00, 0x00,
25 0x00, 0xFC, 0x00, 0x00, 0x00, 0xFC, 0x00, 0x00,
26 0x00, 0xFC, 0x00, 0x00, 0x00, 0xFC, 0x00, 0x00,
27 0x00, 0xFC, 0x00, 0x00, 0x00, 0xFC, 0x00, 0x00,
28 0x00, 0xFC, 0x00, 0x00, 0x00, 0xFC, 0x00, 0x00,
29 0x00, 0xFC, 0x00, 0x00, 0x00, 0xFC, 0x00, 0x00,
30 0x00, 0xFC, 0x00, 0x00, 0x00, 0xFC, 0x00, 0x00,
31 0x00, 0xFC, 0x00, 0x00, 0x00, 0xFC, 0x00, 0x00,
32 0x00, 0x82, 0x00, 0x93, 0x00, 0xFC, 0x00, 0x00,
33 0x84, 0xC1, 0x02, 0x9F, 0x08, 0x18, 0x10, 0x00,
34 0x02, 0x28, 0x00, 0x03, 0x8F, 0x00, 0xFF, 0xF8,
36 res
= tas5825m_write_block_at(dev
, 0x08, values
, ARRAY_SIZE(values
));
41 res
= tas5825m_set_page(dev
, 0x02);
46 const uint8_t values
[] = {
47 0x02, 0x60, 0x00, 0x01, 0x84, 0xA0, 0x02, 0x00,
48 0x84, 0x02, 0x04, 0x03, 0x00, 0x26, 0x20, 0x96,
49 0x84, 0xA2, 0x04, 0x02, 0x84, 0xC1, 0x02, 0xBC,
50 0x84, 0x49, 0x03, 0x64, 0x08, 0xFC, 0x0C, 0x99,
51 0x02, 0x70, 0x00, 0x04, 0x84, 0xC1, 0x02, 0xBD,
52 0xE0, 0x10, 0x31, 0xAD, 0x84, 0xCA, 0x20, 0xE0,
53 0xF0, 0x1C, 0x31, 0xAE, 0xF0, 0x1C, 0x31, 0xAF,
54 0x02, 0x68, 0x00, 0x03, 0xF0, 0x1C, 0x31, 0xB0,
55 0xF0, 0x1D, 0x31, 0xB1, 0x02, 0x78, 0x00, 0x02,
56 0x84, 0x41, 0x03, 0x78, 0x80, 0x27, 0x80, 0xF9,
57 0x08, 0xFC, 0x0C, 0x98, 0x84, 0x83, 0x03, 0x6A,
58 0xE0, 0x10, 0x11, 0xAD, 0x84, 0xC2, 0x00, 0xE0,
59 0xF0, 0x1C, 0x11, 0xAE, 0xF0, 0x1C, 0x11, 0xAF,
60 0xF0, 0x1C, 0x11, 0xB0, 0xF0, 0x1D, 0x11, 0xB1,
61 0x84, 0x59, 0x03, 0x65, 0x80, 0x27, 0x80, 0xF8,
63 res
= tas5825m_write_block_at(dev
, 0x08, values
, ARRAY_SIZE(values
));
68 res
= tas5825m_set_page(dev
, 0x03);
73 const uint8_t values
[] = {
74 0x84, 0x83, 0x03, 0x6B, 0xE2, 0x57, 0x91, 0xB2,
75 0x84, 0xC1, 0x02, 0xBD, 0x84, 0x82, 0x60, 0xE0,
76 0xF0, 0x1C, 0x71, 0xB3, 0xF0, 0x1C, 0x71, 0xB4,
77 0xF0, 0x1C, 0x71, 0xB5, 0xF0, 0x1D, 0x71, 0xB6,
78 0x84, 0x51, 0x03, 0x79, 0x80, 0x27, 0x80, 0xFB,
79 0x84, 0x83, 0x03, 0x6C, 0xE0, 0x10, 0x11, 0xB2,
80 0x84, 0xC2, 0x40, 0xE0, 0xF0, 0x1C, 0x51, 0xB3,
81 0xF0, 0x1C, 0x51, 0xB4, 0xF0, 0x1C, 0x51, 0xB5,
82 0xF0, 0x1D, 0x51, 0xB6, 0x84, 0x4B, 0x03, 0x64,
83 0x84, 0x49, 0x03, 0x77, 0x86, 0xA1, 0x01, 0xB7,
84 0x84, 0x43, 0x03, 0x78, 0x02, 0x11, 0xFF, 0xFC,
85 0x84, 0x41, 0x03, 0x7E, 0x80, 0x27, 0x80, 0xFA,
86 0x84, 0x83, 0x03, 0x6D, 0xE2, 0x57, 0x80, 0x00,
87 0x84, 0xC1, 0x02, 0xBD, 0x84, 0x82, 0x20, 0xE0,
88 0xF0, 0x1C, 0x31, 0xB8, 0xF0, 0x1C, 0x31, 0xB9,
90 res
= tas5825m_write_block_at(dev
, 0x08, values
, ARRAY_SIZE(values
));
95 res
= tas5825m_set_page(dev
, 0x04);
100 const uint8_t values
[] = {
101 0xF0, 0x1C, 0x31, 0xBA, 0xF0, 0x1D, 0x31, 0xBB,
102 0x86, 0xA1, 0x01, 0xB7, 0x80, 0x27, 0x80, 0xF9,
103 0x84, 0x83, 0x03, 0x6E, 0xE0, 0x10, 0x00, 0x00,
104 0x84, 0xC2, 0x00, 0xE0, 0xF0, 0x1C, 0x11, 0xB8,
105 0xF0, 0x1C, 0x11, 0xB9, 0xF0, 0x1C, 0x11, 0xBA,
106 0xF0, 0x1D, 0x11, 0xBB, 0x86, 0xA1, 0x01, 0x9D,
107 0x80, 0x27, 0x80, 0xF8, 0x84, 0x83, 0x03, 0x6F,
108 0x84, 0x5B, 0x03, 0x65, 0x66, 0x6D, 0x60, 0x00,
109 0xEE, 0x64, 0x80, 0x00, 0x02, 0xC3, 0x00, 0x10,
110 0x62, 0x6D, 0x40, 0x00, 0xEA, 0x64, 0x60, 0x00,
111 0x02, 0xD3, 0x00, 0x10, 0x88, 0x47, 0x00, 0x81,
112 0x09, 0x07, 0x08, 0x88, 0x08, 0xFC, 0x28, 0x53,
113 0x0D, 0x00, 0x10, 0x18, 0x84, 0xC3, 0x03, 0x24,
114 0x08, 0x60, 0x28, 0x50, 0x84, 0x80, 0x04, 0x02,
115 0xE4, 0x00, 0x00, 0x80, 0x86, 0xC1, 0x01, 0x9F,
117 res
= tas5825m_write_block_at(dev
, 0x08, values
, ARRAY_SIZE(values
));
122 res
= tas5825m_set_page(dev
, 0x05);
127 const uint8_t values
[] = {
128 0x88, 0x47, 0x20, 0x81, 0x0D, 0x00, 0x10, 0x20,
129 0x84, 0x53, 0x03, 0x79, 0x84, 0x4B, 0x03, 0x77,
130 0x84, 0x43, 0x03, 0x7E, 0x00, 0x42, 0x20, 0x85,
131 0x84, 0xDB, 0x03, 0x23, 0x08, 0xFC, 0x38, 0x10,
132 0x02, 0x48, 0x02, 0xBC, 0x02, 0x40, 0x02, 0xBD,
133 0xE4, 0x10, 0x11, 0x9E, 0x00, 0xFE, 0x20, 0x88,
134 0x88, 0x6C, 0x00, 0x00, 0x02, 0x48, 0x02, 0xBC,
135 0x02, 0x40, 0x02, 0xBD, 0x02, 0x80, 0x00, 0x00,
136 0x84, 0xA1, 0x03, 0x6F, 0xE4, 0x00, 0x00, 0x00,
137 0x84, 0xA1, 0x03, 0x6E, 0x84, 0xD1, 0x03, 0x6C,
138 0xE0, 0x00, 0x00, 0x00, 0xE8, 0x00, 0x00, 0x82,
139 0x84, 0xC9, 0x03, 0x6D, 0x88, 0x07, 0x00, 0x80,
140 0xEC, 0x00, 0x00, 0x81, 0x10, 0x00, 0x18, 0x01,
141 0x88, 0x47, 0x00, 0x80, 0x02, 0x50, 0x02, 0xBC,
142 0x00, 0xFE, 0x20, 0x99, 0x0C, 0x20, 0x08, 0x20,
144 res
= tas5825m_write_block_at(dev
, 0x08, values
, ARRAY_SIZE(values
));
149 res
= tas5825m_set_page(dev
, 0x06);
154 const uint8_t values
[] = {
155 0x02, 0x78, 0x00, 0x02, 0x02, 0x50, 0x02, 0xBC,
156 0x02, 0x40, 0x02, 0xBD, 0x02, 0x70, 0x00, 0x06,
157 0x84, 0x59, 0x03, 0x4F, 0xE2, 0x57, 0x91, 0xBC,
158 0x02, 0xC3, 0x00, 0x10, 0x84, 0xC9, 0x02, 0xBD,
159 0x84, 0xC2, 0x60, 0xE0, 0xF0, 0x1C, 0x71, 0xBD,
160 0xF0, 0x1C, 0x71, 0xBE, 0x02, 0x68, 0x00, 0x05,
161 0xF0, 0x1C, 0x71, 0xBF, 0xF0, 0x1D, 0x71, 0xC0,
162 0xE4, 0x00, 0x11, 0xC3, 0x80, 0x27, 0x80, 0xE3,
163 0xF4, 0x00, 0x11, 0xC1, 0xF4, 0x1F, 0x71, 0xC2,
164 0xF4, 0x1C, 0x71, 0xC4, 0xF4, 0x1D, 0x71, 0xC5,
165 0x84, 0x49, 0x03, 0x57, 0x80, 0x67, 0x80, 0xFB,
166 0x02, 0xD3, 0x00, 0x10, 0xE0, 0x10, 0x31, 0xBC,
167 0x84, 0xCA, 0x20, 0xE0, 0xF0, 0x1C, 0x31, 0xBD,
168 0xF0, 0x1C, 0x31, 0xBE, 0xF0, 0x1C, 0x31, 0xBF,
169 0xF0, 0x1D, 0x31, 0xC0, 0xE4, 0x00, 0x11, 0xC3,
171 res
= tas5825m_write_block_at(dev
, 0x08, values
, ARRAY_SIZE(values
));
176 res
= tas5825m_set_page(dev
, 0x07);
181 const uint8_t values
[] = {
182 0x80, 0x27, 0x80, 0xE1, 0xF4, 0x00, 0x11, 0xC1,
183 0xF4, 0x1F, 0x31, 0xC2, 0xF4, 0x1C, 0x31, 0xC4,
184 0xF4, 0x1D, 0x31, 0xC5, 0x84, 0xC2, 0x04, 0x05,
185 0x08, 0xFC, 0x58, 0x10, 0x80, 0x67, 0x80, 0xF9,
186 0x02, 0xD3, 0x00, 0x10, 0x84, 0xCA, 0x04, 0x04,
187 0x08, 0xFC, 0x58, 0x31, 0x84, 0xCA, 0x04, 0x06,
188 0x08, 0x00, 0x0A, 0x21, 0x84, 0xC2, 0x04, 0x07,
189 0x08, 0x00, 0x0A, 0x00, 0xE4, 0x10, 0x31, 0xA3,
190 0xE0, 0x10, 0x00, 0x00, 0xEA, 0x65, 0x60, 0x00,
191 0x02, 0xC3, 0x00, 0x10, 0xEE, 0x65, 0x80, 0x00,
192 0x02, 0xCB, 0x00, 0x10, 0x88, 0x47, 0x00, 0x82,
193 0x09, 0x07, 0x09, 0x31, 0x08, 0xFC, 0x48, 0x13,
194 0x0D, 0x00, 0x10, 0x38, 0x84, 0xCB, 0x03, 0x2C,
195 0x08, 0x60, 0x48, 0x11, 0x84, 0x80, 0x04, 0x02,
196 0xE4, 0x00, 0x00, 0x81, 0x02, 0x28, 0x00, 0x02,
198 res
= tas5825m_write_block_at(dev
, 0x08, values
, ARRAY_SIZE(values
));
203 res
= tas5825m_set_page(dev
, 0x08);
208 const uint8_t values
[] = {
209 0x88, 0x67, 0x20, 0x00, 0xE4, 0x00, 0x02, 0x00,
210 0x84, 0xDB, 0x03, 0x2B, 0x80, 0x48, 0x00, 0x81,
211 0x86, 0xD9, 0x01, 0xA9, 0x86, 0xC1, 0x01, 0xAA,
212 0x0D, 0x00, 0x10, 0x38, 0x08, 0xFC, 0x3C, 0x12,
213 0x84, 0x5B, 0x03, 0x4F, 0x84, 0x4B, 0x03, 0x57,
214 0x84, 0xD2, 0x04, 0x02, 0x00, 0x62, 0x20, 0xE4,
215 0x86, 0xD1, 0x01, 0xAC, 0x0D, 0x00, 0x10, 0x20,
216 0x86, 0xC9, 0x01, 0xA8, 0x86, 0xC1, 0x01, 0xA7,
217 0x00, 0xFE, 0x20, 0xE8, 0x08, 0x44, 0x26, 0x30,
218 0x08, 0xFC, 0x3C, 0x71, 0x86, 0xC1, 0x01, 0xA6,
219 0x84, 0xCA, 0x04, 0x02, 0x86, 0xD1, 0x01, 0xAB,
220 0x84, 0x80, 0x04, 0x02, 0xE4, 0x00, 0x00, 0x80,
221 0x88, 0x40, 0x00, 0x80, 0x08, 0xFC, 0x08, 0x50,
222 0x02, 0x28, 0x00, 0x01, 0x02, 0xA3, 0x00, 0x18,
223 0xE4, 0x40, 0x00, 0x00, 0x88, 0xC8, 0x00, 0x82,
225 res
= tas5825m_write_block_at(dev
, 0x08, values
, ARRAY_SIZE(values
));
230 res
= tas5825m_set_page(dev
, 0x09);
235 const uint8_t values
[] = {
236 0x84, 0xC9, 0x03, 0x2D, 0x86, 0xC1, 0x01, 0xA5,
237 0x86, 0xD9, 0x01, 0xA4, 0x0D, 0x00, 0x10, 0x48,
238 0x08, 0x44, 0x06, 0x13, 0x86, 0xC1, 0x01, 0xEF,
239 0x84, 0x49, 0x03, 0x37, 0x00, 0xFC, 0x00, 0x00,
240 0xE4, 0x10, 0x40, 0x83, 0xEC, 0x10, 0x20, 0x00,
241 0x88, 0x47, 0x00, 0x82, 0x04, 0x80, 0xA8, 0xB3,
242 0x84, 0x80, 0x04, 0x07, 0xE4, 0x00, 0x00, 0x83,
243 0x84, 0xDB, 0x03, 0x2D, 0x88, 0x40, 0x00, 0x83,
244 0x10, 0x00, 0x1A, 0x22, 0xE4, 0x80, 0xC0, 0x00,
245 0x88, 0x40, 0x00, 0x81, 0x84, 0xD8, 0x04, 0x04,
246 0x0C, 0x20, 0x08, 0x39, 0x86, 0xD1, 0x01, 0xF0,
247 0x84, 0x81, 0x02, 0xBC, 0x86, 0xC9, 0x01, 0xF1,
248 0xE0, 0x00, 0x11, 0xC7, 0x84, 0x82, 0x20, 0xE0,
249 0x84, 0x82, 0x04, 0x02, 0xF0, 0x1C, 0x31, 0xC8,
250 0xF0, 0x1C, 0x31, 0xC9, 0xF0, 0x1C, 0x31, 0xCA,
252 res
= tas5825m_write_block_at(dev
, 0x08, values
, ARRAY_SIZE(values
));
257 res
= tas5825m_set_page(dev
, 0x0A);
262 const uint8_t values
[] = {
263 0xF0, 0x1D, 0x31, 0xCB, 0xE4, 0x00, 0x11, 0xCE,
264 0x80, 0x27, 0x80, 0xE1, 0xF4, 0x00, 0x11, 0xCC,
265 0xF4, 0x1F, 0x31, 0xCD, 0xF4, 0x1C, 0x31, 0xCF,
266 0xF4, 0x1D, 0x31, 0xD0, 0x84, 0x41, 0x03, 0x2F,
267 0x80, 0x67, 0x80, 0xF9, 0x02, 0xDB, 0x00, 0x10,
268 0x8F, 0x30, 0x00, 0x00, 0x0C, 0x1C, 0x11, 0x74,
269 0x08, 0x64, 0x66, 0x72, 0x0D, 0x00, 0x10, 0x40,
270 0x08, 0x44, 0x06, 0x12, 0x84, 0xD2, 0x41, 0x00,
271 0xE0, 0x10, 0x51, 0xD1, 0xF0, 0x1C, 0x11, 0xD2,
272 0xF0, 0x1C, 0x11, 0xD3, 0xF0, 0x1C, 0x11, 0xD4,
273 0xF0, 0x1D, 0x11, 0xD5, 0xE4, 0x00, 0x11, 0xD8,
274 0x80, 0x27, 0x80, 0xE0, 0xF4, 0x00, 0x11, 0xD6,
275 0xF4, 0x20, 0x11, 0xD7, 0x84, 0x84, 0x00, 0xF8,
276 0xF4, 0x1C, 0x11, 0xD9, 0x84, 0x4B, 0x03, 0x37,
277 0xF4, 0x1D, 0x11, 0xDA, 0x84, 0x49, 0x03, 0x5F,
279 res
= tas5825m_write_block_at(dev
, 0x08, values
, ARRAY_SIZE(values
));
284 res
= tas5825m_set_page(dev
, 0x0B);
289 const uint8_t values
[] = {
290 0x80, 0x67, 0x80, 0xF8, 0xE0, 0x00, 0x11, 0xDB,
291 0x84, 0x82, 0x21, 0x00, 0x84, 0x82, 0x20, 0xE0,
292 0xF0, 0x1C, 0x31, 0xDC, 0xF0, 0x1C, 0x31, 0xDD,
293 0xF0, 0x1C, 0x31, 0xDE, 0xF0, 0x1D, 0x31, 0xDF,
294 0xE4, 0x00, 0x11, 0xE2, 0x80, 0x27, 0x80, 0xE1,
295 0xF4, 0x00, 0x11, 0xE0, 0xF4, 0x1F, 0x31, 0xE1,
296 0xF4, 0x1C, 0x31, 0xE3, 0xF4, 0x1D, 0x31, 0xE4,
297 0x84, 0x51, 0x03, 0x60, 0x80, 0x67, 0x80, 0xF9,
298 0xE4, 0x00, 0x00, 0x81, 0xE0, 0x80, 0x51, 0xE5,
299 0x84, 0x82, 0x40, 0xE0, 0xF0, 0x1C, 0x51, 0xE6,
300 0xF0, 0x1C, 0x51, 0xE7, 0xF0, 0x1C, 0x51, 0xE8,
301 0x88, 0x47, 0x00, 0x80, 0xF0, 0x1D, 0x51, 0xE9,
302 0xE4, 0x00, 0x11, 0xEC, 0x80, 0x27, 0x80, 0xE2,
303 0xF4, 0x00, 0x11, 0xEA, 0xF4, 0x1F, 0x51, 0xEB,
304 0xF4, 0x1C, 0x51, 0xED, 0xF4, 0x1D, 0x51, 0xEE,
306 res
= tas5825m_write_block_at(dev
, 0x08, values
, ARRAY_SIZE(values
));
311 res
= tas5825m_set_page(dev
, 0x0C);
316 const uint8_t values
[] = {
317 0x02, 0x58, 0x02, 0xBC, 0x08, 0xFC, 0x0D, 0x18,
318 0x80, 0x67, 0x80, 0xFA, 0x02, 0xD3, 0x00, 0x10,
319 0x10, 0x00, 0x18, 0x03, 0x84, 0x43, 0x03, 0x2F,
320 0x84, 0x4B, 0x03, 0x5F, 0x84, 0x53, 0x03, 0x60,
321 0x84, 0x41, 0x03, 0x47, 0x84, 0x51, 0x03, 0x3F,
322 0x84, 0xC1, 0x02, 0xBD, 0x00, 0xFC, 0x00, 0x00,
323 0x02, 0x48, 0x02, 0xBD, 0x02, 0x11, 0xFF, 0xF8,
324 0x86, 0xD1, 0x01, 0xEF, 0x86, 0xC9, 0x01, 0xF0,
325 0x86, 0x1D, 0x01, 0xF1, 0xE0, 0x10, 0x11, 0xC7,
326 0x86, 0xA1, 0x01, 0xC8, 0x84, 0xC2, 0x00, 0xE0,
327 0xF0, 0x1C, 0x00, 0x00, 0xF0, 0x1C, 0x11, 0xC9,
328 0xF0, 0x1C, 0x11, 0xCA, 0xF0, 0x1D, 0x11, 0xCB,
329 0xE4, 0x00, 0x11, 0xCE, 0x80, 0x27, 0x80, 0xE0,
330 0x84, 0x1E, 0x04, 0x02, 0x02, 0x78, 0x00, 0x02,
331 0xF4, 0x00, 0x11, 0xCC, 0xF4, 0x1F, 0x11, 0xCD,
333 res
= tas5825m_write_block_at(dev
, 0x08, values
, ARRAY_SIZE(values
));
338 res
= tas5825m_set_page(dev
, 0x0D);
343 const uint8_t values
[] = {
344 0xF4, 0x1C, 0x11, 0xCF, 0xF4, 0x1D, 0x11, 0xD0,
345 0x86, 0xA1, 0x01, 0xD1, 0x80, 0x67, 0x80, 0xF8,
346 0x84, 0x43, 0x03, 0x47, 0x84, 0x59, 0x03, 0x62,
347 0x8F, 0xA0, 0x00, 0x00, 0x02, 0xDB, 0x00, 0x10,
348 0x0C, 0x1C, 0x51, 0x6C, 0x08, 0x64, 0x66, 0x71,
349 0x0D, 0x00, 0x10, 0x30, 0x08, 0x44, 0x46, 0x51,
350 0x84, 0xCA, 0x01, 0x00, 0xE0, 0x10, 0x20, 0x00,
351 0xF0, 0x1C, 0x51, 0xD2, 0xF0, 0x1C, 0x51, 0xD3,
352 0xF0, 0x1C, 0x51, 0xD4, 0xF0, 0x1D, 0x51, 0xD5,
353 0xE4, 0x00, 0x11, 0xD8, 0x80, 0x27, 0x80, 0xE2,
354 0xF4, 0x00, 0x11, 0xD6, 0xF4, 0x1F, 0x51, 0xD7,
355 0xF4, 0x1C, 0x51, 0xD9, 0xF4, 0x1D, 0x51, 0xDA,
356 0x84, 0x41, 0x03, 0x61, 0x80, 0x67, 0x80, 0xFA,
357 0xE0, 0x00, 0x11, 0xDB, 0x84, 0x82, 0x01, 0x00,
358 0x84, 0x82, 0x00, 0xE0, 0xF0, 0x1C, 0x11, 0xDC,
360 res
= tas5825m_write_block_at(dev
, 0x08, values
, ARRAY_SIZE(values
));
365 res
= tas5825m_set_page(dev
, 0x0E);
370 const uint8_t values
[] = {
371 0xF0, 0x1C, 0x11, 0xDD, 0xF0, 0x1C, 0x11, 0xDE,
372 0xF0, 0x1D, 0x11, 0xDF, 0xE4, 0x00, 0x11, 0xE2,
373 0x80, 0x27, 0x80, 0xE0, 0xF4, 0x00, 0x11, 0xE0,
374 0xF4, 0x1F, 0x11, 0xE1, 0xF4, 0x1C, 0x11, 0xE3,
375 0x02, 0x83, 0x00, 0x18, 0x84, 0xC2, 0x60, 0xE0,
376 0x86, 0xC1, 0x01, 0xE4, 0xE0, 0x00, 0x11, 0xE5,
377 0xF4, 0x1D, 0x00, 0x80, 0x84, 0xA0, 0x04, 0x02,
378 0x80, 0x67, 0x80, 0xF8, 0xE4, 0x00, 0x00, 0x00,
379 0xF0, 0x1C, 0x71, 0xE6, 0xF0, 0x1C, 0x71, 0xE7,
380 0xF0, 0x1C, 0x71, 0xE8, 0xF0, 0x1D, 0x71, 0xE9,
381 0x86, 0xA1, 0x01, 0xEC, 0x88, 0x47, 0x00, 0x80,
382 0xE4, 0x00, 0x00, 0x00, 0x80, 0x27, 0x80, 0xE3,
383 0xF4, 0x00, 0x11, 0xEA, 0xF4, 0x1F, 0x71, 0xEB,
384 0xF4, 0x1C, 0x71, 0xED, 0xF4, 0x1D, 0x71, 0xEE,
385 0x86, 0xC9, 0x01, 0xA1, 0x80, 0x67, 0x80, 0xFB,
387 res
= tas5825m_write_block_at(dev
, 0x08, values
, ARRAY_SIZE(values
));
392 res
= tas5825m_set_page(dev
, 0x0F);
397 const uint8_t values
[] = {
398 0x84, 0x5B, 0x03, 0x62, 0x08, 0x00, 0x10, 0x20,
399 0x02, 0xD3, 0x00, 0x10, 0x84, 0x53, 0x03, 0x3F,
400 0x84, 0x43, 0x03, 0x61, 0x08, 0xFC, 0x0D, 0x18,
401 0x02, 0x50, 0x02, 0xBD, 0x00, 0x26, 0x21, 0xB7,
402 0x10, 0x00, 0x18, 0x01, 0x86, 0xC1, 0x01, 0xC6,
403 0x84, 0xC3, 0x03, 0x63, 0x02, 0xC0, 0x03, 0x63,
404 0x84, 0x52, 0x04, 0x00, 0x02, 0x48, 0x02, 0xBC,
405 0x84, 0xC2, 0x04, 0x01, 0x00, 0xFF, 0x10, 0xB0,
406 0x8C, 0xFF, 0x02, 0xBC, 0x00, 0xFE, 0x21, 0xDA,
407 0x00, 0xFC, 0x00, 0x00, 0x86, 0xC9, 0x01, 0xA0,
408 0x84, 0x81, 0x02, 0xBC, 0x02, 0xA3, 0x00, 0x10,
409 0xE4, 0x00, 0x00, 0x00, 0x84, 0x81, 0x02, 0xBD,
410 0x88, 0x47, 0x13, 0x25, 0x02, 0xA3, 0x00, 0x10,
411 0xE4, 0x00, 0x00, 0x00, 0x88, 0x47, 0x13, 0x26,
412 0x02, 0x40, 0x03, 0x28, 0x84, 0xC1, 0x03, 0x25,
414 res
= tas5825m_write_block_at(dev
, 0x08, values
, ARRAY_SIZE(values
));
419 res
= tas5825m_set_page(dev
, 0x10);
424 const uint8_t values
[] = {
425 0x00, 0xFF, 0x11, 0x4E, 0x00, 0xFC, 0x00, 0x00,
426 0x02, 0x40, 0x03, 0x29, 0x86, 0xC9, 0x01, 0xA0,
427 0x84, 0xC1, 0x03, 0x26, 0x00, 0xFF, 0x11, 0x4E,
428 0x00, 0xFC, 0x00, 0x00, 0x86, 0xC1, 0x01, 0xA2,
429 0x84, 0xC3, 0x03, 0x2A, 0x02, 0xC0, 0x03, 0x29,
430 0x02, 0xC8, 0x03, 0x26, 0x02, 0x40, 0x03, 0x28,
431 0x02, 0x48, 0x03, 0x25, 0x02, 0x50, 0x03, 0x2A,
432 0x84, 0xC2, 0x04, 0x00, 0x84, 0xCA, 0x04, 0x01,
433 0x00, 0xFF, 0x21, 0xDF, 0x00, 0xFC, 0x00, 0x00,
434 0x84, 0xA1, 0x02, 0xBC, 0xE6, 0x64, 0xA0, 0x00,
435 0x88, 0x47, 0x12, 0xBC, 0x84, 0xA1, 0x03, 0x26,
436 0xE6, 0x57, 0xA0, 0x00, 0x88, 0x47, 0x12, 0xBD,
437 0x84, 0x00, 0x04, 0x03, 0x00, 0xFC, 0x00, 0x00,
438 0x02, 0xC0, 0x00, 0x00, 0x00, 0xFC, 0x50, 0x00,
439 0x8F, 0x00, 0x00, 0x08, 0x8F, 0x00, 0xFF, 0xFF,
441 res
= tas5825m_write_block_at(dev
, 0x08, values
, ARRAY_SIZE(values
));
446 res
= tas5825m_set_page(dev
, 0x11);
451 const uint8_t values
[] = {
452 0x84, 0x58, 0x04, 0x01, 0x84, 0xA1, 0x03, 0x68,
453 0x84, 0xC1, 0x03, 0x67, 0xE0, 0xE0, 0x00, 0x00,
454 0x02, 0xCA, 0x60, 0x00, 0x40, 0x40, 0xA0, 0x00,
455 0x80, 0x00, 0xC0, 0x82, 0x08, 0xFC, 0x48, 0x3A,
456 0x08, 0xFC, 0x38, 0x52, 0x84, 0x58, 0x04, 0x02,
457 0xE0, 0x10, 0x40, 0x00, 0x84, 0xA0, 0x41, 0x00,
458 0x40, 0x47, 0x20, 0x00, 0x02, 0xD3, 0x00, 0x10,
459 0x84, 0xA2, 0x04, 0x00, 0x84, 0xA1, 0x03, 0x66,
460 0xE4, 0x20, 0x00, 0x00, 0x08, 0x00, 0x28, 0x42,
461 0x45, 0x40, 0xA0, 0x00, 0x80, 0x40, 0xC0, 0x83,
462 0x08, 0xFC, 0x68, 0x3B, 0x08, 0xFC, 0x38, 0x71,
463 0x84, 0xD3, 0x03, 0x68, 0xE4, 0x10, 0x20, 0x00,
464 0x84, 0xA0, 0x04, 0x00, 0x45, 0x47, 0x20, 0x00,
465 0x02, 0xD3, 0x00, 0x10, 0x80, 0x40, 0xC0, 0x81,
466 0x0D, 0x00, 0x10, 0x20, 0x08, 0x00, 0x28, 0x42,
468 res
= tas5825m_write_block_at(dev
, 0x08, values
, ARRAY_SIZE(values
));
473 res
= tas5825m_set_page(dev
, 0x12);
478 const uint8_t values
[] = {
479 0x84, 0xD3, 0x03, 0x66, 0x86, 0xD1, 0x01, 0x9C,
480 0x86, 0xD9, 0x01, 0x9B, 0x08, 0xFC, 0x3C, 0x11,
481 0x08, 0x44, 0x46, 0x53, 0x00, 0xFC, 0x00, 0x00,
482 0x02, 0x83, 0x00, 0x19, 0x02, 0xA3, 0x00, 0x1B,
483 0x80, 0x00, 0xC0, 0x83, 0x84, 0xC9, 0x03, 0x69,
484 0x0D, 0x00, 0x10, 0x68, 0x08, 0xFC, 0x7C, 0x33,
485 0xE0, 0x00, 0x00, 0x00, 0x02, 0x83, 0x00, 0x1B,
486 0x86, 0xD9, 0x01, 0x9B, 0x08, 0x44, 0x46, 0x53,
487 0x80, 0x07, 0x00, 0x82, 0xE0, 0x00, 0x00, 0x83,
488 0x80, 0x07, 0x00, 0x83, 0x0C, 0x60, 0x0C, 0x10,
489 0x0C, 0xE0, 0x0C, 0x39, 0x84, 0xC3, 0x03, 0x67,
490 0x84, 0xCB, 0x03, 0x69, 0x00, 0xFC, 0x50, 0x00,
491 0x8F, 0x00, 0x00, 0x01,
493 res
= tas5825m_write_block_at(dev
, 0x08, values
, ARRAY_SIZE(values
));
501 static int program_biquad_filters(struct device
*dev
)
505 res
= tas5825m_set_book(dev
, 0xAA);
509 res
= tas5825m_set_page(dev
, 0x01);
514 const uint8_t values
[] = {
515 0x07, 0xED, 0x50, 0x78, 0xF0, 0xBB, 0x11, 0x75,
516 0x07, 0x5C, 0xFB, 0x5D, 0x0F, 0x44, 0xEE, 0x8B,
517 0xF8, 0xB5, 0xB4, 0x2B, 0x07, 0xE4, 0x94, 0x67,
518 0xF1, 0x16, 0x72, 0x2F, 0x07, 0x10, 0xC7, 0x66,
519 0x0E, 0xE9, 0x8D, 0xD1, 0xF9, 0x0A, 0xA4, 0x33,
520 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
521 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
522 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
523 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
524 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
526 res
= tas5825m_write_block_at(dev
, 0x30, values
, ARRAY_SIZE(values
));
531 res
= tas5825m_set_page(dev
, 0x02);
536 const uint8_t values
[] = {
537 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
538 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
539 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
540 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
541 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
542 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
543 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
544 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
545 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
546 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
547 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
548 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
549 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
550 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
551 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
553 res
= tas5825m_write_block_at(dev
, 0x08, values
, ARRAY_SIZE(values
));
558 res
= tas5825m_set_page(dev
, 0x03);
563 const uint8_t values
[] = {
564 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
565 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
566 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
567 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
568 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
569 0x07, 0xB9, 0x96, 0x60, 0xF0, 0x8C, 0xD3, 0x40,
570 0x07, 0xB9, 0x96, 0x60, 0x0F, 0x71, 0xF1, 0x6F,
571 0xF8, 0x8B, 0x97, 0xF0, 0x07, 0xDB, 0xDE, 0xC0,
572 0xF0, 0x48, 0x42, 0x80, 0x07, 0xDB, 0xDE, 0xC0,
573 0x0F, 0xB6, 0x7C, 0xB8, 0xF8, 0x47, 0x01, 0xB8,
574 0x07, 0xBA, 0x69, 0x7A, 0xF0, 0xCA, 0x2B, 0x37,
575 0x07, 0x84, 0xF0, 0x5E, 0x0F, 0x35, 0xD4, 0xC9,
576 0xF8, 0xC0, 0xA6, 0x28, 0x08, 0x00, 0x00, 0x00,
577 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
578 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
580 res
= tas5825m_write_block_at(dev
, 0x08, values
, ARRAY_SIZE(values
));
585 res
= tas5825m_set_page(dev
, 0x04);
590 const uint8_t values
[] = {
591 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
592 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
593 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
594 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
595 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
596 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
597 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
598 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
599 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
600 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
601 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
602 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
603 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
604 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
605 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
607 res
= tas5825m_write_block_at(dev
, 0x08, values
, ARRAY_SIZE(values
));
612 res
= tas5825m_set_page(dev
, 0x05);
617 const uint8_t values
[] = {
618 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
619 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
620 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
621 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
622 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
623 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
624 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
625 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
626 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
627 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
628 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
629 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
630 0x00, 0x00, 0x00, 0x00, 0x07, 0xB9, 0x96, 0x60,
631 0xF0, 0x8C, 0xD3, 0x40, 0x07, 0xB9, 0x96, 0x60,
632 0x0F, 0x71, 0xF1, 0x6F, 0xF8, 0x8B, 0x97, 0xF0,
634 res
= tas5825m_write_block_at(dev
, 0x08, values
, ARRAY_SIZE(values
));
639 res
= tas5825m_set_page(dev
, 0x06);
644 const uint8_t values
[] = {
645 0x07, 0xDB, 0xDE, 0xC0, 0xF0, 0x48, 0x42, 0x80,
646 0x07, 0xDB, 0xDE, 0xC0, 0x0F, 0xB6, 0x7C, 0xB8,
647 0xF8, 0x47, 0x01, 0xB8, 0x07, 0xBA, 0x69, 0x7A,
648 0xF0, 0xCA, 0x2B, 0x37, 0x07, 0x84, 0xF0, 0x5E,
649 0x0F, 0x35, 0xD4, 0xC9, 0xF8, 0xC0, 0xA6, 0x28,
651 res
= tas5825m_write_block_at(dev
, 0x08, values
, ARRAY_SIZE(values
));
656 res
= tas5825m_set_page(dev
, 0x0F);
661 const uint8_t values
[] = {
662 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
663 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
664 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
665 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
666 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
667 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
668 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
669 0x00, 0x00, 0x00, 0x00, 0x08, 0x41, 0xBE, 0x3C,
670 0xF0, 0x4D, 0x2C, 0x26, 0x07, 0x7A, 0xE8, 0xE9,
671 0x0F, 0xB6, 0x7C, 0xB8, 0xF8, 0x47, 0x01, 0xB8,
672 0x08, 0x00, 0x00, 0x00
674 res
= tas5825m_write_block_at(dev
, 0x2C, values
, ARRAY_SIZE(values
));
679 res
= tas5825m_set_page(dev
, 0x10);
684 const uint8_t values
[] = {
685 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
686 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
688 res
= tas5825m_write_block_at(dev
, 0x08, values
, ARRAY_SIZE(values
));
693 const uint8_t values
[] = {
694 0x00, 0x99, 0x82, 0x0D, 0xFF, 0x08, 0xB1, 0xE4,
695 0x00, 0x67, 0xA6, 0xD7, 0x0F, 0xBE, 0xCA, 0x9D,
696 0xF8, 0x37, 0x5A, 0x9B, 0x08, 0x00, 0x00, 0x00,
697 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
698 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
699 0x35, 0x5D, 0x83, 0xC3, 0x96, 0xF7, 0xF4, 0x67,
700 0x33, 0xEC, 0x44, 0x70, 0x0C, 0xE3, 0x60, 0xA2,
701 0xFA, 0x99, 0x26, 0x28, 0x08, 0x00, 0x00, 0x00,
702 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
703 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
704 0x00, 0x03, 0xF6, 0x87, 0x00, 0x07, 0xED, 0x0F,
705 0x00, 0x03, 0xF6, 0x87, 0x0E, 0xF9, 0x62, 0x4A,
706 0xF8, 0xF6, 0xC3, 0x98
708 res
= tas5825m_write_block_at(dev
, 0x1C, values
, ARRAY_SIZE(values
));
713 res
= tas5825m_set_page(dev
, 0x11);
718 const uint8_t values
[] = {
719 0x00, 0x03, 0xF6, 0x87, 0x00, 0x07, 0xED, 0x0F,
720 0x00, 0x03, 0xF6, 0x87, 0x0E, 0xF9, 0x62, 0x4A,
721 0xF8, 0xF6, 0xC3, 0x98, 0x07, 0x80, 0xA7, 0xAC,
722 0xF0, 0xFE, 0xB0, 0xA7, 0x07, 0x80, 0xA7, 0xAC,
723 0x0E, 0xF9, 0x62, 0x4A, 0xF8, 0xF6, 0xC3, 0x98,
724 0x07, 0x80, 0xA7, 0xAC, 0xF0, 0xFE, 0xB0, 0xA7,
725 0x07, 0x80, 0xA7, 0xAC, 0x0E, 0xF9, 0x62, 0x4A,
726 0xF8, 0xF6, 0xC3, 0x98
728 res
= tas5825m_write_block_at(dev
, 0x08, values
, ARRAY_SIZE(values
));
737 int tas5825m_setup(struct device
*dev
, int id
)
741 res
= tas5825m_set_book(dev
, 0x00);
745 // Set to HiZ state and enable DSP
746 res
= tas5825m_write_at(dev
, 0x03, 0x02);
750 // Digital core and registers reset
751 res
= tas5825m_write_at(dev
, 0x01, 0x11);
756 res
= tas5825m_write_at(dev
, 0x03, 0x12);
760 res
= tas5825m_write_at(dev
, 0x48, 0x0C);
764 res
= program_dsp_ram(dev
);
768 res
= tas5825m_set_book(dev
, 0x78);
772 res
= tas5825m_set_page(dev
, 0x18);
777 const uint8_t values
[] = {
778 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
779 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
780 0x00, 0x00, 0x00, 0x00
782 res
= tas5825m_write_block_at(dev
, 0x30, values
, ARRAY_SIZE(values
));
787 res
= tas5825m_set_page(dev
, 0x1C);
792 const uint8_t values
[] = {
793 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
794 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
795 0x00, 0x00, 0x03, 0x30, 0x00, 0x00, 0x00, 0x00,
796 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
797 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
798 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
799 0x00, 0x00, 0x03, 0x38, 0x00, 0x00, 0x00, 0x00,
800 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
801 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
802 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
803 0x00, 0x00, 0x03, 0x40, 0x00, 0x00, 0x00, 0x00,
804 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
805 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
806 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
807 0x00, 0x00, 0x03, 0x48
809 res
= tas5825m_write_block_at(dev
, 0x0C, values
, ARRAY_SIZE(values
));
814 res
= tas5825m_set_page(dev
, 0x1D);
819 const uint8_t values
[] = {
820 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
821 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
822 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
823 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x50,
824 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
825 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
826 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
827 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x58,
828 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
829 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
830 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
831 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x70,
832 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 0x03, 0x88,
833 0x00, 0x00, 0x03, 0x90, 0x00, 0x00, 0x00, 0x00,
834 0x00, 0x00, 0x03, 0x98, 0x00, 0x00, 0x03, 0xA0,
836 res
= tas5825m_write_block_at(dev
, 0x08, values
, ARRAY_SIZE(values
));
841 res
= tas5825m_set_page(dev
, 0x1E);
846 const uint8_t values
[] = {
847 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
848 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
849 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
850 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
851 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
852 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
853 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
854 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
855 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xA8,
856 0x00, 0x00, 0x03, 0xB0, 0x00, 0x00, 0x03, 0xB8,
857 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
858 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
859 0x00, 0x00, 0x03, 0xC0
861 res
= tas5825m_write_block_at(dev
, 0x08, values
, ARRAY_SIZE(values
));
867 res
= tas5825m_set_book(dev
, 0x8C);
871 res
= tas5825m_set_page(dev
, 0x0E);
876 const uint8_t values
[] = {
877 0x00, 0x20, 0xC4, 0x9C, 0x00, 0x20, 0xC4, 0x9C,
878 0x02, 0xDE, 0xAD, 0x00, 0x74, 0x01, 0x39, 0x01,
879 0x00, 0x20, 0xC4, 0x9B, 0x00, 0xA7, 0x26, 0x4A,
880 0x00, 0x00, 0x00, 0x00, 0x7F, 0xFF, 0xFF, 0xFF,
881 0x7F, 0xFF, 0xFF, 0xFF
883 res
= tas5825m_write_block_at(dev
, 0x5C, values
, ARRAY_SIZE(values
));
888 res
= tas5825m_set_page(dev
, 0x0F);
893 const uint8_t values
[] = {
894 0x7F, 0xFF, 0xFF, 0xFF, 0x7F, 0xFF, 0xFF, 0xFF,
895 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
896 0x00, 0x00, 0x00, 0x00, 0xE7, 0x00, 0x00, 0x00,
897 0xFE, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
898 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
899 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
900 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
901 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
902 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
903 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
904 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
905 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
906 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
907 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
908 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
910 res
= tas5825m_write_block_at(dev
, 0x08, values
, ARRAY_SIZE(values
));
915 res
= tas5825m_set_page(dev
, 0x10);
920 const uint8_t values
[] = {
921 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
922 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
923 0x7F, 0xFF, 0xFF, 0xFF, 0x00, 0x62, 0x48, 0x8E,
924 0xFF, 0x83, 0xE9, 0x30, 0x00, 0x2E, 0x18, 0x72,
925 0x0F, 0x40, 0xAE, 0x1F, 0xF8, 0x9A, 0x41, 0xD5,
926 0x07, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00,
927 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
928 0x00, 0x00, 0x00, 0x00, 0x07, 0xFF, 0xFF, 0xFF,
929 0xF0, 0xBF, 0x51, 0xE1, 0x07, 0x65, 0xBE, 0x2B,
930 0x0A, 0x19, 0xBB, 0x39, 0xFC, 0x3F, 0x79, 0xE8,
931 0x07, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00,
932 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
933 0x00, 0x00, 0x00, 0x00, 0x00, 0x5C, 0x79, 0x55,
934 0x00, 0xB8, 0xF2, 0xAB, 0x00, 0x5C, 0x79, 0x55,
935 0x0D, 0x98, 0xCC, 0x51, 0xFA, 0x16, 0x2B, 0x95,
937 res
= tas5825m_write_block_at(dev
, 0x08, values
, ARRAY_SIZE(values
));
942 res
= tas5825m_set_page(dev
, 0x11);
947 const uint8_t values
[] = {
948 0x00, 0x5C, 0x79, 0x55, 0x00, 0xB8, 0xF2, 0xAB,
949 0x00, 0x5C, 0x79, 0x55, 0x0D, 0x98, 0xCC, 0x51,
950 0xFA, 0x16, 0x2B, 0x95, 0x06, 0xE0, 0xA8, 0x2F,
951 0xF2, 0x3E, 0xAF, 0xA2, 0x06, 0xE0, 0xA8, 0x2F,
952 0x0D, 0x98, 0xCC, 0x51, 0xFA, 0x16, 0x2B, 0x95,
953 0x06, 0xE0, 0xA8, 0x2F, 0xF2, 0x3E, 0xAF, 0xA2,
954 0x06, 0xE0, 0xA8, 0x2F, 0x0D, 0x98, 0xCC, 0x51,
955 0xFA, 0x16, 0x2B, 0x95, 0x02, 0x4D, 0x99, 0x99,
956 0xFD, 0xB2, 0x66, 0x67, 0x00, 0x80, 0x00, 0x00,
958 res
= tas5825m_write_block_at(dev
, 0x08, values
, ARRAY_SIZE(values
));
963 res
= tas5825m_set_book(dev
, 0x00);
967 res
= tas5825m_write_at(dev
, 0x40, 0x00);
970 res
= tas5825m_write_at(dev
, 0x7D, 0x11);
973 res
= tas5825m_write_at(dev
, 0x7E, 0xFF);
977 res
= tas5825m_set_page(dev
, 0x01);
981 res
= tas5825m_write_at(dev
, 0x51, 0x05);
985 res
= tas5825m_set_page(dev
, 0x02);
989 res
= tas5825m_write_at(dev
, 0x19, 0xDF);
993 res
= tas5825m_set_page(dev
, 0x00);
997 res
= tas5825m_write_at(dev
, 0x46, 0x11);
1000 res
= tas5825m_write_at(dev
, 0x02, 0x00);
1003 res
= tas5825m_write_at(dev
, 0x53, 0x00);
1006 res
= tas5825m_write_at(dev
, 0x54, 0x00);
1010 // Set to HiZ state and enable DSP
1011 res
= tas5825m_write_at(dev
, 0x03, 0x02);
1015 // Wait for device to settle
1019 res
= tas5825m_set_book(dev
, 0x8C);
1023 res
= tas5825m_set_page(dev
, 0x0B);
1028 const uint8_t values
[] = {
1029 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
1031 res
= tas5825m_write_block_at(dev
, 0x28, values
, ARRAY_SIZE(values
));
1036 const uint8_t values
[] = {
1037 0x00, 0x20, 0xC4, 0x9C
1039 res
= tas5825m_write_block_at(dev
, 0x50, values
, ARRAY_SIZE(values
));
1044 const uint8_t values
[] = {
1045 0x7F, 0xFF, 0xFF, 0xFF
1047 res
= tas5825m_write_block_at(dev
, 0x5C, values
, ARRAY_SIZE(values
));
1052 res
= tas5825m_set_page(dev
, 0x01);
1057 const uint8_t values
[] = {
1058 0xC0, 0x00, 0x00, 0x00, 0x00, 0x71, 0x94, 0x9A,
1060 res
= tas5825m_write_block_at(dev
, 0x28, values
, ARRAY_SIZE(values
));
1065 res
= tas5825m_set_page(dev
, 0x0A);
1070 const uint8_t values
[] = {
1071 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1072 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00,
1073 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1074 0x00, 0x00, 0x00, 0x00
1076 res
= tas5825m_write_block_at(dev
, 0x64, values
, ARRAY_SIZE(values
));
1081 res
= tas5825m_set_page(dev
, 0x0B);
1086 const uint8_t values
[] = {
1087 0x00, 0x80, 0x00, 0x00, 0x00, 0x2D, 0x6A, 0x86,
1088 0x00, 0x2D, 0x6A, 0x86, 0x00, 0x80, 0x00, 0x00,
1089 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1090 0x00, 0x80, 0x00, 0x00
1092 res
= tas5825m_write_block_at(dev
, 0x08, values
, ARRAY_SIZE(values
));
1097 const uint8_t values
[] = {
1098 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
1099 0x00, 0x00, 0x57, 0x62, 0x00, 0x00, 0x00, 0x00,
1101 res
= tas5825m_write_block_at(dev
, 0x28, values
, ARRAY_SIZE(values
));
1106 const uint8_t values
[] = {
1107 0x02, 0x66, 0xC4, 0x1B, 0x00, 0x89, 0x37, 0x4C,
1109 res
= tas5825m_write_block_at(dev
, 0x48, values
, ARRAY_SIZE(values
));
1114 const uint8_t values
[] = {
1115 0x7D, 0x99, 0x3B, 0xE5, 0x00, 0x00, 0x57, 0x62,
1117 res
= tas5825m_write_block_at(dev
, 0x54, values
, ARRAY_SIZE(values
));
1122 res
= tas5825m_set_page(dev
, 0x0E);
1127 const uint8_t values
[] = {
1128 0x00, 0x22, 0x1D, 0x95, 0x00, 0x03, 0x69, 0xC5,
1129 0x00, 0x03, 0x69, 0xC5, 0x1C, 0x1B, 0xF0, 0x41,
1130 0x04, 0x0C, 0x37, 0x14, 0x00, 0x03, 0x69, 0xC5,
1131 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0x30, 0xE8,
1132 0x01, 0x2E, 0x4F, 0x40
1134 res
= tas5825m_write_block_at(dev
, 0x5C, values
, ARRAY_SIZE(values
));
1139 res
= tas5825m_set_page(dev
, 0x0F);
1144 const uint8_t values
[] = {
1145 0x00, 0xC9, 0xD9, 0xD4, 0x00, 0x43, 0x6C, 0x19,
1146 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1147 0xFF, 0xA0, 0x00, 0x00, 0xF7, 0x5C, 0x28, 0xF6,
1148 0xFB, 0x44, 0x29, 0x20, 0x00, 0x00, 0x00, 0x00,
1149 0x00, 0x00, 0x00, 0x00
1151 res
= tas5825m_write_block_at(dev
, 0x08, values
, ARRAY_SIZE(values
));
1156 res
= tas5825m_set_page(dev
, 0x10);
1161 const uint8_t values
[] = {
1162 0x08, 0x13, 0x85, 0x62
1164 res
= tas5825m_write_block_at(dev
, 0x18, values
, ARRAY_SIZE(values
));
1169 res
= tas5825m_set_page(dev
, 0x11);
1174 const uint8_t values
[] = {
1175 0x02, 0x9E, 0x15, 0x7E, 0xFD, 0x61, 0xEA, 0x82,
1176 0x01, 0x00, 0x00, 0x00
1178 res
= tas5825m_write_block_at(dev
, 0x44, values
, ARRAY_SIZE(values
));
1183 res
= tas5825m_set_page(dev
, 0x07);
1188 const uint8_t values
[] = {
1189 0x00, 0x80, 0x00, 0x00
1191 res
= tas5825m_write_block_at(dev
, 0x64, values
, ARRAY_SIZE(values
));
1196 const uint8_t values
[] = {
1197 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
1199 res
= tas5825m_write_block_at(dev
, 0x6C, values
, ARRAY_SIZE(values
));
1204 res
= program_biquad_filters(dev
);
1208 res
= tas5825m_set_book(dev
, 0x00);
1213 res
= tas5825m_write_at(dev
, 0x30, 0x00);
1216 res
= tas5825m_write_at(dev
, 0x60, 0x02);
1219 res
= tas5825m_write_at(dev
, 0x62, 0x09);
1222 res
= tas5825m_write_at(dev
, 0x4C, 0x30);
1226 // Set to PLAY state
1227 res
= tas5825m_write_at(dev
, 0x03, 0x03);
1231 // Clear analog fault
1232 res
= tas5825m_write_at(dev
, 0x78, 0x80);
1236 res
= tas5825m_write_at(dev
, 0x60, 0x00);
1239 res
= tas5825m_write_at(dev
, 0x64, 0x02);