Bug 214101

Summary: [ALC294] [ASUS G713QY] no sound via internal speakers due to PCI ids clash
Product: Drivers Reporter: velemas
Component: Sound(ALSA)Assignee: Jaroslav Kysela (perex)
Status: RESOLVED CODE_FIX    
Severity: normal CC: tiwai
Priority: P1    
Hardware: x86-64   
OS: Linux   
Kernel Version: 5.13.10 Subsystem:
Regression: No Bisected commit-id:
Attachments: alsa-info.sh output
Test fix patch
Test fix patch v2

Description velemas 2021-08-18 16:28:55 UTC
Asus ROG Strix G17 Advantage Edition (G713QY) has ALC294 Realtek with SubVendor/SubDevice 1043:103f id clash with pci quirk for ASUS TX300 in sound/pci/hda/patch_realtek.c:

SND_PCI_QUIRK(0x1043, 0x103f, "ASUS TX300", ALC282_FIXUP_ASUS_TX300)

This results in non-working internal speakers on this laptop.

hwinfo --sound output:

40: PCI 800.6: 0403 Audio device
  [Created at pci.386]
  Unique ID: S8E2.+02tHV7fQm6
  Parent ID: JZZT.e+TNXSUNut3
  SysFS ID: /devices/pci0000:00/0000:00:08.1/0000:08:00.6
  SysFS BusID: 0000:08:00.6
  Hardware Class: sound
  Device Name: "HD Audio Controller"
  Model: "AMD Family 17h (Models 10h-1fh) HD Audio Controller"
  Vendor: pci 0x1022 "AMD"
  Device: pci 0x15e3 "Family 17h (Models 10h-1fh) HD Audio Controller"
  SubVendor: pci 0x1043 "ASUSTeK Computer Inc."
  SubDevice: pci 0x103f 
  Driver: "snd_hda_intel"
  Driver Modules: "snd_hda_intel"
  Memory Range: 0xfc9c0000-0xfc9c7fff (rw,non-prefetchable)
  IRQ: 104 (486 events)
  Module Alias: "pci:v00001022d000015E3sv00001043sd0000103Fbc04sc03i00"
  Driver Info #0:
    Driver Status: snd_hda_intel is active
    Driver Activation Cmd: "modprobe snd_hda_intel"
  Config Status: cfg=new, avail=yes, need=no, active=unknown
  Attached to: #25 (PCI bridge)

Removing the quirk and re-compiling make the speakers work.
Comment 1 Takashi Iwai 2021-08-19 15:55:18 UTC
That's too bad :-<

Does it have another codec SSID?  Please check the codec proc output.
Or give alsa-info.sh output; run it with --no-upload option and attach to Bugzilla, at best as an attachment.
Comment 2 velemas 2021-08-20 09:03:02 UTC
Created attachment 298377 [details]
alsa-info.sh output
Comment 3 velemas 2021-08-20 09:04:15 UTC
It has other codecs but associated with AMD GPUs. I attached alsa-info.sh output.
Comment 4 Takashi Iwai 2021-08-20 09:42:36 UTC
Thanks.  I guess a simple fix is to just check the codec ID.  TX300 is with ALC282 while this is ALC294.

A test fix patch is below.
Comment 5 Takashi Iwai 2021-08-20 09:43:13 UTC
Created attachment 298385 [details]
Test fix patch
Comment 6 Takashi Iwai 2021-08-20 09:49:52 UTC
Scratch my previous fix; this will miss the ALC294 speaker quirk.  Will rewrite for that.
Comment 7 Takashi Iwai 2021-08-20 11:13:07 UTC
Created attachment 298389 [details]
Test fix patch v2
Comment 8 velemas 2021-08-20 11:45:02 UTC
I compiled the kernel with your patch v2. It fixes the issue. Thanks!
Comment 9 Takashi Iwai 2021-08-20 15:00:39 UTC
Good to hear.  Now the patch was submitted and will be merged to sound.git tree.
  https://lore.kernel.org/alsa-devel/20210820143214.3654-1-tiwai@suse.de/

It's not sure whether the fix will land into 5.14 final kernel, but at latest it should be included in 5.15-rc1 and backported to stable trees eventually later.