PageRenderTime 1169ms CodeModel.GetById 15ms RepoModel.GetById 0ms app.codeStats 0ms

/sound/pci/hda/alc260_quirks.c

https://github.com/Mengqi/linux-2.6
C | 1272 lines | 877 code | 94 blank | 301 comment | 6 complexity | 44f87ec79f19d41f0381d487978e80f1 MD5 | raw file
  1. /*
  2. * ALC260 quirk models
  3. * included by patch_realtek.c
  4. */
  5. /* ALC260 models */
  6. enum {
  7. ALC260_AUTO,
  8. ALC260_BASIC,
  9. ALC260_HP,
  10. ALC260_HP_DC7600,
  11. ALC260_HP_3013,
  12. ALC260_FUJITSU_S702X,
  13. ALC260_ACER,
  14. ALC260_WILL,
  15. ALC260_REPLACER_672V,
  16. ALC260_FAVORIT100,
  17. #ifdef CONFIG_SND_DEBUG
  18. ALC260_TEST,
  19. #endif
  20. ALC260_MODEL_LAST /* last tag */
  21. };
  22. static const hda_nid_t alc260_dac_nids[1] = {
  23. /* front */
  24. 0x02,
  25. };
  26. static const hda_nid_t alc260_adc_nids[1] = {
  27. /* ADC0 */
  28. 0x04,
  29. };
  30. static const hda_nid_t alc260_adc_nids_alt[1] = {
  31. /* ADC1 */
  32. 0x05,
  33. };
  34. /* NIDs used when simultaneous access to both ADCs makes sense. Note that
  35. * alc260_capture_mixer assumes ADC0 (nid 0x04) is the first ADC.
  36. */
  37. static const hda_nid_t alc260_dual_adc_nids[2] = {
  38. /* ADC0, ADC1 */
  39. 0x04, 0x05
  40. };
  41. #define ALC260_DIGOUT_NID 0x03
  42. #define ALC260_DIGIN_NID 0x06
  43. static const struct hda_input_mux alc260_capture_source = {
  44. .num_items = 4,
  45. .items = {
  46. { "Mic", 0x0 },
  47. { "Front Mic", 0x1 },
  48. { "Line", 0x2 },
  49. { "CD", 0x4 },
  50. },
  51. };
  52. /* On Fujitsu S702x laptops capture only makes sense from Mic/LineIn jack,
  53. * headphone jack and the internal CD lines since these are the only pins at
  54. * which audio can appear. For flexibility, also allow the option of
  55. * recording the mixer output on the second ADC (ADC0 doesn't have a
  56. * connection to the mixer output).
  57. */
  58. static const struct hda_input_mux alc260_fujitsu_capture_sources[2] = {
  59. {
  60. .num_items = 3,
  61. .items = {
  62. { "Mic/Line", 0x0 },
  63. { "CD", 0x4 },
  64. { "Headphone", 0x2 },
  65. },
  66. },
  67. {
  68. .num_items = 4,
  69. .items = {
  70. { "Mic/Line", 0x0 },
  71. { "CD", 0x4 },
  72. { "Headphone", 0x2 },
  73. { "Mixer", 0x5 },
  74. },
  75. },
  76. };
  77. /* Acer TravelMate(/Extensa/Aspire) notebooks have similar configuration to
  78. * the Fujitsu S702x, but jacks are marked differently.
  79. */
  80. static const struct hda_input_mux alc260_acer_capture_sources[2] = {
  81. {
  82. .num_items = 4,
  83. .items = {
  84. { "Mic", 0x0 },
  85. { "Line", 0x2 },
  86. { "CD", 0x4 },
  87. { "Headphone", 0x5 },
  88. },
  89. },
  90. {
  91. .num_items = 5,
  92. .items = {
  93. { "Mic", 0x0 },
  94. { "Line", 0x2 },
  95. { "CD", 0x4 },
  96. { "Headphone", 0x6 },
  97. { "Mixer", 0x5 },
  98. },
  99. },
  100. };
  101. /* Maxdata Favorit 100XS */
  102. static const struct hda_input_mux alc260_favorit100_capture_sources[2] = {
  103. {
  104. .num_items = 2,
  105. .items = {
  106. { "Line/Mic", 0x0 },
  107. { "CD", 0x4 },
  108. },
  109. },
  110. {
  111. .num_items = 3,
  112. .items = {
  113. { "Line/Mic", 0x0 },
  114. { "CD", 0x4 },
  115. { "Mixer", 0x5 },
  116. },
  117. },
  118. };
  119. /*
  120. * This is just place-holder, so there's something for alc_build_pcms to look
  121. * at when it calculates the maximum number of channels. ALC260 has no mixer
  122. * element which allows changing the channel mode, so the verb list is
  123. * never used.
  124. */
  125. static const struct hda_channel_mode alc260_modes[1] = {
  126. { 2, NULL },
  127. };
  128. /* Mixer combinations
  129. *
  130. * basic: base_output + input + pc_beep + capture
  131. * HP: base_output + input + capture_alt
  132. * HP_3013: hp_3013 + input + capture
  133. * fujitsu: fujitsu + capture
  134. * acer: acer + capture
  135. */
  136. static const struct snd_kcontrol_new alc260_base_output_mixer[] = {
  137. HDA_CODEC_VOLUME("Front Playback Volume", 0x08, 0x0, HDA_OUTPUT),
  138. HDA_BIND_MUTE("Front Playback Switch", 0x08, 2, HDA_INPUT),
  139. HDA_CODEC_VOLUME("Headphone Playback Volume", 0x09, 0x0, HDA_OUTPUT),
  140. HDA_BIND_MUTE("Headphone Playback Switch", 0x09, 2, HDA_INPUT),
  141. HDA_CODEC_VOLUME_MONO("Mono Playback Volume", 0x0a, 1, 0x0, HDA_OUTPUT),
  142. HDA_BIND_MUTE_MONO("Mono Playback Switch", 0x0a, 1, 2, HDA_INPUT),
  143. { } /* end */
  144. };
  145. static const struct snd_kcontrol_new alc260_input_mixer[] = {
  146. HDA_CODEC_VOLUME("CD Playback Volume", 0x07, 0x04, HDA_INPUT),
  147. HDA_CODEC_MUTE("CD Playback Switch", 0x07, 0x04, HDA_INPUT),
  148. HDA_CODEC_VOLUME("Line Playback Volume", 0x07, 0x02, HDA_INPUT),
  149. HDA_CODEC_MUTE("Line Playback Switch", 0x07, 0x02, HDA_INPUT),
  150. HDA_CODEC_VOLUME("Mic Playback Volume", 0x07, 0x0, HDA_INPUT),
  151. HDA_CODEC_MUTE("Mic Playback Switch", 0x07, 0x0, HDA_INPUT),
  152. HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x07, 0x01, HDA_INPUT),
  153. HDA_CODEC_MUTE("Front Mic Playback Switch", 0x07, 0x01, HDA_INPUT),
  154. { } /* end */
  155. };
  156. /* update HP, line and mono out pins according to the master switch */
  157. static void alc260_hp_master_update(struct hda_codec *codec)
  158. {
  159. update_speakers(codec);
  160. }
  161. static int alc260_hp_master_sw_get(struct snd_kcontrol *kcontrol,
  162. struct snd_ctl_elem_value *ucontrol)
  163. {
  164. struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
  165. struct alc_spec *spec = codec->spec;
  166. *ucontrol->value.integer.value = !spec->master_mute;
  167. return 0;
  168. }
  169. static int alc260_hp_master_sw_put(struct snd_kcontrol *kcontrol,
  170. struct snd_ctl_elem_value *ucontrol)
  171. {
  172. struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
  173. struct alc_spec *spec = codec->spec;
  174. int val = !*ucontrol->value.integer.value;
  175. if (val == spec->master_mute)
  176. return 0;
  177. spec->master_mute = val;
  178. alc260_hp_master_update(codec);
  179. return 1;
  180. }
  181. static const struct snd_kcontrol_new alc260_hp_output_mixer[] = {
  182. {
  183. .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
  184. .name = "Master Playback Switch",
  185. .subdevice = HDA_SUBDEV_NID_FLAG | 0x11,
  186. .info = snd_ctl_boolean_mono_info,
  187. .get = alc260_hp_master_sw_get,
  188. .put = alc260_hp_master_sw_put,
  189. },
  190. HDA_CODEC_VOLUME("Front Playback Volume", 0x08, 0x0, HDA_OUTPUT),
  191. HDA_BIND_MUTE("Front Playback Switch", 0x08, 2, HDA_INPUT),
  192. HDA_CODEC_VOLUME("Headphone Playback Volume", 0x09, 0x0, HDA_OUTPUT),
  193. HDA_BIND_MUTE("Headphone Playback Switch", 0x09, 2, HDA_INPUT),
  194. HDA_CODEC_VOLUME_MONO("Speaker Playback Volume", 0x0a, 1, 0x0,
  195. HDA_OUTPUT),
  196. HDA_BIND_MUTE_MONO("Speaker Playback Switch", 0x0a, 1, 2, HDA_INPUT),
  197. { } /* end */
  198. };
  199. static const struct hda_verb alc260_hp_unsol_verbs[] = {
  200. {0x10, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC_HP_EVENT},
  201. {},
  202. };
  203. static void alc260_hp_setup(struct hda_codec *codec)
  204. {
  205. struct alc_spec *spec = codec->spec;
  206. spec->autocfg.hp_pins[0] = 0x0f;
  207. spec->autocfg.speaker_pins[0] = 0x10;
  208. spec->autocfg.speaker_pins[1] = 0x11;
  209. spec->automute = 1;
  210. spec->automute_mode = ALC_AUTOMUTE_PIN;
  211. }
  212. static const struct snd_kcontrol_new alc260_hp_3013_mixer[] = {
  213. {
  214. .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
  215. .name = "Master Playback Switch",
  216. .subdevice = HDA_SUBDEV_NID_FLAG | 0x11,
  217. .info = snd_ctl_boolean_mono_info,
  218. .get = alc260_hp_master_sw_get,
  219. .put = alc260_hp_master_sw_put,
  220. },
  221. HDA_CODEC_VOLUME("Front Playback Volume", 0x09, 0x0, HDA_OUTPUT),
  222. HDA_CODEC_MUTE("Front Playback Switch", 0x10, 0x0, HDA_OUTPUT),
  223. HDA_CODEC_VOLUME("Aux-In Playback Volume", 0x07, 0x06, HDA_INPUT),
  224. HDA_CODEC_MUTE("Aux-In Playback Switch", 0x07, 0x06, HDA_INPUT),
  225. HDA_CODEC_VOLUME("Headphone Playback Volume", 0x08, 0x0, HDA_OUTPUT),
  226. HDA_CODEC_MUTE("Headphone Playback Switch", 0x15, 0x0, HDA_OUTPUT),
  227. HDA_CODEC_VOLUME_MONO("Speaker Playback Volume", 0x0a, 1, 0x0, HDA_OUTPUT),
  228. HDA_CODEC_MUTE_MONO("Speaker Playback Switch", 0x11, 1, 0x0, HDA_OUTPUT),
  229. { } /* end */
  230. };
  231. static void alc260_hp_3013_setup(struct hda_codec *codec)
  232. {
  233. struct alc_spec *spec = codec->spec;
  234. spec->autocfg.hp_pins[0] = 0x15;
  235. spec->autocfg.speaker_pins[0] = 0x10;
  236. spec->autocfg.speaker_pins[1] = 0x11;
  237. spec->automute = 1;
  238. spec->automute_mode = ALC_AUTOMUTE_PIN;
  239. }
  240. static const struct hda_bind_ctls alc260_dc7600_bind_master_vol = {
  241. .ops = &snd_hda_bind_vol,
  242. .values = {
  243. HDA_COMPOSE_AMP_VAL(0x08, 3, 0, HDA_OUTPUT),
  244. HDA_COMPOSE_AMP_VAL(0x09, 3, 0, HDA_OUTPUT),
  245. HDA_COMPOSE_AMP_VAL(0x0a, 3, 0, HDA_OUTPUT),
  246. 0
  247. },
  248. };
  249. static const struct hda_bind_ctls alc260_dc7600_bind_switch = {
  250. .ops = &snd_hda_bind_sw,
  251. .values = {
  252. HDA_COMPOSE_AMP_VAL(0x11, 3, 0, HDA_OUTPUT),
  253. HDA_COMPOSE_AMP_VAL(0x15, 3, 0, HDA_OUTPUT),
  254. 0
  255. },
  256. };
  257. static const struct snd_kcontrol_new alc260_hp_dc7600_mixer[] = {
  258. HDA_BIND_VOL("Master Playback Volume", &alc260_dc7600_bind_master_vol),
  259. HDA_BIND_SW("LineOut Playback Switch", &alc260_dc7600_bind_switch),
  260. HDA_CODEC_MUTE("Speaker Playback Switch", 0x0f, 0x0, HDA_OUTPUT),
  261. HDA_CODEC_MUTE("Headphone Playback Switch", 0x10, 0x0, HDA_OUTPUT),
  262. { } /* end */
  263. };
  264. static const struct hda_verb alc260_hp_3013_unsol_verbs[] = {
  265. {0x15, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC_HP_EVENT},
  266. {},
  267. };
  268. static void alc260_hp_3012_setup(struct hda_codec *codec)
  269. {
  270. struct alc_spec *spec = codec->spec;
  271. spec->autocfg.hp_pins[0] = 0x10;
  272. spec->autocfg.speaker_pins[0] = 0x0f;
  273. spec->autocfg.speaker_pins[1] = 0x11;
  274. spec->autocfg.speaker_pins[2] = 0x15;
  275. spec->automute = 1;
  276. spec->automute_mode = ALC_AUTOMUTE_PIN;
  277. }
  278. /* Fujitsu S702x series laptops. ALC260 pin usage: Mic/Line jack = 0x12,
  279. * HP jack = 0x14, CD audio = 0x16, internal speaker = 0x10.
  280. */
  281. static const struct snd_kcontrol_new alc260_fujitsu_mixer[] = {
  282. HDA_CODEC_VOLUME("Headphone Playback Volume", 0x08, 0x0, HDA_OUTPUT),
  283. HDA_BIND_MUTE("Headphone Playback Switch", 0x08, 2, HDA_INPUT),
  284. ALC_PIN_MODE("Headphone Jack Mode", 0x14, ALC_PIN_DIR_INOUT),
  285. HDA_CODEC_VOLUME("CD Playback Volume", 0x07, 0x04, HDA_INPUT),
  286. HDA_CODEC_MUTE("CD Playback Switch", 0x07, 0x04, HDA_INPUT),
  287. HDA_CODEC_VOLUME("Mic/Line Playback Volume", 0x07, 0x0, HDA_INPUT),
  288. HDA_CODEC_MUTE("Mic/Line Playback Switch", 0x07, 0x0, HDA_INPUT),
  289. ALC_PIN_MODE("Mic/Line Jack Mode", 0x12, ALC_PIN_DIR_IN),
  290. HDA_CODEC_VOLUME("Speaker Playback Volume", 0x09, 0x0, HDA_OUTPUT),
  291. HDA_BIND_MUTE("Speaker Playback Switch", 0x09, 2, HDA_INPUT),
  292. { } /* end */
  293. };
  294. /* Mixer for Acer TravelMate(/Extensa/Aspire) notebooks. Note that current
  295. * versions of the ALC260 don't act on requests to enable mic bias from NID
  296. * 0x0f (used to drive the headphone jack in these laptops). The ALC260
  297. * datasheet doesn't mention this restriction. At this stage it's not clear
  298. * whether this behaviour is intentional or is a hardware bug in chip
  299. * revisions available in early 2006. Therefore for now allow the
  300. * "Headphone Jack Mode" control to span all choices, but if it turns out
  301. * that the lack of mic bias for this NID is intentional we could change the
  302. * mode from ALC_PIN_DIR_INOUT to ALC_PIN_DIR_INOUT_NOMICBIAS.
  303. *
  304. * In addition, Acer TravelMate(/Extensa/Aspire) notebooks in early 2006
  305. * don't appear to make the mic bias available from the "line" jack, even
  306. * though the NID used for this jack (0x14) can supply it. The theory is
  307. * that perhaps Acer have included blocking capacitors between the ALC260
  308. * and the output jack. If this turns out to be the case for all such
  309. * models the "Line Jack Mode" mode could be changed from ALC_PIN_DIR_INOUT
  310. * to ALC_PIN_DIR_INOUT_NOMICBIAS.
  311. *
  312. * The C20x Tablet series have a mono internal speaker which is controlled
  313. * via the chip's Mono sum widget and pin complex, so include the necessary
  314. * controls for such models. On models without a "mono speaker" the control
  315. * won't do anything.
  316. */
  317. static const struct snd_kcontrol_new alc260_acer_mixer[] = {
  318. HDA_CODEC_VOLUME("Master Playback Volume", 0x08, 0x0, HDA_OUTPUT),
  319. HDA_BIND_MUTE("Master Playback Switch", 0x08, 2, HDA_INPUT),
  320. ALC_PIN_MODE("Headphone Jack Mode", 0x0f, ALC_PIN_DIR_INOUT),
  321. HDA_CODEC_VOLUME_MONO("Speaker Playback Volume", 0x0a, 1, 0x0,
  322. HDA_OUTPUT),
  323. HDA_BIND_MUTE_MONO("Speaker Playback Switch", 0x0a, 1, 2,
  324. HDA_INPUT),
  325. HDA_CODEC_VOLUME("CD Playback Volume", 0x07, 0x04, HDA_INPUT),
  326. HDA_CODEC_MUTE("CD Playback Switch", 0x07, 0x04, HDA_INPUT),
  327. HDA_CODEC_VOLUME("Mic Playback Volume", 0x07, 0x0, HDA_INPUT),
  328. HDA_CODEC_MUTE("Mic Playback Switch", 0x07, 0x0, HDA_INPUT),
  329. ALC_PIN_MODE("Mic Jack Mode", 0x12, ALC_PIN_DIR_IN),
  330. HDA_CODEC_VOLUME("Line Playback Volume", 0x07, 0x02, HDA_INPUT),
  331. HDA_CODEC_MUTE("Line Playback Switch", 0x07, 0x02, HDA_INPUT),
  332. ALC_PIN_MODE("Line Jack Mode", 0x14, ALC_PIN_DIR_INOUT),
  333. { } /* end */
  334. };
  335. /* Maxdata Favorit 100XS: one output and one input (0x12) jack
  336. */
  337. static const struct snd_kcontrol_new alc260_favorit100_mixer[] = {
  338. HDA_CODEC_VOLUME("Master Playback Volume", 0x08, 0x0, HDA_OUTPUT),
  339. HDA_BIND_MUTE("Master Playback Switch", 0x08, 2, HDA_INPUT),
  340. ALC_PIN_MODE("Output Jack Mode", 0x0f, ALC_PIN_DIR_INOUT),
  341. HDA_CODEC_VOLUME("Line/Mic Playback Volume", 0x07, 0x0, HDA_INPUT),
  342. HDA_CODEC_MUTE("Line/Mic Playback Switch", 0x07, 0x0, HDA_INPUT),
  343. ALC_PIN_MODE("Line/Mic Jack Mode", 0x12, ALC_PIN_DIR_IN),
  344. { } /* end */
  345. };
  346. /* Packard bell V7900 ALC260 pin usage: HP = 0x0f, Mic jack = 0x12,
  347. * Line In jack = 0x14, CD audio = 0x16, pc beep = 0x17.
  348. */
  349. static const struct snd_kcontrol_new alc260_will_mixer[] = {
  350. HDA_CODEC_VOLUME("Master Playback Volume", 0x08, 0x0, HDA_OUTPUT),
  351. HDA_BIND_MUTE("Master Playback Switch", 0x08, 0x2, HDA_INPUT),
  352. HDA_CODEC_VOLUME("Mic Playback Volume", 0x07, 0x0, HDA_INPUT),
  353. HDA_CODEC_MUTE("Mic Playback Switch", 0x07, 0x0, HDA_INPUT),
  354. ALC_PIN_MODE("Mic Jack Mode", 0x12, ALC_PIN_DIR_IN),
  355. HDA_CODEC_VOLUME("Line Playback Volume", 0x07, 0x02, HDA_INPUT),
  356. HDA_CODEC_MUTE("Line Playback Switch", 0x07, 0x02, HDA_INPUT),
  357. ALC_PIN_MODE("Line Jack Mode", 0x14, ALC_PIN_DIR_INOUT),
  358. HDA_CODEC_VOLUME("CD Playback Volume", 0x07, 0x04, HDA_INPUT),
  359. HDA_CODEC_MUTE("CD Playback Switch", 0x07, 0x04, HDA_INPUT),
  360. { } /* end */
  361. };
  362. /* Replacer 672V ALC260 pin usage: Mic jack = 0x12,
  363. * Line In jack = 0x14, ATAPI Mic = 0x13, speaker = 0x0f.
  364. */
  365. static const struct snd_kcontrol_new alc260_replacer_672v_mixer[] = {
  366. HDA_CODEC_VOLUME("Master Playback Volume", 0x08, 0x0, HDA_OUTPUT),
  367. HDA_BIND_MUTE("Master Playback Switch", 0x08, 0x2, HDA_INPUT),
  368. HDA_CODEC_VOLUME("Mic Playback Volume", 0x07, 0x0, HDA_INPUT),
  369. HDA_CODEC_MUTE("Mic Playback Switch", 0x07, 0x0, HDA_INPUT),
  370. ALC_PIN_MODE("Mic Jack Mode", 0x12, ALC_PIN_DIR_IN),
  371. HDA_CODEC_VOLUME("ATAPI Mic Playback Volume", 0x07, 0x1, HDA_INPUT),
  372. HDA_CODEC_MUTE("ATATI Mic Playback Switch", 0x07, 0x1, HDA_INPUT),
  373. HDA_CODEC_VOLUME("Line Playback Volume", 0x07, 0x02, HDA_INPUT),
  374. HDA_CODEC_MUTE("Line Playback Switch", 0x07, 0x02, HDA_INPUT),
  375. ALC_PIN_MODE("Line Jack Mode", 0x14, ALC_PIN_DIR_INOUT),
  376. { } /* end */
  377. };
  378. /*
  379. * initialization verbs
  380. */
  381. static const struct hda_verb alc260_init_verbs[] = {
  382. /* Line In pin widget for input */
  383. {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
  384. /* CD pin widget for input */
  385. {0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
  386. /* Mic1 (rear panel) pin widget for input and vref at 80% */
  387. {0x12, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80},
  388. /* Mic2 (front panel) pin widget for input and vref at 80% */
  389. {0x13, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80},
  390. /* LINE-2 is used for line-out in rear */
  391. {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
  392. /* select line-out */
  393. {0x0e, AC_VERB_SET_CONNECT_SEL, 0x00},
  394. /* LINE-OUT pin */
  395. {0x0f, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
  396. /* enable HP */
  397. {0x10, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
  398. /* enable Mono */
  399. {0x11, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
  400. /* mute capture amp left and right */
  401. {0x04, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
  402. /* set connection select to line in (default select for this ADC) */
  403. {0x04, AC_VERB_SET_CONNECT_SEL, 0x02},
  404. /* mute capture amp left and right */
  405. {0x05, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
  406. /* set connection select to line in (default select for this ADC) */
  407. {0x05, AC_VERB_SET_CONNECT_SEL, 0x02},
  408. /* set vol=0 Line-Out mixer amp left and right */
  409. {0x08, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO},
  410. /* unmute pin widget amp left and right (no gain on this amp) */
  411. {0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
  412. /* set vol=0 HP mixer amp left and right */
  413. {0x09, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO},
  414. /* unmute pin widget amp left and right (no gain on this amp) */
  415. {0x10, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
  416. /* set vol=0 Mono mixer amp left and right */
  417. {0x0a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO},
  418. /* unmute pin widget amp left and right (no gain on this amp) */
  419. {0x11, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
  420. /* unmute LINE-2 out pin */
  421. {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
  422. /* Amp Indexes: CD = 0x04, Line In 1 = 0x02, Mic 1 = 0x00 &
  423. * Line In 2 = 0x03
  424. */
  425. /* mute analog inputs */
  426. {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
  427. {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
  428. {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(2)},
  429. {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(3)},
  430. {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(4)},
  431. /* Amp Indexes: DAC = 0x01 & mixer = 0x00 */
  432. /* mute Front out path */
  433. {0x08, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
  434. {0x08, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
  435. /* mute Headphone out path */
  436. {0x09, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
  437. {0x09, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
  438. /* mute Mono out path */
  439. {0x0a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
  440. {0x0a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
  441. { }
  442. };
  443. #if 0 /* should be identical with alc260_init_verbs? */
  444. static const struct hda_verb alc260_hp_init_verbs[] = {
  445. /* Headphone and output */
  446. {0x10, AC_VERB_SET_PIN_WIDGET_CONTROL, 0xc0},
  447. /* mono output */
  448. {0x11, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x40},
  449. /* Mic1 (rear panel) pin widget for input and vref at 80% */
  450. {0x12, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x24},
  451. /* Mic2 (front panel) pin widget for input and vref at 80% */
  452. {0x13, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x24},
  453. /* Line In pin widget for input */
  454. {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x20},
  455. /* Line-2 pin widget for output */
  456. {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x40},
  457. /* CD pin widget for input */
  458. {0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x20},
  459. /* unmute amp left and right */
  460. {0x04, AC_VERB_SET_AMP_GAIN_MUTE, 0x7000},
  461. /* set connection select to line in (default select for this ADC) */
  462. {0x04, AC_VERB_SET_CONNECT_SEL, 0x02},
  463. /* unmute Line-Out mixer amp left and right (volume = 0) */
  464. {0x08, AC_VERB_SET_AMP_GAIN_MUTE, 0xb000},
  465. /* mute pin widget amp left and right (no gain on this amp) */
  466. {0x15, AC_VERB_SET_AMP_GAIN_MUTE, 0x0000},
  467. /* unmute HP mixer amp left and right (volume = 0) */
  468. {0x09, AC_VERB_SET_AMP_GAIN_MUTE, 0xb000},
  469. /* mute pin widget amp left and right (no gain on this amp) */
  470. {0x10, AC_VERB_SET_AMP_GAIN_MUTE, 0x0000},
  471. /* Amp Indexes: CD = 0x04, Line In 1 = 0x02, Mic 1 = 0x00 &
  472. * Line In 2 = 0x03
  473. */
  474. /* mute analog inputs */
  475. {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
  476. {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
  477. {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(2)},
  478. {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(3)},
  479. {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(4)},
  480. /* Amp Indexes: DAC = 0x01 & mixer = 0x00 */
  481. /* Unmute Front out path */
  482. {0x08, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x00 << 8))},
  483. {0x08, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x01 << 8))},
  484. /* Unmute Headphone out path */
  485. {0x09, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x00 << 8))},
  486. {0x09, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x01 << 8))},
  487. /* Unmute Mono out path */
  488. {0x0a, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x00 << 8))},
  489. {0x0a, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x01 << 8))},
  490. { }
  491. };
  492. #endif
  493. static const struct hda_verb alc260_hp_3013_init_verbs[] = {
  494. /* Line out and output */
  495. {0x10, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x40},
  496. /* mono output */
  497. {0x11, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x40},
  498. /* Mic1 (rear panel) pin widget for input and vref at 80% */
  499. {0x12, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x24},
  500. /* Mic2 (front panel) pin widget for input and vref at 80% */
  501. {0x13, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x24},
  502. /* Line In pin widget for input */
  503. {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x20},
  504. /* Headphone pin widget for output */
  505. {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, 0xc0},
  506. /* CD pin widget for input */
  507. {0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x20},
  508. /* unmute amp left and right */
  509. {0x04, AC_VERB_SET_AMP_GAIN_MUTE, 0x7000},
  510. /* set connection select to line in (default select for this ADC) */
  511. {0x04, AC_VERB_SET_CONNECT_SEL, 0x02},
  512. /* unmute Line-Out mixer amp left and right (volume = 0) */
  513. {0x08, AC_VERB_SET_AMP_GAIN_MUTE, 0xb000},
  514. /* mute pin widget amp left and right (no gain on this amp) */
  515. {0x15, AC_VERB_SET_AMP_GAIN_MUTE, 0x0000},
  516. /* unmute HP mixer amp left and right (volume = 0) */
  517. {0x09, AC_VERB_SET_AMP_GAIN_MUTE, 0xb000},
  518. /* mute pin widget amp left and right (no gain on this amp) */
  519. {0x10, AC_VERB_SET_AMP_GAIN_MUTE, 0x0000},
  520. /* Amp Indexes: CD = 0x04, Line In 1 = 0x02, Mic 1 = 0x00 &
  521. * Line In 2 = 0x03
  522. */
  523. /* mute analog inputs */
  524. {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
  525. {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
  526. {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(2)},
  527. {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(3)},
  528. {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(4)},
  529. /* Amp Indexes: DAC = 0x01 & mixer = 0x00 */
  530. /* Unmute Front out path */
  531. {0x08, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x00 << 8))},
  532. {0x08, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x01 << 8))},
  533. /* Unmute Headphone out path */
  534. {0x09, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x00 << 8))},
  535. {0x09, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x01 << 8))},
  536. /* Unmute Mono out path */
  537. {0x0a, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x00 << 8))},
  538. {0x0a, AC_VERB_SET_AMP_GAIN_MUTE, (0x7000 | (0x01 << 8))},
  539. { }
  540. };
  541. /* Initialisation sequence for ALC260 as configured in Fujitsu S702x
  542. * laptops. ALC260 pin usage: Mic/Line jack = 0x12, HP jack = 0x14, CD
  543. * audio = 0x16, internal speaker = 0x10.
  544. */
  545. static const struct hda_verb alc260_fujitsu_init_verbs[] = {
  546. /* Disable all GPIOs */
  547. {0x01, AC_VERB_SET_GPIO_MASK, 0},
  548. /* Internal speaker is connected to headphone pin */
  549. {0x10, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
  550. /* Headphone/Line-out jack connects to Line1 pin; make it an output */
  551. {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
  552. /* Mic/Line-in jack is connected to mic1 pin, so make it an input */
  553. {0x12, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
  554. /* Ensure all other unused pins are disabled and muted. */
  555. {0x0f, AC_VERB_SET_PIN_WIDGET_CONTROL, 0},
  556. {0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
  557. {0x11, AC_VERB_SET_PIN_WIDGET_CONTROL, 0},
  558. {0x11, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
  559. {0x13, AC_VERB_SET_PIN_WIDGET_CONTROL, 0},
  560. {0x13, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
  561. {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, 0},
  562. {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
  563. /* Disable digital (SPDIF) pins */
  564. {0x03, AC_VERB_SET_DIGI_CONVERT_1, 0},
  565. {0x06, AC_VERB_SET_DIGI_CONVERT_1, 0},
  566. /* Ensure Line1 pin widget takes its input from the OUT1 sum bus
  567. * when acting as an output.
  568. */
  569. {0x0d, AC_VERB_SET_CONNECT_SEL, 0},
  570. /* Start with output sum widgets muted and their output gains at min */
  571. {0x08, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
  572. {0x08, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
  573. {0x08, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO},
  574. {0x09, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
  575. {0x09, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
  576. {0x09, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO},
  577. {0x0a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
  578. {0x0a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
  579. {0x0a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO},
  580. /* Unmute HP pin widget amp left and right (no equiv mixer ctrl) */
  581. {0x10, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
  582. /* Unmute Line1 pin widget output buffer since it starts as an output.
  583. * If the pin mode is changed by the user the pin mode control will
  584. * take care of enabling the pin's input/output buffers as needed.
  585. * Therefore there's no need to enable the input buffer at this
  586. * stage.
  587. */
  588. {0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
  589. /* Unmute input buffer of pin widget used for Line-in (no equiv
  590. * mixer ctrl)
  591. */
  592. {0x12, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
  593. /* Mute capture amp left and right */
  594. {0x04, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
  595. /* Set ADC connection select to match default mixer setting - line
  596. * in (on mic1 pin)
  597. */
  598. {0x04, AC_VERB_SET_CONNECT_SEL, 0x00},
  599. /* Do the same for the second ADC: mute capture input amp and
  600. * set ADC connection to line in (on mic1 pin)
  601. */
  602. {0x05, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
  603. {0x05, AC_VERB_SET_CONNECT_SEL, 0x00},
  604. /* Mute all inputs to mixer widget (even unconnected ones) */
  605. {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, /* mic1 pin */
  606. {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)}, /* mic2 pin */
  607. {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(2)}, /* line1 pin */
  608. {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(3)}, /* line2 pin */
  609. {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(4)}, /* CD pin */
  610. {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(5)}, /* Beep-gen pin */
  611. {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(6)}, /* Line-out pin */
  612. {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(7)}, /* HP-pin pin */
  613. { }
  614. };
  615. /* Initialisation sequence for ALC260 as configured in Acer TravelMate and
  616. * similar laptops (adapted from Fujitsu init verbs).
  617. */
  618. static const struct hda_verb alc260_acer_init_verbs[] = {
  619. /* On TravelMate laptops, GPIO 0 enables the internal speaker and
  620. * the headphone jack. Turn this on and rely on the standard mute
  621. * methods whenever the user wants to turn these outputs off.
  622. */
  623. {0x01, AC_VERB_SET_GPIO_MASK, 0x01},
  624. {0x01, AC_VERB_SET_GPIO_DIRECTION, 0x01},
  625. {0x01, AC_VERB_SET_GPIO_DATA, 0x01},
  626. /* Internal speaker/Headphone jack is connected to Line-out pin */
  627. {0x0f, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
  628. /* Internal microphone/Mic jack is connected to Mic1 pin */
  629. {0x12, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF50},
  630. /* Line In jack is connected to Line1 pin */
  631. {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
  632. /* Some Acers (eg: C20x Tablets) use Mono pin for internal speaker */
  633. {0x11, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
  634. /* Ensure all other unused pins are disabled and muted. */
  635. {0x10, AC_VERB_SET_PIN_WIDGET_CONTROL, 0},
  636. {0x10, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
  637. {0x13, AC_VERB_SET_PIN_WIDGET_CONTROL, 0},
  638. {0x13, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
  639. {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, 0},
  640. {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
  641. /* Disable digital (SPDIF) pins */
  642. {0x03, AC_VERB_SET_DIGI_CONVERT_1, 0},
  643. {0x06, AC_VERB_SET_DIGI_CONVERT_1, 0},
  644. /* Ensure Mic1 and Line1 pin widgets take input from the OUT1 sum
  645. * bus when acting as outputs.
  646. */
  647. {0x0b, AC_VERB_SET_CONNECT_SEL, 0},
  648. {0x0d, AC_VERB_SET_CONNECT_SEL, 0},
  649. /* Start with output sum widgets muted and their output gains at min */
  650. {0x08, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
  651. {0x08, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
  652. {0x08, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO},
  653. {0x09, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
  654. {0x09, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
  655. {0x09, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO},
  656. {0x0a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
  657. {0x0a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
  658. {0x0a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO},
  659. /* Unmute Line-out pin widget amp left and right
  660. * (no equiv mixer ctrl)
  661. */
  662. {0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
  663. /* Unmute mono pin widget amp output (no equiv mixer ctrl) */
  664. {0x11, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
  665. /* Unmute Mic1 and Line1 pin widget input buffers since they start as
  666. * inputs. If the pin mode is changed by the user the pin mode control
  667. * will take care of enabling the pin's input/output buffers as needed.
  668. * Therefore there's no need to enable the input buffer at this
  669. * stage.
  670. */
  671. {0x12, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
  672. {0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
  673. /* Mute capture amp left and right */
  674. {0x04, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
  675. /* Set ADC connection select to match default mixer setting - mic
  676. * (on mic1 pin)
  677. */
  678. {0x04, AC_VERB_SET_CONNECT_SEL, 0x00},
  679. /* Do similar with the second ADC: mute capture input amp and
  680. * set ADC connection to mic to match ALSA's default state.
  681. */
  682. {0x05, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
  683. {0x05, AC_VERB_SET_CONNECT_SEL, 0x00},
  684. /* Mute all inputs to mixer widget (even unconnected ones) */
  685. {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, /* mic1 pin */
  686. {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)}, /* mic2 pin */
  687. {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(2)}, /* line1 pin */
  688. {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(3)}, /* line2 pin */
  689. {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(4)}, /* CD pin */
  690. {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(5)}, /* Beep-gen pin */
  691. {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(6)}, /* Line-out pin */
  692. {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(7)}, /* HP-pin pin */
  693. { }
  694. };
  695. /* Initialisation sequence for Maxdata Favorit 100XS
  696. * (adapted from Acer init verbs).
  697. */
  698. static const struct hda_verb alc260_favorit100_init_verbs[] = {
  699. /* GPIO 0 enables the output jack.
  700. * Turn this on and rely on the standard mute
  701. * methods whenever the user wants to turn these outputs off.
  702. */
  703. {0x01, AC_VERB_SET_GPIO_MASK, 0x01},
  704. {0x01, AC_VERB_SET_GPIO_DIRECTION, 0x01},
  705. {0x01, AC_VERB_SET_GPIO_DATA, 0x01},
  706. /* Line/Mic input jack is connected to Mic1 pin */
  707. {0x12, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF50},
  708. /* Ensure all other unused pins are disabled and muted. */
  709. {0x10, AC_VERB_SET_PIN_WIDGET_CONTROL, 0},
  710. {0x10, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
  711. {0x11, AC_VERB_SET_PIN_WIDGET_CONTROL, 0},
  712. {0x11, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
  713. {0x13, AC_VERB_SET_PIN_WIDGET_CONTROL, 0},
  714. {0x13, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
  715. {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, 0},
  716. {0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
  717. {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, 0},
  718. {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
  719. /* Disable digital (SPDIF) pins */
  720. {0x03, AC_VERB_SET_DIGI_CONVERT_1, 0},
  721. {0x06, AC_VERB_SET_DIGI_CONVERT_1, 0},
  722. /* Ensure Mic1 and Line1 pin widgets take input from the OUT1 sum
  723. * bus when acting as outputs.
  724. */
  725. {0x0b, AC_VERB_SET_CONNECT_SEL, 0},
  726. {0x0d, AC_VERB_SET_CONNECT_SEL, 0},
  727. /* Start with output sum widgets muted and their output gains at min */
  728. {0x08, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
  729. {0x08, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
  730. {0x08, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO},
  731. {0x09, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
  732. {0x09, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
  733. {0x09, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO},
  734. {0x0a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
  735. {0x0a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
  736. {0x0a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO},
  737. /* Unmute Line-out pin widget amp left and right
  738. * (no equiv mixer ctrl)
  739. */
  740. {0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
  741. /* Unmute Mic1 and Line1 pin widget input buffers since they start as
  742. * inputs. If the pin mode is changed by the user the pin mode control
  743. * will take care of enabling the pin's input/output buffers as needed.
  744. * Therefore there's no need to enable the input buffer at this
  745. * stage.
  746. */
  747. {0x12, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
  748. /* Mute capture amp left and right */
  749. {0x04, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
  750. /* Set ADC connection select to match default mixer setting - mic
  751. * (on mic1 pin)
  752. */
  753. {0x04, AC_VERB_SET_CONNECT_SEL, 0x00},
  754. /* Do similar with the second ADC: mute capture input amp and
  755. * set ADC connection to mic to match ALSA's default state.
  756. */
  757. {0x05, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
  758. {0x05, AC_VERB_SET_CONNECT_SEL, 0x00},
  759. /* Mute all inputs to mixer widget (even unconnected ones) */
  760. {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, /* mic1 pin */
  761. {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)}, /* mic2 pin */
  762. {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(2)}, /* line1 pin */
  763. {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(3)}, /* line2 pin */
  764. {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(4)}, /* CD pin */
  765. {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(5)}, /* Beep-gen pin */
  766. {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(6)}, /* Line-out pin */
  767. {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(7)}, /* HP-pin pin */
  768. { }
  769. };
  770. static const struct hda_verb alc260_will_verbs[] = {
  771. {0x0f, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
  772. {0x0b, AC_VERB_SET_CONNECT_SEL, 0x00},
  773. {0x0d, AC_VERB_SET_CONNECT_SEL, 0x00},
  774. {0x0f, AC_VERB_SET_EAPD_BTLENABLE, 0x02},
  775. {0x1a, AC_VERB_SET_COEF_INDEX, 0x07},
  776. {0x1a, AC_VERB_SET_PROC_COEF, 0x3040},
  777. {}
  778. };
  779. static const struct hda_verb alc260_replacer_672v_verbs[] = {
  780. {0x0f, AC_VERB_SET_EAPD_BTLENABLE, 0x02},
  781. {0x1a, AC_VERB_SET_COEF_INDEX, 0x07},
  782. {0x1a, AC_VERB_SET_PROC_COEF, 0x3050},
  783. {0x01, AC_VERB_SET_GPIO_MASK, 0x01},
  784. {0x01, AC_VERB_SET_GPIO_DIRECTION, 0x01},
  785. {0x01, AC_VERB_SET_GPIO_DATA, 0x00},
  786. {0x0f, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC_HP_EVENT},
  787. {}
  788. };
  789. /* toggle speaker-output according to the hp-jack state */
  790. static void alc260_replacer_672v_automute(struct hda_codec *codec)
  791. {
  792. unsigned int present;
  793. /* speaker --> GPIO Data 0, hp or spdif --> GPIO data 1 */
  794. present = snd_hda_jack_detect(codec, 0x0f);
  795. if (present) {
  796. snd_hda_codec_write_cache(codec, 0x01, 0,
  797. AC_VERB_SET_GPIO_DATA, 1);
  798. snd_hda_codec_write_cache(codec, 0x0f, 0,
  799. AC_VERB_SET_PIN_WIDGET_CONTROL,
  800. PIN_HP);
  801. } else {
  802. snd_hda_codec_write_cache(codec, 0x01, 0,
  803. AC_VERB_SET_GPIO_DATA, 0);
  804. snd_hda_codec_write_cache(codec, 0x0f, 0,
  805. AC_VERB_SET_PIN_WIDGET_CONTROL,
  806. PIN_OUT);
  807. }
  808. }
  809. static void alc260_replacer_672v_unsol_event(struct hda_codec *codec,
  810. unsigned int res)
  811. {
  812. if ((res >> 26) == ALC_HP_EVENT)
  813. alc260_replacer_672v_automute(codec);
  814. }
  815. static const struct hda_verb alc260_hp_dc7600_verbs[] = {
  816. {0x05, AC_VERB_SET_CONNECT_SEL, 0x01},
  817. {0x15, AC_VERB_SET_CONNECT_SEL, 0x01},
  818. {0x0f, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
  819. {0x10, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
  820. {0x11, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
  821. {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
  822. {0x13, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80},
  823. {0x10, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC_HP_EVENT},
  824. {0x11, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC_HP_EVENT},
  825. {0x15, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC_HP_EVENT},
  826. {}
  827. };
  828. /* Test configuration for debugging, modelled after the ALC880 test
  829. * configuration.
  830. */
  831. #ifdef CONFIG_SND_DEBUG
  832. static const hda_nid_t alc260_test_dac_nids[1] = {
  833. 0x02,
  834. };
  835. static const hda_nid_t alc260_test_adc_nids[2] = {
  836. 0x04, 0x05,
  837. };
  838. /* For testing the ALC260, each input MUX needs its own definition since
  839. * the signal assignments are different. This assumes that the first ADC
  840. * is NID 0x04.
  841. */
  842. static const struct hda_input_mux alc260_test_capture_sources[2] = {
  843. {
  844. .num_items = 7,
  845. .items = {
  846. { "MIC1 pin", 0x0 },
  847. { "MIC2 pin", 0x1 },
  848. { "LINE1 pin", 0x2 },
  849. { "LINE2 pin", 0x3 },
  850. { "CD pin", 0x4 },
  851. { "LINE-OUT pin", 0x5 },
  852. { "HP-OUT pin", 0x6 },
  853. },
  854. },
  855. {
  856. .num_items = 8,
  857. .items = {
  858. { "MIC1 pin", 0x0 },
  859. { "MIC2 pin", 0x1 },
  860. { "LINE1 pin", 0x2 },
  861. { "LINE2 pin", 0x3 },
  862. { "CD pin", 0x4 },
  863. { "Mixer", 0x5 },
  864. { "LINE-OUT pin", 0x6 },
  865. { "HP-OUT pin", 0x7 },
  866. },
  867. },
  868. };
  869. static const struct snd_kcontrol_new alc260_test_mixer[] = {
  870. /* Output driver widgets */
  871. HDA_CODEC_VOLUME_MONO("Mono Playback Volume", 0x0a, 1, 0x0, HDA_OUTPUT),
  872. HDA_BIND_MUTE_MONO("Mono Playback Switch", 0x0a, 1, 2, HDA_INPUT),
  873. HDA_CODEC_VOLUME("LOUT2 Playback Volume", 0x09, 0x0, HDA_OUTPUT),
  874. HDA_BIND_MUTE("LOUT2 Playback Switch", 0x09, 2, HDA_INPUT),
  875. HDA_CODEC_VOLUME("LOUT1 Playback Volume", 0x08, 0x0, HDA_OUTPUT),
  876. HDA_BIND_MUTE("LOUT1 Playback Switch", 0x08, 2, HDA_INPUT),
  877. /* Modes for retasking pin widgets
  878. * Note: the ALC260 doesn't seem to act on requests to enable mic
  879. * bias from NIDs 0x0f and 0x10. The ALC260 datasheet doesn't
  880. * mention this restriction. At this stage it's not clear whether
  881. * this behaviour is intentional or is a hardware bug in chip
  882. * revisions available at least up until early 2006. Therefore for
  883. * now allow the "HP-OUT" and "LINE-OUT" Mode controls to span all
  884. * choices, but if it turns out that the lack of mic bias for these
  885. * NIDs is intentional we could change their modes from
  886. * ALC_PIN_DIR_INOUT to ALC_PIN_DIR_INOUT_NOMICBIAS.
  887. */
  888. ALC_PIN_MODE("HP-OUT pin mode", 0x10, ALC_PIN_DIR_INOUT),
  889. ALC_PIN_MODE("LINE-OUT pin mode", 0x0f, ALC_PIN_DIR_INOUT),
  890. ALC_PIN_MODE("LINE2 pin mode", 0x15, ALC_PIN_DIR_INOUT),
  891. ALC_PIN_MODE("LINE1 pin mode", 0x14, ALC_PIN_DIR_INOUT),
  892. ALC_PIN_MODE("MIC2 pin mode", 0x13, ALC_PIN_DIR_INOUT),
  893. ALC_PIN_MODE("MIC1 pin mode", 0x12, ALC_PIN_DIR_INOUT),
  894. /* Loopback mixer controls */
  895. HDA_CODEC_VOLUME("MIC1 Playback Volume", 0x07, 0x00, HDA_INPUT),
  896. HDA_CODEC_MUTE("MIC1 Playback Switch", 0x07, 0x00, HDA_INPUT),
  897. HDA_CODEC_VOLUME("MIC2 Playback Volume", 0x07, 0x01, HDA_INPUT),
  898. HDA_CODEC_MUTE("MIC2 Playback Switch", 0x07, 0x01, HDA_INPUT),
  899. HDA_CODEC_VOLUME("LINE1 Playback Volume", 0x07, 0x02, HDA_INPUT),
  900. HDA_CODEC_MUTE("LINE1 Playback Switch", 0x07, 0x02, HDA_INPUT),
  901. HDA_CODEC_VOLUME("LINE2 Playback Volume", 0x07, 0x03, HDA_INPUT),
  902. HDA_CODEC_MUTE("LINE2 Playback Switch", 0x07, 0x03, HDA_INPUT),
  903. HDA_CODEC_VOLUME("CD Playback Volume", 0x07, 0x04, HDA_INPUT),
  904. HDA_CODEC_MUTE("CD Playback Switch", 0x07, 0x04, HDA_INPUT),
  905. HDA_CODEC_VOLUME("LINE-OUT loopback Playback Volume", 0x07, 0x06, HDA_INPUT),
  906. HDA_CODEC_MUTE("LINE-OUT loopback Playback Switch", 0x07, 0x06, HDA_INPUT),
  907. HDA_CODEC_VOLUME("HP-OUT loopback Playback Volume", 0x07, 0x7, HDA_INPUT),
  908. HDA_CODEC_MUTE("HP-OUT loopback Playback Switch", 0x07, 0x7, HDA_INPUT),
  909. /* Controls for GPIO pins, assuming they are configured as outputs */
  910. ALC_GPIO_DATA_SWITCH("GPIO pin 0", 0x01, 0x01),
  911. ALC_GPIO_DATA_SWITCH("GPIO pin 1", 0x01, 0x02),
  912. ALC_GPIO_DATA_SWITCH("GPIO pin 2", 0x01, 0x04),
  913. ALC_GPIO_DATA_SWITCH("GPIO pin 3", 0x01, 0x08),
  914. /* Switches to allow the digital IO pins to be enabled. The datasheet
  915. * is ambigious as to which NID is which; testing on laptops which
  916. * make this output available should provide clarification.
  917. */
  918. ALC_SPDIF_CTRL_SWITCH("SPDIF Playback Switch", 0x03, 0x01),
  919. ALC_SPDIF_CTRL_SWITCH("SPDIF Capture Switch", 0x06, 0x01),
  920. /* A switch allowing EAPD to be enabled. Some laptops seem to use
  921. * this output to turn on an external amplifier.
  922. */
  923. ALC_EAPD_CTRL_SWITCH("LINE-OUT EAPD Enable Switch", 0x0f, 0x02),
  924. ALC_EAPD_CTRL_SWITCH("HP-OUT EAPD Enable Switch", 0x10, 0x02),
  925. { } /* end */
  926. };
  927. static const struct hda_verb alc260_test_init_verbs[] = {
  928. /* Enable all GPIOs as outputs with an initial value of 0 */
  929. {0x01, AC_VERB_SET_GPIO_DIRECTION, 0x0f},
  930. {0x01, AC_VERB_SET_GPIO_DATA, 0x00},
  931. {0x01, AC_VERB_SET_GPIO_MASK, 0x0f},
  932. /* Enable retasking pins as output, initially without power amp */
  933. {0x10, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
  934. {0x0f, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
  935. {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
  936. {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
  937. {0x13, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
  938. {0x12, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
  939. /* Disable digital (SPDIF) pins initially, but users can enable
  940. * them via a mixer switch. In the case of SPDIF-out, this initverb
  941. * payload also sets the generation to 0, output to be in "consumer"
  942. * PCM format, copyright asserted, no pre-emphasis and no validity
  943. * control.
  944. */
  945. {0x03, AC_VERB_SET_DIGI_CONVERT_1, 0},
  946. {0x06, AC_VERB_SET_DIGI_CONVERT_1, 0},
  947. /* Ensure mic1, mic2, line1 and line2 pin widgets take input from the
  948. * OUT1 sum bus when acting as an output.
  949. */
  950. {0x0b, AC_VERB_SET_CONNECT_SEL, 0},
  951. {0x0c, AC_VERB_SET_CONNECT_SEL, 0},
  952. {0x0d, AC_VERB_SET_CONNECT_SEL, 0},
  953. {0x0e, AC_VERB_SET_CONNECT_SEL, 0},
  954. /* Start with output sum widgets muted and their output gains at min */
  955. {0x08, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
  956. {0x08, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
  957. {0x08, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO},
  958. {0x09, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
  959. {0x09, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
  960. {0x09, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO},
  961. {0x0a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
  962. {0x0a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)},
  963. {0x0a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_ZERO},
  964. /* Unmute retasking pin widget output buffers since the default
  965. * state appears to be output. As the pin mode is changed by the
  966. * user the pin mode control will take care of enabling the pin's
  967. * input/output buffers as needed.
  968. */
  969. {0x10, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
  970. {0x0f, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
  971. {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
  972. {0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
  973. {0x13, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
  974. {0x12, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
  975. /* Also unmute the mono-out pin widget */
  976. {0x11, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
  977. /* Mute capture amp left and right */
  978. {0x04, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
  979. /* Set ADC connection select to match default mixer setting (mic1
  980. * pin)
  981. */
  982. {0x04, AC_VERB_SET_CONNECT_SEL, 0x00},
  983. /* Do the same for the second ADC: mute capture input amp and
  984. * set ADC connection to mic1 pin
  985. */
  986. {0x05, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
  987. {0x05, AC_VERB_SET_CONNECT_SEL, 0x00},
  988. /* Mute all inputs to mixer widget (even unconnected ones) */
  989. {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)}, /* mic1 pin */
  990. {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(1)}, /* mic2 pin */
  991. {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(2)}, /* line1 pin */
  992. {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(3)}, /* line2 pin */
  993. {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(4)}, /* CD pin */
  994. {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(5)}, /* Beep-gen pin */
  995. {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(6)}, /* Line-out pin */
  996. {0x07, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(7)}, /* HP-pin pin */
  997. { }
  998. };
  999. #endif
  1000. /*
  1001. * ALC260 configurations
  1002. */
  1003. static const char * const alc260_models[ALC260_MODEL_LAST] = {
  1004. [ALC260_BASIC] = "basic",
  1005. [ALC260_HP] = "hp",
  1006. [ALC260_HP_3013] = "hp-3013",
  1007. [ALC260_HP_DC7600] = "hp-dc7600",
  1008. [ALC260_FUJITSU_S702X] = "fujitsu",
  1009. [ALC260_ACER] = "acer",
  1010. [ALC260_WILL] = "will",
  1011. [ALC260_REPLACER_672V] = "replacer",
  1012. [ALC260_FAVORIT100] = "favorit100",
  1013. #ifdef CONFIG_SND_DEBUG
  1014. [ALC260_TEST] = "test",
  1015. #endif
  1016. [ALC260_AUTO] = "auto",
  1017. };
  1018. static const struct snd_pci_quirk alc260_cfg_tbl[] = {
  1019. SND_PCI_QUIRK(0x1025, 0x007b, "Acer C20x", ALC260_ACER),
  1020. SND_PCI_QUIRK(0x1025, 0x007f, "Acer", ALC260_WILL),
  1021. SND_PCI_QUIRK(0x1025, 0x008f, "Acer", ALC260_ACER),
  1022. SND_PCI_QUIRK(0x1509, 0x4540, "Favorit 100XS", ALC260_FAVORIT100),
  1023. SND_PCI_QUIRK(0x103c, 0x2808, "HP d5700", ALC260_HP_3013),
  1024. SND_PCI_QUIRK(0x103c, 0x280a, "HP d5750", ALC260_AUTO), /* no quirk */
  1025. SND_PCI_QUIRK(0x103c, 0x3010, "HP", ALC260_HP_3013),
  1026. SND_PCI_QUIRK(0x103c, 0x3011, "HP", ALC260_HP_3013),
  1027. SND_PCI_QUIRK(0x103c, 0x3012, "HP", ALC260_HP_DC7600),
  1028. SND_PCI_QUIRK(0x103c, 0x3013, "HP", ALC260_HP_3013),
  1029. SND_PCI_QUIRK(0x103c, 0x3014, "HP", ALC260_HP),
  1030. SND_PCI_QUIRK(0x103c, 0x3015, "HP", ALC260_HP),
  1031. SND_PCI_QUIRK(0x103c, 0x3016, "HP", ALC260_HP),
  1032. SND_PCI_QUIRK(0x104d, 0x81bb, "Sony VAIO", ALC260_BASIC),
  1033. SND_PCI_QUIRK(0x104d, 0x81cc, "Sony VAIO", ALC260_BASIC),
  1034. SND_PCI_QUIRK(0x104d, 0x81cd, "Sony VAIO", ALC260_BASIC),
  1035. SND_PCI_QUIRK(0x10cf, 0x1326, "Fujitsu S702X", ALC260_FUJITSU_S702X),
  1036. SND_PCI_QUIRK(0x152d, 0x0729, "CTL U553W", ALC260_BASIC),
  1037. SND_PCI_QUIRK(0x161f, 0x2057, "Replacer 672V", ALC260_REPLACER_672V),
  1038. SND_PCI_QUIRK(0x1631, 0xc017, "PB V7900", ALC260_WILL),
  1039. {}
  1040. };
  1041. static const struct alc_config_preset alc260_presets[] = {
  1042. [ALC260_BASIC] = {
  1043. .mixers = { alc260_base_output_mixer,
  1044. alc260_input_mixer },
  1045. .init_verbs = { alc260_init_verbs },
  1046. .num_dacs = ARRAY_SIZE(alc260_dac_nids),
  1047. .dac_nids = alc260_dac_nids,
  1048. .num_adc_nids = ARRAY_SIZE(alc260_dual_adc_nids),
  1049. .adc_nids = alc260_dual_adc_nids,
  1050. .num_channel_mode = ARRAY_SIZE(alc260_modes),
  1051. .channel_mode = alc260_modes,
  1052. .input_mux = &alc260_capture_source,
  1053. },
  1054. [ALC260_HP] = {
  1055. .mixers = { alc260_hp_output_mixer,
  1056. alc260_input_mixer },
  1057. .init_verbs = { alc260_init_verbs,
  1058. alc260_hp_unsol_verbs },
  1059. .num_dacs = ARRAY_SIZE(alc260_dac_nids),
  1060. .dac_nids = alc260_dac_nids,
  1061. .num_adc_nids = ARRAY_SIZE(alc260_adc_nids_alt),
  1062. .adc_nids = alc260_adc_nids_alt,
  1063. .num_channel_mode = ARRAY_SIZE(alc260_modes),
  1064. .channel_mode = alc260_modes,
  1065. .input_mux = &alc260_capture_source,
  1066. .unsol_event = alc_sku_unsol_event,
  1067. .setup = alc260_hp_setup,
  1068. .init_hook = alc_inithook,
  1069. },
  1070. [ALC260_HP_DC7600] = {
  1071. .mixers = { alc260_hp_dc7600_mixer,
  1072. alc260_input_mixer },
  1073. .init_verbs = { alc260_init_verbs,
  1074. alc260_hp_dc7600_verbs },
  1075. .num_dacs = ARRAY_SIZE(alc260_dac_nids),
  1076. .dac_nids = alc260_dac_nids,
  1077. .num_adc_nids = ARRAY_SIZE(alc260_adc_nids_alt),
  1078. .adc_nids = alc260_adc_nids_alt,
  1079. .num_channel_mode = ARRAY_SIZE(alc260_modes),
  1080. .channel_mode = alc260_modes,
  1081. .input_mux = &alc260_capture_source,
  1082. .unsol_event = alc_sku_unsol_event,
  1083. .setup = alc260_hp_3012_setup,
  1084. .init_hook = alc_inithook,
  1085. },
  1086. [ALC260_HP_3013] = {
  1087. .mixers = { alc260_hp_3013_mixer,
  1088. alc260_input_mixer },
  1089. .init_verbs = { alc260_hp_3013_init_verbs,
  1090. alc260_hp_3013_unsol_verbs },
  1091. .num_dacs = ARRAY_SIZE(alc260_dac_nids),
  1092. .dac_nids = alc260_dac_nids,
  1093. .num_adc_nids = ARRAY_SIZE(alc260_adc_nids_alt),
  1094. .adc_nids = alc260_adc_nids_alt,
  1095. .num_channel_mode = ARRAY_SIZE(alc260_modes),
  1096. .channel_mode = alc260_modes,
  1097. .input_mux = &alc260_capture_source,
  1098. .unsol_event = alc_sku_unsol_event,
  1099. .setup = alc260_hp_3013_setup,
  1100. .init_hook = alc_inithook,
  1101. },
  1102. [ALC260_FUJITSU_S702X] = {
  1103. .mixers = { alc260_fujitsu_mixer },
  1104. .init_verbs = { alc260_fujitsu_init_verbs },
  1105. .num_dacs = ARRAY_SIZE(alc260_dac_nids),
  1106. .dac_nids = alc260_dac_nids,
  1107. .num_adc_nids = ARRAY_SIZE(alc260_dual_adc_nids),
  1108. .adc_nids = alc260_dual_adc_nids,
  1109. .num_channel_mode = ARRAY_SIZE(alc260_modes),
  1110. .channel_mode = alc260_modes,
  1111. .num_mux_defs = ARRAY_SIZE(alc260_fujitsu_capture_sources),
  1112. .input_mux = alc260_fujitsu_capture_sources,
  1113. },
  1114. [ALC260_ACER] = {
  1115. .mixers = { alc260_acer_mixer },
  1116. .init_verbs = { alc260_acer_init_verbs },
  1117. .num_dacs = ARRAY_SIZE(alc260_dac_nids),
  1118. .dac_nids = alc260_dac_nids,
  1119. .num_adc_nids = ARRAY_SIZE(alc260_dual_adc_nids),
  1120. .adc_nids = alc260_dual_adc_nids,
  1121. .num_channel_mode = ARRAY_SIZE(alc260_modes),
  1122. .channel_mode = alc260_modes,
  1123. .num_mux_defs = ARRAY_SIZE(alc260_acer_capture_sources),
  1124. .input_mux = alc260_acer_capture_sources,
  1125. },
  1126. [ALC260_FAVORIT100] = {
  1127. .mixers = { alc260_favorit100_mixer },
  1128. .init_verbs = { alc260_favorit100_init_verbs },
  1129. .num_dacs = ARRAY_SIZE(alc260_dac_nids),
  1130. .dac_nids = alc260_dac_nids,
  1131. .num_adc_nids = ARRAY_SIZE(alc260_dual_adc_nids),
  1132. .adc_nids = alc260_dual_adc_nids,
  1133. .num_channel_mode = ARRAY_SIZE(alc260_modes),
  1134. .channel_mode = alc260_modes,
  1135. .num_mux_defs = ARRAY_SIZE(alc260_favorit100_capture_sources),
  1136. .input_mux = alc260_favorit100_capture_sources,
  1137. },
  1138. [ALC260_WILL] = {
  1139. .mixers = { alc260_will_mixer },
  1140. .init_verbs = { alc260_init_verbs, alc260_will_verbs },
  1141. .num_dacs = ARRAY_SIZE(alc260_dac_nids),
  1142. .dac_nids = alc260_dac_nids,
  1143. .num_adc_nids = ARRAY_SIZE(alc260_adc_nids),
  1144. .adc_nids = alc260_adc_nids,
  1145. .dig_out_nid = ALC260_DIGOUT_NID,
  1146. .num_channel_mode = ARRAY_SIZE(alc260_modes),
  1147. .channel_mode = alc260_modes,
  1148. .input_mux = &alc260_capture_source,
  1149. },
  1150. [ALC260_REPLACER_672V] = {
  1151. .mixers = { alc260_replacer_672v_mixer },
  1152. .init_verbs = { alc260_init_verbs, alc260_replacer_672v_verbs },
  1153. .num_dacs = ARRAY_SIZE(alc260_dac_nids),
  1154. .dac_nids = alc260_dac_nids,
  1155. .num_adc_nids = ARRAY_SIZE(alc260_adc_nids),
  1156. .adc_nids = alc260_adc_nids,
  1157. .dig_out_nid = ALC260_DIGOUT_NID,
  1158. .num_channel_mode = ARRAY_SIZE(alc260_modes),
  1159. .channel_mode = alc260_modes,
  1160. .input_mux = &alc260_capture_source,
  1161. .unsol_event = alc260_replacer_672v_unsol_event,
  1162. .init_hook = alc260_replacer_672v_automute,
  1163. },
  1164. #ifdef CONFIG_SND_DEBUG
  1165. [ALC260_TEST] = {
  1166. .mixers = { alc260_test_mixer },
  1167. .init_verbs = { alc260_test_init_verbs },
  1168. .num_dacs = ARRAY_SIZE(alc260_test_dac_nids),
  1169. .dac_nids = alc260_test_dac_nids,
  1170. .num_adc_nids = ARRAY_SIZE(alc260_test_adc_nids),
  1171. .adc_nids = alc260_test_adc_nids,
  1172. .num_channel_mode = ARRAY_SIZE(alc260_modes),
  1173. .channel_mode = alc260_modes,
  1174. .num_mux_defs = ARRAY_SIZE(alc260_test_capture_sources),
  1175. .input_mux = alc260_test_capture_sources,
  1176. },
  1177. #endif
  1178. };