~ [ 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.10.17)


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

~ [ 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