patch_conexant.c 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032
  1. /*
  2. * HD audio interface patch for Conexant HDA audio codec
  3. *
  4. * Copyright (c) 2006 Pototskiy Akex <alex.pototskiy@gmail.com>
  5. * Takashi Iwai <tiwai@suse.de>
  6. * Tobin Davis <tdavis@dsl-only.net>
  7. *
  8. * This driver is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation; either version 2 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * This driver is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program; if not, write to the Free Software
  20. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  21. */
  22. #include <linux/init.h>
  23. #include <linux/delay.h>
  24. #include <linux/slab.h>
  25. #include <linux/module.h>
  26. #include <sound/core.h>
  27. #include <sound/jack.h>
  28. #include "hda_codec.h"
  29. #include "hda_local.h"
  30. #include "hda_auto_parser.h"
  31. #include "hda_beep.h"
  32. #include "hda_jack.h"
  33. #include "hda_generic.h"
  34. struct conexant_spec {
  35. struct hda_gen_spec gen;
  36. unsigned int beep_amp;
  37. /* extra EAPD pins */
  38. unsigned int num_eapds;
  39. hda_nid_t eapds[4];
  40. bool dynamic_eapd;
  41. hda_nid_t mute_led_eapd;
  42. unsigned int parse_flags; /* flag for snd_hda_parse_pin_defcfg() */
  43. /* OPLC XO specific */
  44. bool recording;
  45. bool dc_enable;
  46. unsigned int dc_input_bias; /* offset into olpc_xo_dc_bias */
  47. struct nid_path *dc_mode_path;
  48. };
  49. #ifdef CONFIG_SND_HDA_INPUT_BEEP
  50. static inline void set_beep_amp(struct conexant_spec *spec, hda_nid_t nid,
  51. int idx, int dir)
  52. {
  53. spec->gen.beep_nid = nid;
  54. spec->beep_amp = HDA_COMPOSE_AMP_VAL(nid, 1, idx, dir);
  55. }
  56. /* additional beep mixers; the actual parameters are overwritten at build */
  57. static const struct snd_kcontrol_new cxt_beep_mixer[] = {
  58. HDA_CODEC_VOLUME_MONO("Beep Playback Volume", 0, 1, 0, HDA_OUTPUT),
  59. HDA_CODEC_MUTE_BEEP_MONO("Beep Playback Switch", 0, 1, 0, HDA_OUTPUT),
  60. { } /* end */
  61. };
  62. /* create beep controls if needed */
  63. static int add_beep_ctls(struct hda_codec *codec)
  64. {
  65. struct conexant_spec *spec = codec->spec;
  66. int err;
  67. if (spec->beep_amp) {
  68. const struct snd_kcontrol_new *knew;
  69. for (knew = cxt_beep_mixer; knew->name; knew++) {
  70. struct snd_kcontrol *kctl;
  71. kctl = snd_ctl_new1(knew, codec);
  72. if (!kctl)
  73. return -ENOMEM;
  74. kctl->private_value = spec->beep_amp;
  75. err = snd_hda_ctl_add(codec, 0, kctl);
  76. if (err < 0)
  77. return err;
  78. }
  79. }
  80. return 0;
  81. }
  82. #else
  83. #define set_beep_amp(spec, nid, idx, dir) /* NOP */
  84. #define add_beep_ctls(codec) 0
  85. #endif
  86. /*
  87. * Automatic parser for CX20641 & co
  88. */
  89. #ifdef CONFIG_SND_HDA_INPUT_BEEP
  90. static void cx_auto_parse_beep(struct hda_codec *codec)
  91. {
  92. struct conexant_spec *spec = codec->spec;
  93. hda_nid_t nid;
  94. for_each_hda_codec_node(nid, codec)
  95. if (get_wcaps_type(get_wcaps(codec, nid)) == AC_WID_BEEP) {
  96. set_beep_amp(spec, nid, 0, HDA_OUTPUT);
  97. break;
  98. }
  99. }
  100. #else
  101. #define cx_auto_parse_beep(codec)
  102. #endif
  103. /* parse EAPDs */
  104. static void cx_auto_parse_eapd(struct hda_codec *codec)
  105. {
  106. struct conexant_spec *spec = codec->spec;
  107. hda_nid_t nid;
  108. for_each_hda_codec_node(nid, codec) {
  109. if (get_wcaps_type(get_wcaps(codec, nid)) != AC_WID_PIN)
  110. continue;
  111. if (!(snd_hda_query_pin_caps(codec, nid) & AC_PINCAP_EAPD))
  112. continue;
  113. spec->eapds[spec->num_eapds++] = nid;
  114. if (spec->num_eapds >= ARRAY_SIZE(spec->eapds))
  115. break;
  116. }
  117. /* NOTE: below is a wild guess; if we have more than two EAPDs,
  118. * it's a new chip, where EAPDs are supposed to be associated to
  119. * pins, and we can control EAPD per pin.
  120. * OTOH, if only one or two EAPDs are found, it's an old chip,
  121. * thus it might control over all pins.
  122. */
  123. if (spec->num_eapds > 2)
  124. spec->dynamic_eapd = 1;
  125. }
  126. static void cx_auto_turn_eapd(struct hda_codec *codec, int num_pins,
  127. hda_nid_t *pins, bool on)
  128. {
  129. int i;
  130. for (i = 0; i < num_pins; i++) {
  131. if (snd_hda_query_pin_caps(codec, pins[i]) & AC_PINCAP_EAPD)
  132. snd_hda_codec_write(codec, pins[i], 0,
  133. AC_VERB_SET_EAPD_BTLENABLE,
  134. on ? 0x02 : 0);
  135. }
  136. }
  137. /* turn on/off EAPD according to Master switch */
  138. static void cx_auto_vmaster_hook(void *private_data, int enabled)
  139. {
  140. struct hda_codec *codec = private_data;
  141. struct conexant_spec *spec = codec->spec;
  142. cx_auto_turn_eapd(codec, spec->num_eapds, spec->eapds, enabled);
  143. }
  144. /* turn on/off EAPD according to Master switch (inversely!) for mute LED */
  145. static void cx_auto_vmaster_hook_mute_led(void *private_data, int enabled)
  146. {
  147. struct hda_codec *codec = private_data;
  148. struct conexant_spec *spec = codec->spec;
  149. snd_hda_codec_write(codec, spec->mute_led_eapd, 0,
  150. AC_VERB_SET_EAPD_BTLENABLE,
  151. enabled ? 0x00 : 0x02);
  152. }
  153. static int cx_auto_build_controls(struct hda_codec *codec)
  154. {
  155. int err;
  156. err = snd_hda_gen_build_controls(codec);
  157. if (err < 0)
  158. return err;
  159. err = add_beep_ctls(codec);
  160. if (err < 0)
  161. return err;
  162. return 0;
  163. }
  164. static int cx_auto_init(struct hda_codec *codec)
  165. {
  166. struct conexant_spec *spec = codec->spec;
  167. snd_hda_gen_init(codec);
  168. if (!spec->dynamic_eapd)
  169. cx_auto_turn_eapd(codec, spec->num_eapds, spec->eapds, true);
  170. snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_INIT);
  171. return 0;
  172. }
  173. #define cx_auto_free snd_hda_gen_free
  174. static const struct hda_codec_ops cx_auto_patch_ops = {
  175. .build_controls = cx_auto_build_controls,
  176. .build_pcms = snd_hda_gen_build_pcms,
  177. .init = cx_auto_init,
  178. .free = cx_auto_free,
  179. .unsol_event = snd_hda_jack_unsol_event,
  180. #ifdef CONFIG_PM
  181. .check_power_status = snd_hda_gen_check_power_status,
  182. #endif
  183. };
  184. /*
  185. * pin fix-up
  186. */
  187. enum {
  188. CXT_PINCFG_LENOVO_X200,
  189. CXT_PINCFG_LENOVO_TP410,
  190. CXT_PINCFG_LEMOTE_A1004,
  191. CXT_PINCFG_LEMOTE_A1205,
  192. CXT_PINCFG_COMPAQ_CQ60,
  193. CXT_FIXUP_STEREO_DMIC,
  194. CXT_FIXUP_INC_MIC_BOOST,
  195. CXT_FIXUP_HEADPHONE_MIC_PIN,
  196. CXT_FIXUP_HEADPHONE_MIC,
  197. CXT_FIXUP_GPIO1,
  198. CXT_FIXUP_ASPIRE_DMIC,
  199. CXT_FIXUP_THINKPAD_ACPI,
  200. CXT_FIXUP_OLPC_XO,
  201. CXT_FIXUP_CAP_MIX_AMP,
  202. CXT_FIXUP_TOSHIBA_P105,
  203. CXT_FIXUP_HP_530,
  204. CXT_FIXUP_CAP_MIX_AMP_5047,
  205. CXT_FIXUP_MUTE_LED_EAPD,
  206. };
  207. /* for hda_fixup_thinkpad_acpi() */
  208. #include "thinkpad_helper.c"
  209. static void cxt_fixup_stereo_dmic(struct hda_codec *codec,
  210. const struct hda_fixup *fix, int action)
  211. {
  212. struct conexant_spec *spec = codec->spec;
  213. spec->gen.inv_dmic_split = 1;
  214. }
  215. static void cxt5066_increase_mic_boost(struct hda_codec *codec,
  216. const struct hda_fixup *fix, int action)
  217. {
  218. if (action != HDA_FIXUP_ACT_PRE_PROBE)
  219. return;
  220. snd_hda_override_amp_caps(codec, 0x17, HDA_OUTPUT,
  221. (0x3 << AC_AMPCAP_OFFSET_SHIFT) |
  222. (0x4 << AC_AMPCAP_NUM_STEPS_SHIFT) |
  223. (0x27 << AC_AMPCAP_STEP_SIZE_SHIFT) |
  224. (0 << AC_AMPCAP_MUTE_SHIFT));
  225. }
  226. static void cxt_update_headset_mode(struct hda_codec *codec)
  227. {
  228. /* The verbs used in this function were tested on a Conexant CX20751/2 codec. */
  229. int i;
  230. bool mic_mode = false;
  231. struct conexant_spec *spec = codec->spec;
  232. struct auto_pin_cfg *cfg = &spec->gen.autocfg;
  233. hda_nid_t mux_pin = spec->gen.imux_pins[spec->gen.cur_mux[0]];
  234. for (i = 0; i < cfg->num_inputs; i++)
  235. if (cfg->inputs[i].pin == mux_pin) {
  236. mic_mode = !!cfg->inputs[i].is_headphone_mic;
  237. break;
  238. }
  239. if (mic_mode) {
  240. snd_hda_codec_write_cache(codec, 0x1c, 0, 0x410, 0x7c); /* enable merged mode for analog int-mic */
  241. spec->gen.hp_jack_present = false;
  242. } else {
  243. snd_hda_codec_write_cache(codec, 0x1c, 0, 0x410, 0x54); /* disable merged mode for analog int-mic */
  244. spec->gen.hp_jack_present = snd_hda_jack_detect(codec, spec->gen.autocfg.hp_pins[0]);
  245. }
  246. snd_hda_gen_update_outputs(codec);
  247. }
  248. static void cxt_update_headset_mode_hook(struct hda_codec *codec,
  249. struct snd_kcontrol *kcontrol,
  250. struct snd_ctl_elem_value *ucontrol)
  251. {
  252. cxt_update_headset_mode(codec);
  253. }
  254. static void cxt_fixup_headphone_mic(struct hda_codec *codec,
  255. const struct hda_fixup *fix, int action)
  256. {
  257. struct conexant_spec *spec = codec->spec;
  258. switch (action) {
  259. case HDA_FIXUP_ACT_PRE_PROBE:
  260. spec->parse_flags |= HDA_PINCFG_HEADPHONE_MIC;
  261. snd_hdac_regmap_add_vendor_verb(&codec->core, 0x410);
  262. break;
  263. case HDA_FIXUP_ACT_PROBE:
  264. spec->gen.cap_sync_hook = cxt_update_headset_mode_hook;
  265. spec->gen.automute_hook = cxt_update_headset_mode;
  266. break;
  267. case HDA_FIXUP_ACT_INIT:
  268. cxt_update_headset_mode(codec);
  269. break;
  270. }
  271. }
  272. /* OPLC XO 1.5 fixup */
  273. /* OLPC XO-1.5 supports DC input mode (e.g. for use with analog sensors)
  274. * through the microphone jack.
  275. * When the user enables this through a mixer switch, both internal and
  276. * external microphones are disabled. Gain is fixed at 0dB. In this mode,
  277. * we also allow the bias to be configured through a separate mixer
  278. * control. */
  279. #define update_mic_pin(codec, nid, val) \
  280. snd_hda_codec_update_cache(codec, nid, 0, \
  281. AC_VERB_SET_PIN_WIDGET_CONTROL, val)
  282. static const struct hda_input_mux olpc_xo_dc_bias = {
  283. .num_items = 3,
  284. .items = {
  285. { "Off", PIN_IN },
  286. { "50%", PIN_VREF50 },
  287. { "80%", PIN_VREF80 },
  288. },
  289. };
  290. static void olpc_xo_update_mic_boost(struct hda_codec *codec)
  291. {
  292. struct conexant_spec *spec = codec->spec;
  293. int ch, val;
  294. for (ch = 0; ch < 2; ch++) {
  295. val = AC_AMP_SET_OUTPUT |
  296. (ch ? AC_AMP_SET_RIGHT : AC_AMP_SET_LEFT);
  297. if (!spec->dc_enable)
  298. val |= snd_hda_codec_amp_read(codec, 0x17, ch, HDA_OUTPUT, 0);
  299. snd_hda_codec_write(codec, 0x17, 0,
  300. AC_VERB_SET_AMP_GAIN_MUTE, val);
  301. }
  302. }
  303. static void olpc_xo_update_mic_pins(struct hda_codec *codec)
  304. {
  305. struct conexant_spec *spec = codec->spec;
  306. int cur_input, val;
  307. struct nid_path *path;
  308. cur_input = spec->gen.input_paths[0][spec->gen.cur_mux[0]];
  309. /* Set up mic pins for port-B, C and F dynamically as the recording
  310. * LED is turned on/off by these pin controls
  311. */
  312. if (!spec->dc_enable) {
  313. /* disable DC bias path and pin for port F */
  314. update_mic_pin(codec, 0x1e, 0);
  315. snd_hda_activate_path(codec, spec->dc_mode_path, false, false);
  316. /* update port B (ext mic) and C (int mic) */
  317. /* OLPC defers mic widget control until when capture is
  318. * started because the microphone LED comes on as soon as
  319. * these settings are put in place. if we did this before
  320. * recording, it would give the false indication that
  321. * recording is happening when it is not.
  322. */
  323. update_mic_pin(codec, 0x1a, spec->recording ?
  324. snd_hda_codec_get_pin_target(codec, 0x1a) : 0);
  325. update_mic_pin(codec, 0x1b, spec->recording ?
  326. snd_hda_codec_get_pin_target(codec, 0x1b) : 0);
  327. /* enable normal mic path */
  328. path = snd_hda_get_path_from_idx(codec, cur_input);
  329. if (path)
  330. snd_hda_activate_path(codec, path, true, false);
  331. } else {
  332. /* disable normal mic path */
  333. path = snd_hda_get_path_from_idx(codec, cur_input);
  334. if (path)
  335. snd_hda_activate_path(codec, path, false, false);
  336. /* Even though port F is the DC input, the bias is controlled
  337. * on port B. We also leave that port as an active input (but
  338. * unselected) in DC mode just in case that is necessary to
  339. * make the bias setting take effect.
  340. */
  341. if (spec->recording)
  342. val = olpc_xo_dc_bias.items[spec->dc_input_bias].index;
  343. else
  344. val = 0;
  345. update_mic_pin(codec, 0x1a, val);
  346. update_mic_pin(codec, 0x1b, 0);
  347. /* enable DC bias path and pin */
  348. update_mic_pin(codec, 0x1e, spec->recording ? PIN_IN : 0);
  349. snd_hda_activate_path(codec, spec->dc_mode_path, true, false);
  350. }
  351. }
  352. /* mic_autoswitch hook */
  353. static void olpc_xo_automic(struct hda_codec *codec,
  354. struct hda_jack_callback *jack)
  355. {
  356. struct conexant_spec *spec = codec->spec;
  357. /* in DC mode, we don't handle automic */
  358. if (!spec->dc_enable)
  359. snd_hda_gen_mic_autoswitch(codec, jack);
  360. olpc_xo_update_mic_pins(codec);
  361. if (spec->dc_enable)
  362. olpc_xo_update_mic_boost(codec);
  363. }
  364. /* pcm_capture hook */
  365. static void olpc_xo_capture_hook(struct hda_pcm_stream *hinfo,
  366. struct hda_codec *codec,
  367. struct snd_pcm_substream *substream,
  368. int action)
  369. {
  370. struct conexant_spec *spec = codec->spec;
  371. /* toggle spec->recording flag and update mic pins accordingly
  372. * for turning on/off LED
  373. */
  374. switch (action) {
  375. case HDA_GEN_PCM_ACT_PREPARE:
  376. spec->recording = 1;
  377. olpc_xo_update_mic_pins(codec);
  378. break;
  379. case HDA_GEN_PCM_ACT_CLEANUP:
  380. spec->recording = 0;
  381. olpc_xo_update_mic_pins(codec);
  382. break;
  383. }
  384. }
  385. static int olpc_xo_dc_mode_get(struct snd_kcontrol *kcontrol,
  386. struct snd_ctl_elem_value *ucontrol)
  387. {
  388. struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
  389. struct conexant_spec *spec = codec->spec;
  390. ucontrol->value.integer.value[0] = spec->dc_enable;
  391. return 0;
  392. }
  393. static int olpc_xo_dc_mode_put(struct snd_kcontrol *kcontrol,
  394. struct snd_ctl_elem_value *ucontrol)
  395. {
  396. struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
  397. struct conexant_spec *spec = codec->spec;
  398. int dc_enable = !!ucontrol->value.integer.value[0];
  399. if (dc_enable == spec->dc_enable)
  400. return 0;
  401. spec->dc_enable = dc_enable;
  402. olpc_xo_update_mic_pins(codec);
  403. olpc_xo_update_mic_boost(codec);
  404. return 1;
  405. }
  406. static int olpc_xo_dc_bias_enum_get(struct snd_kcontrol *kcontrol,
  407. struct snd_ctl_elem_value *ucontrol)
  408. {
  409. struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
  410. struct conexant_spec *spec = codec->spec;
  411. ucontrol->value.enumerated.item[0] = spec->dc_input_bias;
  412. return 0;
  413. }
  414. static int olpc_xo_dc_bias_enum_info(struct snd_kcontrol *kcontrol,
  415. struct snd_ctl_elem_info *uinfo)
  416. {
  417. return snd_hda_input_mux_info(&olpc_xo_dc_bias, uinfo);
  418. }
  419. static int olpc_xo_dc_bias_enum_put(struct snd_kcontrol *kcontrol,
  420. struct snd_ctl_elem_value *ucontrol)
  421. {
  422. struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
  423. struct conexant_spec *spec = codec->spec;
  424. const struct hda_input_mux *imux = &olpc_xo_dc_bias;
  425. unsigned int idx;
  426. idx = ucontrol->value.enumerated.item[0];
  427. if (idx >= imux->num_items)
  428. idx = imux->num_items - 1;
  429. if (spec->dc_input_bias == idx)
  430. return 0;
  431. spec->dc_input_bias = idx;
  432. if (spec->dc_enable)
  433. olpc_xo_update_mic_pins(codec);
  434. return 1;
  435. }
  436. static const struct snd_kcontrol_new olpc_xo_mixers[] = {
  437. {
  438. .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
  439. .name = "DC Mode Enable Switch",
  440. .info = snd_ctl_boolean_mono_info,
  441. .get = olpc_xo_dc_mode_get,
  442. .put = olpc_xo_dc_mode_put,
  443. },
  444. {
  445. .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
  446. .name = "DC Input Bias Enum",
  447. .info = olpc_xo_dc_bias_enum_info,
  448. .get = olpc_xo_dc_bias_enum_get,
  449. .put = olpc_xo_dc_bias_enum_put,
  450. },
  451. {}
  452. };
  453. /* overriding mic boost put callback; update mic boost volume only when
  454. * DC mode is disabled
  455. */
  456. static int olpc_xo_mic_boost_put(struct snd_kcontrol *kcontrol,
  457. struct snd_ctl_elem_value *ucontrol)
  458. {
  459. struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
  460. struct conexant_spec *spec = codec->spec;
  461. int ret = snd_hda_mixer_amp_volume_put(kcontrol, ucontrol);
  462. if (ret > 0 && spec->dc_enable)
  463. olpc_xo_update_mic_boost(codec);
  464. return ret;
  465. }
  466. static void cxt_fixup_olpc_xo(struct hda_codec *codec,
  467. const struct hda_fixup *fix, int action)
  468. {
  469. struct conexant_spec *spec = codec->spec;
  470. int i;
  471. if (action != HDA_FIXUP_ACT_PROBE)
  472. return;
  473. spec->gen.mic_autoswitch_hook = olpc_xo_automic;
  474. spec->gen.pcm_capture_hook = olpc_xo_capture_hook;
  475. spec->dc_mode_path = snd_hda_add_new_path(codec, 0x1e, 0x14, 0);
  476. snd_hda_add_new_ctls(codec, olpc_xo_mixers);
  477. /* OLPC's microphone port is DC coupled for use with external sensors,
  478. * therefore we use a 50% mic bias in order to center the input signal
  479. * with the DC input range of the codec.
  480. */
  481. snd_hda_codec_set_pin_target(codec, 0x1a, PIN_VREF50);
  482. /* override mic boost control */
  483. for (i = 0; i < spec->gen.kctls.used; i++) {
  484. struct snd_kcontrol_new *kctl =
  485. snd_array_elem(&spec->gen.kctls, i);
  486. if (!strcmp(kctl->name, "Mic Boost Volume")) {
  487. kctl->put = olpc_xo_mic_boost_put;
  488. break;
  489. }
  490. }
  491. }
  492. static void cxt_fixup_mute_led_eapd(struct hda_codec *codec,
  493. const struct hda_fixup *fix, int action)
  494. {
  495. struct conexant_spec *spec = codec->spec;
  496. if (action == HDA_FIXUP_ACT_PRE_PROBE) {
  497. spec->mute_led_eapd = 0x1b;
  498. spec->dynamic_eapd = 1;
  499. spec->gen.vmaster_mute.hook = cx_auto_vmaster_hook_mute_led;
  500. }
  501. }
  502. /*
  503. * Fix max input level on mixer widget to 0dB
  504. * (originally it has 0x2b steps with 0dB offset 0x14)
  505. */
  506. static void cxt_fixup_cap_mix_amp(struct hda_codec *codec,
  507. const struct hda_fixup *fix, int action)
  508. {
  509. snd_hda_override_amp_caps(codec, 0x17, HDA_INPUT,
  510. (0x14 << AC_AMPCAP_OFFSET_SHIFT) |
  511. (0x14 << AC_AMPCAP_NUM_STEPS_SHIFT) |
  512. (0x05 << AC_AMPCAP_STEP_SIZE_SHIFT) |
  513. (1 << AC_AMPCAP_MUTE_SHIFT));
  514. }
  515. /*
  516. * Fix max input level on mixer widget to 0dB
  517. * (originally it has 0x1e steps with 0 dB offset 0x17)
  518. */
  519. static void cxt_fixup_cap_mix_amp_5047(struct hda_codec *codec,
  520. const struct hda_fixup *fix, int action)
  521. {
  522. snd_hda_override_amp_caps(codec, 0x10, HDA_INPUT,
  523. (0x17 << AC_AMPCAP_OFFSET_SHIFT) |
  524. (0x17 << AC_AMPCAP_NUM_STEPS_SHIFT) |
  525. (0x05 << AC_AMPCAP_STEP_SIZE_SHIFT) |
  526. (1 << AC_AMPCAP_MUTE_SHIFT));
  527. }
  528. /* ThinkPad X200 & co with cxt5051 */
  529. static const struct hda_pintbl cxt_pincfg_lenovo_x200[] = {
  530. { 0x16, 0x042140ff }, /* HP (seq# overridden) */
  531. { 0x17, 0x21a11000 }, /* dock-mic */
  532. { 0x19, 0x2121103f }, /* dock-HP */
  533. { 0x1c, 0x21440100 }, /* dock SPDIF out */
  534. {}
  535. };
  536. /* ThinkPad 410/420/510/520, X201 & co with cxt5066 */
  537. static const struct hda_pintbl cxt_pincfg_lenovo_tp410[] = {
  538. { 0x19, 0x042110ff }, /* HP (seq# overridden) */
  539. { 0x1a, 0x21a190f0 }, /* dock-mic */
  540. { 0x1c, 0x212140ff }, /* dock-HP */
  541. {}
  542. };
  543. /* Lemote A1004/A1205 with cxt5066 */
  544. static const struct hda_pintbl cxt_pincfg_lemote[] = {
  545. { 0x1a, 0x90a10020 }, /* Internal mic */
  546. { 0x1b, 0x03a11020 }, /* External mic */
  547. { 0x1d, 0x400101f0 }, /* Not used */
  548. { 0x1e, 0x40a701f0 }, /* Not used */
  549. { 0x20, 0x404501f0 }, /* Not used */
  550. { 0x22, 0x404401f0 }, /* Not used */
  551. { 0x23, 0x40a701f0 }, /* Not used */
  552. {}
  553. };
  554. static const struct hda_fixup cxt_fixups[] = {
  555. [CXT_PINCFG_LENOVO_X200] = {
  556. .type = HDA_FIXUP_PINS,
  557. .v.pins = cxt_pincfg_lenovo_x200,
  558. },
  559. [CXT_PINCFG_LENOVO_TP410] = {
  560. .type = HDA_FIXUP_PINS,
  561. .v.pins = cxt_pincfg_lenovo_tp410,
  562. .chained = true,
  563. .chain_id = CXT_FIXUP_THINKPAD_ACPI,
  564. },
  565. [CXT_PINCFG_LEMOTE_A1004] = {
  566. .type = HDA_FIXUP_PINS,
  567. .chained = true,
  568. .chain_id = CXT_FIXUP_INC_MIC_BOOST,
  569. .v.pins = cxt_pincfg_lemote,
  570. },
  571. [CXT_PINCFG_LEMOTE_A1205] = {
  572. .type = HDA_FIXUP_PINS,
  573. .v.pins = cxt_pincfg_lemote,
  574. },
  575. [CXT_PINCFG_COMPAQ_CQ60] = {
  576. .type = HDA_FIXUP_PINS,
  577. .v.pins = (const struct hda_pintbl[]) {
  578. /* 0x17 was falsely set up as a mic, it should 0x1d */
  579. { 0x17, 0x400001f0 },
  580. { 0x1d, 0x97a70120 },
  581. { }
  582. }
  583. },
  584. [CXT_FIXUP_STEREO_DMIC] = {
  585. .type = HDA_FIXUP_FUNC,
  586. .v.func = cxt_fixup_stereo_dmic,
  587. },
  588. [CXT_FIXUP_INC_MIC_BOOST] = {
  589. .type = HDA_FIXUP_FUNC,
  590. .v.func = cxt5066_increase_mic_boost,
  591. },
  592. [CXT_FIXUP_HEADPHONE_MIC_PIN] = {
  593. .type = HDA_FIXUP_PINS,
  594. .chained = true,
  595. .chain_id = CXT_FIXUP_HEADPHONE_MIC,
  596. .v.pins = (const struct hda_pintbl[]) {
  597. { 0x18, 0x03a1913d }, /* use as headphone mic, without its own jack detect */
  598. { }
  599. }
  600. },
  601. [CXT_FIXUP_HEADPHONE_MIC] = {
  602. .type = HDA_FIXUP_FUNC,
  603. .v.func = cxt_fixup_headphone_mic,
  604. },
  605. [CXT_FIXUP_GPIO1] = {
  606. .type = HDA_FIXUP_VERBS,
  607. .v.verbs = (const struct hda_verb[]) {
  608. { 0x01, AC_VERB_SET_GPIO_MASK, 0x01 },
  609. { 0x01, AC_VERB_SET_GPIO_DIRECTION, 0x01 },
  610. { 0x01, AC_VERB_SET_GPIO_DATA, 0x01 },
  611. { }
  612. },
  613. },
  614. [CXT_FIXUP_ASPIRE_DMIC] = {
  615. .type = HDA_FIXUP_FUNC,
  616. .v.func = cxt_fixup_stereo_dmic,
  617. .chained = true,
  618. .chain_id = CXT_FIXUP_GPIO1,
  619. },
  620. [CXT_FIXUP_THINKPAD_ACPI] = {
  621. .type = HDA_FIXUP_FUNC,
  622. .v.func = hda_fixup_thinkpad_acpi,
  623. },
  624. [CXT_FIXUP_OLPC_XO] = {
  625. .type = HDA_FIXUP_FUNC,
  626. .v.func = cxt_fixup_olpc_xo,
  627. },
  628. [CXT_FIXUP_CAP_MIX_AMP] = {
  629. .type = HDA_FIXUP_FUNC,
  630. .v.func = cxt_fixup_cap_mix_amp,
  631. },
  632. [CXT_FIXUP_TOSHIBA_P105] = {
  633. .type = HDA_FIXUP_PINS,
  634. .v.pins = (const struct hda_pintbl[]) {
  635. { 0x10, 0x961701f0 }, /* speaker/hp */
  636. { 0x12, 0x02a1901e }, /* ext mic */
  637. { 0x14, 0x95a70110 }, /* int mic */
  638. {}
  639. },
  640. },
  641. [CXT_FIXUP_HP_530] = {
  642. .type = HDA_FIXUP_PINS,
  643. .v.pins = (const struct hda_pintbl[]) {
  644. { 0x12, 0x90a60160 }, /* int mic */
  645. {}
  646. },
  647. .chained = true,
  648. .chain_id = CXT_FIXUP_CAP_MIX_AMP,
  649. },
  650. [CXT_FIXUP_CAP_MIX_AMP_5047] = {
  651. .type = HDA_FIXUP_FUNC,
  652. .v.func = cxt_fixup_cap_mix_amp_5047,
  653. },
  654. [CXT_FIXUP_MUTE_LED_EAPD] = {
  655. .type = HDA_FIXUP_FUNC,
  656. .v.func = cxt_fixup_mute_led_eapd,
  657. },
  658. };
  659. static const struct snd_pci_quirk cxt5045_fixups[] = {
  660. SND_PCI_QUIRK(0x103c, 0x30d5, "HP 530", CXT_FIXUP_HP_530),
  661. SND_PCI_QUIRK(0x1179, 0xff31, "Toshiba P105", CXT_FIXUP_TOSHIBA_P105),
  662. /* HP, Packard Bell, Fujitsu-Siemens & Lenovo laptops have
  663. * really bad sound over 0dB on NID 0x17.
  664. */
  665. SND_PCI_QUIRK_VENDOR(0x103c, "HP", CXT_FIXUP_CAP_MIX_AMP),
  666. SND_PCI_QUIRK_VENDOR(0x1631, "Packard Bell", CXT_FIXUP_CAP_MIX_AMP),
  667. SND_PCI_QUIRK_VENDOR(0x1734, "Fujitsu", CXT_FIXUP_CAP_MIX_AMP),
  668. SND_PCI_QUIRK_VENDOR(0x17aa, "Lenovo", CXT_FIXUP_CAP_MIX_AMP),
  669. {}
  670. };
  671. static const struct hda_model_fixup cxt5045_fixup_models[] = {
  672. { .id = CXT_FIXUP_CAP_MIX_AMP, .name = "cap-mix-amp" },
  673. { .id = CXT_FIXUP_TOSHIBA_P105, .name = "toshiba-p105" },
  674. { .id = CXT_FIXUP_HP_530, .name = "hp-530" },
  675. {}
  676. };
  677. static const struct snd_pci_quirk cxt5047_fixups[] = {
  678. /* HP laptops have really bad sound over 0 dB on NID 0x10.
  679. */
  680. SND_PCI_QUIRK_VENDOR(0x103c, "HP", CXT_FIXUP_CAP_MIX_AMP_5047),
  681. {}
  682. };
  683. static const struct hda_model_fixup cxt5047_fixup_models[] = {
  684. { .id = CXT_FIXUP_CAP_MIX_AMP_5047, .name = "cap-mix-amp" },
  685. {}
  686. };
  687. static const struct snd_pci_quirk cxt5051_fixups[] = {
  688. SND_PCI_QUIRK(0x103c, 0x360b, "Compaq CQ60", CXT_PINCFG_COMPAQ_CQ60),
  689. SND_PCI_QUIRK(0x17aa, 0x20f2, "Lenovo X200", CXT_PINCFG_LENOVO_X200),
  690. {}
  691. };
  692. static const struct hda_model_fixup cxt5051_fixup_models[] = {
  693. { .id = CXT_PINCFG_LENOVO_X200, .name = "lenovo-x200" },
  694. {}
  695. };
  696. static const struct snd_pci_quirk cxt5066_fixups[] = {
  697. SND_PCI_QUIRK(0x1025, 0x0543, "Acer Aspire One 522", CXT_FIXUP_STEREO_DMIC),
  698. SND_PCI_QUIRK(0x1025, 0x054c, "Acer Aspire 3830TG", CXT_FIXUP_ASPIRE_DMIC),
  699. SND_PCI_QUIRK(0x1025, 0x054f, "Acer Aspire 4830T", CXT_FIXUP_ASPIRE_DMIC),
  700. SND_PCI_QUIRK(0x1043, 0x138d, "Asus", CXT_FIXUP_HEADPHONE_MIC_PIN),
  701. SND_PCI_QUIRK(0x152d, 0x0833, "OLPC XO-1.5", CXT_FIXUP_OLPC_XO),
  702. SND_PCI_QUIRK(0x17aa, 0x20f2, "Lenovo T400", CXT_PINCFG_LENOVO_TP410),
  703. SND_PCI_QUIRK(0x17aa, 0x215e, "Lenovo T410", CXT_PINCFG_LENOVO_TP410),
  704. SND_PCI_QUIRK(0x17aa, 0x215f, "Lenovo T510", CXT_PINCFG_LENOVO_TP410),
  705. SND_PCI_QUIRK(0x17aa, 0x21ce, "Lenovo T420", CXT_PINCFG_LENOVO_TP410),
  706. SND_PCI_QUIRK(0x17aa, 0x21cf, "Lenovo T520", CXT_PINCFG_LENOVO_TP410),
  707. SND_PCI_QUIRK(0x17aa, 0x21da, "Lenovo X220", CXT_PINCFG_LENOVO_TP410),
  708. SND_PCI_QUIRK(0x17aa, 0x21db, "Lenovo X220-tablet", CXT_PINCFG_LENOVO_TP410),
  709. SND_PCI_QUIRK(0x17aa, 0x38af, "Lenovo IdeaPad Z560", CXT_FIXUP_MUTE_LED_EAPD),
  710. SND_PCI_QUIRK(0x17aa, 0x3975, "Lenovo U300s", CXT_FIXUP_STEREO_DMIC),
  711. SND_PCI_QUIRK(0x17aa, 0x3977, "Lenovo IdeaPad U310", CXT_FIXUP_STEREO_DMIC),
  712. SND_PCI_QUIRK(0x17aa, 0x397b, "Lenovo S205", CXT_FIXUP_STEREO_DMIC),
  713. SND_PCI_QUIRK_VENDOR(0x17aa, "Thinkpad", CXT_FIXUP_THINKPAD_ACPI),
  714. SND_PCI_QUIRK(0x1c06, 0x2011, "Lemote A1004", CXT_PINCFG_LEMOTE_A1004),
  715. SND_PCI_QUIRK(0x1c06, 0x2012, "Lemote A1205", CXT_PINCFG_LEMOTE_A1205),
  716. {}
  717. };
  718. static const struct hda_model_fixup cxt5066_fixup_models[] = {
  719. { .id = CXT_FIXUP_STEREO_DMIC, .name = "stereo-dmic" },
  720. { .id = CXT_FIXUP_GPIO1, .name = "gpio1" },
  721. { .id = CXT_FIXUP_HEADPHONE_MIC_PIN, .name = "headphone-mic-pin" },
  722. { .id = CXT_PINCFG_LENOVO_TP410, .name = "tp410" },
  723. { .id = CXT_FIXUP_THINKPAD_ACPI, .name = "thinkpad" },
  724. { .id = CXT_PINCFG_LEMOTE_A1004, .name = "lemote-a1004" },
  725. { .id = CXT_PINCFG_LEMOTE_A1205, .name = "lemote-a1205" },
  726. { .id = CXT_FIXUP_OLPC_XO, .name = "olpc-xo" },
  727. { .id = CXT_FIXUP_MUTE_LED_EAPD, .name = "mute-led-eapd" },
  728. {}
  729. };
  730. /* add "fake" mute amp-caps to DACs on cx5051 so that mixer mute switches
  731. * can be created (bko#42825)
  732. */
  733. static void add_cx5051_fake_mutes(struct hda_codec *codec)
  734. {
  735. struct conexant_spec *spec = codec->spec;
  736. static hda_nid_t out_nids[] = {
  737. 0x10, 0x11, 0
  738. };
  739. hda_nid_t *p;
  740. for (p = out_nids; *p; p++)
  741. snd_hda_override_amp_caps(codec, *p, HDA_OUTPUT,
  742. AC_AMPCAP_MIN_MUTE |
  743. query_amp_caps(codec, *p, HDA_OUTPUT));
  744. spec->gen.dac_min_mute = true;
  745. }
  746. static int patch_conexant_auto(struct hda_codec *codec)
  747. {
  748. struct conexant_spec *spec;
  749. int err;
  750. codec_info(codec, "%s: BIOS auto-probing.\n", codec->core.chip_name);
  751. spec = kzalloc(sizeof(*spec), GFP_KERNEL);
  752. if (!spec)
  753. return -ENOMEM;
  754. snd_hda_gen_spec_init(&spec->gen);
  755. codec->spec = spec;
  756. codec->patch_ops = cx_auto_patch_ops;
  757. cx_auto_parse_beep(codec);
  758. cx_auto_parse_eapd(codec);
  759. spec->gen.own_eapd_ctl = 1;
  760. if (spec->dynamic_eapd)
  761. spec->gen.vmaster_mute.hook = cx_auto_vmaster_hook;
  762. switch (codec->core.vendor_id) {
  763. case 0x14f15045:
  764. codec->single_adc_amp = 1;
  765. spec->gen.mixer_nid = 0x17;
  766. spec->gen.add_stereo_mix_input = HDA_HINT_STEREO_MIX_AUTO;
  767. snd_hda_pick_fixup(codec, cxt5045_fixup_models,
  768. cxt5045_fixups, cxt_fixups);
  769. break;
  770. case 0x14f15047:
  771. codec->pin_amp_workaround = 1;
  772. spec->gen.mixer_nid = 0x19;
  773. spec->gen.add_stereo_mix_input = HDA_HINT_STEREO_MIX_AUTO;
  774. snd_hda_pick_fixup(codec, cxt5047_fixup_models,
  775. cxt5047_fixups, cxt_fixups);
  776. break;
  777. case 0x14f15051:
  778. add_cx5051_fake_mutes(codec);
  779. codec->pin_amp_workaround = 1;
  780. snd_hda_pick_fixup(codec, cxt5051_fixup_models,
  781. cxt5051_fixups, cxt_fixups);
  782. break;
  783. default:
  784. codec->pin_amp_workaround = 1;
  785. snd_hda_pick_fixup(codec, cxt5066_fixup_models,
  786. cxt5066_fixups, cxt_fixups);
  787. break;
  788. }
  789. /* Show mute-led control only on HP laptops
  790. * This is a sort of white-list: on HP laptops, EAPD corresponds
  791. * only to the mute-LED without actualy amp function. Meanwhile,
  792. * others may use EAPD really as an amp switch, so it might be
  793. * not good to expose it blindly.
  794. */
  795. switch (codec->core.subsystem_id >> 16) {
  796. case 0x103c:
  797. spec->gen.vmaster_mute_enum = 1;
  798. break;
  799. }
  800. snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PRE_PROBE);
  801. err = snd_hda_parse_pin_defcfg(codec, &spec->gen.autocfg, NULL,
  802. spec->parse_flags);
  803. if (err < 0)
  804. goto error;
  805. err = snd_hda_gen_parse_auto_config(codec, &spec->gen.autocfg);
  806. if (err < 0)
  807. goto error;
  808. /* Some laptops with Conexant chips show stalls in S3 resume,
  809. * which falls into the single-cmd mode.
  810. * Better to make reset, then.
  811. */
  812. if (!codec->bus->core.sync_write) {
  813. codec_info(codec,
  814. "Enable sync_write for stable communication\n");
  815. codec->bus->core.sync_write = 1;
  816. codec->bus->allow_bus_reset = 1;
  817. }
  818. snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_PROBE);
  819. return 0;
  820. error:
  821. cx_auto_free(codec);
  822. return err;
  823. }
  824. /*
  825. */
  826. static const struct hda_codec_preset snd_hda_preset_conexant[] = {
  827. { .id = 0x14f15045, .name = "CX20549 (Venice)",
  828. .patch = patch_conexant_auto },
  829. { .id = 0x14f15047, .name = "CX20551 (Waikiki)",
  830. .patch = patch_conexant_auto },
  831. { .id = 0x14f15051, .name = "CX20561 (Hermosa)",
  832. .patch = patch_conexant_auto },
  833. { .id = 0x14f15066, .name = "CX20582 (Pebble)",
  834. .patch = patch_conexant_auto },
  835. { .id = 0x14f15067, .name = "CX20583 (Pebble HSF)",
  836. .patch = patch_conexant_auto },
  837. { .id = 0x14f15068, .name = "CX20584",
  838. .patch = patch_conexant_auto },
  839. { .id = 0x14f15069, .name = "CX20585",
  840. .patch = patch_conexant_auto },
  841. { .id = 0x14f1506c, .name = "CX20588",
  842. .patch = patch_conexant_auto },
  843. { .id = 0x14f1506e, .name = "CX20590",
  844. .patch = patch_conexant_auto },
  845. { .id = 0x14f15097, .name = "CX20631",
  846. .patch = patch_conexant_auto },
  847. { .id = 0x14f15098, .name = "CX20632",
  848. .patch = patch_conexant_auto },
  849. { .id = 0x14f150a1, .name = "CX20641",
  850. .patch = patch_conexant_auto },
  851. { .id = 0x14f150a2, .name = "CX20642",
  852. .patch = patch_conexant_auto },
  853. { .id = 0x14f150ab, .name = "CX20651",
  854. .patch = patch_conexant_auto },
  855. { .id = 0x14f150ac, .name = "CX20652",
  856. .patch = patch_conexant_auto },
  857. { .id = 0x14f150b8, .name = "CX20664",
  858. .patch = patch_conexant_auto },
  859. { .id = 0x14f150b9, .name = "CX20665",
  860. .patch = patch_conexant_auto },
  861. { .id = 0x14f150f1, .name = "CX20721",
  862. .patch = patch_conexant_auto },
  863. { .id = 0x14f150f2, .name = "CX20722",
  864. .patch = patch_conexant_auto },
  865. { .id = 0x14f150f3, .name = "CX20723",
  866. .patch = patch_conexant_auto },
  867. { .id = 0x14f150f4, .name = "CX20724",
  868. .patch = patch_conexant_auto },
  869. { .id = 0x14f1510f, .name = "CX20751/2",
  870. .patch = patch_conexant_auto },
  871. { .id = 0x14f15110, .name = "CX20751/2",
  872. .patch = patch_conexant_auto },
  873. { .id = 0x14f15111, .name = "CX20753/4",
  874. .patch = patch_conexant_auto },
  875. { .id = 0x14f15113, .name = "CX20755",
  876. .patch = patch_conexant_auto },
  877. { .id = 0x14f15114, .name = "CX20756",
  878. .patch = patch_conexant_auto },
  879. { .id = 0x14f15115, .name = "CX20757",
  880. .patch = patch_conexant_auto },
  881. { .id = 0x14f151d7, .name = "CX20952",
  882. .patch = patch_conexant_auto },
  883. {} /* terminator */
  884. };
  885. MODULE_ALIAS("snd-hda-codec-id:14f15045");
  886. MODULE_ALIAS("snd-hda-codec-id:14f15047");
  887. MODULE_ALIAS("snd-hda-codec-id:14f15051");
  888. MODULE_ALIAS("snd-hda-codec-id:14f15066");
  889. MODULE_ALIAS("snd-hda-codec-id:14f15067");
  890. MODULE_ALIAS("snd-hda-codec-id:14f15068");
  891. MODULE_ALIAS("snd-hda-codec-id:14f15069");
  892. MODULE_ALIAS("snd-hda-codec-id:14f1506c");
  893. MODULE_ALIAS("snd-hda-codec-id:14f1506e");
  894. MODULE_ALIAS("snd-hda-codec-id:14f15097");
  895. MODULE_ALIAS("snd-hda-codec-id:14f15098");
  896. MODULE_ALIAS("snd-hda-codec-id:14f150a1");
  897. MODULE_ALIAS("snd-hda-codec-id:14f150a2");
  898. MODULE_ALIAS("snd-hda-codec-id:14f150ab");
  899. MODULE_ALIAS("snd-hda-codec-id:14f150ac");
  900. MODULE_ALIAS("snd-hda-codec-id:14f150b8");
  901. MODULE_ALIAS("snd-hda-codec-id:14f150b9");
  902. MODULE_ALIAS("snd-hda-codec-id:14f150f1");
  903. MODULE_ALIAS("snd-hda-codec-id:14f150f2");
  904. MODULE_ALIAS("snd-hda-codec-id:14f150f3");
  905. MODULE_ALIAS("snd-hda-codec-id:14f150f4");
  906. MODULE_ALIAS("snd-hda-codec-id:14f1510f");
  907. MODULE_ALIAS("snd-hda-codec-id:14f15110");
  908. MODULE_ALIAS("snd-hda-codec-id:14f15111");
  909. MODULE_ALIAS("snd-hda-codec-id:14f15113");
  910. MODULE_ALIAS("snd-hda-codec-id:14f15114");
  911. MODULE_ALIAS("snd-hda-codec-id:14f15115");
  912. MODULE_ALIAS("snd-hda-codec-id:14f151d7");
  913. MODULE_LICENSE("GPL");
  914. MODULE_DESCRIPTION("Conexant HD-audio codec");
  915. static struct hda_codec_driver conexant_driver = {
  916. .preset = snd_hda_preset_conexant,
  917. };
  918. module_hda_codec_driver(conexant_driver);