git: 301ced3b69fb - stable/13 - snd_hdspe(4): Recognize newer firmware's PCI vendor id.

From: Ruslan Bukin <br_at_FreeBSD.org>
Date: Sun, 28 Jul 2024 20:21:03 UTC
The branch stable/13 has been updated by br:

URL: https://cgit.FreeBSD.org/src/commit/?id=301ced3b69fb162bb157043c4a8da483cfff56e7

commit 301ced3b69fb162bb157043c4a8da483cfff56e7
Author:     Florian Walpen <dev@submerge.ch>
AuthorDate: 2024-04-27 08:48:37 +0000
Commit:     Ruslan Bukin <br@FreeBSD.org>
CommitDate: 2024-07-28 20:20:04 +0000

    snd_hdspe(4): Recognize newer firmware's PCI vendor id.
    
    At least for HDSPe RayDAT cards, newer firmware comes with RME's own PCI
    vendor id instead of the Xilinx one. Other HDSPe cards are probably also
    affected. Update snd_hdspe(4) to recognize both the old Xilinx and the
    new RME vendor ids.
    
    Differential Revision:  https://reviews.freebsd.org/D44978
    MFC after: 1 day
    
    (cherry picked from commit 9718d4ab99386918f5b5c207c58289eaade20623)
---
 sys/dev/sound/pci/hdspe.c | 3 ++-
 sys/dev/sound/pci/hdspe.h | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/sys/dev/sound/pci/hdspe.c b/sys/dev/sound/pci/hdspe.c
index 7289bd3401dc..9bd7bc449c70 100644
--- a/sys/dev/sound/pci/hdspe.c
+++ b/sys/dev/sound/pci/hdspe.c
@@ -231,7 +231,8 @@ hdspe_probe(device_t dev)
 {
 	uint32_t rev;
 
-	if (pci_get_vendor(dev) == PCI_VENDOR_XILINX &&
+	if ((pci_get_vendor(dev) == PCI_VENDOR_XILINX ||
+	    pci_get_vendor(dev) == PCI_VENDOR_RME) &&
 	    pci_get_device(dev) == PCI_DEVICE_XILINX_HDSPE) {
 		rev = pci_get_revid(dev);
 		switch (rev) {
diff --git a/sys/dev/sound/pci/hdspe.h b/sys/dev/sound/pci/hdspe.h
index 7056a75a66c1..fc2af2972d1c 100644
--- a/sys/dev/sound/pci/hdspe.h
+++ b/sys/dev/sound/pci/hdspe.h
@@ -27,6 +27,7 @@
  */
 
 #define	PCI_VENDOR_XILINX		0x10ee
+#define	PCI_VENDOR_RME			0x1d18 /* Newer firmware versions. */
 #define	PCI_DEVICE_XILINX_HDSPE		0x3fc6 /* AIO, MADI, AES, RayDAT */
 #define	PCI_CLASS_REVISION		0x08
 #define	PCI_REVISION_AIO		212