From 075cb979fee775dfbc4f99b09f0d590366f2c8ca Mon Sep 17 00:00:00 2001 From: 13r0ck Date: Mon, 15 Aug 2022 20:18:30 -0600 Subject: [PATCH] ALSA: hda - Improv 3.5mm hotplug on ROG strix B550 When plugging of unplugging an audio jack on this motherbaord, sometimes the audio jacks would stop appearing to pipewire/pulseaudio. Interestingly `cat`-ing out the file `/proc/asound//codec#0`, and or restarting pipewire fixes the issue temporarily. This PR improves the current functionality by making hotplug with one 3.5mm jack work, it still breaks if hotplug is between multiple jacks though. --- sound/pci/hda/hda_intel.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index a77165bd92a983..513b9765a97783 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c @@ -305,11 +305,16 @@ enum { (AZX_DCAPS_PRESET_ATI_HDMI | AZX_DCAPS_SNOOP_OFF) /* quirks for AMD SB */ -#define AZX_DCAPS_PRESET_AMD_SB \ - (AZX_DCAPS_NO_TCSEL | AZX_DCAPS_AMD_WORKAROUND |\ - AZX_DCAPS_SNOOP_TYPE(ATI) | AZX_DCAPS_PM_RUNTIME |\ +#define AZX_DCAPS_PRESET_AMD_SB \ + (AZX_DCAPS_NO_TCSEL | AZX_DCAPS_AMD_WORKAROUND | \ + AZX_DCAPS_SNOOP_TYPE(ATI) | AZX_DCAPS_PM_RUNTIME | \ AZX_DCAPS_RETRY_PROBE) +/* quirks for AMD X570 & ROG Strix B550 & co */ +#define AZX_DCAPS_PRESET_AMD_SB_ALT \ + (AZX_DCAPS_NO_TCSEL | AZX_DCAPS_AMD_WORKAROUND | \ + AZX_DCAPS_SNOOP_TYPE(ATI) | AZX_DCAPS_RETRY_PROBE) + /* quirks for Nvidia */ #define AZX_DCAPS_PRESET_NVIDIA \ (AZX_DCAPS_NO_MSI | AZX_DCAPS_CORBRP_SELF_CLEAR |\ @@ -2604,7 +2609,7 @@ static const struct pci_device_id azx_ids[] = { .driver_data = AZX_DRIVER_GENERIC | AZX_DCAPS_PRESET_AMD_SB }, /* AMD, X570 & co */ { PCI_DEVICE(0x1022, 0x1487), - .driver_data = AZX_DRIVER_GENERIC | AZX_DCAPS_PRESET_AMD_SB }, + .driver_data = AZX_DRIVER_GENERIC | AZX_DCAPS_PRESET_AMD_SB_ALT }, /* AMD Stoney */ { PCI_DEVICE(0x1022, 0x157a), .driver_data = AZX_DRIVER_GENERIC | AZX_DCAPS_PRESET_ATI_SB |