sound/aoa/codecs/tas-gain-table.h

Source file repositories/reference/linux-study-clean/sound/aoa/codecs/tas-gain-table.h

File Facts

System
Linux kernel
Corpus path
sound/aoa/codecs/tas-gain-table.h
Extension
.h
Size
5478 bytes
Lines
211
Domain
Driver Families
Bucket
sound/aoa
Inferred role
Driver Families: implementation source
Status
source implementation candidate

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

int main() {
  int dB2;
  printf("/" "* This file is only included exactly once!\n");
  printf(" *\n");
  printf(" * If they'd only tell us that generating this table was\n");
  printf(" * as easy as calculating\n");
  printf(" *      hwvalue = 1048576.0*exp(0.057564628*dB*2)\n");
  printf(" * :) *" "/\n");
  printf("static int tas_gaintable[] = {\n");
  printf("	0x000000, /" "* -infinity dB *" "/\n");
  for (dB2=-140;dB2<=36;dB2++)
    printf("	0x%.6x, /" "* %-02.1f dB *" "/\n", (int)(1048576.0*exp(0.057564628*dB2)), dB2/2.0);
  printf("};\n\n");
}

*/

/* This file is only included exactly once!
 *
 * If they'd only tell us that generating this table was
 * as easy as calculating
 *      hwvalue = 1048576.0*exp(0.057564628*dB*2)
 * :) */
static const int tas_gaintable[] = {
	0x000000, /* -infinity dB */
	0x00014b, /* -70.0 dB */
	0x00015f, /* -69.5 dB */
	0x000174, /* -69.0 dB */
	0x00018a, /* -68.5 dB */
	0x0001a1, /* -68.0 dB */
	0x0001ba, /* -67.5 dB */
	0x0001d4, /* -67.0 dB */
	0x0001f0, /* -66.5 dB */
	0x00020d, /* -66.0 dB */
	0x00022c, /* -65.5 dB */
	0x00024d, /* -65.0 dB */
	0x000270, /* -64.5 dB */
	0x000295, /* -64.0 dB */
	0x0002bc, /* -63.5 dB */
	0x0002e6, /* -63.0 dB */
	0x000312, /* -62.5 dB */
	0x000340, /* -62.0 dB */
	0x000372, /* -61.5 dB */
	0x0003a6, /* -61.0 dB */
	0x0003dd, /* -60.5 dB */
	0x000418, /* -60.0 dB */
	0x000456, /* -59.5 dB */
	0x000498, /* -59.0 dB */
	0x0004de, /* -58.5 dB */
	0x000528, /* -58.0 dB */
	0x000576, /* -57.5 dB */
	0x0005c9, /* -57.0 dB */
	0x000620, /* -56.5 dB */
	0x00067d, /* -56.0 dB */
	0x0006e0, /* -55.5 dB */
	0x000748, /* -55.0 dB */
	0x0007b7, /* -54.5 dB */
	0x00082c, /* -54.0 dB */
	0x0008a8, /* -53.5 dB */
	0x00092b, /* -53.0 dB */
	0x0009b6, /* -52.5 dB */
	0x000a49, /* -52.0 dB */
	0x000ae5, /* -51.5 dB */
	0x000b8b, /* -51.0 dB */
	0x000c3a, /* -50.5 dB */
	0x000cf3, /* -50.0 dB */
	0x000db8, /* -49.5 dB */
	0x000e88, /* -49.0 dB */
	0x000f64, /* -48.5 dB */
	0x00104e, /* -48.0 dB */
	0x001145, /* -47.5 dB */
	0x00124b, /* -47.0 dB */
	0x001361, /* -46.5 dB */
	0x001487, /* -46.0 dB */
	0x0015be, /* -45.5 dB */
	0x001708, /* -45.0 dB */
	0x001865, /* -44.5 dB */
	0x0019d8, /* -44.0 dB */
	0x001b60, /* -43.5 dB */
	0x001cff, /* -43.0 dB */
	0x001eb7, /* -42.5 dB */
	0x002089, /* -42.0 dB */
	0x002276, /* -41.5 dB */
	0x002481, /* -41.0 dB */
	0x0026ab, /* -40.5 dB */
	0x0028f5, /* -40.0 dB */
	0x002b63, /* -39.5 dB */
	0x002df5, /* -39.0 dB */
	0x0030ae, /* -38.5 dB */
	0x003390, /* -38.0 dB */

Annotation

Implementation Notes