diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2015-07-29 18:13:24 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2015-07-29 18:13:24 -0400 |
commit | 4b979e4c611ce750d32b51737f837b485f43c69b (patch) | |
tree | 3bc56f2a22d2cf29bc183b67e74e1e8c0733efc0 /sound/pci/hda/patch_realtek.c | |
parent | 1559f3b8d0527e24219149c95b3de5e7b2924828 (diff) | |
parent | cbfe8fa6cd672011c755c3cd85c9ffd4e2d10a6f (diff) |
Merge branch 'linus' into irq/core
Pull in upstream fixes before applying conflicting changes
Diffstat (limited to 'sound/pci/hda/patch_realtek.c')
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 94 |
1 files changed, 86 insertions, 8 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index b3b44681d3cf..742fc626f9e1 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -4441,6 +4441,55 @@ static void alc290_fixup_mono_speakers(struct hda_codec *codec, | |||
4441 | } | 4441 | } |
4442 | } | 4442 | } |
4443 | 4443 | ||
4444 | /* Hook to update amp GPIO4 for automute */ | ||
4445 | static void alc280_hp_gpio4_automute_hook(struct hda_codec *codec, | ||
4446 | struct hda_jack_callback *jack) | ||
4447 | { | ||
4448 | struct alc_spec *spec = codec->spec; | ||
4449 | |||
4450 | snd_hda_gen_hp_automute(codec, jack); | ||
4451 | /* mute_led_polarity is set to 0, so we pass inverted value here */ | ||
4452 | alc_update_gpio_led(codec, 0x10, !spec->gen.hp_jack_present); | ||
4453 | } | ||
4454 | |||
4455 | /* Manage GPIOs for HP EliteBook Folio 9480m. | ||
4456 | * | ||
4457 | * GPIO4 is the headphone amplifier power control | ||
4458 | * GPIO3 is the audio output mute indicator LED | ||
4459 | */ | ||
4460 | |||
4461 | static void alc280_fixup_hp_9480m(struct hda_codec *codec, | ||
4462 | const struct hda_fixup *fix, | ||
4463 | int action) | ||
4464 | { | ||
4465 | struct alc_spec *spec = codec->spec; | ||
4466 | static const struct hda_verb gpio_init[] = { | ||
4467 | { 0x01, AC_VERB_SET_GPIO_MASK, 0x18 }, | ||
4468 | { 0x01, AC_VERB_SET_GPIO_DIRECTION, 0x18 }, | ||
4469 | {} | ||
4470 | }; | ||
4471 | |||
4472 | if (action == HDA_FIXUP_ACT_PRE_PROBE) { | ||
4473 | /* Set the hooks to turn the headphone amp on/off | ||
4474 | * as needed | ||
4475 | */ | ||
4476 | spec->gen.vmaster_mute.hook = alc_fixup_gpio_mute_hook; | ||
4477 | spec->gen.hp_automute_hook = alc280_hp_gpio4_automute_hook; | ||
4478 | |||
4479 | /* The GPIOs are currently off */ | ||
4480 | spec->gpio_led = 0; | ||
4481 | |||
4482 | /* GPIO3 is connected to the output mute LED, | ||
4483 | * high is on, low is off | ||
4484 | */ | ||
4485 | spec->mute_led_polarity = 0; | ||
4486 | spec->gpio_mute_led_mask = 0x08; | ||
4487 | |||
4488 | /* Initialize GPIO configuration */ | ||
4489 | snd_hda_add_verbs(codec, gpio_init); | ||
4490 | } | ||
4491 | } | ||
4492 | |||
4444 | /* for hda_fixup_thinkpad_acpi() */ | 4493 | /* for hda_fixup_thinkpad_acpi() */ |
4445 | #include "thinkpad_helper.c" | 4494 | #include "thinkpad_helper.c" |
4446 | 4495 | ||
@@ -4521,6 +4570,7 @@ enum { | |||
4521 | ALC286_FIXUP_HP_GPIO_LED, | 4570 | ALC286_FIXUP_HP_GPIO_LED, |
4522 | ALC280_FIXUP_HP_GPIO2_MIC_HOTKEY, | 4571 | ALC280_FIXUP_HP_GPIO2_MIC_HOTKEY, |
4523 | ALC280_FIXUP_HP_DOCK_PINS, | 4572 | ALC280_FIXUP_HP_DOCK_PINS, |
4573 | ALC280_FIXUP_HP_9480M, | ||
4524 | ALC288_FIXUP_DELL_HEADSET_MODE, | 4574 | ALC288_FIXUP_DELL_HEADSET_MODE, |
4525 | ALC288_FIXUP_DELL1_MIC_NO_PRESENCE, | 4575 | ALC288_FIXUP_DELL1_MIC_NO_PRESENCE, |
4526 | ALC288_FIXUP_DELL_XPS_13_GPIO6, | 4576 | ALC288_FIXUP_DELL_XPS_13_GPIO6, |
@@ -5011,7 +5061,7 @@ static const struct hda_fixup alc269_fixups[] = { | |||
5011 | { 0x14, 0x90170110 }, | 5061 | { 0x14, 0x90170110 }, |
5012 | { 0x17, 0x40000008 }, | 5062 | { 0x17, 0x40000008 }, |
5013 | { 0x18, 0x411111f0 }, | 5063 | { 0x18, 0x411111f0 }, |
5014 | { 0x19, 0x411111f0 }, | 5064 | { 0x19, 0x01a1913c }, |
5015 | { 0x1a, 0x411111f0 }, | 5065 | { 0x1a, 0x411111f0 }, |
5016 | { 0x1b, 0x411111f0 }, | 5066 | { 0x1b, 0x411111f0 }, |
5017 | { 0x1d, 0x40f89b2d }, | 5067 | { 0x1d, 0x40f89b2d }, |
@@ -5043,6 +5093,10 @@ static const struct hda_fixup alc269_fixups[] = { | |||
5043 | .chained = true, | 5093 | .chained = true, |
5044 | .chain_id = ALC280_FIXUP_HP_GPIO4 | 5094 | .chain_id = ALC280_FIXUP_HP_GPIO4 |
5045 | }, | 5095 | }, |
5096 | [ALC280_FIXUP_HP_9480M] = { | ||
5097 | .type = HDA_FIXUP_FUNC, | ||
5098 | .v.func = alc280_fixup_hp_9480m, | ||
5099 | }, | ||
5046 | [ALC288_FIXUP_DELL_HEADSET_MODE] = { | 5100 | [ALC288_FIXUP_DELL_HEADSET_MODE] = { |
5047 | .type = HDA_FIXUP_FUNC, | 5101 | .type = HDA_FIXUP_FUNC, |
5048 | .v.func = alc_fixup_headset_mode_dell_alc288, | 5102 | .v.func = alc_fixup_headset_mode_dell_alc288, |
@@ -5161,6 +5215,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { | |||
5161 | SND_PCI_QUIRK(0x103c, 0x22b7, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), | 5215 | SND_PCI_QUIRK(0x103c, 0x22b7, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), |
5162 | SND_PCI_QUIRK(0x103c, 0x22bf, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), | 5216 | SND_PCI_QUIRK(0x103c, 0x22bf, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), |
5163 | SND_PCI_QUIRK(0x103c, 0x22cf, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), | 5217 | SND_PCI_QUIRK(0x103c, 0x22cf, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC1), |
5218 | SND_PCI_QUIRK(0x103c, 0x22db, "HP", ALC280_FIXUP_HP_9480M), | ||
5164 | SND_PCI_QUIRK(0x103c, 0x22dc, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED), | 5219 | SND_PCI_QUIRK(0x103c, 0x22dc, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED), |
5165 | SND_PCI_QUIRK(0x103c, 0x22fb, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED), | 5220 | SND_PCI_QUIRK(0x103c, 0x22fb, "HP", ALC269_FIXUP_HP_GPIO_MIC1_LED), |
5166 | /* ALC290 */ | 5221 | /* ALC290 */ |
@@ -5375,8 +5430,7 @@ static const struct hda_model_fixup alc269_fixup_models[] = { | |||
5375 | {0x15, 0x0221401f}, \ | 5430 | {0x15, 0x0221401f}, \ |
5376 | {0x1a, 0x411111f0}, \ | 5431 | {0x1a, 0x411111f0}, \ |
5377 | {0x1b, 0x411111f0}, \ | 5432 | {0x1b, 0x411111f0}, \ |
5378 | {0x1d, 0x40700001}, \ | 5433 | {0x1d, 0x40700001} |
5379 | {0x1e, 0x411111f0} | ||
5380 | 5434 | ||
5381 | #define ALC298_STANDARD_PINS \ | 5435 | #define ALC298_STANDARD_PINS \ |
5382 | {0x18, 0x411111f0}, \ | 5436 | {0x18, 0x411111f0}, \ |
@@ -5408,6 +5462,17 @@ static const struct snd_hda_pin_quirk alc269_pin_fixup_tbl[] = { | |||
5408 | {0x1d, 0x40700001}, | 5462 | {0x1d, 0x40700001}, |
5409 | {0x21, 0x02211030}), | 5463 | {0x21, 0x02211030}), |
5410 | SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, | 5464 | SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, |
5465 | {0x12, 0x40000000}, | ||
5466 | {0x14, 0x90170130}, | ||
5467 | {0x17, 0x411111f0}, | ||
5468 | {0x18, 0x411111f0}, | ||
5469 | {0x19, 0x411111f0}, | ||
5470 | {0x1a, 0x411111f0}, | ||
5471 | {0x1b, 0x01014020}, | ||
5472 | {0x1d, 0x4054c029}, | ||
5473 | {0x1e, 0x411111f0}, | ||
5474 | {0x21, 0x0221103f}), | ||
5475 | SND_HDA_PIN_QUIRK(0x10ec0255, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, | ||
5411 | {0x12, 0x90a60160}, | 5476 | {0x12, 0x90a60160}, |
5412 | {0x14, 0x90170120}, | 5477 | {0x14, 0x90170120}, |
5413 | {0x17, 0x90170140}, | 5478 | {0x17, 0x90170140}, |
@@ -5635,35 +5700,48 @@ static const struct snd_hda_pin_quirk alc269_pin_fixup_tbl[] = { | |||
5635 | {0x13, 0x411111f0}, | 5700 | {0x13, 0x411111f0}, |
5636 | {0x16, 0x01014020}, | 5701 | {0x16, 0x01014020}, |
5637 | {0x18, 0x411111f0}, | 5702 | {0x18, 0x411111f0}, |
5638 | {0x19, 0x01a19030}), | 5703 | {0x19, 0x01a19030}, |
5704 | {0x1e, 0x411111f0}), | ||
5639 | SND_HDA_PIN_QUIRK(0x10ec0292, 0x1028, "Dell", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE, | 5705 | SND_HDA_PIN_QUIRK(0x10ec0292, 0x1028, "Dell", ALC269_FIXUP_DELL2_MIC_NO_PRESENCE, |
5640 | ALC292_STANDARD_PINS, | 5706 | ALC292_STANDARD_PINS, |
5641 | {0x12, 0x90a60140}, | 5707 | {0x12, 0x90a60140}, |
5642 | {0x13, 0x411111f0}, | 5708 | {0x13, 0x411111f0}, |
5643 | {0x16, 0x01014020}, | 5709 | {0x16, 0x01014020}, |
5644 | {0x18, 0x02a19031}, | 5710 | {0x18, 0x02a19031}, |
5645 | {0x19, 0x01a1903e}), | 5711 | {0x19, 0x01a1903e}, |
5712 | {0x1e, 0x411111f0}), | ||
5646 | SND_HDA_PIN_QUIRK(0x10ec0292, 0x1028, "Dell", ALC269_FIXUP_DELL3_MIC_NO_PRESENCE, | 5713 | SND_HDA_PIN_QUIRK(0x10ec0292, 0x1028, "Dell", ALC269_FIXUP_DELL3_MIC_NO_PRESENCE, |
5647 | ALC292_STANDARD_PINS, | 5714 | ALC292_STANDARD_PINS, |
5648 | {0x12, 0x90a60140}, | 5715 | {0x12, 0x90a60140}, |
5649 | {0x13, 0x411111f0}, | 5716 | {0x13, 0x411111f0}, |
5650 | {0x16, 0x411111f0}, | 5717 | {0x16, 0x411111f0}, |
5651 | {0x18, 0x411111f0}, | 5718 | {0x18, 0x411111f0}, |
5652 | {0x19, 0x411111f0}), | 5719 | {0x19, 0x411111f0}, |
5720 | {0x1e, 0x411111f0}), | ||
5653 | SND_HDA_PIN_QUIRK(0x10ec0293, 0x1028, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE, | 5721 | SND_HDA_PIN_QUIRK(0x10ec0293, 0x1028, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE, |
5654 | ALC292_STANDARD_PINS, | 5722 | ALC292_STANDARD_PINS, |
5655 | {0x12, 0x40000000}, | 5723 | {0x12, 0x40000000}, |
5656 | {0x13, 0x90a60140}, | 5724 | {0x13, 0x90a60140}, |
5657 | {0x16, 0x21014020}, | 5725 | {0x16, 0x21014020}, |
5658 | {0x18, 0x411111f0}, | 5726 | {0x18, 0x411111f0}, |
5659 | {0x19, 0x21a19030}), | 5727 | {0x19, 0x21a19030}, |
5728 | {0x1e, 0x411111f0}), | ||
5660 | SND_HDA_PIN_QUIRK(0x10ec0293, 0x1028, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE, | 5729 | SND_HDA_PIN_QUIRK(0x10ec0293, 0x1028, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE, |
5661 | ALC292_STANDARD_PINS, | 5730 | ALC292_STANDARD_PINS, |
5662 | {0x12, 0x40000000}, | 5731 | {0x12, 0x40000000}, |
5663 | {0x13, 0x90a60140}, | 5732 | {0x13, 0x90a60140}, |
5664 | {0x16, 0x411111f0}, | 5733 | {0x16, 0x411111f0}, |
5665 | {0x18, 0x411111f0}, | 5734 | {0x18, 0x411111f0}, |
5666 | {0x19, 0x411111f0}), | 5735 | {0x19, 0x411111f0}, |
5736 | {0x1e, 0x411111f0}), | ||
5737 | SND_HDA_PIN_QUIRK(0x10ec0293, 0x1028, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE, | ||
5738 | ALC292_STANDARD_PINS, | ||
5739 | {0x12, 0x40000000}, | ||
5740 | {0x13, 0x90a60140}, | ||
5741 | {0x16, 0x21014020}, | ||
5742 | {0x18, 0x411111f0}, | ||
5743 | {0x19, 0x21a19030}, | ||
5744 | {0x1e, 0x411111ff}), | ||
5667 | SND_HDA_PIN_QUIRK(0x10ec0298, 0x1028, "Dell", ALC298_FIXUP_DELL1_MIC_NO_PRESENCE, | 5745 | SND_HDA_PIN_QUIRK(0x10ec0298, 0x1028, "Dell", ALC298_FIXUP_DELL1_MIC_NO_PRESENCE, |
5668 | ALC298_STANDARD_PINS, | 5746 | ALC298_STANDARD_PINS, |
5669 | {0x12, 0x90a60130}, | 5747 | {0x12, 0x90a60130}, |