2
* Purpose: Definitions for the mixer of cs4231.
7
* This file is part of Open Sound System.
9
* Copyright (C) 4Front Technologies 1996-2008.
11
* This this source file is released under GPL v2 license (no other versions).
12
* See the COPYING file included in the main directory of this source
13
* distribution for the license terms and conditions.
17
#define MODE2_MIXER_DEVICES (SOUND_MASK_LINE1 | SOUND_MASK_LINE2 | \
19
SOUND_MASK_LINE | SOUND_MASK_SPEAKER | \
21
SOUND_MASK_PCM | SOUND_MASK_IMIX)
23
#define MODE2_REC_DEVICES (SOUND_MASK_LINE | SOUND_MASK_MIC | \
24
SOUND_MASK_LINE1|SOUND_MASK_IMIX)
29
unsigned int polarity; /* 0=normal, 1=reversed */
35
typedef struct mixer_def mixer_ent;
36
typedef mixer_ent mixer_ents[2];
39
* Most of the mixer entries work in backwards. Setting the polarity field
40
* makes them to work correctly.
42
* The channel numbering used by individual soundcards is not fixed. Some
43
* cards have assigned different meanings for the AUX1, AUX2 and LINE inputs.
44
* The current version doesn't try to compensate this.
47
#define MIX_ENT(name, reg_l, pola_l, pos_l, len_l, reg_r, pola_r, pos_r, len_r, mute_bit) \
48
{{reg_l, pola_l, pos_l, len_l}, {reg_r, pola_r, pos_r, len_r, mute_bit}}
50
static mixer_ents cs4231_mix_devices[32] = {
51
MIX_ENT (SOUND_MIXER_VOLUME, 27, 1, 0, 4, 29, 1, 0, 4, 7),
52
MIX_ENT (SOUND_MIXER_BASS, 0, 0, 0, 0, 0, 0, 0, 0, 8),
53
MIX_ENT (SOUND_MIXER_TREBLE, 0, 0, 0, 0, 0, 0, 0, 0, 8),
54
MIX_ENT (SOUND_MIXER_SYNTH, 4, 1, 0, 5, 5, 1, 0, 5, 7),
55
MIX_ENT (SOUND_MIXER_PCM, 6, 1, 0, 6, 7, 1, 0, 6, 7),
56
MIX_ENT (SOUND_MIXER_SPEAKER, 26, 1, 0, 4, 0, 0, 0, 0, 8),
57
MIX_ENT (SOUND_MIXER_LINE, 18, 1, 0, 5, 19, 1, 0, 5, 7),
58
MIX_ENT (SOUND_MIXER_MIC, 0, 0, 5, 1, 1, 0, 5, 1, 8),
59
MIX_ENT (SOUND_MIXER_CD, 2, 1, 0, 5, 3, 1, 0, 5, 7),
60
MIX_ENT (SOUND_MIXER_IMIX, 13, 1, 2, 6, 0, 0, 0, 0, 8),
61
MIX_ENT (SOUND_MIXER_ALTPCM, 0, 0, 0, 0, 0, 0, 0, 0, 8),
62
MIX_ENT (SOUND_MIXER_RECLEV, 0, 0, 0, 0, 0, 0, 0, 0, 8),
63
MIX_ENT (SOUND_MIXER_IGAIN, 0, 0, 0, 4, 1, 0, 0, 4, 8),
64
MIX_ENT (SOUND_MIXER_OGAIN, 0, 0, 0, 0, 0, 0, 0, 0, 8),
65
MIX_ENT (SOUND_MIXER_LINE1, 2, 1, 0, 5, 3, 1, 0, 5, 7),
66
MIX_ENT (SOUND_MIXER_LINE2, 4, 1, 0, 5, 5, 1, 0, 5, 7),
67
MIX_ENT (SOUND_MIXER_LINE, 18, 1, 0, 5, 19, 1, 0, 5, 7)
70
static int default_mixer_levels[32] = {
71
0x3232, /* Master Volume */
76
0x1515, /* PC Speaker */
80
0x0000, /* Recording monitor */
81
0x4b4b, /* Second PCM */
82
0x4b4b, /* Recording level */
83
0x0000, /* Input gain */
84
0x4b4b, /* Output gain */
87
0x1515 /* Line3 (usually line in) */
94
* Channel enable bits for ioctl(SOUND_MIXER_PRIVATE1)
98
#define AUDIO_SPEAKER 0x01 /* Enable mono output */
99
#define AUDIO_HEADPHONE 0x02 /* Sparc only */
100
#define AUDIO_LINE_OUT 0x04 /* Sparc only */