Skip to content

Commit e2bb260

Browse files
brentlulgirdwood
authored andcommitted
pipe-demux-eq-iir-playback: support eq coef customization
Topology file could use PIPELINE_FILTER1 macro to include a m4 file with eq coefficient. If macro is not defined, eq_iir_coef_bandsplit.m4 will be included. Signed-off-by: Brent Lu <brent.lu@intel.com>
1 parent 8ed1e90 commit e2bb260

File tree

2 files changed

+32
-29
lines changed

2 files changed

+32
-29
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Bandsplit, created with example_iir_bandsplit.m 26-Oct-2021
2+
CONTROLBYTES_PRIV(DEF_EQIIR_PRIV,
3+
` bytes "0x53,0x4f,0x46,0x00,0x00,0x00,0x00,0x00,'
4+
` 0xb0,0x00,0x00,0x00,0x01,0x20,0x01,0x03,'
5+
` 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,'
6+
` 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,'
7+
` 0xb0,0x00,0x00,0x00,0x04,0x00,0x00,0x00,'
8+
` 0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,'
9+
` 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,'
10+
` 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,'
11+
` 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,'
12+
` 0x01,0x00,0x00,0x00,0x02,0x00,0x00,0x00,'
13+
` 0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,'
14+
` 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,'
15+
` 0x00,0x00,0x00,0x00,0x50,0xda,0xf0,0xc0,'
16+
` 0x1e,0x5d,0x0d,0x7f,0x3c,0xdf,0xd6,0x1f,'
17+
` 0x89,0x41,0x52,0xc0,0x3c,0xdf,0xd6,0x1f,'
18+
` 0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,'
19+
` 0x2d,0x3a,0xcd,0xd3,0xc0,0xf5,0x82,0x68,'
20+
` 0xb9,0x41,0x76,0x00,0x72,0x83,0xec,0x00,'
21+
` 0xb9,0x41,0x76,0x00,0xff,0xff,0xff,0xff,'
22+
` 0x99,0x7f,0x00,0x00,0x01,0x00,0x00,0x00,'
23+
` 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,'
24+
` 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,'
25+
` 0x00,0x00,0x00,0x00,0x2d,0x3a,0xcd,0xd3,'
26+
` 0xc0,0xf5,0x82,0x68,0x01,0xe1,0xa6,0x1a,'
27+
` 0xff,0x3d,0xb2,0xca,0x01,0xe1,0xa6,0x1a,'
28+
` 0x00,0x00,0x00,0x00,0xb2,0x7f,0x00,0x00"'
29+
)

tools/topology/topology1/sof/pipe-demux-eq-iir-playback.m4

Lines changed: 3 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -23,35 +23,9 @@ C_CONTROLBYTES(concat(`DEMUX', PIPELINE_ID), PIPELINE_ID,
2323
define(DEF_EQIIR_COEF, concat(`eqiir_coef_', PIPELINE_ID))
2424
define(DEF_EQIIR_PRIV, concat(`eqiir_priv_', PIPELINE_ID))
2525

26-
# Bandsplit, created with example_iir_bandsplit.m 26-Oct-2021
27-
CONTROLBYTES_PRIV(DEF_EQIIR_PRIV,
28-
` bytes "0x53,0x4f,0x46,0x00,0x00,0x00,0x00,0x00,'
29-
` 0xb0,0x00,0x00,0x00,0x01,0x20,0x01,0x03,'
30-
` 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,'
31-
` 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,'
32-
` 0xb0,0x00,0x00,0x00,0x04,0x00,0x00,0x00,'
33-
` 0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,'
34-
` 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,'
35-
` 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,'
36-
` 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,'
37-
` 0x01,0x00,0x00,0x00,0x02,0x00,0x00,0x00,'
38-
` 0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,'
39-
` 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,'
40-
` 0x00,0x00,0x00,0x00,0x50,0xda,0xf0,0xc0,'
41-
` 0x1e,0x5d,0x0d,0x7f,0x3c,0xdf,0xd6,0x1f,'
42-
` 0x89,0x41,0x52,0xc0,0x3c,0xdf,0xd6,0x1f,'
43-
` 0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,'
44-
` 0x2d,0x3a,0xcd,0xd3,0xc0,0xf5,0x82,0x68,'
45-
` 0xb9,0x41,0x76,0x00,0x72,0x83,0xec,0x00,'
46-
` 0xb9,0x41,0x76,0x00,0xff,0xff,0xff,0xff,'
47-
` 0x99,0x7f,0x00,0x00,0x01,0x00,0x00,0x00,'
48-
` 0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,'
49-
` 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,'
50-
` 0x00,0x00,0x00,0x00,0x2d,0x3a,0xcd,0xd3,'
51-
` 0xc0,0xf5,0x82,0x68,0x01,0xe1,0xa6,0x1a,'
52-
` 0xff,0x3d,0xb2,0xca,0x01,0xe1,0xa6,0x1a,'
53-
` 0x00,0x00,0x00,0x00,0xb2,0x7f,0x00,0x00"'
54-
)
26+
# define filter. eq_iir_coef_bandsplit.m4 is set by default
27+
ifdef(`PIPELINE_FILTER1', , `define(PIPELINE_FILTER1, eq_iir_coef_bandsplit.m4)')
28+
include(PIPELINE_FILTER1)
5529

5630
C_CONTROLBYTES(DEF_EQIIR_COEF, PIPELINE_ID,
5731
CONTROLBYTES_OPS(bytes, 258 binds the control to bytes get/put handlers, 258, 258),

0 commit comments

Comments
 (0)