~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/sound/aoa/codecs/tas-basstreble.h

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /sound/aoa/codecs/tas-basstreble.h (Version linux-6.12-rc7) and /sound/aoa/codecs/tas-basstreble.h (Version linux-4.15.18)


  1 /* SPDX-License-Identifier: GPL-2.0 */              1 /* SPDX-License-Identifier: GPL-2.0 */
  2 /*                                                  2 /*
  3  * This file is only included exactly once!         3  * This file is only included exactly once!
  4  *                                                  4  *
  5  * The tables here are derived from the tas300      5  * The tables here are derived from the tas3004 datasheet,
  6  * modulo typo corrections and some smoothing.      6  * modulo typo corrections and some smoothing...
  7  */                                                 7  */
  8                                                     8 
  9 #define TAS3004_TREBLE_MIN      0                   9 #define TAS3004_TREBLE_MIN      0
 10 #define TAS3004_TREBLE_MAX      72                 10 #define TAS3004_TREBLE_MAX      72
 11 #define TAS3004_BASS_MIN        0                  11 #define TAS3004_BASS_MIN        0
 12 #define TAS3004_BASS_MAX        72                 12 #define TAS3004_BASS_MAX        72
 13 #define TAS3004_TREBLE_ZERO     36                 13 #define TAS3004_TREBLE_ZERO     36
 14 #define TAS3004_BASS_ZERO       36                 14 #define TAS3004_BASS_ZERO       36
 15                                                    15 
 16 static const u8 tas3004_treble_table[] = {     !!  16 static u8 tas3004_treble_table[] = {
 17         150, /* -18 dB */                          17         150, /* -18 dB */
 18         149,                                       18         149,
 19         148,                                       19         148,
 20         147,                                       20         147,
 21         146,                                       21         146,
 22         145,                                       22         145,
 23         144,                                       23         144,
 24         143,                                       24         143,
 25         142,                                       25         142,
 26         141,                                       26         141,
 27         140,                                       27         140,
 28         139,                                       28         139,
 29         138,                                       29         138,
 30         137,                                       30         137,
 31         136,                                       31         136,
 32         135,                                       32         135,
 33         134,                                       33         134,
 34         133,                                       34         133,
 35         132,                                       35         132,
 36         131,                                       36         131,
 37         130,                                       37         130,
 38         129,                                       38         129,
 39         128,                                       39         128,
 40         127,                                       40         127,
 41         126,                                       41         126,
 42         125,                                       42         125,
 43         124,                                       43         124,
 44         123,                                       44         123,
 45         122,                                       45         122,
 46         121,                                       46         121,
 47         120,                                       47         120,
 48         119,                                       48         119,
 49         118,                                       49         118,
 50         117,                                       50         117,
 51         116,                                       51         116,
 52         115,                                       52         115,
 53         114, /* 0 dB */                            53         114, /* 0 dB */
 54         113,                                       54         113,
 55         112,                                       55         112,
 56         111,                                       56         111,
 57         109,                                       57         109,
 58         108,                                       58         108,
 59         107,                                       59         107,
 60         105,                                       60         105,
 61         104,                                       61         104,
 62         103,                                       62         103,
 63         101,                                       63         101,
 64         99,                                        64         99,
 65         98,                                        65         98,
 66         96,                                        66         96,
 67         93,                                        67         93,
 68         91,                                        68         91,
 69         89,                                        69         89,
 70         86,                                        70         86,
 71         83,                                        71         83,
 72         81,                                        72         81,
 73         77,                                        73         77,
 74         74,                                        74         74,
 75         71,                                        75         71,
 76         67,                                        76         67,
 77         63,                                        77         63,
 78         59,                                        78         59,
 79         54,                                        79         54,
 80         49,                                        80         49,
 81         44,                                        81         44,
 82         38,                                        82         38,
 83         32,                                        83         32,
 84         26,                                        84         26,
 85         19,                                        85         19,
 86         10,                                        86         10,
 87         4,                                         87         4,
 88         2,                                         88         2,
 89         1, /* +18 dB */                            89         1, /* +18 dB */
 90 };                                                 90 };
 91                                                    91 
 92 static inline u8 tas3004_treble(int idx)           92 static inline u8 tas3004_treble(int idx)
 93 {                                                  93 {
 94         return tas3004_treble_table[idx];          94         return tas3004_treble_table[idx];
 95 }                                                  95 }
 96                                                    96 
 97 /* I only save the difference here to the treb     97 /* I only save the difference here to the treble table
 98  * so that the binary is smaller...                98  * so that the binary is smaller...
 99  * I have also ignored completely differences      99  * I have also ignored completely differences of
100  * +/- 1                                          100  * +/- 1
101  */                                               101  */
102 static const s8 tas3004_bass_diff_to_treble[]  !! 102 static s8 tas3004_bass_diff_to_treble[] = {
103         2, /* 7 dB, offset 50 */                  103         2, /* 7 dB, offset 50 */
104         2,                                        104         2,
105         2,                                        105         2,
106         2,                                        106         2,
107         2,                                        107         2,
108         1,                                        108         1,
109         2,                                        109         2,
110         2,                                        110         2,
111         2,                                        111         2,
112         3,                                        112         3,
113         4,                                        113         4,
114         4,                                        114         4,
115         5,                                        115         5,
116         6,                                        116         6,
117         7,                                        117         7,
118         8,                                        118         8,
119         9,                                        119         9,
120         10,                                       120         10,
121         11,                                       121         11,
122         14,                                       122         14,
123         13,                                       123         13,
124         8,                                        124         8,
125         1, /* 18 dB */                            125         1, /* 18 dB */
126 };                                                126 };
127                                                   127 
128 static inline u8 tas3004_bass(int idx)            128 static inline u8 tas3004_bass(int idx)
129 {                                                 129 {
130         u8 result = tas3004_treble_table[idx];    130         u8 result = tas3004_treble_table[idx];
131                                                   131 
132         if (idx >= 50)                            132         if (idx >= 50)
133                 result += tas3004_bass_diff_to    133                 result += tas3004_bass_diff_to_treble[idx-50];
134         return result;                            134         return result;
135 }                                                 135 }
136                                                   136 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php