Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ALSA: hda: Glenfly: add HD Audio PCI IDs and HDMI Codec Vendor IDs.

Add a set of HD Audio PCI IDS, and the HDMI codec vendor IDs for
Glenfly Gpus.

- In default_bdl_pos_adj, set bdl to 128 as Glenfly Gpus have hardware
limitation, need to increase hdac interrupt interval.
- In azx_first_init, enable polling mode for Glenfly Gpu. When the codec
complete the command, it sends interrupt and writes response entries to
memory, howerver, the write requests sometimes are not actually
synchronized to memory when driver handle hdac interrupt on Glenfly Gpus.
If the RIRB status is not updated in the interrupt handler,
azx_rirb_get_response keeps trying to recevie a response from rirb until
1s timeout. Enabling polling mode for Glenfly Gpu can fix the issue.
- In patch_gf_hdmi, set Glenlfy Gpu Codec's no_sticky_stream as it need
driver to do actual clean-ups for the linked codec when switch from one
codec to another.

Signed-off-by: jasontao <jasontao@glenfly.com>
Signed-off-by: Reaper Li <reaperlioc@glenfly.com>
Link: https://lore.kernel.org/r/20230426013059.4329-1-reaperlioc@glenfly.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>

authored by

jasontao and committed by
Takashi Iwai
c51e4310 baa6584a

+43
+21
sound/pci/hda/hda_intel.c
··· 227 227 AZX_DRIVER_ATI, 228 228 AZX_DRIVER_ATIHDMI, 229 229 AZX_DRIVER_ATIHDMI_NS, 230 + AZX_DRIVER_GFHDMI, 230 231 AZX_DRIVER_VIA, 231 232 AZX_DRIVER_SIS, 232 233 AZX_DRIVER_ULI, ··· 350 349 [AZX_DRIVER_ATI] = "HDA ATI SB", 351 350 [AZX_DRIVER_ATIHDMI] = "HDA ATI HDMI", 352 351 [AZX_DRIVER_ATIHDMI_NS] = "HDA ATI HDMI", 352 + [AZX_DRIVER_GFHDMI] = "HDA GF HDMI", 353 353 [AZX_DRIVER_VIA] = "HDA VIA VT82xx", 354 354 [AZX_DRIVER_SIS] = "HDA SIS966", 355 355 [AZX_DRIVER_ULI] = "HDA ULI M5461", ··· 1745 1743 } 1746 1744 1747 1745 switch (chip->driver_type) { 1746 + /* 1747 + * increase the bdl size for Glenfly Gpus for hardware 1748 + * limitation on hdac interrupt interval 1749 + */ 1750 + case AZX_DRIVER_GFHDMI: 1751 + return 128; 1748 1752 case AZX_DRIVER_ICH: 1749 1753 case AZX_DRIVER_PCH: 1750 1754 return 1; ··· 1866 1858 pci_write_config_dword(pci, PCI_BASE_ADDRESS_1, 0); 1867 1859 } 1868 1860 #endif 1861 + /* 1862 + * Fix response write request not synced to memory when handle 1863 + * hdac interrupt on Glenfly Gpus 1864 + */ 1865 + if (chip->driver_type == AZX_DRIVER_GFHDMI) 1866 + bus->polling_mode = 1; 1869 1867 1870 1868 err = pcim_iomap_regions(pci, 1 << 0, "ICH HD audio"); 1871 1869 if (err < 0) ··· 1973 1959 chip->playback_streams = ATIHDMI_NUM_PLAYBACK; 1974 1960 chip->capture_streams = ATIHDMI_NUM_CAPTURE; 1975 1961 break; 1962 + case AZX_DRIVER_GFHDMI: 1976 1963 case AZX_DRIVER_GENERIC: 1977 1964 default: 1978 1965 chip->playback_streams = ICH6_NUM_PLAYBACK; ··· 2742 2727 { PCI_DEVICE(0x1002, 0xab38), 2743 2728 .driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS | 2744 2729 AZX_DCAPS_PM_RUNTIME }, 2730 + /* GLENFLY */ 2731 + { PCI_DEVICE(0x6766, PCI_ANY_ID), 2732 + .class = PCI_CLASS_MULTIMEDIA_HD_AUDIO << 8, 2733 + .class_mask = 0xffffff, 2734 + .driver_data = AZX_DRIVER_GFHDMI | AZX_DCAPS_POSFIX_LPIB | 2735 + AZX_DCAPS_NO_MSI | AZX_DCAPS_NO_64BIT }, 2745 2736 /* VIA VT8251/VT8237A */ 2746 2737 { PCI_DEVICE(0x1106, 0x3288), .driver_data = AZX_DRIVER_VIA }, 2747 2738 /* VIA GFX VT7122/VX900 */
+22
sound/pci/hda/patch_hdmi.c
··· 4474 4474 return patch_simple_hdmi(codec, VIAHDMI_CVT_NID, VIAHDMI_PIN_NID); 4475 4475 } 4476 4476 4477 + static int patch_gf_hdmi(struct hda_codec *codec) 4478 + { 4479 + int err; 4480 + 4481 + err = patch_generic_hdmi(codec); 4482 + if (err) 4483 + return err; 4484 + 4485 + /* 4486 + * Glenfly GPUs have two codecs, stream switches from one codec to 4487 + * another, need to do actual clean-ups in codec_cleanup_stream 4488 + */ 4489 + codec->no_sticky_stream = 1; 4490 + return 0; 4491 + } 4492 + 4477 4493 /* 4478 4494 * patch entries 4479 4495 */ ··· 4580 4564 HDA_CODEC_ENTRY(0x10de00a0, "GPU a0 HDMI/DP", patch_nvhdmi), 4581 4565 HDA_CODEC_ENTRY(0x10de8001, "MCP73 HDMI", patch_nvhdmi_2ch), 4582 4566 HDA_CODEC_ENTRY(0x10de8067, "MCP67/68 HDMI", patch_nvhdmi_2ch), 4567 + HDA_CODEC_ENTRY(0x67663d82, "Arise 82 HDMI/DP", patch_gf_hdmi), 4568 + HDA_CODEC_ENTRY(0x67663d83, "Arise 83 HDMI/DP", patch_gf_hdmi), 4569 + HDA_CODEC_ENTRY(0x67663d84, "Arise 84 HDMI/DP", patch_gf_hdmi), 4570 + HDA_CODEC_ENTRY(0x67663d85, "Arise 85 HDMI/DP", patch_gf_hdmi), 4571 + HDA_CODEC_ENTRY(0x67663d86, "Arise 86 HDMI/DP", patch_gf_hdmi), 4572 + HDA_CODEC_ENTRY(0x67663d87, "Arise 87 HDMI/DP", patch_gf_hdmi), 4583 4573 HDA_CODEC_ENTRY(0x11069f80, "VX900 HDMI/DP", patch_via_hdmi), 4584 4574 HDA_CODEC_ENTRY(0x11069f81, "VX900 HDMI/DP", patch_via_hdmi), 4585 4575 HDA_CODEC_ENTRY(0x11069f84, "VX11 HDMI/DP", patch_generic_hdmi),