Lines Matching +full:0 +full:x11

53 #define CS420X_VENDOR_NID	0x11
54 #define CS_DIG_OUT1_PIN_NID 0x10
55 #define CS_DIG_OUT2_PIN_NID 0x15
56 #define CS_DMIC1_PIN_NID 0x0e
57 #define CS_DMIC2_PIN_NID 0x12
60 #define IDX_SPDIF_STAT 0x0000
61 #define IDX_SPDIF_CTL 0x0001
62 #define IDX_ADC_CFG 0x0002
64 * 0 = immediate,
69 #define CS_COEF_ADC_SZC_MASK (3 << 0)
70 #define CS_COEF_ADC_MIC_SZC_MODE (3 << 0) /* SZC setup for mic */
71 #define CS_COEF_ADC_LI_SZC_MODE (3 << 0) /* SZC setup for line-in */
72 /* PGA mode: 0 = differential, 1 = signle-ended */
75 #define IDX_DAC_CFG 0x0003
77 * 0 = Immediate
82 #define CS_COEF_DAC_HP_SZC_MODE (3 << 0) /* nid 0x02 */
83 #define CS_COEF_DAC_LO_SZC_MODE (3 << 2) /* nid 0x03 */
84 #define CS_COEF_DAC_SPK_SZC_MODE (3 << 4) /* nid 0x04 */
86 #define IDX_BEEP_CFG 0x0004
87 /* 0x0008 - test reg key */
88 /* 0x0009 - 0x0014 -> 12 test regs */
89 /* 0x0015 - visibility reg */
92 #define CS4208_VENDOR_NID 0x24
98 snd_hda_codec_write(codec, spec->vendor_nid, 0,
100 return snd_hda_codec_read(codec, spec->vendor_nid, 0,
101 AC_VERB_GET_PROC_COEF, 0);
109 snd_hda_codec_write(codec, spec->vendor_nid, 0,
111 snd_hda_codec_write(codec, spec->vendor_nid, 0,
134 snd_hda_codec_write(codec, 0x01, 0,
168 {0x11, AC_VERB_SET_PROC_STATE, 1},
169 {0x11, AC_VERB_SET_COEF_INDEX, IDX_DAC_CFG},
170 {0x11, AC_VERB_SET_PROC_COEF,
171 (0x002a /* DAC1/2/3 SZCMode Soft Ramp */
172 | 0x0040 /* Mute DACs on FIFO error */
173 | 0x1000 /* Enable DACs High Pass Filter */
174 | 0x0400 /* Disable Coefficient Auto increment */
177 {0x11, AC_VERB_SET_COEF_INDEX, IDX_ADC_CFG},
178 {0x11, AC_VERB_SET_PROC_COEF, 0x000a},
180 {0x11, AC_VERB_SET_COEF_INDEX, IDX_BEEP_CFG},
181 {0x11, AC_VERB_SET_PROC_COEF, 0x0007}, /* Enable Beep thru DAC1/2/3 */
187 {0x01, AC_VERB_SET_POWER_STATE, 0x00}, /* AFG: D0 */
188 {0x24, AC_VERB_SET_PROC_STATE, 0x01}, /* VPW: processing on */
189 {0x24, AC_VERB_SET_COEF_INDEX, 0x0033},
190 {0x24, AC_VERB_SET_PROC_COEF, 0x0001}, /* A1 ICS */
191 {0x24, AC_VERB_SET_COEF_INDEX, 0x0034},
192 {0x24, AC_VERB_SET_PROC_COEF, 0x1C01}, /* A1 Enable, A Thresh = 300mV */
215 {0x01, AC_VERB_SET_POWER_STATE, 0x00}, /* AFG: D0 */
216 {0x11, AC_VERB_SET_PROC_STATE, 0x01}, /* VPW: processing on */
218 {0x11, AC_VERB_SET_COEF_INDEX, 0x0008},
219 {0x11, AC_VERB_SET_PROC_COEF, 0x9999},
220 {0x11, AC_VERB_SET_COEF_INDEX, 0x0017},
221 {0x11, AC_VERB_SET_PROC_COEF, 0xa412},
222 {0x11, AC_VERB_SET_COEF_INDEX, 0x0001},
223 {0x11, AC_VERB_SET_PROC_COEF, 0x0009},
225 {0x07, AC_VERB_SET_POWER_STATE, 0x00}, /* S/PDIF Rx: D0 */
226 {0x08, AC_VERB_SET_POWER_STATE, 0x00}, /* S/PDIF Tx: D0 */
228 {0x11, AC_VERB_SET_COEF_INDEX, 0x0017},
229 {0x11, AC_VERB_SET_PROC_COEF, 0x2412},
230 {0x11, AC_VERB_SET_COEF_INDEX, 0x0008},
231 {0x11, AC_VERB_SET_PROC_COEF, 0x0000},
232 {0x11, AC_VERB_SET_COEF_INDEX, 0x0001},
233 {0x11, AC_VERB_SET_PROC_COEF, 0x0008},
234 {0x11, AC_VERB_SET_PROC_STATE, 0x00},
243 coef = 0x0002; /* SRC_MUTE soft-mute on SPDIF (if no lock) */
244 coef |= 0x0008; /* Replace with mute on error */
246 coef |= 0x4000; /* RX to TX1 or TX2 Loopthru / SPDIF2
268 snd_hda_codec_write(codec, 0x01, 0, AC_VERB_SET_GPIO_MASK,
270 snd_hda_codec_write(codec, 0x01, 0, AC_VERB_SET_GPIO_DIRECTION,
272 snd_hda_codec_write(codec, 0x01, 0, AC_VERB_SET_GPIO_DATA,
281 return 0;
289 if (err < 0)
292 return 0;
301 err = snd_hda_parse_pin_defcfg(codec, &spec->gen.autocfg, NULL, 0);
302 if (err < 0)
306 if (err < 0)
311 unsigned int done = 0;
313 for (i = 0; i < spec->gen.input_mux.num_items; i++) {
324 return 0;
340 SND_PCI_QUIRK(0x10de, 0x0ac0, "MacBookPro 5,3", CS420X_MBP53),
341 SND_PCI_QUIRK(0x10de, 0x0d94, "MacBookAir 3,1(2)", CS420X_MBP55),
342 SND_PCI_QUIRK(0x10de, 0xcb79, "MacBookPro 5,5", CS420X_MBP55),
343 SND_PCI_QUIRK(0x10de, 0xcb89, "MacBookPro 7,1", CS420X_MBP55),
345 /*SND_PCI_QUIRK(0x8086, 0x7270, "IMac 27 Inch", CS420X_IMAC27),*/
348 SND_PCI_QUIRK(0x106b, 0x0600, "iMac 14,1", CS420X_IMAC27_122),
349 SND_PCI_QUIRK(0x106b, 0x0900, "iMac 12,1", CS420X_IMAC27_122),
350 SND_PCI_QUIRK(0x106b, 0x1c00, "MacBookPro 8,1", CS420X_MBP81),
351 SND_PCI_QUIRK(0x106b, 0x2000, "iMac 12,2", CS420X_IMAC27_122),
352 SND_PCI_QUIRK(0x106b, 0x2800, "MacBookPro 10,1", CS420X_MBP101),
353 SND_PCI_QUIRK(0x106b, 0x5600, "MacBookAir 5,2", CS420X_MBP81),
354 SND_PCI_QUIRK(0x106b, 0x5b00, "MacBookAir 4,2", CS420X_MBA42),
355 SND_PCI_QUIRK_VENDOR(0x106b, "Apple", CS420X_APPLE),
360 { 0x09, 0x012b4050 },
361 { 0x0a, 0x90100141 },
362 { 0x0b, 0x90100140 },
363 { 0x0c, 0x018b3020 },
364 { 0x0d, 0x90a00110 },
365 { 0x0e, 0x400000f0 },
366 { 0x0f, 0x01cbe030 },
367 { 0x10, 0x014be060 },
368 { 0x12, 0x400000f0 },
369 { 0x15, 0x400000f0 },
374 { 0x09, 0x012b4030 },
375 { 0x0a, 0x90100121 },
376 { 0x0b, 0x90100120 },
377 { 0x0c, 0x400000f0 },
378 { 0x0d, 0x90a00110 },
379 { 0x0e, 0x400000f0 },
380 { 0x0f, 0x400000f0 },
381 { 0x10, 0x014be040 },
382 { 0x12, 0x400000f0 },
383 { 0x15, 0x400000f0 },
388 { 0x09, 0x012b4050 },
389 { 0x0a, 0x90100140 },
390 { 0x0b, 0x90100142 },
391 { 0x0c, 0x018b3020 },
392 { 0x0d, 0x90a00110 },
393 { 0x0e, 0x400000f0 },
394 { 0x0f, 0x01cbe030 },
395 { 0x10, 0x014be060 },
396 { 0x12, 0x01ab9070 },
397 { 0x15, 0x400000f0 },
402 { 0x0d, 0x40ab90f0 },
403 { 0x0e, 0x90a600f0 },
404 { 0x12, 0x50a600f0 },
409 { 0x09, 0x012b4030 }, /* HP */
410 { 0x0a, 0x400000f0 },
411 { 0x0b, 0x90100120 }, /* speaker */
412 { 0x0c, 0x400000f0 },
413 { 0x0d, 0x90a00110 }, /* mic */
414 { 0x0e, 0x400000f0 },
415 { 0x0f, 0x400000f0 },
416 { 0x10, 0x400000f0 },
417 { 0x12, 0x400000f0 },
418 { 0x15, 0x400000f0 },
423 { 0x10, 0x032120f0 }, /* HP */
424 { 0x11, 0x500000f0 },
425 { 0x12, 0x90100010 }, /* Speaker */
426 { 0x13, 0x500000f0 },
427 { 0x14, 0x500000f0 },
428 { 0x15, 0x770000f0 },
429 { 0x16, 0x770000f0 },
430 { 0x17, 0x430000f0 },
431 { 0x18, 0x43ab9030 }, /* Mic */
432 { 0x19, 0x770000f0 },
433 { 0x1a, 0x770000f0 },
434 { 0x1b, 0x770000f0 },
435 { 0x1c, 0x90a00090 },
436 { 0x1d, 0x500000f0 },
437 { 0x1e, 0x500000f0 },
438 { 0x1f, 0x500000f0 },
439 { 0x20, 0x500000f0 },
440 { 0x21, 0x430000f0 },
441 { 0x22, 0x430000f0 },
508 {0x11, AC_VERB_SET_COEF_INDEX, IDX_ADC_CFG},
509 {0x11, AC_VERB_SET_PROC_COEF, 0x102a},
549 if (err < 0)
554 return 0;
578 SND_PCI_QUIRK_VENDOR(0x106b, "Apple", CS4208_MAC_AUTO),
584 SND_PCI_QUIRK(0x106b, 0x5e00, "MacBookPro 11,2", CS4208_MBP11),
585 SND_PCI_QUIRK(0x106b, 0x6c00, "MacMini 7,1", CS4208_MACMINI),
586 SND_PCI_QUIRK(0x106b, 0x7100, "MacBookAir 6,1", CS4208_MBA6),
587 SND_PCI_QUIRK(0x106b, 0x7200, "MacBookAir 6,2", CS4208_MBA6),
588 SND_PCI_QUIRK(0x106b, 0x7b00, "MacBookPro 12,1", CS4208_MBP11),
598 spec->gpio_eapd_hp = 0;
626 { 0x18, 0x00ab9150 }, /* mic (audio-in) jack: disable detect */
627 { 0x21, 0x004be140 }, /* SPDIF: disable detect */
632 /* HP pin (0x10) has an inverted detection */
644 hda_nid_t pin = spec->gen.autocfg.dig_out_pins[0];
645 int pinctl = ucontrol->value.integer.value[0] ? PIN_OUT : 0;
659 if (!spec->gen.autocfg.dig_out_pins[0])
698 /* correct the 0dB offset of input pins */
705 caps |= 0x02;
714 /* exclude NID 0x10 (HP) from output volumes due to different steps */
715 spec->gen.out_vol_mask = 1ULL << 0x10;
721 snd_hda_override_wcaps(codec, 0x18,
722 get_wcaps(codec, 0x18) | AC_WCAP_STEREO);
723 cs4208_fix_amp_caps(codec, 0x18);
724 cs4208_fix_amp_caps(codec, 0x1b);
725 cs4208_fix_amp_caps(codec, 0x1c);
728 if (err < 0)
733 return 0;
751 if (err < 0)
770 HDA_CODEC_ID_MODEL(0x10134206, "CS4206", CS420X_VENDOR_NID),
771 HDA_CODEC_ID_MODEL(0x10134207, "CS4207", CS420X_VENDOR_NID),
772 HDA_CODEC_ID_MODEL(0x10134208, "CS4208", CS4208_VENDOR_NID),