sound/pci/au88x0/au88x0_xtalk.c

Source file repositories/reference/linux-study-clean/sound/pci/au88x0/au88x0_xtalk.c

File Facts

System
Linux kernel
Corpus path
sound/pci/au88x0/au88x0_xtalk.c
Extension
.c
Size
22869 bytes
Lines
784
Domain
Driver Families
Bucket
sound/pci
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

// SPDX-License-Identifier: GPL-2.0-or-later
/***************************************************************************
 *            au88x0_cxtalk.c
 *
 *  Wed Nov 19 16:29:47 2003
 *  Copyright  2003  mjander
 *  mjander@users.sourceforge.org
 ****************************************************************************/

/*
 */

#include "au88x0_xtalk.h"

/* Data (a whole lot of data.... ) */

static short const sXtalkWideKLeftEq = 0x269C;
static short const sXtalkWideKRightEq = 0x269C;
static short const sXtalkWideKLeftXt = 0xF25E;
static __maybe_unused short const sXtalkWideKRightXt = 0xF25E;
static short const sXtalkWideShiftLeftEq = 1;
static short const sXtalkWideShiftRightEq = 1;
static short const sXtalkWideShiftLeftXt = 0;
static __maybe_unused short const sXtalkWideShiftRightXt = 0;
static unsigned short const wXtalkWideLeftDelay = 0xd;
static unsigned short const wXtalkWideRightDelay = 0xd;
static short const sXtalkNarrowKLeftEq = 0x468D;
static short const sXtalkNarrowKRightEq = 0x468D;
static short const sXtalkNarrowKLeftXt = 0xF82E;
static __maybe_unused short const sXtalkNarrowKRightXt = 0xF82E;
static short const sXtalkNarrowShiftLeftEq = 0x3;
static short const sXtalkNarrowShiftRightEq = 0x3;
static short const sXtalkNarrowShiftLeftXt = 0;
static __maybe_unused short const sXtalkNarrowShiftRightXt = 0;
static unsigned short const wXtalkNarrowLeftDelay = 0x7;
static unsigned short const wXtalkNarrowRightDelay = 0x7;

static __maybe_unused xtalk_gains_t const asXtalkGainsDefault = {
	0x4000, 0x4000, 0x4000, 0x4000, 0x4000,
	0x4000, 0x4000, 0x4000, 0x4000,	0x4000
};

static __maybe_unused xtalk_gains_t const asXtalkGainsTest = {
	0x7fff, 0x8000, 0x0000, 0x0000, 0x0001,
	0xffff, 0x4000, 0xc000, 0x0002, 0xfffe
};

static __maybe_unused xtalk_gains_t const asXtalkGains1Chan = {
	0x7FFF, 0, 0, 0, 0,
	0x7FFF, 0, 0, 0, 0,
};

// Input gain for 4 A3D slices. One possible input pair is left zero.
static xtalk_gains_t const asXtalkGainsAllChan = {
	0x7FFF, 0x7FFF, 0x7FFF, 0x7FFF, 0,
	0x7FFF, 0x7FFF, 0x7FFF, 0x7FFF,	0
};

static xtalk_gains_t const asXtalkGainsZeros = {
	0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};

static xtalk_dline_t const alXtalkDlineZeros = {
	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
static __maybe_unused xtalk_dline_t const alXtalkDlineTest = {
	0x0000fc18, 0xfff03e8, 0x000186a0, 0xfffe7960, 1, 0xffffffff, 0, 0,
	0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
	0, 0, 0, 0, 0, 0, 0, 0
};

static xtalk_instate_t const asXtalkInStateZeros = {
	0, 0, 0, 0
};

static __maybe_unused xtalk_instate_t const asXtalkInStateTest = {
	0x0080, 0xff80, 0x0001, 0xffff
};

static xtalk_state_t const asXtalkOutStateZeros = {
	{0, 0, 0, 0},
	{0, 0, 0, 0},
	{0, 0, 0, 0},
	{0, 0, 0, 0},
	{0, 0, 0, 0}
};

static short const sDiamondKLeftEq = 0x401d;
static short const sDiamondKRightEq = 0x401d;

Annotation

Implementation Notes