alc662_quirks.c 44 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214
  1. /*
  2. * ALC662/ALC663/ALC665/ALC670 quirk models
  3. * included by patch_realtek.c
  4. */
  5. /* ALC662 models */
  6. enum {
  7. ALC662_AUTO,
  8. ALC662_3ST_2ch_DIG,
  9. ALC662_3ST_6ch_DIG,
  10. ALC662_3ST_6ch,
  11. ALC662_5ST_DIG,
  12. ALC662_LENOVO_101E,
  13. ALC662_ASUS_EEEPC_EP20,
  14. ALC663_ASUS_M51VA,
  15. ALC663_ASUS_G71V,
  16. ALC663_ASUS_H13,
  17. ALC663_ASUS_G50V,
  18. ALC663_ASUS_MODE1,
  19. ALC662_ASUS_MODE2,
  20. ALC663_ASUS_MODE3,
  21. ALC663_ASUS_MODE4,
  22. ALC663_ASUS_MODE5,
  23. ALC663_ASUS_MODE6,
  24. ALC663_ASUS_MODE7,
  25. ALC663_ASUS_MODE8,
  26. ALC662_MODEL_LAST,
  27. };
  28. #define ALC662_DIGOUT_NID 0x06
  29. #define ALC662_DIGIN_NID 0x0a
  30. static const hda_nid_t alc662_dac_nids[3] = {
  31. /* front, rear, clfe */
  32. 0x02, 0x03, 0x04
  33. };
  34. static const hda_nid_t alc272_dac_nids[2] = {
  35. 0x02, 0x03
  36. };
  37. static const hda_nid_t alc662_adc_nids[2] = {
  38. /* ADC1-2 */
  39. 0x09, 0x08
  40. };
  41. static const hda_nid_t alc272_adc_nids[1] = {
  42. /* ADC1-2 */
  43. 0x08,
  44. };
  45. static const hda_nid_t alc662_capsrc_nids[2] = { 0x22, 0x23 };
  46. static const hda_nid_t alc272_capsrc_nids[1] = { 0x23 };
  47. /* input MUX */
  48. /* FIXME: should be a matrix-type input source selection */
  49. static const struct hda_input_mux alc662_capture_source = {
  50. .num_items = 4,
  51. .items = {
  52. { "Mic", 0x0 },
  53. { "Front Mic", 0x1 },
  54. { "Line", 0x2 },
  55. { "CD", 0x4 },
  56. },
  57. };
  58. static const struct hda_input_mux alc662_lenovo_101e_capture_source = {
  59. .num_items = 2,
  60. .items = {
  61. { "Mic", 0x1 },
  62. { "Line", 0x2 },
  63. },
  64. };
  65. static const struct hda_input_mux alc663_capture_source = {
  66. .num_items = 3,
  67. .items = {
  68. { "Mic", 0x0 },
  69. { "Front Mic", 0x1 },
  70. { "Line", 0x2 },
  71. },
  72. };
  73. /*
  74. * 2ch mode
  75. */
  76. static const struct hda_channel_mode alc662_3ST_2ch_modes[1] = {
  77. { 2, NULL }
  78. };
  79. /*
  80. * 2ch mode
  81. */
  82. static const struct hda_verb alc662_3ST_ch2_init[] = {
  83. { 0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80 },
  84. { 0x18, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE },
  85. { 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN },
  86. { 0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE },
  87. { } /* end */
  88. };
  89. /*
  90. * 6ch mode
  91. */
  92. static const struct hda_verb alc662_3ST_ch6_init[] = {
  93. { 0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT },
  94. { 0x18, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE },
  95. { 0x18, AC_VERB_SET_CONNECT_SEL, 0x02 },
  96. { 0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT },
  97. { 0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE },
  98. { 0x1a, AC_VERB_SET_CONNECT_SEL, 0x01 },
  99. { } /* end */
  100. };
  101. static const struct hda_channel_mode alc662_3ST_6ch_modes[2] = {
  102. { 2, alc662_3ST_ch2_init },
  103. { 6, alc662_3ST_ch6_init },
  104. };
  105. /*
  106. * 2ch mode
  107. */
  108. static const struct hda_verb alc662_sixstack_ch6_init[] = {
  109. { 0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x00 },
  110. { 0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, 0x00 },
  111. { 0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT },
  112. { } /* end */
  113. };
  114. /*
  115. * 6ch mode
  116. */
  117. static const struct hda_verb alc662_sixstack_ch8_init[] = {
  118. { 0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT },
  119. { 0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT },
  120. { 0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT },
  121. { } /* end */
  122. };
  123. static const struct hda_channel_mode alc662_5stack_modes[2] = {
  124. { 2, alc662_sixstack_ch6_init },
  125. { 6, alc662_sixstack_ch8_init },
  126. };
  127. /* Pin assignment: Front=0x14, Rear=0x15, CLFE=0x16, Side=0x17
  128. * Mic=0x18, Front Mic=0x19, Line-In=0x1a, HP=0x1b
  129. */
  130. static const struct snd_kcontrol_new alc662_base_mixer[] = {
  131. /* output mixer control */
  132. HDA_CODEC_VOLUME("Front Playback Volume", 0x2, 0x0, HDA_OUTPUT),
  133. HDA_CODEC_MUTE("Front Playback Switch", 0x0c, 0x0, HDA_INPUT),
  134. HDA_CODEC_VOLUME("Surround Playback Volume", 0x3, 0x0, HDA_OUTPUT),
  135. HDA_CODEC_MUTE("Surround Playback Switch", 0x0d, 0x0, HDA_INPUT),
  136. HDA_CODEC_VOLUME_MONO("Center Playback Volume", 0x04, 1, 0x0, HDA_OUTPUT),
  137. HDA_CODEC_VOLUME_MONO("LFE Playback Volume", 0x04, 2, 0x0, HDA_OUTPUT),
  138. HDA_CODEC_MUTE_MONO("Center Playback Switch", 0x0e, 1, 0x0, HDA_INPUT),
  139. HDA_CODEC_MUTE_MONO("LFE Playback Switch", 0x0e, 2, 0x0, HDA_INPUT),
  140. HDA_CODEC_MUTE("Headphone Playback Switch", 0x1b, 0x0, HDA_OUTPUT),
  141. /*Input mixer control */
  142. HDA_CODEC_VOLUME("CD Playback Volume", 0xb, 0x4, HDA_INPUT),
  143. HDA_CODEC_MUTE("CD Playback Switch", 0xb, 0x4, HDA_INPUT),
  144. HDA_CODEC_VOLUME("Line Playback Volume", 0xb, 0x02, HDA_INPUT),
  145. HDA_CODEC_MUTE("Line Playback Switch", 0xb, 0x02, HDA_INPUT),
  146. HDA_CODEC_VOLUME("Mic Playback Volume", 0xb, 0x0, HDA_INPUT),
  147. HDA_CODEC_MUTE("Mic Playback Switch", 0xb, 0x0, HDA_INPUT),
  148. HDA_CODEC_VOLUME("Front Mic Playback Volume", 0xb, 0x01, HDA_INPUT),
  149. HDA_CODEC_MUTE("Front Mic Playback Switch", 0xb, 0x01, HDA_INPUT),
  150. { } /* end */
  151. };
  152. static const struct snd_kcontrol_new alc662_3ST_2ch_mixer[] = {
  153. HDA_CODEC_VOLUME("Front Playback Volume", 0x02, 0x0, HDA_OUTPUT),
  154. HDA_CODEC_MUTE("Front Playback Switch", 0x0c, 0x0, HDA_INPUT),
  155. HDA_CODEC_MUTE("Headphone Playback Switch", 0x1b, 0x0, HDA_OUTPUT),
  156. HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT),
  157. HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT),
  158. HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT),
  159. HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT),
  160. HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT),
  161. HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT),
  162. HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x1, HDA_INPUT),
  163. HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x1, HDA_INPUT),
  164. { } /* end */
  165. };
  166. static const struct snd_kcontrol_new alc662_3ST_6ch_mixer[] = {
  167. HDA_CODEC_VOLUME("Front Playback Volume", 0x02, 0x0, HDA_OUTPUT),
  168. HDA_CODEC_MUTE("Front Playback Switch", 0x0c, 0x0, HDA_INPUT),
  169. HDA_CODEC_VOLUME("Surround Playback Volume", 0x03, 0x0, HDA_OUTPUT),
  170. HDA_CODEC_MUTE("Surround Playback Switch", 0x0d, 0x0, HDA_INPUT),
  171. HDA_CODEC_VOLUME_MONO("Center Playback Volume", 0x04, 1, 0x0, HDA_OUTPUT),
  172. HDA_CODEC_VOLUME_MONO("LFE Playback Volume", 0x04, 2, 0x0, HDA_OUTPUT),
  173. HDA_CODEC_MUTE_MONO("Center Playback Switch", 0x0e, 1, 0x0, HDA_INPUT),
  174. HDA_CODEC_MUTE_MONO("LFE Playback Switch", 0x0e, 2, 0x0, HDA_INPUT),
  175. HDA_CODEC_MUTE("Headphone Playback Switch", 0x1b, 0x0, HDA_OUTPUT),
  176. HDA_CODEC_VOLUME("CD Playback Volume", 0x0b, 0x04, HDA_INPUT),
  177. HDA_CODEC_MUTE("CD Playback Switch", 0x0b, 0x04, HDA_INPUT),
  178. HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT),
  179. HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT),
  180. HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT),
  181. HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT),
  182. HDA_CODEC_VOLUME("Front Mic Playback Volume", 0x0b, 0x1, HDA_INPUT),
  183. HDA_CODEC_MUTE("Front Mic Playback Switch", 0x0b, 0x1, HDA_INPUT),
  184. { } /* end */
  185. };
  186. static const struct snd_kcontrol_new alc662_lenovo_101e_mixer[] = {
  187. HDA_CODEC_VOLUME("Front Playback Volume", 0x02, 0x0, HDA_OUTPUT),
  188. HDA_BIND_MUTE("Front Playback Switch", 0x02, 2, HDA_INPUT),
  189. HDA_CODEC_VOLUME("Speaker Playback Volume", 0x03, 0x0, HDA_OUTPUT),
  190. HDA_BIND_MUTE("Speaker Playback Switch", 0x03, 2, HDA_INPUT),
  191. HDA_CODEC_MUTE("Headphone Playback Switch", 0x1b, 0x0, HDA_OUTPUT),
  192. HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT),
  193. HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT),
  194. HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x1, HDA_INPUT),
  195. HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x1, HDA_INPUT),
  196. { } /* end */
  197. };
  198. static const struct snd_kcontrol_new alc662_eeepc_ep20_mixer[] = {
  199. ALC262_HIPPO_MASTER_SWITCH,
  200. HDA_CODEC_VOLUME("Front Playback Volume", 0x02, 0x0, HDA_OUTPUT),
  201. HDA_CODEC_VOLUME("Surround Playback Volume", 0x03, 0x0, HDA_OUTPUT),
  202. HDA_CODEC_VOLUME_MONO("Center Playback Volume", 0x04, 1, 0x0, HDA_OUTPUT),
  203. HDA_CODEC_VOLUME_MONO("LFE Playback Volume", 0x04, 2, 0x0, HDA_OUTPUT),
  204. HDA_BIND_MUTE("MuteCtrl Playback Switch", 0x0c, 2, HDA_INPUT),
  205. HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT),
  206. HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT),
  207. HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT),
  208. HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT),
  209. { } /* end */
  210. };
  211. static const struct hda_bind_ctls alc663_asus_bind_master_vol = {
  212. .ops = &snd_hda_bind_vol,
  213. .values = {
  214. HDA_COMPOSE_AMP_VAL(0x02, 3, 0, HDA_OUTPUT),
  215. HDA_COMPOSE_AMP_VAL(0x03, 3, 0, HDA_OUTPUT),
  216. 0
  217. },
  218. };
  219. static const struct hda_bind_ctls alc663_asus_one_bind_switch = {
  220. .ops = &snd_hda_bind_sw,
  221. .values = {
  222. HDA_COMPOSE_AMP_VAL(0x14, 3, 0, HDA_OUTPUT),
  223. HDA_COMPOSE_AMP_VAL(0x21, 3, 0, HDA_OUTPUT),
  224. 0
  225. },
  226. };
  227. static const struct snd_kcontrol_new alc663_m51va_mixer[] = {
  228. HDA_BIND_VOL("Master Playback Volume", &alc663_asus_bind_master_vol),
  229. HDA_BIND_SW("Master Playback Switch", &alc663_asus_one_bind_switch),
  230. HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT),
  231. HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT),
  232. { } /* end */
  233. };
  234. static const struct hda_bind_ctls alc663_asus_tree_bind_switch = {
  235. .ops = &snd_hda_bind_sw,
  236. .values = {
  237. HDA_COMPOSE_AMP_VAL(0x14, 3, 0, HDA_OUTPUT),
  238. HDA_COMPOSE_AMP_VAL(0x15, 3, 0, HDA_OUTPUT),
  239. HDA_COMPOSE_AMP_VAL(0x21, 3, 0, HDA_OUTPUT),
  240. 0
  241. },
  242. };
  243. static const struct snd_kcontrol_new alc663_two_hp_m1_mixer[] = {
  244. HDA_BIND_VOL("Master Playback Volume", &alc663_asus_bind_master_vol),
  245. HDA_BIND_SW("Master Playback Switch", &alc663_asus_tree_bind_switch),
  246. HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT),
  247. HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT),
  248. HDA_CODEC_VOLUME("F-Mic Playback Volume", 0x0b, 0x1, HDA_INPUT),
  249. HDA_CODEC_MUTE("F-Mic Playback Switch", 0x0b, 0x1, HDA_INPUT),
  250. { } /* end */
  251. };
  252. static const struct hda_bind_ctls alc663_asus_four_bind_switch = {
  253. .ops = &snd_hda_bind_sw,
  254. .values = {
  255. HDA_COMPOSE_AMP_VAL(0x14, 3, 0, HDA_OUTPUT),
  256. HDA_COMPOSE_AMP_VAL(0x15, 3, 0, HDA_OUTPUT),
  257. HDA_COMPOSE_AMP_VAL(0x1b, 3, 0, HDA_OUTPUT),
  258. 0
  259. },
  260. };
  261. static const struct snd_kcontrol_new alc663_two_hp_m2_mixer[] = {
  262. HDA_BIND_VOL("Master Playback Volume", &alc663_asus_bind_master_vol),
  263. HDA_BIND_SW("Master Playback Switch", &alc663_asus_four_bind_switch),
  264. HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT),
  265. HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT),
  266. HDA_CODEC_VOLUME("F-Mic Playback Volume", 0x0b, 0x1, HDA_INPUT),
  267. HDA_CODEC_MUTE("F-Mic Playback Switch", 0x0b, 0x1, HDA_INPUT),
  268. { } /* end */
  269. };
  270. static const struct snd_kcontrol_new alc662_1bjd_mixer[] = {
  271. HDA_CODEC_VOLUME("Speaker Playback Volume", 0x02, 0x0, HDA_OUTPUT),
  272. HDA_CODEC_MUTE("Speaker Playback Switch", 0x14, 0x0, HDA_OUTPUT),
  273. HDA_CODEC_MUTE("Headphone Playback Switch", 0x1b, 0x0, HDA_OUTPUT),
  274. HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT),
  275. HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT),
  276. HDA_CODEC_VOLUME("F-Mic Playback Volume", 0x0b, 0x1, HDA_INPUT),
  277. HDA_CODEC_MUTE("F-Mic Playback Switch", 0x0b, 0x1, HDA_INPUT),
  278. { } /* end */
  279. };
  280. static const struct hda_bind_ctls alc663_asus_two_bind_master_vol = {
  281. .ops = &snd_hda_bind_vol,
  282. .values = {
  283. HDA_COMPOSE_AMP_VAL(0x02, 3, 0, HDA_OUTPUT),
  284. HDA_COMPOSE_AMP_VAL(0x04, 3, 0, HDA_OUTPUT),
  285. 0
  286. },
  287. };
  288. static const struct hda_bind_ctls alc663_asus_two_bind_switch = {
  289. .ops = &snd_hda_bind_sw,
  290. .values = {
  291. HDA_COMPOSE_AMP_VAL(0x14, 3, 0, HDA_OUTPUT),
  292. HDA_COMPOSE_AMP_VAL(0x16, 3, 0, HDA_OUTPUT),
  293. 0
  294. },
  295. };
  296. static const struct snd_kcontrol_new alc663_asus_21jd_clfe_mixer[] = {
  297. HDA_BIND_VOL("Master Playback Volume",
  298. &alc663_asus_two_bind_master_vol),
  299. HDA_BIND_SW("Master Playback Switch", &alc663_asus_two_bind_switch),
  300. HDA_CODEC_VOLUME("Headphone Playback Volume", 0x03, 0x0, HDA_OUTPUT),
  301. HDA_CODEC_MUTE("Headphone Playback Switch", 0x21, 0x0, HDA_OUTPUT),
  302. HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT),
  303. HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT),
  304. { } /* end */
  305. };
  306. static const struct snd_kcontrol_new alc663_asus_15jd_clfe_mixer[] = {
  307. HDA_BIND_VOL("Master Playback Volume", &alc663_asus_bind_master_vol),
  308. HDA_BIND_SW("Master Playback Switch", &alc663_asus_two_bind_switch),
  309. HDA_CODEC_VOLUME("Headphone Playback Volume", 0x03, 0x0, HDA_OUTPUT),
  310. HDA_CODEC_MUTE("Headphone Playback Switch", 0x15, 0x0, HDA_OUTPUT),
  311. HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT),
  312. HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT),
  313. { } /* end */
  314. };
  315. static const struct snd_kcontrol_new alc663_g71v_mixer[] = {
  316. HDA_CODEC_VOLUME("Speaker Playback Volume", 0x02, 0x0, HDA_OUTPUT),
  317. HDA_CODEC_MUTE("Speaker Playback Switch", 0x14, 0x0, HDA_OUTPUT),
  318. HDA_CODEC_VOLUME("Front Playback Volume", 0x03, 0x0, HDA_OUTPUT),
  319. HDA_CODEC_MUTE("Front Playback Switch", 0x15, 0x0, HDA_OUTPUT),
  320. HDA_CODEC_MUTE("Headphone Playback Switch", 0x21, 0x0, HDA_OUTPUT),
  321. HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT),
  322. HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT),
  323. HDA_CODEC_VOLUME("Internal Mic Playback Volume", 0x0b, 0x1, HDA_INPUT),
  324. HDA_CODEC_MUTE("Internal Mic Playback Switch", 0x0b, 0x1, HDA_INPUT),
  325. { } /* end */
  326. };
  327. static const struct snd_kcontrol_new alc663_g50v_mixer[] = {
  328. HDA_CODEC_VOLUME("Speaker Playback Volume", 0x02, 0x0, HDA_OUTPUT),
  329. HDA_CODEC_MUTE("Speaker Playback Switch", 0x14, 0x0, HDA_OUTPUT),
  330. HDA_CODEC_MUTE("Headphone Playback Switch", 0x21, 0x0, HDA_OUTPUT),
  331. HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT),
  332. HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT),
  333. HDA_CODEC_VOLUME("Internal Mic Playback Volume", 0x0b, 0x1, HDA_INPUT),
  334. HDA_CODEC_MUTE("Internal Mic Playback Switch", 0x0b, 0x1, HDA_INPUT),
  335. HDA_CODEC_VOLUME("Line Playback Volume", 0x0b, 0x02, HDA_INPUT),
  336. HDA_CODEC_MUTE("Line Playback Switch", 0x0b, 0x02, HDA_INPUT),
  337. { } /* end */
  338. };
  339. static const struct hda_bind_ctls alc663_asus_mode7_8_all_bind_switch = {
  340. .ops = &snd_hda_bind_sw,
  341. .values = {
  342. HDA_COMPOSE_AMP_VAL(0x14, 3, 0, HDA_OUTPUT),
  343. HDA_COMPOSE_AMP_VAL(0x15, 3, 0, HDA_OUTPUT),
  344. HDA_COMPOSE_AMP_VAL(0x17, 3, 0, HDA_OUTPUT),
  345. HDA_COMPOSE_AMP_VAL(0x1b, 3, 0, HDA_OUTPUT),
  346. HDA_COMPOSE_AMP_VAL(0x21, 3, 0, HDA_OUTPUT),
  347. 0
  348. },
  349. };
  350. static const struct hda_bind_ctls alc663_asus_mode7_8_sp_bind_switch = {
  351. .ops = &snd_hda_bind_sw,
  352. .values = {
  353. HDA_COMPOSE_AMP_VAL(0x14, 3, 0, HDA_OUTPUT),
  354. HDA_COMPOSE_AMP_VAL(0x17, 3, 0, HDA_OUTPUT),
  355. 0
  356. },
  357. };
  358. static const struct snd_kcontrol_new alc663_mode7_mixer[] = {
  359. HDA_BIND_SW("Master Playback Switch", &alc663_asus_mode7_8_all_bind_switch),
  360. HDA_BIND_VOL("Speaker Playback Volume", &alc663_asus_bind_master_vol),
  361. HDA_BIND_SW("Speaker Playback Switch", &alc663_asus_mode7_8_sp_bind_switch),
  362. HDA_CODEC_MUTE("Headphone1 Playback Switch", 0x1b, 0x0, HDA_OUTPUT),
  363. HDA_CODEC_MUTE("Headphone2 Playback Switch", 0x21, 0x0, HDA_OUTPUT),
  364. HDA_CODEC_VOLUME("IntMic Playback Volume", 0x0b, 0x0, HDA_INPUT),
  365. HDA_CODEC_MUTE("IntMic Playback Switch", 0x0b, 0x0, HDA_INPUT),
  366. HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x1, HDA_INPUT),
  367. HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x1, HDA_INPUT),
  368. { } /* end */
  369. };
  370. static const struct snd_kcontrol_new alc663_mode8_mixer[] = {
  371. HDA_BIND_SW("Master Playback Switch", &alc663_asus_mode7_8_all_bind_switch),
  372. HDA_BIND_VOL("Speaker Playback Volume", &alc663_asus_bind_master_vol),
  373. HDA_BIND_SW("Speaker Playback Switch", &alc663_asus_mode7_8_sp_bind_switch),
  374. HDA_CODEC_MUTE("Headphone1 Playback Switch", 0x15, 0x0, HDA_OUTPUT),
  375. HDA_CODEC_MUTE("Headphone2 Playback Switch", 0x21, 0x0, HDA_OUTPUT),
  376. HDA_CODEC_VOLUME("Mic Playback Volume", 0x0b, 0x0, HDA_INPUT),
  377. HDA_CODEC_MUTE("Mic Playback Switch", 0x0b, 0x0, HDA_INPUT),
  378. { } /* end */
  379. };
  380. static const struct snd_kcontrol_new alc662_chmode_mixer[] = {
  381. {
  382. .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
  383. .name = "Channel Mode",
  384. .info = alc_ch_mode_info,
  385. .get = alc_ch_mode_get,
  386. .put = alc_ch_mode_put,
  387. },
  388. { } /* end */
  389. };
  390. static const struct hda_verb alc662_init_verbs[] = {
  391. /* ADC: mute amp left and right */
  392. {0x09, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
  393. {0x09, AC_VERB_SET_CONNECT_SEL, 0x00},
  394. {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
  395. {0x0c, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
  396. {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
  397. {0x0d, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
  398. {0x0e, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
  399. {0x0e, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
  400. /* Front Pin: output 0 (0x0c) */
  401. {0x14, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
  402. {0x14, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
  403. /* Rear Pin: output 1 (0x0d) */
  404. {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
  405. {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
  406. /* CLFE Pin: output 2 (0x0e) */
  407. {0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
  408. {0x16, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
  409. /* Mic (rear) pin: input vref at 80% */
  410. {0x18, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80},
  411. {0x18, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
  412. /* Front Mic pin: input vref at 80% */
  413. {0x19, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_VREF80},
  414. {0x19, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
  415. /* Line In pin: input */
  416. {0x1a, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
  417. {0x1a, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE},
  418. /* Line-2 In: Headphone output (output 0 - 0x0c) */
  419. {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
  420. {0x1b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
  421. {0x1b, AC_VERB_SET_CONNECT_SEL, 0x00},
  422. /* CD pin widget for input */
  423. {0x1c, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
  424. /* FIXME: use matrix-type input source selection */
  425. /* Mixer elements: 0x18, 19, 1a, 1b, 1c, 1d, 14, 15, 16, 17, 0b */
  426. /* Input mixer */
  427. {0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
  428. {0x23, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(0)},
  429. { }
  430. };
  431. static const struct hda_verb alc662_eapd_init_verbs[] = {
  432. /* always trun on EAPD */
  433. {0x14, AC_VERB_SET_EAPD_BTLENABLE, 2},
  434. {0x15, AC_VERB_SET_EAPD_BTLENABLE, 2},
  435. { }
  436. };
  437. static const struct hda_verb alc662_sue_init_verbs[] = {
  438. {0x14, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN|ALC_FRONT_EVENT},
  439. {0x1b, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN|ALC_HP_EVENT},
  440. {}
  441. };
  442. /* Set Unsolicited Event*/
  443. static const struct hda_verb alc662_eeepc_ep20_sue_init_verbs[] = {
  444. {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
  445. {0x14, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC_HP_EVENT},
  446. {}
  447. };
  448. static const struct hda_verb alc663_m51va_init_verbs[] = {
  449. {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
  450. {0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
  451. {0x21, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
  452. {0x21, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
  453. {0x21, AC_VERB_SET_CONNECT_SEL, 0x01}, /* Headphone */
  454. {0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
  455. {0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(9)},
  456. {0x18, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC_MIC_EVENT},
  457. {0x21, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC_HP_EVENT},
  458. {}
  459. };
  460. static const struct hda_verb alc663_21jd_amic_init_verbs[] = {
  461. {0x21, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
  462. {0x21, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
  463. {0x21, AC_VERB_SET_CONNECT_SEL, 0x01}, /* Headphone */
  464. {0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
  465. {0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
  466. {0x18, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC_MIC_EVENT},
  467. {0x21, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC_HP_EVENT},
  468. {}
  469. };
  470. static const struct hda_verb alc662_1bjd_amic_init_verbs[] = {
  471. {0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
  472. {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
  473. {0x1b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
  474. {0x1b, AC_VERB_SET_CONNECT_SEL, 0x00}, /* Headphone */
  475. {0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
  476. {0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
  477. {0x18, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC_MIC_EVENT},
  478. {0x1b, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC_HP_EVENT},
  479. {}
  480. };
  481. static const struct hda_verb alc663_15jd_amic_init_verbs[] = {
  482. {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
  483. {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
  484. {0x15, AC_VERB_SET_CONNECT_SEL, 0x01}, /* Headphone */
  485. {0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
  486. {0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
  487. {0x18, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC_MIC_EVENT},
  488. {0x15, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC_HP_EVENT},
  489. {}
  490. };
  491. static const struct hda_verb alc663_two_hp_amic_m1_init_verbs[] = {
  492. {0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
  493. {0x21, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
  494. {0x21, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
  495. {0x21, AC_VERB_SET_CONNECT_SEL, 0x0}, /* Headphone */
  496. {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
  497. {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
  498. {0x15, AC_VERB_SET_CONNECT_SEL, 0x0}, /* Headphone */
  499. {0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
  500. {0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
  501. {0x18, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC_MIC_EVENT},
  502. {0x21, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC_HP_EVENT},
  503. {0x15, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC_HP_EVENT},
  504. {}
  505. };
  506. static const struct hda_verb alc663_two_hp_amic_m2_init_verbs[] = {
  507. {0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
  508. {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
  509. {0x1b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
  510. {0x1b, AC_VERB_SET_CONNECT_SEL, 0x01}, /* Headphone */
  511. {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
  512. {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
  513. {0x15, AC_VERB_SET_CONNECT_SEL, 0x01}, /* Headphone */
  514. {0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
  515. {0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(1)},
  516. {0x18, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC_MIC_EVENT},
  517. {0x1b, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC_HP_EVENT},
  518. {0x15, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC_HP_EVENT},
  519. {}
  520. };
  521. static const struct hda_verb alc663_g71v_init_verbs[] = {
  522. {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
  523. /* {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE}, */
  524. /* {0x15, AC_VERB_SET_CONNECT_SEL, 0x01}, */ /* Headphone */
  525. {0x21, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
  526. {0x21, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
  527. {0x21, AC_VERB_SET_CONNECT_SEL, 0x00}, /* Headphone */
  528. {0x15, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN|ALC_FRONT_EVENT},
  529. {0x18, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN|ALC_MIC_EVENT},
  530. {0x21, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN|ALC_HP_EVENT},
  531. {}
  532. };
  533. static const struct hda_verb alc663_g50v_init_verbs[] = {
  534. {0x21, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
  535. {0x21, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
  536. {0x21, AC_VERB_SET_CONNECT_SEL, 0x00}, /* Headphone */
  537. {0x18, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC_MIC_EVENT},
  538. {0x21, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC_HP_EVENT},
  539. {}
  540. };
  541. static const struct hda_verb alc662_ecs_init_verbs[] = {
  542. {0x09, AC_VERB_SET_AMP_GAIN_MUTE, 0x701f},
  543. {0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
  544. {0x18, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC_MIC_EVENT},
  545. {0x1b, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC_HP_EVENT},
  546. {}
  547. };
  548. static const struct hda_verb alc663_mode7_init_verbs[] = {
  549. {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
  550. {0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
  551. {0x17, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
  552. {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
  553. {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
  554. {0x1b, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
  555. {0x1b, AC_VERB_SET_CONNECT_SEL, 0x01},
  556. {0x21, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
  557. {0x21, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
  558. {0x21, AC_VERB_SET_CONNECT_SEL, 0x01}, /* Headphone */
  559. {0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
  560. {0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(9)},
  561. {0x19, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC_MIC_EVENT},
  562. {0x1b, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC_HP_EVENT},
  563. {0x21, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC_HP_EVENT},
  564. {}
  565. };
  566. static const struct hda_verb alc663_mode8_init_verbs[] = {
  567. {0x12, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
  568. {0x15, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
  569. {0x15, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
  570. {0x15, AC_VERB_SET_CONNECT_SEL, 0x01},
  571. {0x16, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
  572. {0x17, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_OUT},
  573. {0x17, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
  574. {0x1b, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_IN},
  575. {0x21, AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP},
  576. {0x21, AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE},
  577. {0x21, AC_VERB_SET_CONNECT_SEL, 0x01}, /* Headphone */
  578. {0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_MUTE(0)},
  579. {0x22, AC_VERB_SET_AMP_GAIN_MUTE, AMP_IN_UNMUTE(9)},
  580. {0x15, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC_HP_EVENT},
  581. {0x18, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC_MIC_EVENT},
  582. {0x21, AC_VERB_SET_UNSOLICITED_ENABLE, AC_USRSP_EN | ALC_HP_EVENT},
  583. {}
  584. };
  585. static const struct snd_kcontrol_new alc662_auto_capture_mixer[] = {
  586. HDA_CODEC_VOLUME("Capture Volume", 0x09, 0x0, HDA_INPUT),
  587. HDA_CODEC_MUTE("Capture Switch", 0x09, 0x0, HDA_INPUT),
  588. { } /* end */
  589. };
  590. static const struct snd_kcontrol_new alc272_auto_capture_mixer[] = {
  591. HDA_CODEC_VOLUME("Capture Volume", 0x08, 0x0, HDA_INPUT),
  592. HDA_CODEC_MUTE("Capture Switch", 0x08, 0x0, HDA_INPUT),
  593. { } /* end */
  594. };
  595. static void alc662_lenovo_101e_setup(struct hda_codec *codec)
  596. {
  597. struct alc_spec *spec = codec->spec;
  598. spec->autocfg.hp_pins[0] = 0x1b;
  599. spec->autocfg.line_out_pins[0] = 0x14;
  600. spec->autocfg.speaker_pins[0] = 0x15;
  601. spec->automute = 1;
  602. spec->detect_line = 1;
  603. spec->automute_lines = 1;
  604. spec->automute_mode = ALC_AUTOMUTE_AMP;
  605. }
  606. static void alc662_eeepc_ep20_setup(struct hda_codec *codec)
  607. {
  608. struct alc_spec *spec = codec->spec;
  609. spec->autocfg.hp_pins[0] = 0x14;
  610. spec->autocfg.speaker_pins[0] = 0x1b;
  611. spec->automute = 1;
  612. spec->automute_mode = ALC_AUTOMUTE_AMP;
  613. }
  614. static void alc663_m51va_setup(struct hda_codec *codec)
  615. {
  616. struct alc_spec *spec = codec->spec;
  617. spec->autocfg.hp_pins[0] = 0x21;
  618. spec->autocfg.speaker_pins[0] = 0x14;
  619. spec->automute_mixer_nid[0] = 0x0c;
  620. spec->automute = 1;
  621. spec->automute_mode = ALC_AUTOMUTE_MIXER;
  622. spec->ext_mic_pin = 0x18;
  623. spec->int_mic_pin = 0x12;
  624. spec->auto_mic = 1;
  625. }
  626. /* ***************** Mode1 ******************************/
  627. static void alc663_mode1_setup(struct hda_codec *codec)
  628. {
  629. struct alc_spec *spec = codec->spec;
  630. spec->autocfg.hp_pins[0] = 0x21;
  631. spec->autocfg.speaker_pins[0] = 0x14;
  632. spec->automute_mixer_nid[0] = 0x0c;
  633. spec->automute = 1;
  634. spec->automute_mode = ALC_AUTOMUTE_MIXER;
  635. spec->ext_mic_pin = 0x18;
  636. spec->int_mic_pin = 0x19;
  637. spec->auto_mic = 1;
  638. }
  639. /* ***************** Mode2 ******************************/
  640. static void alc662_mode2_setup(struct hda_codec *codec)
  641. {
  642. struct alc_spec *spec = codec->spec;
  643. spec->autocfg.hp_pins[0] = 0x1b;
  644. spec->autocfg.speaker_pins[0] = 0x14;
  645. spec->automute = 1;
  646. spec->automute_mode = ALC_AUTOMUTE_PIN;
  647. spec->ext_mic_pin = 0x18;
  648. spec->int_mic_pin = 0x19;
  649. spec->auto_mic = 1;
  650. }
  651. /* ***************** Mode3 ******************************/
  652. static void alc663_mode3_setup(struct hda_codec *codec)
  653. {
  654. struct alc_spec *spec = codec->spec;
  655. spec->autocfg.hp_pins[0] = 0x21;
  656. spec->autocfg.hp_pins[0] = 0x15;
  657. spec->autocfg.speaker_pins[0] = 0x14;
  658. spec->automute = 1;
  659. spec->automute_mode = ALC_AUTOMUTE_PIN;
  660. spec->ext_mic_pin = 0x18;
  661. spec->int_mic_pin = 0x19;
  662. spec->auto_mic = 1;
  663. }
  664. /* ***************** Mode4 ******************************/
  665. static void alc663_mode4_setup(struct hda_codec *codec)
  666. {
  667. struct alc_spec *spec = codec->spec;
  668. spec->autocfg.hp_pins[0] = 0x21;
  669. spec->autocfg.speaker_pins[0] = 0x14;
  670. spec->autocfg.speaker_pins[1] = 0x16;
  671. spec->automute_mixer_nid[0] = 0x0c;
  672. spec->automute_mixer_nid[1] = 0x0e;
  673. spec->automute = 1;
  674. spec->automute_mode = ALC_AUTOMUTE_MIXER;
  675. spec->ext_mic_pin = 0x18;
  676. spec->int_mic_pin = 0x19;
  677. spec->auto_mic = 1;
  678. }
  679. /* ***************** Mode5 ******************************/
  680. static void alc663_mode5_setup(struct hda_codec *codec)
  681. {
  682. struct alc_spec *spec = codec->spec;
  683. spec->autocfg.hp_pins[0] = 0x15;
  684. spec->autocfg.speaker_pins[0] = 0x14;
  685. spec->autocfg.speaker_pins[1] = 0x16;
  686. spec->automute_mixer_nid[0] = 0x0c;
  687. spec->automute_mixer_nid[1] = 0x0e;
  688. spec->automute = 1;
  689. spec->automute_mode = ALC_AUTOMUTE_MIXER;
  690. spec->ext_mic_pin = 0x18;
  691. spec->int_mic_pin = 0x19;
  692. spec->auto_mic = 1;
  693. }
  694. /* ***************** Mode6 ******************************/
  695. static void alc663_mode6_setup(struct hda_codec *codec)
  696. {
  697. struct alc_spec *spec = codec->spec;
  698. spec->autocfg.hp_pins[0] = 0x1b;
  699. spec->autocfg.hp_pins[0] = 0x15;
  700. spec->autocfg.speaker_pins[0] = 0x14;
  701. spec->automute_mixer_nid[0] = 0x0c;
  702. spec->automute = 1;
  703. spec->automute_mode = ALC_AUTOMUTE_MIXER;
  704. spec->ext_mic_pin = 0x18;
  705. spec->int_mic_pin = 0x19;
  706. spec->auto_mic = 1;
  707. }
  708. /* ***************** Mode7 ******************************/
  709. static void alc663_mode7_setup(struct hda_codec *codec)
  710. {
  711. struct alc_spec *spec = codec->spec;
  712. spec->autocfg.hp_pins[0] = 0x1b;
  713. spec->autocfg.hp_pins[0] = 0x21;
  714. spec->autocfg.speaker_pins[0] = 0x14;
  715. spec->autocfg.speaker_pins[0] = 0x17;
  716. spec->automute = 1;
  717. spec->automute_mode = ALC_AUTOMUTE_PIN;
  718. spec->ext_mic_pin = 0x18;
  719. spec->int_mic_pin = 0x19;
  720. spec->auto_mic = 1;
  721. }
  722. /* ***************** Mode8 ******************************/
  723. static void alc663_mode8_setup(struct hda_codec *codec)
  724. {
  725. struct alc_spec *spec = codec->spec;
  726. spec->autocfg.hp_pins[0] = 0x21;
  727. spec->autocfg.hp_pins[1] = 0x15;
  728. spec->autocfg.speaker_pins[0] = 0x14;
  729. spec->autocfg.speaker_pins[0] = 0x17;
  730. spec->automute = 1;
  731. spec->automute_mode = ALC_AUTOMUTE_PIN;
  732. spec->ext_mic_pin = 0x18;
  733. spec->int_mic_pin = 0x12;
  734. spec->auto_mic = 1;
  735. }
  736. static void alc663_g71v_setup(struct hda_codec *codec)
  737. {
  738. struct alc_spec *spec = codec->spec;
  739. spec->autocfg.hp_pins[0] = 0x21;
  740. spec->autocfg.line_out_pins[0] = 0x15;
  741. spec->autocfg.speaker_pins[0] = 0x14;
  742. spec->automute = 1;
  743. spec->automute_mode = ALC_AUTOMUTE_AMP;
  744. spec->detect_line = 1;
  745. spec->automute_lines = 1;
  746. spec->ext_mic_pin = 0x18;
  747. spec->int_mic_pin = 0x12;
  748. spec->auto_mic = 1;
  749. }
  750. #define alc663_g50v_setup alc663_m51va_setup
  751. static const struct snd_kcontrol_new alc662_ecs_mixer[] = {
  752. HDA_CODEC_VOLUME("Master Playback Volume", 0x02, 0x0, HDA_OUTPUT),
  753. ALC262_HIPPO_MASTER_SWITCH,
  754. HDA_CODEC_VOLUME("Mic/LineIn Boost Volume", 0x18, 0, HDA_INPUT),
  755. HDA_CODEC_VOLUME("Mic/LineIn Playback Volume", 0x0b, 0x0, HDA_INPUT),
  756. HDA_CODEC_MUTE("Mic/LineIn Playback Switch", 0x0b, 0x0, HDA_INPUT),
  757. HDA_CODEC_VOLUME("Internal Mic Boost Volume", 0x19, 0, HDA_INPUT),
  758. HDA_CODEC_VOLUME("Internal Mic Playback Volume", 0x0b, 0x1, HDA_INPUT),
  759. HDA_CODEC_MUTE("Internal Mic Playback Switch", 0x0b, 0x1, HDA_INPUT),
  760. { } /* end */
  761. };
  762. /*
  763. * configuration and preset
  764. */
  765. static const char * const alc662_models[ALC662_MODEL_LAST] = {
  766. [ALC662_3ST_2ch_DIG] = "3stack-dig",
  767. [ALC662_3ST_6ch_DIG] = "3stack-6ch-dig",
  768. [ALC662_3ST_6ch] = "3stack-6ch",
  769. [ALC662_5ST_DIG] = "5stack-dig",
  770. [ALC662_LENOVO_101E] = "lenovo-101e",
  771. [ALC662_ASUS_EEEPC_EP20] = "eeepc-ep20",
  772. [ALC663_ASUS_M51VA] = "m51va",
  773. [ALC663_ASUS_G71V] = "g71v",
  774. [ALC663_ASUS_H13] = "h13",
  775. [ALC663_ASUS_G50V] = "g50v",
  776. [ALC663_ASUS_MODE1] = "asus-mode1",
  777. [ALC662_ASUS_MODE2] = "asus-mode2",
  778. [ALC663_ASUS_MODE3] = "asus-mode3",
  779. [ALC663_ASUS_MODE4] = "asus-mode4",
  780. [ALC663_ASUS_MODE5] = "asus-mode5",
  781. [ALC663_ASUS_MODE6] = "asus-mode6",
  782. [ALC663_ASUS_MODE7] = "asus-mode7",
  783. [ALC663_ASUS_MODE8] = "asus-mode8",
  784. [ALC662_AUTO] = "auto",
  785. };
  786. static const struct snd_pci_quirk alc662_cfg_tbl[] = {
  787. SND_PCI_QUIRK(0x1043, 0x1000, "ASUS N50Vm", ALC663_ASUS_MODE1),
  788. SND_PCI_QUIRK(0x1043, 0x1092, "ASUS NB", ALC663_ASUS_MODE3),
  789. SND_PCI_QUIRK(0x1043, 0x1173, "ASUS K73Jn", ALC663_ASUS_MODE1),
  790. SND_PCI_QUIRK(0x1043, 0x11c3, "ASUS M70V", ALC663_ASUS_MODE3),
  791. SND_PCI_QUIRK(0x1043, 0x11d3, "ASUS NB", ALC663_ASUS_MODE1),
  792. SND_PCI_QUIRK(0x1043, 0x11f3, "ASUS NB", ALC662_ASUS_MODE2),
  793. SND_PCI_QUIRK(0x1043, 0x1203, "ASUS NB", ALC663_ASUS_MODE1),
  794. SND_PCI_QUIRK(0x1043, 0x1303, "ASUS G60J", ALC663_ASUS_MODE1),
  795. SND_PCI_QUIRK(0x1043, 0x1333, "ASUS G60Jx", ALC663_ASUS_MODE1),
  796. SND_PCI_QUIRK(0x1043, 0x1339, "ASUS NB", ALC662_ASUS_MODE2),
  797. SND_PCI_QUIRK(0x1043, 0x13e3, "ASUS N71JA", ALC663_ASUS_MODE7),
  798. SND_PCI_QUIRK(0x1043, 0x1463, "ASUS N71", ALC663_ASUS_MODE7),
  799. SND_PCI_QUIRK(0x1043, 0x14d3, "ASUS G72", ALC663_ASUS_MODE8),
  800. SND_PCI_QUIRK(0x1043, 0x1563, "ASUS N90", ALC663_ASUS_MODE3),
  801. SND_PCI_QUIRK(0x1043, 0x15d3, "ASUS N50SF F50SF", ALC663_ASUS_MODE1),
  802. SND_PCI_QUIRK(0x1043, 0x16c3, "ASUS NB", ALC662_ASUS_MODE2),
  803. SND_PCI_QUIRK(0x1043, 0x16f3, "ASUS K40C K50C", ALC662_ASUS_MODE2),
  804. SND_PCI_QUIRK(0x1043, 0x1733, "ASUS N81De", ALC663_ASUS_MODE1),
  805. SND_PCI_QUIRK(0x1043, 0x1753, "ASUS NB", ALC662_ASUS_MODE2),
  806. SND_PCI_QUIRK(0x1043, 0x1763, "ASUS NB", ALC663_ASUS_MODE6),
  807. SND_PCI_QUIRK(0x1043, 0x1765, "ASUS NB", ALC663_ASUS_MODE6),
  808. SND_PCI_QUIRK(0x1043, 0x1783, "ASUS NB", ALC662_ASUS_MODE2),
  809. SND_PCI_QUIRK(0x1043, 0x1793, "ASUS F50GX", ALC663_ASUS_MODE1),
  810. SND_PCI_QUIRK(0x1043, 0x17b3, "ASUS F70SL", ALC663_ASUS_MODE3),
  811. SND_PCI_QUIRK(0x1043, 0x17c3, "ASUS UX20", ALC663_ASUS_M51VA),
  812. SND_PCI_QUIRK(0x1043, 0x17f3, "ASUS X58LE", ALC662_ASUS_MODE2),
  813. SND_PCI_QUIRK(0x1043, 0x1813, "ASUS NB", ALC662_ASUS_MODE2),
  814. SND_PCI_QUIRK(0x1043, 0x1823, "ASUS NB", ALC663_ASUS_MODE5),
  815. SND_PCI_QUIRK(0x1043, 0x1833, "ASUS NB", ALC663_ASUS_MODE6),
  816. SND_PCI_QUIRK(0x1043, 0x1843, "ASUS NB", ALC662_ASUS_MODE2),
  817. SND_PCI_QUIRK(0x1043, 0x1853, "ASUS F50Z", ALC663_ASUS_MODE1),
  818. SND_PCI_QUIRK(0x1043, 0x1864, "ASUS NB", ALC662_ASUS_MODE2),
  819. SND_PCI_QUIRK(0x1043, 0x1876, "ASUS NB", ALC662_ASUS_MODE2),
  820. SND_PCI_QUIRK(0x1043, 0x1878, "ASUS M51VA", ALC663_ASUS_M51VA),
  821. /*SND_PCI_QUIRK(0x1043, 0x1878, "ASUS M50Vr", ALC663_ASUS_MODE1),*/
  822. SND_PCI_QUIRK(0x1043, 0x1893, "ASUS M50Vm", ALC663_ASUS_MODE3),
  823. SND_PCI_QUIRK(0x1043, 0x1894, "ASUS X55", ALC663_ASUS_MODE3),
  824. SND_PCI_QUIRK(0x1043, 0x18b3, "ASUS N80Vc", ALC663_ASUS_MODE1),
  825. SND_PCI_QUIRK(0x1043, 0x18c3, "ASUS VX5", ALC663_ASUS_MODE1),
  826. SND_PCI_QUIRK(0x1043, 0x18d3, "ASUS N81Te", ALC663_ASUS_MODE1),
  827. SND_PCI_QUIRK(0x1043, 0x18f3, "ASUS N505Tp", ALC663_ASUS_MODE1),
  828. SND_PCI_QUIRK(0x1043, 0x1903, "ASUS F5GL", ALC663_ASUS_MODE1),
  829. SND_PCI_QUIRK(0x1043, 0x1913, "ASUS NB", ALC662_ASUS_MODE2),
  830. SND_PCI_QUIRK(0x1043, 0x1933, "ASUS F80Q", ALC662_ASUS_MODE2),
  831. SND_PCI_QUIRK(0x1043, 0x1943, "ASUS Vx3V", ALC663_ASUS_MODE1),
  832. SND_PCI_QUIRK(0x1043, 0x1953, "ASUS NB", ALC663_ASUS_MODE1),
  833. SND_PCI_QUIRK(0x1043, 0x1963, "ASUS X71C", ALC663_ASUS_MODE3),
  834. SND_PCI_QUIRK(0x1043, 0x1983, "ASUS N5051A", ALC663_ASUS_MODE1),
  835. SND_PCI_QUIRK(0x1043, 0x1993, "ASUS N20", ALC663_ASUS_MODE1),
  836. SND_PCI_QUIRK(0x1043, 0x19a3, "ASUS G50V", ALC663_ASUS_G50V),
  837. /*SND_PCI_QUIRK(0x1043, 0x19a3, "ASUS NB", ALC663_ASUS_MODE1),*/
  838. SND_PCI_QUIRK(0x1043, 0x19b3, "ASUS F7Z", ALC663_ASUS_MODE1),
  839. SND_PCI_QUIRK(0x1043, 0x19c3, "ASUS F5Z/F6x", ALC662_ASUS_MODE2),
  840. SND_PCI_QUIRK(0x1043, 0x19d3, "ASUS NB", ALC663_ASUS_M51VA),
  841. SND_PCI_QUIRK(0x1043, 0x19e3, "ASUS NB", ALC663_ASUS_MODE1),
  842. SND_PCI_QUIRK(0x1043, 0x19f3, "ASUS NB", ALC663_ASUS_MODE4),
  843. SND_PCI_QUIRK(0x1043, 0x8290, "ASUS P5GC-MX", ALC662_3ST_6ch_DIG),
  844. SND_PCI_QUIRK(0x1043, 0x82d1, "ASUS Eeepc EP20", ALC662_ASUS_EEEPC_EP20),
  845. SND_PCI_QUIRK(0x105b, 0x0d47, "Foxconn 45CMX/45GMX/45CMX-K",
  846. ALC662_3ST_6ch_DIG),
  847. SND_PCI_QUIRK(0x1179, 0xff6e, "Toshiba NB20x", ALC662_AUTO),
  848. SND_PCI_QUIRK(0x1458, 0xa002, "Gigabyte 945GCM-S2L",
  849. ALC662_3ST_6ch_DIG),
  850. SND_PCI_QUIRK(0x152d, 0x2304, "Quanta WH1", ALC663_ASUS_H13),
  851. SND_PCI_QUIRK(0x1565, 0x820f, "Biostar TA780G M2+", ALC662_3ST_6ch_DIG),
  852. SND_PCI_QUIRK(0x1631, 0xc10c, "PB RS65", ALC663_ASUS_M51VA),
  853. SND_PCI_QUIRK(0x17aa, 0x101e, "Lenovo", ALC662_LENOVO_101E),
  854. SND_PCI_QUIRK(0x1849, 0x3662, "ASROCK K10N78FullHD-hSLI R3.0",
  855. ALC662_3ST_6ch_DIG),
  856. SND_PCI_QUIRK_MASK(0x1854, 0xf000, 0x2000, "ASUS H13-200x",
  857. ALC663_ASUS_H13),
  858. SND_PCI_QUIRK(0x1991, 0x5628, "Ordissimo EVE", ALC662_LENOVO_101E),
  859. {}
  860. };
  861. static const struct alc_config_preset alc662_presets[] = {
  862. [ALC662_3ST_2ch_DIG] = {
  863. .mixers = { alc662_3ST_2ch_mixer },
  864. .init_verbs = { alc662_init_verbs, alc662_eapd_init_verbs },
  865. .num_dacs = ARRAY_SIZE(alc662_dac_nids),
  866. .dac_nids = alc662_dac_nids,
  867. .dig_out_nid = ALC662_DIGOUT_NID,
  868. .dig_in_nid = ALC662_DIGIN_NID,
  869. .num_channel_mode = ARRAY_SIZE(alc662_3ST_2ch_modes),
  870. .channel_mode = alc662_3ST_2ch_modes,
  871. .input_mux = &alc662_capture_source,
  872. },
  873. [ALC662_3ST_6ch_DIG] = {
  874. .mixers = { alc662_3ST_6ch_mixer, alc662_chmode_mixer },
  875. .init_verbs = { alc662_init_verbs, alc662_eapd_init_verbs },
  876. .num_dacs = ARRAY_SIZE(alc662_dac_nids),
  877. .dac_nids = alc662_dac_nids,
  878. .dig_out_nid = ALC662_DIGOUT_NID,
  879. .dig_in_nid = ALC662_DIGIN_NID,
  880. .num_channel_mode = ARRAY_SIZE(alc662_3ST_6ch_modes),
  881. .channel_mode = alc662_3ST_6ch_modes,
  882. .need_dac_fix = 1,
  883. .input_mux = &alc662_capture_source,
  884. },
  885. [ALC662_3ST_6ch] = {
  886. .mixers = { alc662_3ST_6ch_mixer, alc662_chmode_mixer },
  887. .init_verbs = { alc662_init_verbs, alc662_eapd_init_verbs },
  888. .num_dacs = ARRAY_SIZE(alc662_dac_nids),
  889. .dac_nids = alc662_dac_nids,
  890. .num_channel_mode = ARRAY_SIZE(alc662_3ST_6ch_modes),
  891. .channel_mode = alc662_3ST_6ch_modes,
  892. .need_dac_fix = 1,
  893. .input_mux = &alc662_capture_source,
  894. },
  895. [ALC662_5ST_DIG] = {
  896. .mixers = { alc662_base_mixer, alc662_chmode_mixer },
  897. .init_verbs = { alc662_init_verbs, alc662_eapd_init_verbs },
  898. .num_dacs = ARRAY_SIZE(alc662_dac_nids),
  899. .dac_nids = alc662_dac_nids,
  900. .dig_out_nid = ALC662_DIGOUT_NID,
  901. .dig_in_nid = ALC662_DIGIN_NID,
  902. .num_channel_mode = ARRAY_SIZE(alc662_5stack_modes),
  903. .channel_mode = alc662_5stack_modes,
  904. .input_mux = &alc662_capture_source,
  905. },
  906. [ALC662_LENOVO_101E] = {
  907. .mixers = { alc662_lenovo_101e_mixer },
  908. .init_verbs = { alc662_init_verbs,
  909. alc662_eapd_init_verbs,
  910. alc662_sue_init_verbs },
  911. .num_dacs = ARRAY_SIZE(alc662_dac_nids),
  912. .dac_nids = alc662_dac_nids,
  913. .num_channel_mode = ARRAY_SIZE(alc662_3ST_2ch_modes),
  914. .channel_mode = alc662_3ST_2ch_modes,
  915. .input_mux = &alc662_lenovo_101e_capture_source,
  916. .unsol_event = alc_sku_unsol_event,
  917. .setup = alc662_lenovo_101e_setup,
  918. .init_hook = alc_inithook,
  919. },
  920. [ALC662_ASUS_EEEPC_EP20] = {
  921. .mixers = { alc662_eeepc_ep20_mixer,
  922. alc662_chmode_mixer },
  923. .init_verbs = { alc662_init_verbs,
  924. alc662_eapd_init_verbs,
  925. alc662_eeepc_ep20_sue_init_verbs },
  926. .num_dacs = ARRAY_SIZE(alc662_dac_nids),
  927. .dac_nids = alc662_dac_nids,
  928. .num_channel_mode = ARRAY_SIZE(alc662_3ST_6ch_modes),
  929. .channel_mode = alc662_3ST_6ch_modes,
  930. .input_mux = &alc662_lenovo_101e_capture_source,
  931. .unsol_event = alc_sku_unsol_event,
  932. .setup = alc662_eeepc_ep20_setup,
  933. .init_hook = alc_inithook,
  934. },
  935. [ALC663_ASUS_M51VA] = {
  936. .mixers = { alc663_m51va_mixer },
  937. .init_verbs = { alc662_init_verbs,
  938. alc662_eapd_init_verbs,
  939. alc663_m51va_init_verbs },
  940. .num_dacs = ARRAY_SIZE(alc662_dac_nids),
  941. .dac_nids = alc662_dac_nids,
  942. .dig_out_nid = ALC662_DIGOUT_NID,
  943. .num_channel_mode = ARRAY_SIZE(alc662_3ST_2ch_modes),
  944. .channel_mode = alc662_3ST_2ch_modes,
  945. .unsol_event = alc_sku_unsol_event,
  946. .setup = alc663_m51va_setup,
  947. .init_hook = alc_inithook,
  948. },
  949. [ALC663_ASUS_G71V] = {
  950. .mixers = { alc663_g71v_mixer },
  951. .init_verbs = { alc662_init_verbs,
  952. alc662_eapd_init_verbs,
  953. alc663_g71v_init_verbs },
  954. .num_dacs = ARRAY_SIZE(alc662_dac_nids),
  955. .dac_nids = alc662_dac_nids,
  956. .dig_out_nid = ALC662_DIGOUT_NID,
  957. .num_channel_mode = ARRAY_SIZE(alc662_3ST_2ch_modes),
  958. .channel_mode = alc662_3ST_2ch_modes,
  959. .unsol_event = alc_sku_unsol_event,
  960. .setup = alc663_g71v_setup,
  961. .init_hook = alc_inithook,
  962. },
  963. [ALC663_ASUS_H13] = {
  964. .mixers = { alc663_m51va_mixer },
  965. .init_verbs = { alc662_init_verbs,
  966. alc662_eapd_init_verbs,
  967. alc663_m51va_init_verbs },
  968. .num_dacs = ARRAY_SIZE(alc662_dac_nids),
  969. .dac_nids = alc662_dac_nids,
  970. .num_channel_mode = ARRAY_SIZE(alc662_3ST_2ch_modes),
  971. .channel_mode = alc662_3ST_2ch_modes,
  972. .setup = alc663_m51va_setup,
  973. .unsol_event = alc_sku_unsol_event,
  974. .init_hook = alc_inithook,
  975. },
  976. [ALC663_ASUS_G50V] = {
  977. .mixers = { alc663_g50v_mixer },
  978. .init_verbs = { alc662_init_verbs,
  979. alc662_eapd_init_verbs,
  980. alc663_g50v_init_verbs },
  981. .num_dacs = ARRAY_SIZE(alc662_dac_nids),
  982. .dac_nids = alc662_dac_nids,
  983. .dig_out_nid = ALC662_DIGOUT_NID,
  984. .num_channel_mode = ARRAY_SIZE(alc662_3ST_6ch_modes),
  985. .channel_mode = alc662_3ST_6ch_modes,
  986. .input_mux = &alc663_capture_source,
  987. .unsol_event = alc_sku_unsol_event,
  988. .setup = alc663_g50v_setup,
  989. .init_hook = alc_inithook,
  990. },
  991. [ALC663_ASUS_MODE1] = {
  992. .mixers = { alc663_m51va_mixer },
  993. .cap_mixer = alc662_auto_capture_mixer,
  994. .init_verbs = { alc662_init_verbs,
  995. alc662_eapd_init_verbs,
  996. alc663_21jd_amic_init_verbs },
  997. .num_dacs = ARRAY_SIZE(alc662_dac_nids),
  998. .hp_nid = 0x03,
  999. .dac_nids = alc662_dac_nids,
  1000. .dig_out_nid = ALC662_DIGOUT_NID,
  1001. .num_channel_mode = ARRAY_SIZE(alc662_3ST_2ch_modes),
  1002. .channel_mode = alc662_3ST_2ch_modes,
  1003. .unsol_event = alc_sku_unsol_event,
  1004. .setup = alc663_mode1_setup,
  1005. .init_hook = alc_inithook,
  1006. },
  1007. [ALC662_ASUS_MODE2] = {
  1008. .mixers = { alc662_1bjd_mixer },
  1009. .cap_mixer = alc662_auto_capture_mixer,
  1010. .init_verbs = { alc662_init_verbs,
  1011. alc662_eapd_init_verbs,
  1012. alc662_1bjd_amic_init_verbs },
  1013. .num_dacs = ARRAY_SIZE(alc662_dac_nids),
  1014. .dac_nids = alc662_dac_nids,
  1015. .dig_out_nid = ALC662_DIGOUT_NID,
  1016. .num_channel_mode = ARRAY_SIZE(alc662_3ST_2ch_modes),
  1017. .channel_mode = alc662_3ST_2ch_modes,
  1018. .unsol_event = alc_sku_unsol_event,
  1019. .setup = alc662_mode2_setup,
  1020. .init_hook = alc_inithook,
  1021. },
  1022. [ALC663_ASUS_MODE3] = {
  1023. .mixers = { alc663_two_hp_m1_mixer },
  1024. .cap_mixer = alc662_auto_capture_mixer,
  1025. .init_verbs = { alc662_init_verbs,
  1026. alc662_eapd_init_verbs,
  1027. alc663_two_hp_amic_m1_init_verbs },
  1028. .num_dacs = ARRAY_SIZE(alc662_dac_nids),
  1029. .hp_nid = 0x03,
  1030. .dac_nids = alc662_dac_nids,
  1031. .dig_out_nid = ALC662_DIGOUT_NID,
  1032. .num_channel_mode = ARRAY_SIZE(alc662_3ST_2ch_modes),
  1033. .channel_mode = alc662_3ST_2ch_modes,
  1034. .unsol_event = alc_sku_unsol_event,
  1035. .setup = alc663_mode3_setup,
  1036. .init_hook = alc_inithook,
  1037. },
  1038. [ALC663_ASUS_MODE4] = {
  1039. .mixers = { alc663_asus_21jd_clfe_mixer },
  1040. .cap_mixer = alc662_auto_capture_mixer,
  1041. .init_verbs = { alc662_init_verbs,
  1042. alc662_eapd_init_verbs,
  1043. alc663_21jd_amic_init_verbs},
  1044. .num_dacs = ARRAY_SIZE(alc662_dac_nids),
  1045. .hp_nid = 0x03,
  1046. .dac_nids = alc662_dac_nids,
  1047. .dig_out_nid = ALC662_DIGOUT_NID,
  1048. .num_channel_mode = ARRAY_SIZE(alc662_3ST_2ch_modes),
  1049. .channel_mode = alc662_3ST_2ch_modes,
  1050. .unsol_event = alc_sku_unsol_event,
  1051. .setup = alc663_mode4_setup,
  1052. .init_hook = alc_inithook,
  1053. },
  1054. [ALC663_ASUS_MODE5] = {
  1055. .mixers = { alc663_asus_15jd_clfe_mixer },
  1056. .cap_mixer = alc662_auto_capture_mixer,
  1057. .init_verbs = { alc662_init_verbs,
  1058. alc662_eapd_init_verbs,
  1059. alc663_15jd_amic_init_verbs },
  1060. .num_dacs = ARRAY_SIZE(alc662_dac_nids),
  1061. .hp_nid = 0x03,
  1062. .dac_nids = alc662_dac_nids,
  1063. .dig_out_nid = ALC662_DIGOUT_NID,
  1064. .num_channel_mode = ARRAY_SIZE(alc662_3ST_2ch_modes),
  1065. .channel_mode = alc662_3ST_2ch_modes,
  1066. .unsol_event = alc_sku_unsol_event,
  1067. .setup = alc663_mode5_setup,
  1068. .init_hook = alc_inithook,
  1069. },
  1070. [ALC663_ASUS_MODE6] = {
  1071. .mixers = { alc663_two_hp_m2_mixer },
  1072. .cap_mixer = alc662_auto_capture_mixer,
  1073. .init_verbs = { alc662_init_verbs,
  1074. alc662_eapd_init_verbs,
  1075. alc663_two_hp_amic_m2_init_verbs },
  1076. .num_dacs = ARRAY_SIZE(alc662_dac_nids),
  1077. .hp_nid = 0x03,
  1078. .dac_nids = alc662_dac_nids,
  1079. .dig_out_nid = ALC662_DIGOUT_NID,
  1080. .num_channel_mode = ARRAY_SIZE(alc662_3ST_2ch_modes),
  1081. .channel_mode = alc662_3ST_2ch_modes,
  1082. .unsol_event = alc_sku_unsol_event,
  1083. .setup = alc663_mode6_setup,
  1084. .init_hook = alc_inithook,
  1085. },
  1086. [ALC663_ASUS_MODE7] = {
  1087. .mixers = { alc663_mode7_mixer },
  1088. .cap_mixer = alc662_auto_capture_mixer,
  1089. .init_verbs = { alc662_init_verbs,
  1090. alc662_eapd_init_verbs,
  1091. alc663_mode7_init_verbs },
  1092. .num_dacs = ARRAY_SIZE(alc662_dac_nids),
  1093. .hp_nid = 0x03,
  1094. .dac_nids = alc662_dac_nids,
  1095. .dig_out_nid = ALC662_DIGOUT_NID,
  1096. .num_channel_mode = ARRAY_SIZE(alc662_3ST_2ch_modes),
  1097. .channel_mode = alc662_3ST_2ch_modes,
  1098. .unsol_event = alc_sku_unsol_event,
  1099. .setup = alc663_mode7_setup,
  1100. .init_hook = alc_inithook,
  1101. },
  1102. [ALC663_ASUS_MODE8] = {
  1103. .mixers = { alc663_mode8_mixer },
  1104. .cap_mixer = alc662_auto_capture_mixer,
  1105. .init_verbs = { alc662_init_verbs,
  1106. alc662_eapd_init_verbs,
  1107. alc663_mode8_init_verbs },
  1108. .num_dacs = ARRAY_SIZE(alc662_dac_nids),
  1109. .hp_nid = 0x03,
  1110. .dac_nids = alc662_dac_nids,
  1111. .dig_out_nid = ALC662_DIGOUT_NID,
  1112. .num_channel_mode = ARRAY_SIZE(alc662_3ST_2ch_modes),
  1113. .channel_mode = alc662_3ST_2ch_modes,
  1114. .unsol_event = alc_sku_unsol_event,
  1115. .setup = alc663_mode8_setup,
  1116. .init_hook = alc_inithook,
  1117. },
  1118. };