~ubuntu-branches/ubuntu/vivid/oss4/vivid

« back to all changes in this revision

Viewing changes to kernel/drv/oss_hdaudio/hdaudio_codecids.h

  • Committer: Bazaar Package Importer
  • Author(s): Romain Beauxis, Samuel Thibault, Romain Beauxis, Sebastien NOEL
  • Date: 2011-06-14 10:06:56 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20110614100656-cx4oc7u426zn812z
Tags: 4.2-build2004-1
[ Samuel Thibault ]
* debian/control: Add liboss4-salsa2, liboss4-salsa-dev and
  liboss4-salsa-asound2 packages, equivalent to (and will replace) those from
  the oss-libsalsa package (Closes: #589127).
* debian/patches/liboss4-salsa.patch: New patch to rename libsalsa into
  liboss4-salsa to avoid conflicts in the archive for no good reason.
* debian/rules: Make in libOSSlib and libsalsa.
* debian/liboss4-salsa-dev.install, debian/liboss4-salsa2.install,
  debian/liboss4-salsa-asound2.links, debian/liboss4-salsa-dev.links:
  Install liboss4-salsa libraries like was done in the oss-libsalsa package.
* include-alsa: Add a copy of ALSA 1.0.5 headers: Cf ALSA_1.0.* symbols in
  libsalsa, this is the roughly supported version.
* debian/copyright: Update for new include-alsa files.
* alsa.pc: New file for compatibility with libasound-dev.
* debian/control:
  - Add Vcs-Browser and Vcs-Svn fields.
  - Use linux-any instead of the list of Linux archs (Closes: #604679).
  - Make dkms dependency linux-any only.
* debian/patches/hurd_iot.patch: New patch to fix soundcard.h usage in
  libsalsa on hurd-i386.
* debian/patches/libsalsa_fixes.patch: New patch to fix some printf usages
  and ioctl declaration in libsalsa.
* debian/patches/no_EBADE.patch: New patch to cope with hurd-i386 not having
  EBADE.
* debian/patches/CFLAGS.patch: New patch to make oss4 take debian/rules
  CFLAGS into account.
* debian/patches/snd_asoundlib_version.patch: New patch to add
  snd_asoundlib_version().
* debian/patches/generic_srccconf.patch: New patch to fix source
  configuration on unknown archs.

[ Romain Beauxis ]
* Fixed README.Debian to only mention dkms' modules.
* Switch to dpkg-source 3.0 (quilt) format
* Added DM-Upload-Allowed: yes

[ Sebastien NOEL ]
* New upstream release (Closes: #595298, #619272).
* Fix typo in initscript (Closes: #627149).
* debian/control: adjust linux-headers dependencies (Closes: #628879).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Purpose: Definitions for HDaudio codec chips known by OSS.
 
3
 */
 
4
/*
 
5
 *
 
6
 * This file is part of Open Sound System.
 
7
 *
 
8
 * Copyright (C) 4Front Technologies 1996-2008.
 
9
 *
 
10
 * This this source file is released under GPL v2 license (no other versions).
 
11
 * See the COPYING file included in the main directory of this source
 
12
 * distribution for the license terms and conditions.
 
13
 *
 
14
 */
 
15
 
 
16
/*
 
17
 * NULL mixer init function. Used to disable mixer creation for given codec.
 
18
 */
 
19
static int NULL_mixer_init (int dev, hdaudio_mixer_t * mixer, int cad, int top_group) { return 0;}
 
20
 
 
21
struct codec_desc
 
22
{
 
23
  unsigned int id; /* Codec id (however subdevice ID in the subdevices[] table) */
 
24
  char *name;
 
25
  unsigned long flags;
 
26
#define VF_NONE         0x00000000
 
27
#define VF_ALC88X_HACK  0x00000001      /* ALC88x requires special handling for
 
28
S/PDIF */
 
29
#define VF_VAIO_HACK    0x00000002      /* VAIO STAC9872 requires special
 
30
handling for headphone DAC */
 
31
#define VF_SI3055_HACK  0x00000004      /* Si3055 modem requires manual endpoint
 
32
setuping and rate and ioctl hacks. */
 
33
  char **remap;
 
34
 
 
35
  /*
 
36
   * Order of the output converter (DAC) widgets in multi channel mode.
 
37
   * If left to 0 then 0x76543210 (sequential order) is assumed. Some
 
38
   * motherboards are known to use their own channel ordering which can be
 
39
   * fixed using this approach.
 
40
   */
 
41
  unsigned int multich_map;
 
42
  hda_mixer_init_func mixer_init;
 
43
  unsigned int main_id; /* In the subdevices[] table this is used for the codec ID */
 
44
  unsigned int pci_subdevice; /* PCI subdevice ID of the controller (subdevices[]) */
 
45
};
 
46
 
 
47
 
 
48
/*
 
49
 * Meaningful widget naming schemes for some known codecs.
 
50
 * The list is terminated by a NULL string. An empty string
 
51
 * (EMPTY_STR) means that the automatically selected name will be used.
 
52
 *
 
53
 * Define EMPTY_STR as a pointer to a common "" variable to conserve space.
 
54
 */
 
55
 
 
56
static const char hda_empty_string[] = "";
 
57
#define EMPTY_STR hda_empty_string
 
58
 
 
59
static const char *alc880remap[] = {
 
60
  EMPTY_STR,                            /* 0 */
 
61
  EMPTY_STR,                            /* 1 */
 
62
  "front",                      /* 2 */
 
63
  "rear",                       /* 3 */
 
64
  "center/LFE",                 /* 4 */
 
65
  "side",                       /* 5 */
 
66
  "spdif-out",                  /* 6 */
 
67
  "rec1",                       /* 7 */
 
68
  "rec2",                       /* 8 */
 
69
  "rec3",                       /* 9 */
 
70
  "spdif-in",                   /* 10 */
 
71
  "inputmix",                   /* 11 */
 
72
  "front",                      /* 12 */
 
73
  "rear",                       /* 13 */
 
74
  "center/LFE",                 /* 14 */
 
75
  "side",                       /* 15 */
 
76
  "source-a",                   /* 16 */
 
77
  "source-b",                   /* 17 */
 
78
  "source-c",                   /* 18 */
 
79
  "source-d",                   /* 19 */
 
80
  EMPTY_STR,                            /* 20 */
 
81
  EMPTY_STR,                            /* 21 */
 
82
  EMPTY_STR,                            /* 22 */
 
83
  EMPTY_STR,                            /* 23 */
 
84
  EMPTY_STR,                            /* 24 */
 
85
  EMPTY_STR,                            /* 25 */
 
86
  EMPTY_STR,                            /* 26 */
 
87
  EMPTY_STR,                            /* 27 */
 
88
  EMPTY_STR,                            /* 28 */
 
89
  EMPTY_STR,                            /* 29 */
 
90
  EMPTY_STR,                            /* 30 */
 
91
  EMPTY_STR,                            /* 31 */
 
92
  EMPTY_STR,                            /* 32 */
 
93
  EMPTY_STR,                            /* 33 */
 
94
  EMPTY_STR,                            /* 34 */
 
95
  EMPTY_STR,                            /* 35 */
 
96
  EMPTY_STR,                            /* 36 */
 
97
  "fp-front",                   /* 37 */
 
98
  NULL
 
99
};
 
100
 
 
101
static const char *alc883remap[] = {
 
102
  EMPTY_STR,                           /* 0 */
 
103
  EMPTY_STR,                           /* 1 */
 
104
  "front",                      /* 2 */
 
105
  "rear",                       /* 3 */
 
106
  "center/LFE",                 /* 4 */
 
107
  "side",                       /* 5 */
 
108
  "spdif-out",                  /* 6 */
 
109
  EMPTY_STR,                            /* 7 */
 
110
  "rec1",                       /* 8 */
 
111
  "rec2",                       /* 9 */
 
112
  "spdif-in",                   /* a */
 
113
  "input-mix",                  /* b */
 
114
  "front",                      /* c */
 
115
  "rear",                       /* d */
 
116
  "center/LFE",                 /* e */
 
117
  "side",                       /* f */
 
118
  EMPTY_STR,                    /* 10 */
 
119
  EMPTY_STR,                    /* 11 */
 
120
  EMPTY_STR,                    /* 12 */
 
121
  EMPTY_STR,                    /* 13 */
 
122
  EMPTY_STR,                           /* 14 */
 
123
  EMPTY_STR,                           /* 15 */
 
124
  EMPTY_STR,                           /* 16 */
 
125
  EMPTY_STR,                           /* 17 */
 
126
  EMPTY_STR,                            /* 18 */
 
127
  EMPTY_STR,                    /* 19 */
 
128
  EMPTY_STR,                    /* 1a */
 
129
  EMPTY_STR,                    /* 1b */
 
130
  EMPTY_STR,                            /* 1c */
 
131
  EMPTY_STR,                            /* 1d */
 
132
  EMPTY_STR,                            /* 1e */
 
133
  EMPTY_STR,                    /* 1f */
 
134
  EMPTY_STR,                           /* 20 */
 
135
  EMPTY_STR,                           /* 21 */
 
136
  EMPTY_STR,                           /* 22 */
 
137
  EMPTY_STR,                           /* 23 */
 
138
  EMPTY_STR,                           /* 24 */
 
139
  "pcm4",                       /* 25 */
 
140
  "pcm4",                       /* 26 */
 
141
  NULL
 
142
};
 
143
 
 
144
static const char *alc260remap[] = {
 
145
  EMPTY_STR,                            /* 0x00 */
 
146
  EMPTY_STR,                            /* 0x01 */
 
147
  "front",                      /* 0x02 */
 
148
  "spdif-out",                  /* 0x03 */
 
149
  "rec1",                       /* 0x04 */
 
150
  "rec2",                       /* 0x05 */
 
151
  "spdif-in",                   /* 0x06 */
 
152
  "inputmix",                   /* 0x07 */
 
153
  "speaker-mix",                /* 0x08 */
 
154
  "headphone-mix",              /* 0x09 */
 
155
  "mono-mix",                   /* 0x0a */
 
156
  EMPTY_STR,                            /* 0x0b */
 
157
  EMPTY_STR,                            /* 0x0c */
 
158
  EMPTY_STR,                            /* 0x0d */
 
159
  EMPTY_STR,                            /* 0x0e */
 
160
  "speaker",                    /* 0x0f */
 
161
  "headphone",                  /* 0x10 */
 
162
  "mono",                       /* 0x11 */
 
163
  EMPTY_STR,                            /* 0x12 */
 
164
  EMPTY_STR,                            /* 0x13 */
 
165
  EMPTY_STR,                            /* 0x14 */
 
166
  EMPTY_STR,                            /* 0x15 */
 
167
  EMPTY_STR,                            /* 0x16 */
 
168
  "beep",                       /* 0x17 */
 
169
  "spdif-out",                  /* 0x18 */
 
170
  "spdif-in",                   /* 0x19 */
 
171
  NULL
 
172
};
 
173
 
 
174
static const char *alc262remap[] = {
 
175
  EMPTY_STR,                           /* 0x00 */
 
176
  EMPTY_STR,                           /* 0x01 */
 
177
  "speaker",                    /* 0x02 */
 
178
  "headphone",                  /* 0x03 */
 
179
  EMPTY_STR,                            /* 0x04 */
 
180
  EMPTY_STR,                            /* 0x05 */
 
181
  "spdif-out",                  /* 0x06 */
 
182
  "rec1",                       /* 0x07 */
 
183
  "rec2",                       /* 0x08 */
 
184
  "rec3",                       /* 0x09 */
 
185
  "spdif-in",                   /* 0x0a */
 
186
  "mix",                        /* 0x0b */
 
187
  EMPTY_STR,                           /* 0x0c */
 
188
  EMPTY_STR,                           /* 0x0d */
 
189
  EMPTY_STR,                           /* 0x0e */
 
190
  EMPTY_STR,                           /* 0x0f */
 
191
  EMPTY_STR,                           /* 0x10 */
 
192
  "mono",                       /* 0x11 */
 
193
  "dmic",                       /* 0x12 */
 
194
  EMPTY_STR,                           /* 0x13 */
 
195
  "line-out",                   /* 0x14 */
 
196
  "headphone",                  /* 0x15 */
 
197
  "mono",                       /* 0x16 */
 
198
  "beep",                       /* 0x17 */
 
199
  EMPTY_STR,                            /* 0x18 */
 
200
  EMPTY_STR,                            /* 0x19 */
 
201
  EMPTY_STR,                    /* 0x1a */
 
202
  EMPTY_STR,                    /* 0x1b */
 
203
  EMPTY_STR,                            /* 0x1c */
 
204
  "beep",                       /* 0x1d */
 
205
  "spdif-out",                  /* 0x1e */
 
206
  "spdif-in",                   /* 0x1f */
 
207
  NULL
 
208
};
 
209
 
 
210
static const char *alc662remap[] = {
 
211
  EMPTY_STR,                           /* 0x00 */
 
212
  EMPTY_STR,                           /* 0x01 */
 
213
  "front",                      /* 0x02 */
 
214
  "rear",                       /* 0x03 */
 
215
  "center/LFE",                 /* 0x04 */
 
216
  EMPTY_STR,                            /* 0x05 */
 
217
  "spdif-out",                  /* 0x06 */
 
218
  "spdout",                     /* 0x07 */
 
219
  "rec1",                       /* 0x08 */
 
220
  "rec2",                       /* 0x09 */
 
221
  EMPTY_STR,                            /* 0x0a */
 
222
  "mix",                        /* 0x0b */
 
223
  "front",                      /* 0x0c */
 
224
  "rear",                       /* 0x0d */
 
225
  "c/lfe",                      /* 0x0e */
 
226
  EMPTY_STR,                           /* 0x0f */
 
227
  EMPTY_STR,                           /* 0x10 */
 
228
  EMPTY_STR,                           /* 0x11 */
 
229
  EMPTY_STR,                           /* 0x12 */
 
230
  EMPTY_STR,                            /* 0x13 */
 
231
  EMPTY_STR,                            /* 0x14 */
 
232
  EMPTY_STR,                            /* 0x15 */
 
233
  EMPTY_STR,                    /* 0x16 */
 
234
  EMPTY_STR,                            /* 0x17 */
 
235
  EMPTY_STR,                            /* 0x18 */
 
236
  EMPTY_STR,                            /* 0x19 */
 
237
  EMPTY_STR,                            /* 0x1a */
 
238
  EMPTY_STR,                    /* 0x1b */
 
239
  EMPTY_STR,                    /* 0x1c */
 
240
  EMPTY_STR,                            /* 0x1d */
 
241
  EMPTY_STR,                            /* 0x1e */
 
242
  EMPTY_STR,                           /* 0x1f */
 
243
  EMPTY_STR,                           /* 0x20 */
 
244
  EMPTY_STR,                           /* 0x21 */
 
245
  EMPTY_STR,                           /* 0x22 */
 
246
  EMPTY_STR,                    /* 0x23 */
 
247
  NULL
 
248
};
 
249
 
 
250
static const char *alc861remap[] = {
 
251
  EMPTY_STR,                            /* 0x00 */
 
252
  EMPTY_STR,                            /* 0x01 */
 
253
  EMPTY_STR,                            /* 0x02 */
 
254
  "front",                      /* 0x03 */
 
255
  "side",                       /* 0x04 */
 
256
  "center/LFE",                 /* 0x05 */
 
257
  "rear",                       /* 0x06 */
 
258
  "spdout",                     /* 0x07 */
 
259
  "rec",                        /* 0x08 */
 
260
  EMPTY_STR,                            /* 0x09 */
 
261
  EMPTY_STR,                            /* 0x0a */
 
262
  EMPTY_STR,                            /* 0x0b */
 
263
  EMPTY_STR,                            /* 0x0c */
 
264
  EMPTY_STR,                            /* 0x0d */
 
265
  EMPTY_STR,                            /* 0x0e */
 
266
  EMPTY_STR,                            /* 0x0f */
 
267
  EMPTY_STR,                            /* 0x10 */
 
268
  EMPTY_STR,                            /* 0x11 */
 
269
  EMPTY_STR,                            /* 0x12 */
 
270
  EMPTY_STR,                            /* 0x13 */
 
271
  "recmix",                     /* 0x14 */
 
272
  "outmix",                     /* 0x15 */
 
273
  "frontmix",                   /* 0x16 */
 
274
  "sidemix",                    /* 0x17 */
 
275
  "c/l-mix",                    /* 0x18 */
 
276
  "rearmix",                    /* 0x19 */
 
277
  "line2-mix",                  /* 0x1a */
 
278
  "mic2mix",                    /* 0x1b */
 
279
  "line1mix",                   /* 0x1c */
 
280
  EMPTY_STR,                            /* 0x1d */
 
281
  "vendor",                     /* 0x1e */
 
282
  "center/LFE",                 /* 0x1f */
 
283
  "side",                       /* 0x20 */
 
284
  EMPTY_STR,                            /* 0x21 */
 
285
  EMPTY_STR,                            /* 0x22 */
 
286
  "beep",                       /* 0x23 */
 
287
  NULL
 
288
};
 
289
 
 
290
static const char *cmi9880remap[] = {
 
291
  EMPTY_STR,                            /* 0 */
 
292
  EMPTY_STR,                            /* 1 */
 
293
  EMPTY_STR,                            /* 2 */
 
294
  "front",                      /* 3 */
 
295
  "rear",                       /* 4 */
 
296
  "side",                       /* 5 */
 
297
  "center/LFE",                 /* 6 */
 
298
  "spdif-out",                  /* 7 */
 
299
  EMPTY_STR,                            /* 8 */
 
300
  EMPTY_STR,                            /* 9 */
 
301
  EMPTY_STR,                            /* 10 */
 
302
  EMPTY_STR,                            /* 11 */
 
303
  EMPTY_STR,                            /* 12 */
 
304
  EMPTY_STR,                            /* 13 */
 
305
  EMPTY_STR,                            /* 14 */
 
306
  EMPTY_STR,                            /* 15 */
 
307
  EMPTY_STR,                            /* 16 */
 
308
  EMPTY_STR,                            /* 17 */
 
309
  EMPTY_STR,                            /* 18 */
 
310
  EMPTY_STR,                            /* 19 */
 
311
  EMPTY_STR,                            /* 20 */
 
312
  EMPTY_STR,                            /* 21 */
 
313
  EMPTY_STR,                            /* 22 */
 
314
  "pcbeep",                     /* 23 */
 
315
  EMPTY_STR,                            /* 24 */
 
316
  EMPTY_STR,                            /* 25 */
 
317
  EMPTY_STR,                            /* 26 */
 
318
  EMPTY_STR,                            /* 27 */
 
319
  EMPTY_STR,                            /* 28 */
 
320
  EMPTY_STR,                            /* 29 */
 
321
  EMPTY_STR,                            /* 30 */
 
322
  EMPTY_STR,                            /* 31 */
 
323
  NULL
 
324
};
 
325
 
 
326
static const char *ad1981remap[] = {
 
327
  EMPTY_STR,                            /* 0 */
 
328
  EMPTY_STR,                            /* 1 */
 
329
  "spdif",                      /* 2 */
 
330
  "play",                       /* 3 */
 
331
  "rec",                        /* 4 */
 
332
  EMPTY_STR,                            /* 5 */
 
333
  EMPTY_STR,                            /* 6 */
 
334
  EMPTY_STR,                            /* 7 */
 
335
  EMPTY_STR,                            /* 8 */
 
336
  EMPTY_STR,                            /* 9 */
 
337
  "spdif-out",                  /* a */
 
338
  "mono-sel",                   /* b */
 
339
  "mic-mix",                    /* c */
 
340
  "pcbeep-sel",                 /* d */
 
341
  "rec-mix",                    /* e */
 
342
  "mono-mix",                   /* f */
 
343
  "digital-beep",               /* 10 */
 
344
  "frontmix-amp",               /* 11 */
 
345
  "mic-mixamp",                 /* 12 */
 
346
  "linein-mixamp",              /* 13 */
 
347
  "powerdown",                  /* 14 */
 
348
  "rec-sel",                    /* 15 */
 
349
  EMPTY_STR,                            /* 16 */
 
350
  EMPTY_STR,                            /* 17 */
 
351
  EMPTY_STR,                            /* 18 */
 
352
  EMPTY_STR,                            /* 19 */
 
353
  "lineout-mixamp",             /* 1a */
 
354
  "aux-mixamp",                 /* 1b */
 
355
  "mic-mixamp",                 /* 1c */
 
356
  "CD-mixamp",                  /* 1d */
 
357
  "fp-mic-mute",                /* 1e */
 
358
  "mic-mute",                   /* 1f */
 
359
  NULL
 
360
};
 
361
 
 
362
static const char *ad1983remap[] = {
 
363
  EMPTY_STR,                           /* 0 */
 
364
  EMPTY_STR,                           /* 1 */
 
365
  "spdif",                      /* 2 */
 
366
  "play",                       /* 3 */
 
367
  "rec",                        /* 4 */
 
368
  EMPTY_STR,                    /* 5 */
 
369
  EMPTY_STR,                            /* 6 */
 
370
  EMPTY_STR,                            /* 7 */
 
371
  EMPTY_STR,                            /* 8 */
 
372
  EMPTY_STR,                            /* 9 */
 
373
  "spdif-out",                  /* a */
 
374
  "mono-sel",                   /* b */
 
375
  "mic-boost",                  /* c */
 
376
  "linein-sel",                 /* d */
 
377
  "rec-mix",                    /* e */
 
378
  "mono-mix",                   /* f */
 
379
  "digital-beep",               /* 10 */
 
380
  "frontmix-amp",               /* 11 */
 
381
  "mic-mixamp",                 /* 12 */
 
382
  "linein-mixamp",              /* 13 */
 
383
  "rec-sel",                    /* 14 */
 
384
  "powerdown",                  /* 15 */
 
385
  NULL
 
386
};
 
387
 
 
388
static const char *ad1984remap[] = {
 
389
  EMPTY_STR,                           /* 0 */
 
390
  EMPTY_STR,                           /* 1 */
 
391
  "spdif",                      /* 2 */
 
392
  "headphone",                  /* 3 */
 
393
  "front",                      /* 4 */
 
394
  "dig-mic1",                   /* 5 */
 
395
  "dig-mic2",                   /* 6 */
 
396
  "headphone-mix",              /* 7 */
 
397
  "rec1",                       /* 8 */
 
398
  "rec2",                       /* 9 */
 
399
  "lineout-mix",                /* a */
 
400
  "aux-mix",                    /* b */
 
401
  "rec1-sel",                   /* c */
 
402
  "rec2-sel",                   /* d */
 
403
  "mono-sel",                   /* e */
 
404
  "aux-sel",                    /* f */
 
405
  "beep",                       /* 10 */
 
406
  EMPTY_STR,                            /* 11 */
 
407
  EMPTY_STR,                            /* 12 */
 
408
  EMPTY_STR,                            /* 13 */
 
409
  EMPTY_STR,                            /* 14 */
 
410
  EMPTY_STR,                            /* 15 */
 
411
  EMPTY_STR,                            /* 16 */
 
412
  EMPTY_STR,                            /* 17 */
 
413
  EMPTY_STR,                            /* 18 */
 
414
  "mixer-powerdown",            /* 19 */
 
415
  "beep",                       /* 1a */
 
416
  "spdif-out",                  /* 1b */
 
417
  EMPTY_STR,                            /* 1c */
 
418
  EMPTY_STR,                            /* 1d */
 
419
  "mono-mix",                   /* 1e */
 
420
  "mono-downmix",               /* 1f */
 
421
  "input-mix",                  /* 20 */
 
422
  "input-mixamp",               /* 21 */
 
423
  "headphone-sel",              /* 22 */
 
424
  "dock-sel",                   /* 23 */
 
425
  "dock-mix",                   /* 24 */
 
426
  "dock-micboost",              /* 25 */
 
427
  EMPTY_STR,                            /* 26 */
 
428
  NULL
 
429
};
 
430
 
 
431
static const char *ad1986remap[] = {
 
432
  EMPTY_STR,                            /* 0 */
 
433
  EMPTY_STR,                            /* 1 */
 
434
  "spdif-out",                  /* 2 */
 
435
  "front",                      /* 3 */
 
436
  "rear",                       /* 4 */
 
437
  "center/LFE",                 /* 5 */
 
438
  "rec",                        /* 6 */
 
439
  "recmon",                     /* 7 */
 
440
  "mono-mix",                   /* 8 */
 
441
  "stereo-downmix",             /* 9 */
 
442
  "headphone-sel",              /* a */
 
443
  "lineout-sel",                /* b */
 
444
  "rear-sel",                   /* c */
 
445
  "center/LFE-sel",             /* d */
 
446
  "mono-sel",                   /* e */
 
447
  "mic-sel",                    /* f */
 
448
  "linein-sel",                 /* 10 */
 
449
  "mic-src",                    /* 11 */
 
450
  "rec-src"                     /* 12 */
 
451
  "mic-mix",                    /* 13 */
 
452
  "phone-mix",                  /* 14 */
 
453
  "cd-mix",                     /* 15 */
 
454
  "aux-mix",                    /* 16 */
 
455
  "linein-mix",                 /* 17 */
 
456
  "beep",                       /* 18 */
 
457
  "digital-beep",               /* 19 */
 
458
  EMPTY_STR,                            /* 1a */
 
459
  EMPTY_STR,                            /* 1b */
 
460
  EMPTY_STR,                            /* 1c */
 
461
  EMPTY_STR,                            /* 1d */
 
462
  EMPTY_STR,                            /* 1e */
 
463
  EMPTY_STR,                            /* 1f */
 
464
  EMPTY_STR,                            /* 20 */
 
465
  EMPTY_STR,                            /* 21 */
 
466
  EMPTY_STR,                            /* 22 */
 
467
  EMPTY_STR,                            /* 23 */
 
468
  EMPTY_STR,                            /* 24 */
 
469
  "spdif-out",                  /* 25 */
 
470
  "analog-powerdown",           /* 26 */
 
471
  "mic-c/LFE-mix",              /* 27 */
 
472
  "mic-linein-mix",             /* 28 */
 
473
  "c/LFE-linein-mix",           /* 29 */
 
474
  "mic-linein-c/LFE-mix",       /* 2a */
 
475
  "mic-sel",                    /* 2b */
 
476
  NULL
 
477
};
 
478
 
 
479
static const char *ad1988remap[] = {
 
480
  EMPTY_STR,                            /* 0 */
 
481
  EMPTY_STR,                            /* 1 */ /* This is both audio-fgr and DAC???? */
 
482
  "spdout",                     /* 2 */ /* Not used? */
 
483
  "headphone",                  /* 3 */
 
484
  "front",                      /* 4 */
 
485
  "center/LFE",                 /* 5 */
 
486
  "rear",                       /* 6 */
 
487
  "spdin",                      /* 7 */
 
488
  "rec1",                       /* 8 */
 
489
  "rec2",                       /* 9 */
 
490
  "side",                       /* a */
 
491
  "spdin-src",                  /* b */
 
492
  "rec1-src",                   /* c */
 
493
  "rec2-src",                   /* d */
 
494
  "rec3-src",                   /* e */
 
495
  "rec3",                       /* f */
 
496
  "pcbeep",                     /* 10 */
 
497
  EMPTY_STR,                            /* 11 */
 
498
  EMPTY_STR,                            /* 12 */
 
499
  EMPTY_STR,                            /* 13 */
 
500
  EMPTY_STR,                            /* 14 */
 
501
  EMPTY_STR,                            /* 15 */
 
502
  EMPTY_STR,                            /* 16 */
 
503
  EMPTY_STR,                            /* 17 */
 
504
  EMPTY_STR,                            /* 18 */
 
505
  "power-down",                 /* 19 */
 
506
  "beep",                       /* 1a */
 
507
  "spdif-out",                  /* 1b */
 
508
  "spdif-in",                   /* 1c */
 
509
  "spdifout-mix",               /* 1d */
 
510
  "mono-mix",                   /* 1e */
 
511
  "main-volume",                /* 1f */
 
512
  "analog-mix",                 /* 20 */
 
513
  "outamp",                     /* 21 */
 
514
  "headphon-mix",               /* 22 */
 
515
  "hp-powerdown",               /* 23 */
 
516
  EMPTY_STR,                            /* 24 */
 
517
  EMPTY_STR,                            /* 25 */
 
518
  "mic-mix",                    /* 26 */
 
519
  "center/LFE-mix",             /* 27 */
 
520
  "side-mix",                   /* 28 */
 
521
  "front-mix",                  /* 29 */
 
522
  "rear-mix",                   /* 2a */
 
523
  "fp-mic-mix",                 /* 2b */
 
524
  "linein-mix",                 /* 2c */
 
525
  "mono-mixdown",               /* 2d */
 
526
  EMPTY_STR,                            /* 2e */
 
527
  "bias-pdown",                 /* 2f */
 
528
  "fppink-outsel",              /* 30 */
 
529
  "blue-outsel",                /* 31 */
 
530
  "pink-outsel",                /* 32 */
 
531
  "blue-insel",                 /* 33 */
 
532
  "pink-insel",                 /* 34 */
 
533
  EMPTY_STR,                            /* 35 */
 
534
  "mono-sel",                   /* 36 */
 
535
  "fpgreen-outsel",             /* 37 */
 
536
  "fpgreen-micboost",           /* 38 */
 
537
  "fppink-micboost",            /* 39 */
 
538
  "blue-micboost",              /* 3a */
 
539
  "black-micboost",             /* 3b */
 
540
  "pink-micboost",              /* 3c */
 
541
  "green-micboost",             /* 3d */
 
542
  NULL
 
543
};
 
544
 
 
545
#if 0
 
546
static const char *stac9200remap[] = {
 
547
  EMPTY_STR,                            /* 0 */
 
548
  EMPTY_STR,                            /* 0x01 */
 
549
  "play",                       /* 0x02 */
 
550
  "rec",                        /* 0x03 */
 
551
  "spdif-in",                   /* 0x04 */
 
552
  "spdif-out",                  /* 0x05 */
 
553
  EMPTY_STR,                            /* 0x06 */
 
554
  "playmux",                    /* 0x07 */
 
555
  EMPTY_STR,                            /* 0x08 */
 
556
  EMPTY_STR,                            /* 0x09 */
 
557
  "recmux",                     /* 0x0a */
 
558
  "mainvol",                    /* 0x0b */
 
559
  "inputmux",                   /* 0x0c */
 
560
  EMPTY_STR,                            /* 0x0d */
 
561
  EMPTY_STR,                            /* 0x0e */
 
562
  EMPTY_STR,                            /* 0x0f */
 
563
  EMPTY_STR,                            /* 0x10 */
 
564
  EMPTY_STR,                            /* 0x11 */
 
565
  EMPTY_STR,                            /* 0x12 */
 
566
  "mono-mix",                   /* 0x13 */
 
567
  "beep",                       /* 0x14 */
 
568
  NULL
 
569
};
 
570
#endif
 
571
 
 
572
static const char *stac920xremap[] = {
 
573
  EMPTY_STR,                           /* 0 */
 
574
  EMPTY_STR,                           /* 0x01 */
 
575
  EMPTY_STR,                            /* 0x02 */
 
576
  EMPTY_STR,                            /* 0x03 */
 
577
  EMPTY_STR,                            /* 0x04 */
 
578
  EMPTY_STR,                            /* 0x05 */
 
579
  EMPTY_STR,                            /* 0x06 */
 
580
  EMPTY_STR,                            /* 0x07 */
 
581
  EMPTY_STR,                            /* 0x08 */
 
582
  EMPTY_STR,                            /* 0x09 */
 
583
  EMPTY_STR,                           /* 0x0a */
 
584
  EMPTY_STR,                           /* 0x0b */
 
585
  EMPTY_STR,                           /* 0x0c */
 
586
  EMPTY_STR,                           /* 0x0d */
 
587
  EMPTY_STR,                           /* 0x0e */
 
588
  EMPTY_STR,                           /* 0x0f */
 
589
  "front",                      /* 0x10 */
 
590
  "rear",                       /* 0x11 */
 
591
  "rec1",                       /* 0x12 */
 
592
  "rec2",                       /* 0x13 */
 
593
  "mono-out",                   /* 0x14 */
 
594
  "mono-mix",                   /* 0x15 */
 
595
  "cd",                         /* 0x16 */
 
596
  "dig-mic1",                   /* 0x17 */
 
597
  "dig-mic2",                   /* 0x18 */
 
598
  "input1-mux",                 /* 0x19 */
 
599
  "input2-mux",                 /* 0x1a */
 
600
  "rec1-vol",                   /* 0x1b */
 
601
  "rec2-vol",                   /* 0x1c */
 
602
  "rec1-mux",                   /* 0x1d */
 
603
  "rec2-mux",                   /* 0x1e */
 
604
  "spdif-out",                  /* 0x1f */
 
605
  "spdif-in",                   /* 0x20 */
 
606
  "digital-out",                /* 0x21 */
 
607
  "digital-in",                 /* 0x22 */
 
608
  "beep",                       /* 0x23 */
 
609
  "mastervol",                  /* 0x24 */
 
610
  EMPTY_STR,                            /* 0x25 */
 
611
  NULL
 
612
};
 
613
 
 
614
static const char *stac925xremap[] = {
 
615
  EMPTY_STR,                           /* 0 */
 
616
  EMPTY_STR,                           /* 0x01 */
 
617
  "play",                       /* 0x02 */
 
618
  "rec",                        /* 0x03 */
 
619
  "spdif-in",                   /* 0x04 */
 
620
  "spdif-out",                  /* 0x05 */
 
621
  "output-mux",                 /* 0x06 */
 
622
  EMPTY_STR,                            /* 0x07 */
 
623
  EMPTY_STR,                    /* 0x08 */
 
624
  "rec-vol",                    /* 0x09 */
 
625
  EMPTY_STR,                            /* 0x0a */
 
626
  EMPTY_STR,                            /* 0x0b */
 
627
  EMPTY_STR,                    /* 0x0c */
 
628
  EMPTY_STR,                           /* 0x0d */
 
629
  "vol",                        /* 0x0e */
 
630
  "input-mux",                  /* 0x0f */
 
631
  EMPTY_STR,                           /* 0x10 */
 
632
  EMPTY_STR,                           /* 0x11 */
 
633
  "mono-mix",                   /* 0x12 */
 
634
  "beep",                       /* 0x13 */
 
635
  "rec-mux",                    /* 0x14 */
 
636
  EMPTY_STR,                            /* 0x15 */
 
637
  NULL
 
638
};
 
639
 
 
640
static const char *stac922xremap[] = {
 
641
  EMPTY_STR,                            /* 0 */
 
642
  EMPTY_STR,                            /* 0x01 */
 
643
  "front",                      /* 0x02 */
 
644
  "center/LFE",                 /* 0x03 */
 
645
  "rear",                       /* 0x04 */
 
646
  "side",                       /* 0x05 */
 
647
  "rec1",                       /* 0x06 */
 
648
  "rec2",                       /* 0x07 */
 
649
  "spdif-out",                  /* 0x08 */
 
650
  "spdif-in",                   /* 0x09 */
 
651
  EMPTY_STR,                            /* 0x0a */
 
652
  EMPTY_STR,                            /* 0x0b */
 
653
  EMPTY_STR,                            /* 0x0c */
 
654
  EMPTY_STR,                            /* 0x0d */
 
655
  EMPTY_STR,                            /* 0x0e */
 
656
  EMPTY_STR,                            /* 0x0f */
 
657
  EMPTY_STR,                            /* 0x10 */
 
658
  EMPTY_STR,                            /* 0x11 */
 
659
  "rec1mux",                    /* 0x12 */
 
660
  "rec2mux",                    /* 0x13 */
 
661
  "pcbeep",                     /* 0x14 */
 
662
  "cd",                         /* 0x15 */
 
663
  "mainvol",                    /* 0x16 */
 
664
  "rec1vol",                    /* 0x17 */
 
665
  "rec2vol",                    /* 0x18 */
 
666
  "adat",                       /* 0x19 */
 
667
  "i2s-out",                    /* 0x1a */
 
668
  "i2s-in",                     /* 0x1b */
 
669
  NULL
 
670
};
 
671
 
 
672
static const char *stac923xremap[] = {
 
673
  EMPTY_STR,                           /* 0 */
 
674
  EMPTY_STR,                           /* 0x01 */
 
675
  "front",                      /* 0x02 */
 
676
  "center/LFE",                 /* 0x03 */
 
677
  "rear",                       /* 0x04 */
 
678
  "side",                       /* 0x05 */
 
679
  "headphone",                  /* 0x06 */
 
680
  "rec1",                       /* 0x07 */
 
681
  "rec2",                       /* 0x08 */
 
682
  "rec3",                       /* 0x09 */
 
683
  EMPTY_STR,                           /* 0x0a */
 
684
  EMPTY_STR,                           /* 0x0b */
 
685
  EMPTY_STR,                           /* 0x0c */
 
686
  EMPTY_STR,                           /* 0x0d */
 
687
  EMPTY_STR,                           /* 0x0e */
 
688
  EMPTY_STR,                           /* 0x0f */
 
689
  EMPTY_STR,                    /* 0x10 */
 
690
  EMPTY_STR,                    /* 0x11 */
 
691
  "cd",                         /* 0x12 */
 
692
  "dig-mic1",                   /* 0x13 */
 
693
  "dig-mic2",                   /* 0x14 */
 
694
  "input1-mux",                 /* 0x15 */
 
695
  "input2-mux",                 /* 0x16 */
 
696
  "input3-mux",                 /* 0x17 */
 
697
  "rec1vol",                    /* 0x18 */
 
698
  "rec2vol",                    /* 0x19 */
 
699
  "rec3vol",                    /* 0x1a */
 
700
  "rec1-mux",                   /* 0x1b */
 
701
  "rec2-mux",                   /* 0x1c */
 
702
  "rec3-mux",                   /* 0x1d */
 
703
  "spdif-out",                  /* 0x1e */
 
704
  "adat",                       /* 0x1f */
 
705
  NULL
 
706
};
 
707
 
 
708
 
 
709
static const char *conexant_modem_remap[] =
 
710
{
 
711
        EMPTY_STR,              /* 0x00 */
 
712
        EMPTY_STR,              /* 0x01 */
 
713
        EMPTY_STR,              /* 0x02 */
 
714
        EMPTY_STR,              /* 0x03 */
 
715
        EMPTY_STR,              /* 0x04 */
 
716
        EMPTY_STR,              /* 0x05 */
 
717
        EMPTY_STR,              /* 0x06 */
 
718
        EMPTY_STR,              /* 0x07 */
 
719
        EMPTY_STR,              /* 0x08 */
 
720
        EMPTY_STR,              /* 0x09 */
 
721
        EMPTY_STR,              /* 0x0a */
 
722
        EMPTY_STR,              /* 0x0b */
 
723
        EMPTY_STR,              /* 0x0c */
 
724
        EMPTY_STR,              /* 0x0d */
 
725
        EMPTY_STR,              /* 0x0e */
 
726
        EMPTY_STR,              /* 0x0f */
 
727
        EMPTY_STR,              /* 0x10 */
 
728
        EMPTY_STR,              /* 0x11 */
 
729
        EMPTY_STR,              /* 0x12 */
 
730
        EMPTY_STR,              /* 0x13 */
 
731
        EMPTY_STR,              /* 0x14 */
 
732
        EMPTY_STR,              /* 0x15 */
 
733
        EMPTY_STR,              /* 0x16 */
 
734
        EMPTY_STR,              /* 0x17 */
 
735
        EMPTY_STR,              /* 0x18 */
 
736
        EMPTY_STR,              /* 0x19 */
 
737
        EMPTY_STR,              /* 0x1a */
 
738
        EMPTY_STR,              /* 0x1b */
 
739
        EMPTY_STR,              /* 0x1c */
 
740
        EMPTY_STR,              /* 0x1d */
 
741
        EMPTY_STR,              /* 0x1e */
 
742
        EMPTY_STR,              /* 0x1f */
 
743
        EMPTY_STR,              /* 0x20 */
 
744
        EMPTY_STR,              /* 0x21 */
 
745
        EMPTY_STR,              /* 0x22 */
 
746
        EMPTY_STR,              /* 0x23 */
 
747
        EMPTY_STR,              /* 0x24 */
 
748
        EMPTY_STR,              /* 0x25 */
 
749
        EMPTY_STR,              /* 0x26 */
 
750
        EMPTY_STR,              /* 0x27 */
 
751
        EMPTY_STR,              /* 0x28 */
 
752
        EMPTY_STR,              /* 0x29 */
 
753
        EMPTY_STR,              /* 0x2a */
 
754
        EMPTY_STR,              /* 0x2b */
 
755
        EMPTY_STR,              /* 0x2c */
 
756
        EMPTY_STR,              /* 0x2d */
 
757
        EMPTY_STR,              /* 0x2e */
 
758
        EMPTY_STR,              /* 0x2f */
 
759
        EMPTY_STR,              /* 0x30 */
 
760
        EMPTY_STR,              /* 0x31 */
 
761
        EMPTY_STR,              /* 0x32 */
 
762
        EMPTY_STR,              /* 0x33 */
 
763
        EMPTY_STR,              /* 0x34 */
 
764
        EMPTY_STR,              /* 0x35 */
 
765
        EMPTY_STR,              /* 0x36 */
 
766
        EMPTY_STR,              /* 0x37 */
 
767
        EMPTY_STR,              /* 0x38 */
 
768
        EMPTY_STR,              /* 0x39 */
 
769
        EMPTY_STR,              /* 0x3a */
 
770
        EMPTY_STR,              /* 0x3b */
 
771
        EMPTY_STR,              /* 0x3c */
 
772
        EMPTY_STR,              /* 0x3d */
 
773
        EMPTY_STR,              /* 0x3e */
 
774
        EMPTY_STR,              /* 0x3f */
 
775
        EMPTY_STR,              /* 0x40 */
 
776
        EMPTY_STR,              /* 0x41 */
 
777
        EMPTY_STR,              /* 0x42 */
 
778
        EMPTY_STR,              /* 0x43 */
 
779
        EMPTY_STR,              /* 0x44 */
 
780
        EMPTY_STR,              /* 0x45 */
 
781
        EMPTY_STR,              /* 0x46 */
 
782
        EMPTY_STR,              /* 0x47 */
 
783
        EMPTY_STR,              /* 0x48 */
 
784
        EMPTY_STR,              /* 0x49 */
 
785
        EMPTY_STR,              /* 0x4a */
 
786
        EMPTY_STR,              /* 0x4b */
 
787
        EMPTY_STR,              /* 0x4c */
 
788
        EMPTY_STR,              /* 0x4d */
 
789
        EMPTY_STR,              /* 0x4e */
 
790
        EMPTY_STR,              /* 0x4f */
 
791
        EMPTY_STR,              /* 0x50 */
 
792
        EMPTY_STR,              /* 0x51 */
 
793
        EMPTY_STR,              /* 0x52 */
 
794
        EMPTY_STR,              /* 0x53 */
 
795
        EMPTY_STR,              /* 0x54 */
 
796
        EMPTY_STR,              /* 0x55 */
 
797
        EMPTY_STR,              /* 0x56 */
 
798
        EMPTY_STR,              /* 0x57 */
 
799
        EMPTY_STR,              /* 0x58 */
 
800
        EMPTY_STR,              /* 0x59 */
 
801
        EMPTY_STR,              /* 0x5a */
 
802
        EMPTY_STR,              /* 0x5b */
 
803
        EMPTY_STR,              /* 0x5c */
 
804
        EMPTY_STR,              /* 0x5d */
 
805
        EMPTY_STR,              /* 0x5e */
 
806
        EMPTY_STR,              /* 0x5f */
 
807
        EMPTY_STR,              /* 0x60 */
 
808
        EMPTY_STR,              /* 0x61 */
 
809
        EMPTY_STR,              /* 0x62 */
 
810
        EMPTY_STR,              /* 0x63 */
 
811
        EMPTY_STR,              /* 0x64 */
 
812
        EMPTY_STR,              /* 0x65 */
 
813
        EMPTY_STR,              /* 0x66 */
 
814
        EMPTY_STR,              /* 0x67 */
 
815
        EMPTY_STR,              /* 0x68 */
 
816
        EMPTY_STR,              /* 0x69 */
 
817
        EMPTY_STR,              /* 0x6a */
 
818
        EMPTY_STR,              /* 0x6b */
 
819
        EMPTY_STR,              /* 0x6c */
 
820
        EMPTY_STR,              /* 0x6d */
 
821
        EMPTY_STR,              /* 0x6e */
 
822
        EMPTY_STR,              /* 0x6f */
 
823
        "modem-control",/* 0x70 */ // Vendor defined widget
 
824
        "modem-in",     /* 0x71 */
 
825
        "modem-out",    /* 0x72 */
 
826
        "modem-jack",   /* 0x73 */
 
827
        NULL
 
828
};
 
829
 
 
830
extern int hdaudio_GPIO_init_1 (int dev, hdaudio_mixer_t * mixer, int cad, int top_group);
 
831
 
 
832
static const codec_desc_t codecs[] = {
 
833
  /* Realtek HDA codecs */
 
834
  {0x10ec0260, "ALC260", VF_NONE, (char **) &alc260remap},
 
835
  {0x10ec0262, "ALC262", VF_NONE, (char **) &alc262remap}, 
 
836
  {0x10ec0268, "ALC268", VF_NONE, (char **) &alc262remap}, 
 
837
  {0x10ec0662, "ALC662", VF_NONE, (char **) &alc662remap},
 
838
  {0x10ec0861, "ALC861", VF_NONE, (char **) &alc861remap},
 
839
  {0x10ec0862, "ALC862", VF_NONE, (char **) &alc861remap},
 
840
  {0x10ec0880, "ALC880", VF_ALC88X_HACK, (char **) &alc880remap}, 
 
841
  {0x10ec0882, "ALC882", VF_ALC88X_HACK, (char **) &alc880remap}, 
 
842
  {0x10ec0883, "ALC883", VF_ALC88X_HACK, (char **) &alc883remap}, 
 
843
  {0x10ec0885, "ALC885", VF_ALC88X_HACK, (char **) &alc883remap}, 
 
844
  {0x10ec0888, "ALC888", VF_ALC88X_HACK, (char **) &alc883remap}, 
 
845
  {0x10ec0889, "ALC889", VF_ALC88X_HACK, (char **) &alc883remap}, 
 
846
 
 
847
  /* CMedia HDA codecs */
 
848
  {0x13f69880, "CMI9880", VF_NONE, (char **) &cmi9880remap},
 
849
  {0x434d4980, "CMI9880", VF_NONE, (char **) &cmi9880remap},
 
850
 
 
851
  {0x111d7603, "92HD75B3X5", VF_NONE, NULL, 0, hdaudio_GPIO_init_1},
 
852
  {0x111d7608, "92HD75B2X5", VF_NONE, NULL, 0, hdaudio_GPIO_init_1},
 
853
  {0x111d76b0, "92HD71B8X", VF_NONE, NULL, 0, hdaudio_GPIO_init_1},
 
854
  {0x111d76b1, "92HD71B8X", VF_NONE, NULL, 0, hdaudio_GPIO_init_1},
 
855
  {0x111d76b2, "92HD71B7X", VF_NONE, NULL, 0, hdaudio_GPIO_init_1},
 
856
  {0x111d76b3, "92HD71B7X", VF_NONE, NULL, 0, hdaudio_GPIO_init_1},
 
857
  {0x111d76b4, "92HD71B6X", VF_NONE, NULL, 0, hdaudio_GPIO_init_1},
 
858
  {0x111d76b5, "92HD71B6X", VF_NONE, NULL, 0, hdaudio_GPIO_init_1},
 
859
  {0x111d76b6, "92HD71B5X", VF_NONE, NULL, 0, hdaudio_GPIO_init_1},
 
860
  {0x111d76b7, "92HD71B5X", VF_NONE, NULL, 0, hdaudio_GPIO_init_1},
 
861
 
 
862
  /* Analog Devices HDA codecs */
 
863
  {0x11d41981, "AD1981", VF_NONE, (char **) &ad1981remap, 0x76543021},
 
864
  {0x11d41983, "AD1983", VF_NONE, (char **) &ad1983remap, 0x76543021},
 
865
  {0x11d41984, "AD1984", VF_NONE, (char **) &ad1984remap, 0x76543012},
 
866
  {0x11d41986, "AD1986A", VF_NONE, (char **) &ad1986remap, 0x76540321},
 
867
  {0x11d41988, "AD1988A", VF_NONE, (char **) &ad1988remap, 0x76015432},
 
868
  {0x11d4198b, "AD1988B", VF_NONE, (char **) &ad1988remap, 0x76015432},
 
869
 
 
870
  /* Sigmatel HDA codecs (some of them) */
 
871
  {0x83847690, "STAC9200", VF_NONE, (char **) &stac920xremap },
 
872
  {0x838476a0, "STAC9205", VF_NONE, (char **) &stac920xremap },
 
873
  {0x838476a1, "STAC9205D", VF_NONE, (char **) &stac920xremap },
 
874
  {0x838476a2, "STAC9204", VF_NONE, (char **) &stac920xremap },
 
875
  {0x838476a3, "STAC9204D", VF_NONE, (char **) &stac920xremap },
 
876
  
 
877
  /* Apple Macbook ids */
 
878
  {0x83847880, "STAC9220 A1", VF_NONE, (char **) &stac922xremap },
 
879
  {0x83847882, "STAC9220 A2", VF_NONE, (char **) &stac922xremap },
 
880
  {0x83847680, "STAC9221 A1", VF_NONE, (char **) &stac922xremap },
 
881
 
 
882
  {0x83847681, "STAC9220D", VF_NONE, (char **) &stac922xremap },
 
883
  {0x83847682, "STAC9221", VF_NONE, (char **) &stac922xremap },
 
884
  {0x83847683, "STAC9221D", VF_NONE, (char **) &stac922xremap },
 
885
 
 
886
  {0x83847610, "STAC9230XN", VF_NONE, (char **) &stac923xremap },
 
887
  {0x83847611, "STAC9230DN", VF_NONE, (char **) &stac923xremap },
 
888
  {0x83847612, "STAC9230XT", VF_NONE, (char **) &stac923xremap },
 
889
  {0x83847613, "STAC9230DT", VF_NONE, (char **) &stac923xremap },
 
890
  {0x83847614, "STAC9229X", VF_NONE, (char **) &stac923xremap },
 
891
  {0x83847615, "STAC9229D", VF_NONE, (char **) &stac923xremap },
 
892
  {0x83847616, "STAC9228X", VF_NONE, (char **) &stac923xremap },
 
893
  {0x83847617, "STAC9228D", VF_NONE, (char **) &stac923xremap },
 
894
  {0x83847618, "STAC9227X", VF_NONE, (char **) &stac923xremap }, /* Intel D975XBX2 (at least) */
 
895
  {0x83847619, "STAC9227D", VF_NONE, (char **) &stac923xremap },
 
896
 
 
897
  {0x838476a4, "STAC9255", VF_NONE, (char **) &stac925xremap },
 
898
  {0x838476a5, "STAC9255D", VF_NONE, (char **) &stac925xremap },
 
899
  {0x838476a6, "STAC9254", VF_NONE, (char **) &stac925xremap },
 
900
  {0x838476a7, "STAC9254D", VF_NONE, (char **) &stac925xremap },
 
901
 
 
902
  {0x83847620, "STAC9274", VF_NONE, (char **) &stac923xremap },
 
903
  {0x83847621, "STAC9274D", VF_NONE, (char **) &stac923xremap },
 
904
  {0x83847622, "STAC9273X", VF_NONE, (char **) &stac923xremap },
 
905
  {0x83847623, "STAC9273D", VF_NONE, (char **) &stac923xremap },
 
906
  {0x83847624, "STAC9272X", VF_NONE, (char **) &stac923xremap },
 
907
  {0x83847625, "STAC9272D", VF_NONE, (char **) &stac923xremap },
 
908
  {0x83847626, "STAC9271X", VF_NONE, (char **) &stac923xremap },
 
909
  {0x83847627, "STAC9271D", VF_NONE, (char **) &stac923xremap },
 
910
 
 
911
  {0x83847628, "STAC9274X5NH", VF_NONE, (char **) &stac923xremap },
 
912
  {0x83847629, "STAC9274D5NH", VF_NONE, (char **) &stac923xremap },
 
913
  {0x83847661, "CXD9872RD", VF_NONE, NULL, 0x76543012},
 
914
  {0x83847662, "STAC9872AK", VF_NONE, NULL, 0x76543012},
 
915
  {0x83847664, "STAC9872K", VF_NONE, NULL, 0x76543210}, /* Vaio VGN-AR51J */
 
916
 
 
917
  /* Conexant */
 
918
  {0x14f15045, "CX20548", VF_NONE, NULL, 0x76543201},
 
919
  {0x14f15047, "CX20551", VF_NONE, NULL, 0x76543201},
 
920
  {0x14f15051, "CX20561", VF_NONE, NULL, 0x76543210},
 
921
  {0x14f12c06, "Conexant2c06", VF_NONE, (char **) &conexant_modem_remap, 0, NULL_mixer_init}, /* Modem codec (Vaio) */
 
922
  {0x14f12bfa, "Conexant2bfa", VF_NONE, (char **) &conexant_modem_remap, 0, NULL_mixer_init}, /* Modem codec (Acer Ferrari 5k) */
 
923
 
 
924
  /* Si3055 and compatible modems */
 
925
  {0x163c3055, "Si3055", VF_SI3055_HACK, NULL, 0, NULL_mixer_init },
 
926
  {0x163c3155, "Si3155", VF_SI3055_HACK, NULL, 0, NULL_mixer_init },
 
927
  {0x11c13026, "Agere3026", VF_SI3055_HACK, NULL, 0, NULL_mixer_init },
 
928
  {0x11c13055, "Agere3055", VF_SI3055_HACK, NULL, 0, NULL_mixer_init },
 
929
  {0x11c13155, "Agere3155", VF_SI3055_HACK, NULL, 0, NULL_mixer_init },
 
930
  {0x10573055, "Motorola3055", VF_SI3055_HACK, NULL, 0, NULL_mixer_init },
 
931
  {0x10573057, "Motorola3057", VF_SI3055_HACK, NULL, 0, NULL_mixer_init },
 
932
  {0x10573155, "Motorola3155", VF_SI3055_HACK, NULL, 0, NULL_mixer_init },
 
933
 
 
934
  /* Creative Labs */
 
935
  {0x1102000a, "Createive XFi XTreme", VF_NONE, NULL, 0x76543210},
 
936
 
 
937
  {0x11c11040, "Agere HDA Modem", VF_NONE, NULL, 0, NULL_mixer_init},   
 
938
 
 
939
  /* Unknown */
 
940
  {0, "Unknown"}
 
941
};
 
942
 
 
943
static const char *abit_AA8_remap[] = {
 
944
  EMPTY_STR,                            /* 0 */
 
945
  EMPTY_STR,                            /* 1 */
 
946
  "front",                      /* 2 */
 
947
  "rear",                       /* 3 */
 
948
  "center/LFE",                 /* 4 */
 
949
  "side",                       /* 5 */
 
950
  "spdif-out",                  /* 6 */
 
951
  "rec1",                       /* 7 */
 
952
  "rec2",                       /* 8 */
 
953
  "rec3",                       /* 9 */
 
954
  "spdif-in",                   /* 10 */
 
955
  "inputmix",                   /* 11 */
 
956
  "front",                      /* 12 */
 
957
  "rear",                       /* 13 */
 
958
  "center/LFE",                 /* 14 */
 
959
  "side",                       /* 15 */
 
960
  "out-source",                 /* 16 */
 
961
  "out-source",                 /* 17 */
 
962
  "out-source",                 /* 18 */
 
963
  "out-source",                 /* 19 */
 
964
  "green1",                     /* 20 */
 
965
  "black1",                     /* 21 */
 
966
  "C-L",                        /* 22 */
 
967
  "surr",                       /* 23 */
 
968
  "pink1",                      /* 24 */
 
969
  "pink2",                      /* 25 */
 
970
  "blue1",                      /* 26 */
 
971
  "blue2",                      /* 27 */
 
972
  "cd",                         /* 28 */
 
973
  "beep",                       /* 29 */
 
974
  "spdout",                     /* 30 */
 
975
  "spdin",                      /* 31 */
 
976
  "vendor",                     /* 32 */
 
977
  "vol",                        /* 33 */
 
978
  NULL
 
979
};
 
980
 
 
981
static const char *vaio_remap[] = {
 
982
        EMPTY_STR,              /* 0x00 */
 
983
        EMPTY_STR,              /* 0x01 */
 
984
        "headphone",    /* 0x02 */
 
985
        "pcm",          /* 0x03 */ // Unused
 
986
        "pcm",          /* 0x04 */ // Unused
 
987
        "speaker",      /* 0x05 */
 
988
        "rec1",         /* 0x06 */
 
989
        "rec1-vol",     /* 0x07 */
 
990
        "rec",          /* 0x08 */
 
991
        "rec-vol",      /* 0x09 */
 
992
        "headphone",    /* 0x0a */
 
993
        EMPTY_STR,              /* 0x0b */ // Unused
 
994
        EMPTY_STR,              /* 0x0c */ // Unused
 
995
        "mic",          /* 0x0d */
 
996
        EMPTY_STR,              /* 0x0e */
 
997
        "int-speaker",  /* 0x0f */
 
998
        "spdifout1",    /* 0x10 */
 
999
        "int-digout1",  /* 0x11 */
 
1000
        "spdifin",      /* 0x12 */
 
1001
        "int-digout",   /* 0x13 */
 
1002
        "int-mic",      /* 0x14 */
 
1003
        "rec",          /* 0x15 */
 
1004
        "beep",         /* 0x16 */
 
1005
        "vol",          /* 0x17 */
 
1006
        "spdifout",     /* 0x18 */
 
1007
        NULL
 
1008
};
 
1009
 
 
1010
static const char *alc262_vaio_remap[] =
 
1011
{
 
1012
        EMPTY_STR,             /* 0x00 */
 
1013
        EMPTY_STR,             /* 0x01 */
 
1014
        "speaker",              /* 0x02 */
 
1015
        "headphone",            /* 0x03 */
 
1016
        "vendor",               /* 0x04 */
 
1017
        "vendor",               /* 0x05 */
 
1018
        "hdmi-out",             /* 0x06 */
 
1019
        "rec1",         /* 0x07 */
 
1020
        "rec2",         /* 0x08 */
 
1021
        "rec3",         /* 0x09 */
 
1022
        "spdif-in",             /* 0x0a */
 
1023
        "mix",          /* 0x0b */
 
1024
        "mix",          /* 0x0c */
 
1025
        "mix",          /* 0x0d */
 
1026
        "mono",         /* 0x0e */
 
1027
        "vendor",               /* 0x0f */
 
1028
        "vendor",               /* 0x10 */
 
1029
        "mono",         /* 0x11 */
 
1030
        "dmic",         /* 0x12 */
 
1031
        "vendor",               /* 0x13 */
 
1032
        "line-out",             /* 0x14 */
 
1033
        "headphone",            /* 0x15 */
 
1034
        "mono",         /* 0x16 */
 
1035
        "beep",         /* 0x17 */
 
1036
        "speaker",              /* 0x18 */
 
1037
        "speaker",              /* 0x19 */
 
1038
        "speaker",              /* 0x1a */
 
1039
        "speaker",              /* 0x1b */
 
1040
        "speaker",              /* 0x1c */
 
1041
        "beep",         /* 0x1d */
 
1042
        "spdif-out",            /* 0x1e */
 
1043
        "spdif-in",             /* 0x1f */
 
1044
        "vendor",               /* 0x20 */
 
1045
        "vol",          /* 0x21 */
 
1046
        "rec3",         /* 0x22 */
 
1047
        "rec2",         /* 0x23 */
 
1048
        "rec1",         /* 0x24 */
 
1049
        NULL
 
1050
};
 
1051
 
 
1052
/*
 
1053
 * Table for subsystem ID's that require special handling
 
1054
 */
 
1055
 
 
1056
extern int hdaudio_Asus_P4B_E_mixer_init (int dev, hdaudio_mixer_t * mixer, int cad, int top_group);
 
1057
extern int hdaudio_scaleoP_mixer_init (int dev, hdaudio_mixer_t * mixer, int cad, int top_group);
 
1058
extern int hdaudio_abit_AA8_mixer_init (int dev, hdaudio_mixer_t * mixer, int cad, int top_group);
 
1059
extern int hdaudio_ferrari5k_mixer_init (int dev, hdaudio_mixer_t * mixer, int cad, int top_group);
 
1060
extern int hdaudio_vaio_vgn_mixer_init (int dev, hdaudio_mixer_t * mixer, int cad, int top_group);
 
1061
extern int hdaudio_thinkpad_r61_mixer_init (int dev, hdaudio_mixer_t * mixer, int cad, int top_group);
 
1062
extern int hdaudio_mac_sigmatel_GPIO_init (int dev, hdaudio_mixer_t * mixer, int cad, int top_group);
 
1063
extern int hdaudio_mac_realtek_GPIO_init (int dev, hdaudio_mixer_t * mixer, int cad, int top_group);
 
1064
extern int hdaudio_eeepc_mixer_init (int dev, hdaudio_mixer_t * mixer, int cad, int top_group);
 
1065
extern int hdaudio_asus_a7k_GPIO_init (int dev, hdaudio_mixer_t * mixer, int cad, int top_group);
 
1066
extern int hdaudio_asus_m9_mixer_init (int dev, hdaudio_mixer_t * mixer, int cad, int top_group);
 
1067
 
 
1068
static const codec_desc_t subdevices[] = {
 
1069
  {0x98801019, "ECS 915P-A", VF_NONE, NULL, 0x76541320},
 
1070
  {0x104381e1, "Asus P4B-E/AD1988A", VF_NONE, (char **) &ad1988remap, 0x76015432, hdaudio_Asus_P4B_E_mixer_init},
 
1071
  // {0x1043e601, "ScaleoP/ALC888", VF_ALC88X_HACK, (char **) &alc883remap, 0, hdaudio_scaleoP_mixer_init}, 
 
1072
 
 
1073
  /* Abit AA8 (at least some revisions) have bogus codec config information,
 
1074
   * including the subvendor ID. 0x08800000 is used by many other motherboards
 
1075
   * too. Have to use the pci_subvendor field for alc880 based devices:
 
1076
   *    0x147b1039 = Abit AA8 motherboard.
 
1077
   *    0x15849077 = Rock Pegasus 665 laptop.
 
1078
   */
 
1079
  {0x08800000, "Abit AA8/ALC880", VF_ALC88X_HACK, (char **) &abit_AA8_remap, 0, hdaudio_abit_AA8_mixer_init, 0, 0x147b1039},
 
1080
 
 
1081
  {0x10250000, "Ferrari5k/ALC883", VF_ALC88X_HACK, (char **) &alc883remap, 0, hdaudio_ferrari5k_mixer_init, 0x10ec0883, 0x1025010a},
 
1082
  {0x10250000, "Acer_aspire5052/ALC883", VF_ALC88X_HACK, (char **) &alc883remap, 0, hdaudio_ferrari5k_mixer_init, 0x10ec0883, 0x1025010f},
 
1083
  {0x1025160d, "Acer_travelmate4060/ALC260", VF_NONE, (char **) &alc260remap, 0, hdaudio_GPIO_init_1, 0x10ec0260, 0x1025008f},
 
1084
  {0x10431153, "Asus M9", VF_NONE, (char **) &ad1986remap, 0x76540321, hdaudio_asus_m9_mixer_init},
 
1085
 
 
1086
  /*
 
1087
   **** Sony Vaio VGN-AR51 ***
 
1088
   * Has three codecs. Primary (Stac9872K), Modem (Conexant) and
 
1089
   * HDMI digital output (ALC262). Disable the mixer entries for codecs 2 and 3.
 
1090
   */
 
1091
  {0x104d2200, "Vaio/STAC9872K", VF_VAIO_HACK, (char**) &vaio_remap, 0x76540213, hdaudio_vaio_vgn_mixer_init, 0x83847664, 0x104d9016},
 
1092
  /* 2nd codec (#1) is "Conexant2c06" modem */
 
1093
  {0x104d2200, "Vaio/HDMI", VF_NONE, (char **) &alc262_vaio_remap, 0, NULL_mixer_init, 0x10ec0262, 0x104d9016}, 
 
1094
  /****/
 
1095
 
 
1096
  /*
 
1097
   * Sony VAIO SZ2, SZ3, FE and FE31B
 
1098
   */
 
1099
  {0x104d0700, "Vaio/CXD9872RD", VF_VAIO_HACK, (char**) &vaio_remap, 0x76540213, hdaudio_vaio_vgn_mixer_init, 0x83847661, 0x104d81e6},
 
1100
  {0x104d1000, "Vaio/CXD9872RD", VF_VAIO_HACK, (char**) &vaio_remap, 0x76540213, hdaudio_vaio_vgn_mixer_init, 0x83847661, 0x104d81ef},
 
1101
  {0x104d0c00, "Vaio/CXD9872RD", VF_VAIO_HACK, (char**) &vaio_remap, 0x76540213, hdaudio_vaio_vgn_mixer_init, 0x83847661, 0x104d81ef},
 
1102
 
 
1103
  /*
 
1104
   * Sony VAIO AR
 
1105
   */
 
1106
  {0x104d1300, "Vaio/CXD9872AKD", VF_VAIO_HACK, (char**) &vaio_remap, 0x76540213, hdaudio_vaio_vgn_mixer_init, 0x83847664, 0x104d81fd},
 
1107
 
 
1108
  /*
 
1109
   * Sony Vaio SZ (SZ650) has two codecs, STAC9872AK and Conexant modem.
 
1110
   * Assume the audio codec is identical with Vaio AGN (above).
 
1111
   */
 
1112
  {0x104d1e00, "Vaio/STAC9872AK", VF_VAIO_HACK, (char**) &vaio_remap, 0x76540213, hdaudio_vaio_vgn_mixer_init, 0x83847662, 0x104d9008},
 
1113
  /* Vaio VGC-LA1 */
 
1114
  {0x104d1200, "Vaio/STAC9872AK", VF_VAIO_HACK, (char**) &vaio_remap, 0x76540213, hdaudio_vaio_vgn_mixer_init, 0x83847662, 0x104d8205},
 
1115
 
 
1116
/*
 
1117
 * Thinkpad R61
 
1118
 */
 
1119
  {0x17aa20bb, "Thinkpad R61", VF_NONE, (char**) &ad1984remap, 0, hdaudio_thinkpad_r61_mixer_init},
 
1120
 
 
1121
/*
 
1122
 * Asus Eee PC (model 900 at least)
 
1123
 */
 
1124
  {0x10438337, "Asus Eee PC", VF_NONE, NULL, 0, hdaudio_eeepc_mixer_init},
 
1125
 
 
1126
 /*
 
1127
  * Asus A7K
 
1128
  */
 
1129
  {0x10431339, "Asus A7K", VF_ALC88X_HACK, (char **) &alc880remap, 0, hdaudio_asus_a7k_GPIO_init}, // ALC660
 
1130
 
 
1131
/*
 
1132
 * Known Macintosh systems
 
1133
 */
 
1134
  {0x106b0800, "Intel Mac V1", VF_NONE, (char **) &stac922xremap, 0, hdaudio_mac_sigmatel_GPIO_init},
 
1135
  {0x106b0700, "Intel Mac V2", VF_NONE, (char **) &stac922xremap, 0, hdaudio_mac_sigmatel_GPIO_init},
 
1136
  {0x106b0600, "Intel Mac V2", VF_NONE, (char **) &stac922xremap, 0, hdaudio_mac_sigmatel_GPIO_init},
 
1137
  {0x106b0200, "Intel Mac V3", VF_NONE, (char **) &stac922xremap, 0, hdaudio_mac_sigmatel_GPIO_init},
 
1138
  {0x106b0e00, "Intel Mac V3", VF_NONE, (char **) &stac922xremap, 0, hdaudio_mac_sigmatel_GPIO_init},
 
1139
  {0x106b0f00, "Intel Mac V3", VF_NONE, (char **) &stac922xremap, 0, hdaudio_mac_sigmatel_GPIO_init},
 
1140
  {0x106b1600, "Intel Mac V3", VF_NONE, (char **) &stac922xremap, 0, hdaudio_mac_sigmatel_GPIO_init},
 
1141
  {0x106b1700, "Intel Mac V3", VF_NONE, (char **) &stac922xremap, 0, hdaudio_mac_sigmatel_GPIO_init},
 
1142
  {0x106b1e00, "Intel Mac V3", VF_NONE, (char **) &stac922xremap, 0, hdaudio_mac_sigmatel_GPIO_init},
 
1143
  {0x106b1a00, "Intel Mac V4", VF_NONE, (char **) &stac922xremap, 0, hdaudio_mac_sigmatel_GPIO_init},
 
1144
  // {0x00000100, "Intel Mac V4", VF_NONE, (char **) &stac922xremap, ?, hdaudio_mac_sigmatel_GPIO_init},
 
1145
  {0x106b0a00, "Intel Mac V5", VF_NONE, (char **) &stac922xremap, 0, hdaudio_mac_sigmatel_GPIO_init},
 
1146
  {0x106b2200, "Intel Mac V5", VF_NONE, (char **) &stac922xremap, 0, hdaudio_mac_sigmatel_GPIO_init},
 
1147
  {0x106b3200, "Intel iMac", VF_ALC88X_HACK, (char **) &alc883remap, 0, hdaudio_mac_realtek_GPIO_init}, // ALC885
 
1148
 
 
1149
  {0, "Unknown"}
 
1150
};
 
1151