aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
Diffstat (limited to 'sound')
-rw-r--r--sound/core/vmaster.c1
-rw-r--r--sound/last.c2
-rw-r--r--sound/pci/hda/patch_conexant.c35
-rw-r--r--sound/pci/hda/patch_realtek.c49
-rw-r--r--sound/pci/hda/patch_sigmatel.c5
5 files changed, 79 insertions, 13 deletions
diff --git a/sound/core/vmaster.c b/sound/core/vmaster.c
index 14a286a7bf2b..857586135d18 100644
--- a/sound/core/vmaster.c
+++ b/sound/core/vmaster.c
@@ -419,6 +419,7 @@ EXPORT_SYMBOL(snd_ctl_make_virtual_master);
419 * snd_ctl_add_vmaster_hook - Add a hook to a vmaster control 419 * snd_ctl_add_vmaster_hook - Add a hook to a vmaster control
420 * @kcontrol: vmaster kctl element 420 * @kcontrol: vmaster kctl element
421 * @hook: the hook function 421 * @hook: the hook function
422 * @private_data: the private_data pointer to be saved
422 * 423 *
423 * Adds the given hook to the vmaster control element so that it's called 424 * Adds the given hook to the vmaster control element so that it's called
424 * at each time when the value is changed. 425 * at each time when the value is changed.
diff --git a/sound/last.c b/sound/last.c
index bdd0857b8871..7ffc182e0844 100644
--- a/sound/last.c
+++ b/sound/last.c
@@ -38,4 +38,4 @@ static int __init alsa_sound_last_init(void)
38 return 0; 38 return 0;
39} 39}
40 40
41__initcall(alsa_sound_last_init); 41late_initcall_sync(alsa_sound_last_init);
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c
index a36488d94aaa..d906c5b74cf0 100644
--- a/sound/pci/hda/patch_conexant.c
+++ b/sound/pci/hda/patch_conexant.c
@@ -3971,9 +3971,14 @@ static void cx_auto_init_output(struct hda_codec *codec)
3971 int i; 3971 int i;
3972 3972
3973 mute_outputs(codec, spec->multiout.num_dacs, spec->multiout.dac_nids); 3973 mute_outputs(codec, spec->multiout.num_dacs, spec->multiout.dac_nids);
3974 for (i = 0; i < cfg->hp_outs; i++) 3974 for (i = 0; i < cfg->hp_outs; i++) {
3975 unsigned int val = PIN_OUT;
3976 if (snd_hda_query_pin_caps(codec, cfg->hp_pins[i]) &
3977 AC_PINCAP_HP_DRV)
3978 val |= AC_PINCTL_HP_EN;
3975 snd_hda_codec_write(codec, cfg->hp_pins[i], 0, 3979 snd_hda_codec_write(codec, cfg->hp_pins[i], 0,
3976 AC_VERB_SET_PIN_WIDGET_CONTROL, PIN_HP); 3980 AC_VERB_SET_PIN_WIDGET_CONTROL, val);
3981 }
3977 mute_outputs(codec, cfg->hp_outs, cfg->hp_pins); 3982 mute_outputs(codec, cfg->hp_outs, cfg->hp_pins);
3978 mute_outputs(codec, cfg->line_outs, cfg->line_out_pins); 3983 mute_outputs(codec, cfg->line_outs, cfg->line_out_pins);
3979 mute_outputs(codec, cfg->speaker_outs, cfg->speaker_pins); 3984 mute_outputs(codec, cfg->speaker_outs, cfg->speaker_pins);
@@ -4391,8 +4396,10 @@ static void apply_pin_fixup(struct hda_codec *codec,
4391 4396
4392enum { 4397enum {
4393 CXT_PINCFG_LENOVO_X200, 4398 CXT_PINCFG_LENOVO_X200,
4399 CXT_PINCFG_LENOVO_TP410,
4394}; 4400};
4395 4401
4402/* ThinkPad X200 & co with cxt5051 */
4396static const struct cxt_pincfg cxt_pincfg_lenovo_x200[] = { 4403static const struct cxt_pincfg cxt_pincfg_lenovo_x200[] = {
4397 { 0x16, 0x042140ff }, /* HP (seq# overridden) */ 4404 { 0x16, 0x042140ff }, /* HP (seq# overridden) */
4398 { 0x17, 0x21a11000 }, /* dock-mic */ 4405 { 0x17, 0x21a11000 }, /* dock-mic */
@@ -4401,15 +4408,33 @@ static const struct cxt_pincfg cxt_pincfg_lenovo_x200[] = {
4401 {} 4408 {}
4402}; 4409};
4403 4410
4411/* ThinkPad 410/420/510/520, X201 & co with cxt5066 */
4412static const struct cxt_pincfg cxt_pincfg_lenovo_tp410[] = {
4413 { 0x19, 0x042110ff }, /* HP (seq# overridden) */
4414 { 0x1a, 0x21a190f0 }, /* dock-mic */
4415 { 0x1c, 0x212140ff }, /* dock-HP */
4416 {}
4417};
4418
4404static const struct cxt_pincfg *cxt_pincfg_tbl[] = { 4419static const struct cxt_pincfg *cxt_pincfg_tbl[] = {
4405 [CXT_PINCFG_LENOVO_X200] = cxt_pincfg_lenovo_x200, 4420 [CXT_PINCFG_LENOVO_X200] = cxt_pincfg_lenovo_x200,
4421 [CXT_PINCFG_LENOVO_TP410] = cxt_pincfg_lenovo_tp410,
4406}; 4422};
4407 4423
4408static const struct snd_pci_quirk cxt_fixups[] = { 4424static const struct snd_pci_quirk cxt5051_fixups[] = {
4409 SND_PCI_QUIRK(0x17aa, 0x20f2, "Lenovo X200", CXT_PINCFG_LENOVO_X200), 4425 SND_PCI_QUIRK(0x17aa, 0x20f2, "Lenovo X200", CXT_PINCFG_LENOVO_X200),
4410 {} 4426 {}
4411}; 4427};
4412 4428
4429static const struct snd_pci_quirk cxt5066_fixups[] = {
4430 SND_PCI_QUIRK(0x17aa, 0x20f2, "Lenovo T400", CXT_PINCFG_LENOVO_TP410),
4431 SND_PCI_QUIRK(0x17aa, 0x215e, "Lenovo T410", CXT_PINCFG_LENOVO_TP410),
4432 SND_PCI_QUIRK(0x17aa, 0x215f, "Lenovo T510", CXT_PINCFG_LENOVO_TP410),
4433 SND_PCI_QUIRK(0x17aa, 0x21ce, "Lenovo T420", CXT_PINCFG_LENOVO_TP410),
4434 SND_PCI_QUIRK(0x17aa, 0x21cf, "Lenovo T520", CXT_PINCFG_LENOVO_TP410),
4435 {}
4436};
4437
4413/* add "fake" mute amp-caps to DACs on cx5051 so that mixer mute switches 4438/* add "fake" mute amp-caps to DACs on cx5051 so that mixer mute switches
4414 * can be created (bko#42825) 4439 * can be created (bko#42825)
4415 */ 4440 */
@@ -4446,13 +4471,13 @@ static int patch_conexant_auto(struct hda_codec *codec)
4446 case 0x14f15051: 4471 case 0x14f15051:
4447 add_cx5051_fake_mutes(codec); 4472 add_cx5051_fake_mutes(codec);
4448 codec->pin_amp_workaround = 1; 4473 codec->pin_amp_workaround = 1;
4474 apply_pin_fixup(codec, cxt5051_fixups, cxt_pincfg_tbl);
4449 break; 4475 break;
4450 default: 4476 default:
4451 codec->pin_amp_workaround = 1; 4477 codec->pin_amp_workaround = 1;
4478 apply_pin_fixup(codec, cxt5066_fixups, cxt_pincfg_tbl);
4452 } 4479 }
4453 4480
4454 apply_pin_fixup(codec, cxt_fixups, cxt_pincfg_tbl);
4455
4456 /* Show mute-led control only on HP laptops 4481 /* Show mute-led control only on HP laptops
4457 * This is a sort of white-list: on HP laptops, EAPD corresponds 4482 * This is a sort of white-list: on HP laptops, EAPD corresponds
4458 * only to the mute-LED without actualy amp function. Meanwhile, 4483 * only to the mute-LED without actualy amp function. Meanwhile,
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 2508f8109f11..e65e35433055 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -1445,6 +1445,13 @@ enum {
1445 ALC_FIXUP_ACT_BUILD, 1445 ALC_FIXUP_ACT_BUILD,
1446}; 1446};
1447 1447
1448static void alc_apply_pincfgs(struct hda_codec *codec,
1449 const struct alc_pincfg *cfg)
1450{
1451 for (; cfg->nid; cfg++)
1452 snd_hda_codec_set_pincfg(codec, cfg->nid, cfg->val);
1453}
1454
1448static void alc_apply_fixup(struct hda_codec *codec, int action) 1455static void alc_apply_fixup(struct hda_codec *codec, int action)
1449{ 1456{
1450 struct alc_spec *spec = codec->spec; 1457 struct alc_spec *spec = codec->spec;
@@ -1478,9 +1485,7 @@ static void alc_apply_fixup(struct hda_codec *codec, int action)
1478 snd_printdd(KERN_INFO "hda_codec: %s: " 1485 snd_printdd(KERN_INFO "hda_codec: %s: "
1479 "Apply pincfg for %s\n", 1486 "Apply pincfg for %s\n",
1480 codec->chip_name, modelname); 1487 codec->chip_name, modelname);
1481 for (; cfg->nid; cfg++) 1488 alc_apply_pincfgs(codec, cfg);
1482 snd_hda_codec_set_pincfg(codec, cfg->nid,
1483 cfg->val);
1484 break; 1489 break;
1485 case ALC_FIXUP_VERBS: 1490 case ALC_FIXUP_VERBS:
1486 if (action != ALC_FIXUP_ACT_PROBE || !fix->v.verbs) 1491 if (action != ALC_FIXUP_ACT_PROBE || !fix->v.verbs)
@@ -4861,6 +4866,7 @@ enum {
4861 ALC260_FIXUP_GPIO1_TOGGLE, 4866 ALC260_FIXUP_GPIO1_TOGGLE,
4862 ALC260_FIXUP_REPLACER, 4867 ALC260_FIXUP_REPLACER,
4863 ALC260_FIXUP_HP_B1900, 4868 ALC260_FIXUP_HP_B1900,
4869 ALC260_FIXUP_KN1,
4864}; 4870};
4865 4871
4866static void alc260_gpio1_automute(struct hda_codec *codec) 4872static void alc260_gpio1_automute(struct hda_codec *codec)
@@ -4888,6 +4894,36 @@ static void alc260_fixup_gpio1_toggle(struct hda_codec *codec,
4888 } 4894 }
4889} 4895}
4890 4896
4897static void alc260_fixup_kn1(struct hda_codec *codec,
4898 const struct alc_fixup *fix, int action)
4899{
4900 struct alc_spec *spec = codec->spec;
4901 static const struct alc_pincfg pincfgs[] = {
4902 { 0x0f, 0x02214000 }, /* HP/speaker */
4903 { 0x12, 0x90a60160 }, /* int mic */
4904 { 0x13, 0x02a19000 }, /* ext mic */
4905 { 0x18, 0x01446000 }, /* SPDIF out */
4906 /* disable bogus I/O pins */
4907 { 0x10, 0x411111f0 },
4908 { 0x11, 0x411111f0 },
4909 { 0x14, 0x411111f0 },
4910 { 0x15, 0x411111f0 },
4911 { 0x16, 0x411111f0 },
4912 { 0x17, 0x411111f0 },
4913 { 0x19, 0x411111f0 },
4914 { }
4915 };
4916
4917 switch (action) {
4918 case ALC_FIXUP_ACT_PRE_PROBE:
4919 alc_apply_pincfgs(codec, pincfgs);
4920 break;
4921 case ALC_FIXUP_ACT_PROBE:
4922 spec->init_amp = ALC_INIT_NONE;
4923 break;
4924 }
4925}
4926
4891static const struct alc_fixup alc260_fixups[] = { 4927static const struct alc_fixup alc260_fixups[] = {
4892 [ALC260_FIXUP_HP_DC5750] = { 4928 [ALC260_FIXUP_HP_DC5750] = {
4893 .type = ALC_FIXUP_PINS, 4929 .type = ALC_FIXUP_PINS,
@@ -4938,7 +4974,11 @@ static const struct alc_fixup alc260_fixups[] = {
4938 .v.func = alc260_fixup_gpio1_toggle, 4974 .v.func = alc260_fixup_gpio1_toggle,
4939 .chained = true, 4975 .chained = true,
4940 .chain_id = ALC260_FIXUP_COEF, 4976 .chain_id = ALC260_FIXUP_COEF,
4941 } 4977 },
4978 [ALC260_FIXUP_KN1] = {
4979 .type = ALC_FIXUP_FUNC,
4980 .v.func = alc260_fixup_kn1,
4981 },
4942}; 4982};
4943 4983
4944static const struct snd_pci_quirk alc260_fixup_tbl[] = { 4984static const struct snd_pci_quirk alc260_fixup_tbl[] = {
@@ -4948,6 +4988,7 @@ static const struct snd_pci_quirk alc260_fixup_tbl[] = {
4948 SND_PCI_QUIRK(0x103c, 0x280a, "HP dc5750", ALC260_FIXUP_HP_DC5750), 4988 SND_PCI_QUIRK(0x103c, 0x280a, "HP dc5750", ALC260_FIXUP_HP_DC5750),
4949 SND_PCI_QUIRK(0x103c, 0x30ba, "HP Presario B1900", ALC260_FIXUP_HP_B1900), 4989 SND_PCI_QUIRK(0x103c, 0x30ba, "HP Presario B1900", ALC260_FIXUP_HP_B1900),
4950 SND_PCI_QUIRK(0x1509, 0x4540, "Favorit 100XS", ALC260_FIXUP_GPIO1), 4990 SND_PCI_QUIRK(0x1509, 0x4540, "Favorit 100XS", ALC260_FIXUP_GPIO1),
4991 SND_PCI_QUIRK(0x152d, 0x0729, "Quanta KN1", ALC260_FIXUP_KN1),
4951 SND_PCI_QUIRK(0x161f, 0x2057, "Replacer 672V", ALC260_FIXUP_REPLACER), 4992 SND_PCI_QUIRK(0x161f, 0x2057, "Replacer 672V", ALC260_FIXUP_REPLACER),
4952 SND_PCI_QUIRK(0x1631, 0xc017, "PB V7900", ALC260_FIXUP_COEF), 4993 SND_PCI_QUIRK(0x1631, 0xc017, "PB V7900", ALC260_FIXUP_COEF),
4953 {} 4994 {}
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index 33a9946b492c..4742cac26aa9 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -5063,12 +5063,11 @@ static void stac92xx_update_led_status(struct hda_codec *codec, int enabled)
5063 if (spec->gpio_led_polarity) 5063 if (spec->gpio_led_polarity)
5064 muted = !muted; 5064 muted = !muted;
5065 5065
5066 /*polarity defines *not* muted state level*/
5067 if (!spec->vref_mute_led_nid) { 5066 if (!spec->vref_mute_led_nid) {
5068 if (muted) 5067 if (muted)
5069 spec->gpio_data &= ~spec->gpio_led; /* orange */ 5068 spec->gpio_data |= spec->gpio_led;
5070 else 5069 else
5071 spec->gpio_data |= spec->gpio_led; /* white */ 5070 spec->gpio_data &= ~spec->gpio_led;
5072 stac_gpio_set(codec, spec->gpio_mask, 5071 stac_gpio_set(codec, spec->gpio_mask,
5073 spec->gpio_dir, spec->gpio_data); 5072 spec->gpio_dir, spec->gpio_data);
5074 } else { 5073 } else {