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


** Warning: Cannot open xref database.

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