Changeset 703 for GPL/trunk/alsa-kernel/pci/hda
- Timestamp:
- Sep 26, 2021, 6:18:40 PM (4 years ago)
- Location:
- GPL/trunk
- Files:
-
- 11 edited
-
. (modified) (1 prop)
-
alsa-kernel/pci/hda/hda_bind.c (modified) (1 diff)
-
alsa-kernel/pci/hda/hda_codec.c (modified) (5 diffs)
-
alsa-kernel/pci/hda/hda_generic.c (modified) (3 diffs)
-
alsa-kernel/pci/hda/hda_intel.c (modified) (5 diffs)
-
alsa-kernel/pci/hda/hda_local.h (modified) (1 diff)
-
alsa-kernel/pci/hda/hda_tegra.c (modified) (1 diff)
-
alsa-kernel/pci/hda/patch_ca0132.c (modified) (1 diff)
-
alsa-kernel/pci/hda/patch_hdmi.c (modified) (1 diff)
-
alsa-kernel/pci/hda/patch_realtek.c (modified) (16 diffs)
-
alsa-kernel/pci/hda/patch_via.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
GPL/trunk
- Property svn:mergeinfo changed
/GPL/branches/uniaud32-next merged: 696-702
- Property svn:mergeinfo changed
-
GPL/trunk/alsa-kernel/pci/hda/hda_bind.c
r689 r703 170 170 struct hda_codec *codec = dev_to_hda_codec(dev); 171 171 172 if (!pm_runtime_suspended(dev) && codec->patch_ops.reboot_notify) 173 codec->patch_ops.reboot_notify(codec); 172 if (!pm_runtime_suspended(dev)) { 173 if (codec->patch_ops.reboot_notify) 174 codec->patch_ops.reboot_notify(codec); 175 snd_hda_codec_display_power(codec, false); 176 } 174 177 } 175 178 -
GPL/trunk/alsa-kernel/pci/hda/hda_codec.c
r695 r703 809 809 810 810 /* enable/disable display power per codec */ 811 static voidcodec_display_power(struct hda_codec *codec, bool enable)811 void snd_hda_codec_display_power(struct hda_codec *codec, bool enable) 812 812 { 813 813 if (codec->display_power_control) … … 821 821 return; 822 822 if (device_is_registered(hda_codec_dev(codec))) { 823 codec_display_power(codec, true);823 snd_hda_codec_display_power(codec, true); 824 824 pm_runtime_enable(hda_codec_dev(codec)); 825 825 /* it was powered up in snd_hda_codec_new(), now all done */ … … 847 847 if (codec->core.type == HDA_DEV_LEGACY) 848 848 snd_hdac_device_unregister(&codec->core); 849 codec_display_power(codec, false);849 snd_hda_codec_display_power(codec, false); 850 850 851 851 /* … … 2909 2909 (state & AC_PWRST_CLK_STOP_OK))) 2910 2910 snd_hdac_codec_link_down(&codec->core); 2911 codec_display_power(codec, false);2911 snd_hda_codec_display_power(codec, false); 2912 2912 return 0; 2913 2913 } … … 2921 2921 return 0; 2922 2922 2923 codec_display_power(codec, true);2923 snd_hda_codec_display_power(codec, true); 2924 2924 snd_hdac_codec_link_up(&codec->core); 2925 2925 hda_call_codec_resume(codec); -
GPL/trunk/alsa-kernel/pci/hda/hda_generic.c
r695 r703 1437 1437 } 1438 1438 if (!path) { 1439 dac = dacs[i] = 0;1439 dacs[i] = 0; 1440 1440 badness += bad->no_dac; 1441 1441 } else { … … 3472 3472 const struct hda_input_mux *imux; 3473 3473 struct nid_path *path; 3474 int i, adc_idx, err = 0;3474 int i, adc_idx, ret, err = 0; 3475 3475 3476 3476 imux = &spec->input_mux; … … 3482 3482 continue; 3483 3483 kcontrol->private_value = path->ctls[type]; 3484 err = func(kcontrol, ucontrol); 3485 if (err < 0) 3484 ret = func(kcontrol, ucontrol); 3485 if (ret < 0) { 3486 err = ret; 3486 3487 break; 3488 } 3489 if (ret > 0) 3490 err = 1; 3487 3491 } 3488 3492 mutex_unlock(&codec->control_mutex); -
GPL/trunk/alsa-kernel/pci/hda/hda_intel.c
r695 r703 909 909 } 910 910 911 static void __azx_shutdown_chip(struct azx *chip, bool skip_link_reset) 912 { 913 azx_stop_chip(chip); 914 if (!skip_link_reset) 915 azx_enter_link_reset(chip); 916 azx_clear_irq_pending(chip); 917 display_power(chip, false); 918 } 919 911 920 #ifdef CONFIG_PM 912 921 static DEFINE_MUTEX(card_list_lock); 913 922 static LIST_HEAD(card_list); 923 924 static void azx_shutdown_chip(struct azx *chip) 925 { 926 __azx_shutdown_chip(chip, false); 927 } 914 928 915 929 static void azx_add_card_list(struct azx *chip) … … 970 984 } 971 985 972 static void __azx_runtime_suspend(struct azx *chip)973 {974 azx_stop_chip(chip);975 azx_enter_link_reset(chip);976 azx_clear_irq_pending(chip);977 display_power(chip, false);978 }979 980 986 static void __azx_runtime_resume(struct azx *chip) 981 987 { … … 1056 1062 chip = card->private_data; 1057 1063 bus = azx_bus(chip); 1058 __azx_runtime_suspend(chip);1064 azx_shutdown_chip(chip); 1059 1065 if (bus->irq >= 0) { 1060 1066 free_irq(bus->irq, chip); … … 1136 1142 azx_writew(chip, WAKEEN, azx_readw(chip, WAKEEN) | STATESTS_INT_MASK); 1137 1143 1138 __azx_runtime_suspend(chip);1144 azx_shutdown_chip(chip); 1139 1145 trace_azx_runtime_suspend(chip); 1140 1146 return 0; … … 2435 2441 chip = card->private_data; 2436 2442 if (chip && chip->running) 2437 azx_stop_chip(chip);2443 __azx_shutdown_chip(chip, true); 2438 2444 } 2439 2445 -
GPL/trunk/alsa-kernel/pci/hda/hda_local.h
r695 r703 724 724 void snd_print_channel_allocation(int spk_alloc, char *buf, int buflen); 725 725 726 void snd_hda_codec_display_power(struct hda_codec *codec, bool enable); 727 726 728 /* 727 729 */ -
GPL/trunk/alsa-kernel/pci/hda/hda_tegra.c
r695 r703 236 236 struct hda_tegra *hda = container_of(chip, struct hda_tegra, chip); 237 237 struct hdac_bus *bus = azx_bus(chip); 238 struct device *dev = hda->dev;239 238 struct resource *res; 240 239 241 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 242 hda->regs = devm_ioremap_resource(dev, res); 240 hda->regs = devm_platform_get_and_ioremap_resource(pdev, 0, &res); 243 241 if (IS_ERR(hda->regs)) 244 242 return PTR_ERR(hda->regs); -
GPL/trunk/alsa-kernel/pci/hda/patch_ca0132.c
r695 r703 7697 7697 static void ca0132_alt_start_dsp_audio_streams(struct hda_codec *codec) 7698 7698 { 7699 const unsigned int dsp_dma_stream_ids[] = { 0x0c, 0x03, 0x04 };7699 static const unsigned int dsp_dma_stream_ids[] = { 0x0c, 0x03, 0x04 }; 7700 7700 struct ca0132_spec *spec = codec->spec; 7701 7701 unsigned int i, tmp; -
GPL/trunk/alsa-kernel/pci/hda/patch_hdmi.c
r695 r703 1949 1949 SND_PCI_QUIRK(0x103c, 0x871a, "HP", 1), 1950 1950 SND_PCI_QUIRK(0x1462, 0xec94, "MS-7C94", 1), 1951 SND_PCI_QUIRK(0x8086, 0x2081, "Intel NUC 10", 1), 1951 1952 {} 1952 1953 }; -
GPL/trunk/alsa-kernel/pci/hda/patch_realtek.c
r695 r703 3697 3697 ALC269_TYPE_ALC215, 3698 3698 ALC269_TYPE_ALC225, 3699 ALC269_TYPE_ALC287, 3699 3700 ALC269_TYPE_ALC294, 3700 3701 ALC269_TYPE_ALC300, … … 3733 3734 case ALC269_TYPE_ALC215: 3734 3735 case ALC269_TYPE_ALC225: 3736 case ALC269_TYPE_ALC287: 3735 3737 case ALC269_TYPE_ALC294: 3736 3738 case ALC269_TYPE_ALC300: … … 4205 4207 } 4206 4208 4209 static void alc285_hp_init(struct hda_codec *codec) 4210 { 4211 struct alc_spec *spec = codec->spec; 4212 hda_nid_t hp_pin = alc_get_hp_pin(spec); 4213 int i, val; 4214 int coef38, coef0d, coef36; 4215 4216 alc_update_coef_idx(codec, 0x4a, 1<<15, 1<<15); /* Reset HP JD */ 4217 coef38 = alc_read_coef_idx(codec, 0x38); /* Amp control */ 4218 coef0d = alc_read_coef_idx(codec, 0x0d); /* Digital Misc control */ 4219 coef36 = alc_read_coef_idx(codec, 0x36); /* Passthrough Control */ 4220 alc_update_coef_idx(codec, 0x38, 1<<4, 0x0); 4221 alc_update_coef_idx(codec, 0x0d, 0x110, 0x0); 4222 4223 alc_update_coef_idx(codec, 0x67, 0xf000, 0x3000); 4224 4225 if (hp_pin) 4226 snd_hda_codec_write(codec, hp_pin, 0, 4227 AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_MUTE); 4228 4229 msleep(130); 4230 alc_update_coef_idx(codec, 0x36, 1<<14, 1<<14); 4231 alc_update_coef_idx(codec, 0x36, 1<<13, 0x0); 4232 4233 if (hp_pin) 4234 snd_hda_codec_write(codec, hp_pin, 0, 4235 AC_VERB_SET_PIN_WIDGET_CONTROL, 0x0); 4236 msleep(10); 4237 alc_write_coef_idx(codec, 0x67, 0x0); /* Set HP depop to manual mode */ 4238 alc_write_coefex_idx(codec, 0x58, 0x00, 0x7880); 4239 alc_write_coefex_idx(codec, 0x58, 0x0f, 0xf049); 4240 alc_update_coefex_idx(codec, 0x58, 0x03, 0x00f0, 0x00c0); 4241 4242 alc_write_coefex_idx(codec, 0x58, 0x00, 0xf888); /* HP depop procedure start */ 4243 val = alc_read_coefex_idx(codec, 0x58, 0x00); 4244 for (i = 0; i < 20 && val & 0x8000; i++) { 4245 msleep(50); 4246 val = alc_read_coefex_idx(codec, 0x58, 0x00); 4247 } /* Wait for depop procedure finish */ 4248 4249 alc_write_coefex_idx(codec, 0x58, 0x00, val); /* write back the result */ 4250 alc_update_coef_idx(codec, 0x38, 1<<4, coef38); 4251 alc_update_coef_idx(codec, 0x0d, 0x110, coef0d); 4252 alc_update_coef_idx(codec, 0x36, 3<<13, coef36); 4253 4254 msleep(50); 4255 alc_update_coef_idx(codec, 0x4a, 1<<15, 0); 4256 } 4257 4207 4258 static void alc225_init(struct hda_codec *codec) 4208 4259 { … … 4210 4261 hda_nid_t hp_pin = alc_get_hp_pin(spec); 4211 4262 bool hp1_pin_sense, hp2_pin_sense; 4263 4264 if (spec->codec_variant != ALC269_TYPE_ALC287) 4265 /* required only at boot or S3 and S4 resume time */ 4266 #ifndef TARGET_OS2 4267 if (!spec->done_hp_init || 4268 is_s3_resume(codec) || 4269 is_s4_resume(codec)) { 4270 #else 4271 if (!spec->done_hp_init ) { 4272 4273 #endif 4274 alc285_hp_init(codec); 4275 spec->done_hp_init = true; 4276 } 4212 4277 4213 4278 if (!hp_pin) … … 7289 7354 ALC623_FIXUP_LENOVO_THINKSTATION_P340, 7290 7355 ALC255_FIXUP_ACER_HEADPHONE_AND_MIC, 7356 ALC236_FIXUP_HP_LIMIT_INT_MIC_BOOST, 7291 7357 }; 7292 7358 … … 9184 9250 }, 9185 9251 #endif 9252 [ALC236_FIXUP_HP_LIMIT_INT_MIC_BOOST] = { 9253 .type = HDA_FIXUP_FUNC, 9254 .v.func = alc269_fixup_limit_int_mic_boost, 9255 .chained = true, 9256 .chain_id = ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF, 9257 }, 9186 9258 }; 9187 9259 … … 9274 9346 SND_PCI_QUIRK(0x1028, 0x0a30, "Dell", ALC236_FIXUP_DELL_AIO_HEADSET_MIC), 9275 9347 SND_PCI_QUIRK(0x1028, 0x0a58, "Dell", ALC255_FIXUP_DELL_HEADSET_MIC), 9348 SND_PCI_QUIRK(0x1028, 0x0a61, "Dell XPS 15 9510", ALC289_FIXUP_DUAL_SPK), 9276 9349 SND_PCI_QUIRK(0x1028, 0x164a, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE), 9277 9350 SND_PCI_QUIRK(0x1028, 0x164b, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE), … … 9372 9445 SND_PCI_QUIRK(0x103c, 0x87f4, "HP", ALC287_FIXUP_HP_GPIO_LED), 9373 9446 SND_PCI_QUIRK(0x103c, 0x87f5, "HP", ALC287_FIXUP_HP_GPIO_LED), 9447 SND_PCI_QUIRK(0x103c, 0x87f6, "HP Spectre x360 14", ALC245_FIXUP_HP_X360_AMP), 9374 9448 SND_PCI_QUIRK(0x103c, 0x87f7, "HP Spectre x360 14", ALC245_FIXUP_HP_X360_AMP), 9449 SND_PCI_QUIRK(0x103c, 0x8805, "HP ProBook 650 G8 Notebook PC", ALC236_FIXUP_HP_GPIO_LED), 9375 9450 SND_PCI_QUIRK(0x103c, 0x880d, "HP EliteBook 830 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED), 9376 9451 SND_PCI_QUIRK(0x103c, 0x8846, "HP EliteBook 850 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED), … … 9378 9453 SND_PCI_QUIRK(0x103c, 0x884b, "HP EliteBook 840 Aero G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED), 9379 9454 SND_PCI_QUIRK(0x103c, 0x884c, "HP EliteBook 840 G8 Notebook PC", ALC285_FIXUP_HP_GPIO_LED), 9380 SND_PCI_QUIRK(0x103c, 0x8862, "HP ProBook 445 G8 Notebook PC", ALC236_FIXUP_HP_ MUTE_LED_MICMUTE_VREF),9381 SND_PCI_QUIRK(0x103c, 0x8863, "HP ProBook 445 G8 Notebook PC", ALC236_FIXUP_HP_ MUTE_LED_MICMUTE_VREF),9455 SND_PCI_QUIRK(0x103c, 0x8862, "HP ProBook 445 G8 Notebook PC", ALC236_FIXUP_HP_LIMIT_INT_MIC_BOOST), 9456 SND_PCI_QUIRK(0x103c, 0x8863, "HP ProBook 445 G8 Notebook PC", ALC236_FIXUP_HP_LIMIT_INT_MIC_BOOST), 9382 9457 SND_PCI_QUIRK(0x103c, 0x886d, "HP ZBook Fury 17.3 Inch G8 Mobile Workstation PC", ALC285_FIXUP_HP_GPIO_AMP_INIT), 9383 9458 SND_PCI_QUIRK(0x103c, 0x8870, "HP ZBook Fury 15.6 Inch G8 Mobile Workstation PC", ALC285_FIXUP_HP_GPIO_AMP_INIT), … … 9407 9482 SND_PCI_QUIRK(0x1043, 0x1740, "ASUS UX430UA", ALC295_FIXUP_ASUS_DACS), 9408 9483 SND_PCI_QUIRK(0x1043, 0x17d1, "ASUS UX431FL", ALC294_FIXUP_ASUS_DUAL_SPK), 9484 SND_PCI_QUIRK(0x1043, 0x1662, "ASUS GV301QH", ALC294_FIXUP_ASUS_DUAL_SPK), 9409 9485 SND_PCI_QUIRK(0x1043, 0x1881, "ASUS Zephyrus S/M", ALC294_FIXUP_ASUS_GX502_PINS), 9410 9486 SND_PCI_QUIRK(0x1043, 0x18b1, "Asus MJ401TA", ALC256_FIXUP_ASUS_HEADSET_MIC), … … 9463 9539 SND_PCI_QUIRK(0x152d, 0x1082, "Quanta NL3", ALC269_FIXUP_LIFEBOOK), 9464 9540 SND_PCI_QUIRK(0x1558, 0x1323, "Clevo N130ZU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 9465 SND_PCI_QUIRK(0x1558, 0x1325, " System76 Darter Pro (darp5)", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),9541 SND_PCI_QUIRK(0x1558, 0x1325, "Clevo N15[01][CW]U", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 9466 9542 SND_PCI_QUIRK(0x1558, 0x1401, "Clevo L140[CZ]U", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 9467 9543 SND_PCI_QUIRK(0x1558, 0x1403, "Clevo N140CU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), … … 9498 9574 SND_PCI_QUIRK(0x1558, 0x8535, "Clevo NH50D[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 9499 9575 SND_PCI_QUIRK(0x1558, 0x8536, "Clevo NH79D[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 9500 SND_PCI_QUIRK(0x1558, 0x8550, " System76 Gazelle (gaze14)", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),9501 SND_PCI_QUIRK(0x1558, 0x8551, " System76 Gazelle (gaze14)", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),9502 SND_PCI_QUIRK(0x1558, 0x8560, " System76 Gazelle (gaze14)", ALC269_FIXUP_HEADSET_MIC),9503 SND_PCI_QUIRK(0x1558, 0x8561, " System76 Gazelle (gaze14)", ALC269_FIXUP_HEADSET_MIC),9504 SND_PCI_QUIRK(0x1558, 0x8562, "Clevo NH[5 |7][0-9]RZ[Q]", ALC269_FIXUP_DMIC),9576 SND_PCI_QUIRK(0x1558, 0x8550, "Clevo NH[57][0-9][ER][ACDH]Q", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 9577 SND_PCI_QUIRK(0x1558, 0x8551, "Clevo NH[57][0-9][ER][ACDH]Q", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 9578 SND_PCI_QUIRK(0x1558, 0x8560, "Clevo NH[57][0-9][ER][ACDH]Q", ALC269_FIXUP_HEADSET_MIC), 9579 SND_PCI_QUIRK(0x1558, 0x8561, "Clevo NH[57][0-9][ER][ACDH]Q", ALC269_FIXUP_HEADSET_MIC), 9580 SND_PCI_QUIRK(0x1558, 0x8562, "Clevo NH[57][0-9]RZ[Q]", ALC269_FIXUP_DMIC), 9505 9581 SND_PCI_QUIRK(0x1558, 0x8668, "Clevo NP50B[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 9506 9582 SND_PCI_QUIRK(0x1558, 0x8680, "Clevo NJ50LU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), … … 9513 9589 SND_PCI_QUIRK(0x1558, 0x961d, "Clevo N960S[CDF]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 9514 9590 SND_PCI_QUIRK(0x1558, 0x971d, "Clevo N970T[CDF]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 9515 SND_PCI_QUIRK(0x1558, 0xa500, "Clevo NL5 3RU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),9516 SND_PCI_QUIRK(0x1558, 0xa600, "Clevo NL5 XNU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE),9591 SND_PCI_QUIRK(0x1558, 0xa500, "Clevo NL5[03]RU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 9592 SND_PCI_QUIRK(0x1558, 0xa600, "Clevo NL50NU", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 9517 9593 SND_PCI_QUIRK(0x1558, 0xb018, "Clevo NP50D[BE]", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), 9518 9594 SND_PCI_QUIRK(0x1558, 0xb019, "Clevo NH77D[BE]Q", ALC293_FIXUP_SYSTEM76_MIC_NO_PRESENCE), … … 10401 10477 case 0x10ec0245: 10402 10478 case 0x10ec0285: 10403 case 0x10ec0287:10404 10479 case 0x10ec0289: 10405 10480 spec->codec_variant = ALC269_TYPE_ALC215; … … 10415 10490 spec->init_hook = alc225_init; 10416 10491 spec->gen.mixer_nid = 0; /* no loopback on ALC225, ALC295 and ALC299 */ 10492 break; 10493 case 0x10ec0287: 10494 spec->codec_variant = ALC269_TYPE_ALC287; 10495 spec->shutup = alc225_shutup; 10496 spec->init_hook = alc225_init; 10497 spec->gen.mixer_nid = 0; /* no loopback on ALC287 */ 10417 10498 break; 10418 10499 case 0x10ec0234: … … 10452 10533 snd_hda_pick_fixup(codec, alc269_fixup_models, 10453 10534 alc269_fixup_tbl, alc269_fixups); 10535 /* FIXME: both TX300 and ROG Strix G17 have the same SSID, and 10536 * the quirk breaks the latter (bko#214101). 10537 * Clear the wrong entry. 10538 */ 10539 if (codec->fixup_id == ALC282_FIXUP_ASUS_TX300 && 10540 codec->core.vendor_id == 0x10ec0294) { 10541 codec_dbg(codec, "Clear wrong fixup for ASUS ROG Strix G17\n"); 10542 codec->fixup_id = HDA_FIXUP_ID_NOT_SET; 10543 } 10544 10454 10545 snd_hda_pick_pin_fixup(codec, alc269_pin_fixup_tbl, alc269_fixups, true); 10455 10546 snd_hda_pick_pin_fixup(codec, alc269_fallback_pin_fixup_tbl, alc269_fixups, false); -
GPL/trunk/alsa-kernel/pci/hda/patch_via.c
r679 r703 1063 1063 1064 1064 static const struct snd_pci_quirk vt2002p_fixups[] = { 1065 SND_PCI_QUIRK(0x1043, 0x13f7, "Asus B23E", VIA_FIXUP_POWER_SAVE), 1065 1066 SND_PCI_QUIRK(0x1043, 0x1487, "Asus G75", VIA_FIXUP_ASUS_G75), 1066 1067 SND_PCI_QUIRK(0x1043, 0x8532, "Asus X202E", VIA_FIXUP_INTMIC_BOOST),
Note:
See TracChangeset
for help on using the changeset viewer.
