Check for SYS/GL during library init. Reason is that
[AROS.git] / workbench / devs / AHI / Drivers / VIA-AC97 / regs.h
blob4144418b04a288f9147c0c424e1949be8d430a63
1 /*
2 Copyright © 2005-2013, Davy Wentzler. All rights reserved.
3 Copyright © 2010-2013, The AROS Development Team. All rights reserved.
4 $Id$
5 */
7 #ifndef _REGS_H
8 #define _REGS_H
11 #define VIA_CODEC_CMD 0x80
12 #define VIA_CODEC_CMD_READ (1L << 23)
13 #define VIA_CODEC_CMD_VALID (1L << 25)
14 #define VIA_CODEC_CMD_BUSY (1L << 24)
16 #define PAGE_SIZE 65536
19 #define AC97_RESET 0x0000
21 // Play master volume registers
22 #define AC97_MASTER_VOL_STEREO 0x0002 // -94.5 to 0.0 dB attenuation
23 #define AC97_AUXOUT_VOL 0x0004 // "" + can be impl. as line level out, headphone out or 4ch out. Most likely 4ch out vol.
24 #define AC97_MASTER_VOL_MONO 0x0006 // ""
26 #define AC97_MASTER_TONE 0x0008 // bass / treble
27 #define AC97_PCBEEP_VOL 0x000a
29 // Analog mixer input gain registers
30 // 5-bit gain: -32.5 dB attenuation to +12.0 dB gain
31 // 0x0008 is 0dB gain, 0x8008 is 0dB gain with mute on
32 #define AC97_PHONE_VOL 0x000c // mono: only bits 0-4
33 #define AC97_MIC_VOL 0x000e // mono + bit 6 is 20dB boost switch
34 #define AC97_LINEIN_VOL 0x0010 // stereo
35 #define AC97_CD_VOL 0x0012
36 #define AC97_VIDEO_VOL 0x0014
37 #define AC97_AUX_VOL 0x0016
38 #define AC97_PCMOUT_VOL 0x0018
40 #define AC97_RECORD_SELECT 0x001a
41 // 0dB to 22.5 dB gain on the stereo input
42 #define AC97_RECORD_GAIN 0x001c
43 #define AC97_RECORD_GAIN_MIC 0x001e
45 #define AC97_GENERAL_PURPOSE 0x0020
46 #define AC97_3D_CONTROL 0x0022
48 // mostly a read-only register (except D5 and D4 which control optional DAC slot assignment)
49 // controls variable SRC, double-rate output, multi-channel output and S/PDIF output
50 #define AC97_EXTENDED_ID 0x0028
51 #define AC97_EXTENDED_CTRL 0x002a
53 #define AC97_SPDIF_CTRL 0x003a
55 #define AC97_SURROUND_MASTER 0x0038
57 #define AC97_VENDOR_ID0 0x007C
58 #define AC97_VENDOR_ID1 0x007E
60 #define AC97_MUTE 0x8000
62 #define AC97_RECMUX_MIC 0x0000
63 #define AC97_RECMUX_CD 0x0101
64 #define AC97_RECMUX_VIDEO 0x0202
65 #define AC97_RECMUX_AUX 0x0303
66 #define AC97_RECMUX_LINE 0x0404
67 #define AC97_RECMUX_STEREO_MIX 0x0505
68 #define AC97_RECMUX_MONO_MIX 0x0606
69 #define AC97_RECMUX_PHONE 0x0707
72 #endif /* _REGS_H */