1 /* SPDX-License-Identifier: GPL-2.0 */
3 * This file is only included exactly once!
5 * The tables here are derived from the tas3004 datasheet,
6 * modulo typo corrections and some smoothing...
9 #define TAS3004_TREBLE_MIN 0
10 #define TAS3004_TREBLE_MAX 72
11 #define TAS3004_BASS_MIN 0
12 #define TAS3004_BASS_MAX 72
13 #define TAS3004_TREBLE_ZERO 36
14 #define TAS3004_BASS_ZERO 36
16 static u8 tas3004_treble_table
[] = {
92 static inline u8
tas3004_treble(int idx
)
94 return tas3004_treble_table
[idx
];
97 /* I only save the difference here to the treble table
98 * so that the binary is smaller...
99 * I have also ignored completely differences of
102 static s8 tas3004_bass_diff_to_treble
[] = {
103 2, /* 7 dB, offset 50 */
128 static inline u8
tas3004_bass(int idx
)
130 u8 result
= tas3004_treble_table
[idx
];
133 result
+= tas3004_bass_diff_to_treble
[idx
-50];