]> git.alsa-project.org Git - alsa-ucm-conf.git/commitdiff
USB-Audio: use macros in the base file
authorJaroslav Kysela <perex@perex.cz>
Mon, 26 Jan 2026 19:04:55 +0000 (20:04 +0100)
committerJaroslav Kysela <perex@perex.cz>
Mon, 26 Jan 2026 19:08:23 +0000 (20:08 +0100)
Reduce the file length and increase readability.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
ucm2/USB-Audio/USB-Audio.conf

index 1e66deabe7ccbbe534bf9a2425bd67c8e522b179..c879afa7c3518aa11ea216f462f27ba77102bd3f 100644 (file)
@@ -20,254 +20,142 @@ If.env1 {
        False.Define.SplitPCMPeriodTime "${env:UCM_USB_PERIOD_TIME}"
 }
 
-#
-# device specific configuration block
-#
-
-If.linked {
-       Condition {
-               Type RegexMatch
-               String "${CardComponents}"
-               # Aorus Master Front Headphone 0414:a000
-               Regex "USB0414:a000"
-       }
-       True.Define.ProfileName "../common/linked"
-}
-
-If.realtek-alc1220-vb {
-
-       Condition {
-               Type RegexMatch
-               String "${CardComponents}"
-               # 0414:a002 Gigabyte TRX40 Aorus Pro WiFi
-               # 0414:a00d Gigabyte TRX40 Aorus Pro WiFi Rev 1.2
-               # 0b05:1917 ASUS ROG Strix
-               # 0b05:1918 ASUS PRIME TRX40 PRO-S
-               # 0db0:0d64 MSI TRX40 Creator
-               # 0db0:543d MSI TRX40
-               # 26ce:0a01 Asrock TRX40 Creator
-               Regex "USB((0414:a00[2d])|(0b05:191[78])|(0db0:(0d64|543d))|(26ce:0a01))"
-       }
-       True.Define.ProfileName "Realtek/ALC1220-VB-Desktop"
-}
-
-If.realtek-alc4080 {
-
-       Condition {
-               Type RegexMatch
-               String "${CardComponents}"
-               # 0414:a00e Gigabyte Z590 Aorus Pro AX
-               # 0414:a010 Gigabyte Z590 Vision G Intel
-               # 0414:a011 Gigabyte Z690 AORUS ULTRA
-               # 0414:a012 Gigabyte Z690 AERO G DDR4
-               # 0414:a014 Gigabyte Z690I AORUS ULTRA DDR4
-               # 0b05:1984 ASUS Pro WS WRX80E-SAGE SE WIFI
-               # 0b05:1996 ASUS on multiple boards (including ASUS ROG Maximus XIII)
-               # 0b05:1999 ASUS ROG Strix Z590-A Gaming WiFi
-               # 0b05:19ac ASUS ROG Maximus Z490/Z590 XIII Hero
-               # 0b05:1a16 ASUS ROG Strix B660-F Gaming WiFi
-               # 0b05:1a20 ASUS ROG STRIX Z690-I Gaming Wifi
-               # 0b05:1a27 ALC4082 on ASUS ROG Maximus Z690 Hero
-               # 0b05:1a52 ASUS ROG Strix X670E-F & Z790-E Gaming Wifi
-               # 0b05:1a53 ALC4082 on ASUS ROG Crosshair X670E Extreme
-               # 0b05:1a5c ASUS ROG Strix B650E-I Gaming WiFi
-               # 0b05:1a7a ASUS ROG Strix X670E-I Gaming WiFi
-               # 0b05:1a97 ASUS ROG Maximus Z790 Apex Encore
-               # 0b05:1af1 ASUS ROG Strix Z790-A Gaming Wifi II
-               # 0b05:1b7c ASUS ROG Crosshair X870E Hero
-               # 0b05:1b9b ASUS ROG STRIX X870E-E GAMING WIFI
-               # 0b05:1be1 ASUS ROG Strix B850-I Gaming WiFi
-               # 0db0:005a MSI MPG Z690 CARBON WIFI
-               # 0db0:0b58 MSI MPG X870E CARBON WIFI
-               # 0db0:124b MSI MEG Z690 ACE
-               # 0db0:151f MSI X570S EDGE MAX WIFI
-               # 0db0:1feb MSI Edge Wifi Z690
-               # 0db0:3130 MSI PRO X670-P WIFI
-               # 0db0:36e7 MSI MAG B650I Edge WiFi
-               # 0db0:419c MSI MPG X570S Carbon Max Wifi
-               # 0db0:422d MSI Mag B650 Tomahawk Wifi
-               # 0db0:4240 MSI MAG Z590 Tomahawk Wifi
-               # 0db0:488c MSI MEG Z790 Ace
-               # 0db0:4c84 MSI MPG X870I EDGE TI EVO WIFI
-               # 0db0:543d MSI TRX40 Pro 10G
-               # 0db0:62a4 MSI MPG Z790I Edge WiFi
-               # 0db0:6c09 MSI MPG Z790 Carbon Wifi
-               # 0db0:6cc9 MSI MPG Z590 Gaming Plus
-               # 0db0:70d3 MSI MPG B650 Carbon Wifi
-               # 0db0:7696 MSI MAG B650M Mortar Wifi
-               # 0db0:82c7 MSI MEG Z690I Unify
-               # 0db0:8af7 MSI MPG Z590 Gaming Force
-               # 0db0:961e MSI MEG X670E ACE
-               # 0db0:9e6d MSI PRO B650-A WIFI
-               # 0db0:a073 MSI MAG X570S Torpedo Max
-               # 0db0:a228 MSI MPG Z590M GAMING EDGE WIFI
-               # 0db0:a47c MSI MEG X570S Ace Max
-               # 0db0:a74b MSI MPG Z790 Edge Wifi
-               # 0db0:b202 MSI MAG Z690 Tomahawk Wifi
-               # 0db0:cc78 MSI MAG B850M Mortar Wifi
-               # 0db0:cd0e MSI X870 Tomahawk
-               # 0db0:d1d7 MSI PRO Z790-A WIFI
-               # 0db0:d4fa MSI MPG B850I Edge TI Wifi
-               # 0db0:d6e7 MSI MPG X670E Carbon Wifi
-               # 0db0:e1f8 MSI MEG X670E Godlike
-               # 26ce:0a06 ASRock X670E/Z790 Taichi
-               # 26ce:0a08 ASRock Z790 PG-ITX/TB4, X870 Steel Legend
-               # 26ce:0a0b ASRock X870E Taichi
-               Regex "USB((0414:a0(0e|1[0124]))|(0b05:(19(84|9[69]|ac)|1a(16|2[07]|5[23c]|7a|97|f1)|1b(7c|9b|e1)))|(0db0:(005a|0b58|124b|151f|1feb|3130|36e7|4(19c|22d|240|88c|c84)|543d|62a4|6c[0c]9|70d3|7696|82c7|8af7|961e|9e6d|a(073|228|47c|74b)|b202|c(c78|d0e)|d(1d7|4fa|6e7)|e1f8))|(26ce:0a0[68b]))"
-       }
-       True.Define.ProfileName "Realtek/ALC4080"
-}
-
-If.hp_only {
-       Condition {
-               Type String
-               Haystack "${CardComponents}"
-               Needle "USB152a:8750"
-       }
-       True.Define.ProfileName "Common/HeadphonesOnly"
-}
-
-If.hp-tb-dock {
-       Condition {
-               Type RegexMatch
-               String "${CardComponents}"
-               Regex "USB03f0:0269"
-       }
-       True.Define.ProfileName "HP/Thunderbolt-Dock-Audio-Headset"
-}
-
-If.hyperx-solocast {
+DefineMacro.StringMatch.If.m {
        Condition {
                Type String
                Haystack "${CardComponents}"
-               Needle "USB03f0:0b8b"
+               Needle "USB${var:__Id}"
        }
-       True.Define.ProfileName "HyperX/SoloCast"
-}
-
-If.gigabyte-aorus-main {
-       Condition {
-               Type String
-               Haystack "${CardComponents}"
-               Needle "USB0414:a001"
-       }
-       True.Define.ProfileName "Gigabyte/Aorus-Master-Main-Audio"
-}
-
-If.steinberg-ur22c {
-       Condition {
-               Type String
-               Haystack "${CardComponents}"
-               Needle "USB0499:172f"
-       }
-       True.Define.ProfileName "Steinberg/UR22C"
-}
-
-If.steinberg-ur22mkii {
-       Condition {
-               Type String
-               Haystack "${CardComponents}"
-               Needle "USB0499:170f"
-       }
-       True.Define.ProfileName "Steinberg/UR22mkII"
-}
-
-If.steinberg-ur24c {
-       Condition {
-               Type String
-               Haystack "${CardComponents}"
-               Needle "USB0499:174d"
-       }
-       True.Define.ProfileName "Steinberg/UR24C"
-}
-
-If.steinberg-ur44 {
-       Condition {
-               Type RegexMatch
-               String "${CardComponents}"
-               Regex "USB0499:17((00)|(30)|(04))"
-       }
-       True.Define.ProfileName "Steinberg/UR44"
-}
-
-If.sony-inzone-h9-h7 {
-       Condition {
-               Type String
-               Haystack "${CardComponents}"
-               Needle "USB054c:0e53"
+       True.Define {
+               ProfileName "${var:__Profile}"
+               MixerRemap "${var:-__Remap}"
        }
-       True.Define.ProfileName "Sony/Inzone-H9-H7"
 }
 
-If.sony-dualsense-ps5 {
+DefineMacro.RegexMatch.If.m {
        Condition {
                Type RegexMatch
                String "${CardComponents}"
-               # 054c:0ce6 Sony Corp. DualSense wireless controller (PS5)
-               # 054c:0df2 Sony Corp. DualSense Edge wireless controller (PS5)
-               Regex "USB054c:0((ce6)|(df2))"
+               Regex "USB${var:__Id}"
        }
-       True.Define.ProfileName "Sony/DualSense-PS5"
-}
-
-If.boss-katana {
-       Condition {
-               Type String
-               Haystack "${CardComponents}"
-               # 0582:01d8 BOSS Katana HEAD MkII
-               # Might work for other models
-               # and generations from the same series
-               Needle "USB0582:01d8"
-       }
-       True.Define.ProfileName "BOSS/Katana"
-}
-
-If.roland-quadcapture {
-       Condition {
-               Type String
-               Haystack "${CardComponents}"
-               Needle "USB0582:012f"
-       }
-       True.Define.ProfileName "Roland/Quad-Capture"
-}
-
-If.roland-bridgecast {
-       Condition {
-               Type String
-               Haystack "${CardComponents}"
-               Needle "USB0582:02b7"
-       }
-       True.Define.ProfileName "Roland/BridgeCast"
-}
-
-If.roland-bridgecastv2 {
-       Condition {
-               Type RegexMatch
-               String "${CardComponents}"
-               # 0582:031e Bridge Cast Firmware V2
-               # 0582:030d Bridge Cast One
-               Regex "USB0582:03((1e)|(0d))"
+       True.Define {
+               ProfileName "${var:__Profile}"
+               MixerRemap "${var:-__Remap}"
        }
-       True.Define.ProfileName "Roland/BridgeCastV2"
 }
 
-If.roland-bridgecastx {
-       Condition {
-               Type String
-               Haystack "${CardComponents}"
-               Needle "USB0582:0321"
-       }
-       True.Define.ProfileName "Roland/BridgeCastXV2"
-}
+#
+# device specific configuration block
+#
 
-If.tascam-m12 {
-       Condition {
-               Type String
-               Haystack "${CardComponents}"
-               Needle "USB0644:805f"
-       }
-       True.Define.ProfileName "TASCAM/Model12"
-}
+# Aorus Master Front Headphone 0414:a000
+Macro.linked.RegexMatch "Id='0414:a000' Profile='../common/linked'"
+
+# Realtek ALC1220 block
+Macro.alc1220.RegexMatch {
+       # 0414:a002 Gigabyte TRX40 Aorus Pro WiFi
+       # 0414:a00d Gigabyte TRX40 Aorus Pro WiFi Rev 1.2
+       # 0b05:1917 ASUS ROG Strix
+       # 0b05:1918 ASUS PRIME TRX40 PRO-S
+       # 0db0:0d64 MSI TRX40 Creator
+       # 0db0:543d MSI TRX40
+       # 26ce:0a01 Asrock TRX40 Creator
+       Id "((0414:a00[2d])|(0b05:191[78])|(0db0:(0d64|543d))|(26ce:0a01))"
+       Profile "Realtek/ALC1220-VB-Desktop"
+}
+
+# Realtek ALC4080 block
+Macro.alc4080.RegexMatch {
+       # 0414:a00e Gigabyte Z590 Aorus Pro AX
+       # 0414:a010 Gigabyte Z590 Vision G Intel
+       # 0414:a011 Gigabyte Z690 AORUS ULTRA
+       # 0414:a012 Gigabyte Z690 AERO G DDR4
+       # 0414:a014 Gigabyte Z690I AORUS ULTRA DDR4
+       # 0b05:1984 ASUS Pro WS WRX80E-SAGE SE WIFI
+       # 0b05:1996 ASUS on multiple boards (including ASUS ROG Maximus XIII)
+       # 0b05:1999 ASUS ROG Strix Z590-A Gaming WiFi
+       # 0b05:19ac ASUS ROG Maximus Z490/Z590 XIII Hero
+       # 0b05:1a16 ASUS ROG Strix B660-F Gaming WiFi
+       # 0b05:1a20 ASUS ROG STRIX Z690-I Gaming Wifi
+       # 0b05:1a27 ALC4082 on ASUS ROG Maximus Z690 Hero
+       # 0b05:1a52 ASUS ROG Strix X670E-F & Z790-E Gaming Wifi
+       # 0b05:1a53 ALC4082 on ASUS ROG Crosshair X670E Extreme
+       # 0b05:1a5c ASUS ROG Strix B650E-I Gaming WiFi
+       # 0b05:1a7a ASUS ROG Strix X670E-I Gaming WiFi
+       # 0b05:1a97 ASUS ROG Maximus Z790 Apex Encore
+       # 0b05:1af1 ASUS ROG Strix Z790-A Gaming Wifi II
+       # 0b05:1b7c ASUS ROG Crosshair X870E Hero
+       # 0b05:1b9b ASUS ROG STRIX X870E-E GAMING WIFI
+       # 0b05:1be1 ASUS ROG Strix B850-I Gaming WiFi
+       # 0db0:005a MSI MPG Z690 CARBON WIFI
+       # 0db0:0b58 MSI MPG X870E CARBON WIFI
+       # 0db0:124b MSI MEG Z690 ACE
+       # 0db0:151f MSI X570S EDGE MAX WIFI
+       # 0db0:1feb MSI Edge Wifi Z690
+       # 0db0:3130 MSI PRO X670-P WIFI
+       # 0db0:36e7 MSI MAG B650I Edge WiFi
+       # 0db0:419c MSI MPG X570S Carbon Max Wifi
+       # 0db0:422d MSI Mag B650 Tomahawk Wifi
+       # 0db0:4240 MSI MAG Z590 Tomahawk Wifi
+       # 0db0:488c MSI MEG Z790 Ace
+       # 0db0:4c84 MSI MPG X870I EDGE TI EVO WIFI
+       # 0db0:543d MSI TRX40 Pro 10G
+       # 0db0:62a4 MSI MPG Z790I Edge WiFi
+       # 0db0:6c09 MSI MPG Z790 Carbon Wifi
+       # 0db0:6cc9 MSI MPG Z590 Gaming Plus
+       # 0db0:70d3 MSI MPG B650 Carbon Wifi
+       # 0db0:7696 MSI MAG B650M Mortar Wifi
+       # 0db0:82c7 MSI MEG Z690I Unify
+       # 0db0:8af7 MSI MPG Z590 Gaming Force
+       # 0db0:961e MSI MEG X670E ACE
+       # 0db0:9e6d MSI PRO B650-A WIFI
+       # 0db0:a073 MSI MAG X570S Torpedo Max
+       # 0db0:a228 MSI MPG Z590M GAMING EDGE WIFI
+       # 0db0:a47c MSI MEG X570S Ace Max
+       # 0db0:a74b MSI MPG Z790 Edge Wifi
+       # 0db0:b202 MSI MAG Z690 Tomahawk Wifi
+       # 0db0:cc78 MSI MAG B850M Mortar Wifi
+       # 0db0:cd0e MSI X870 Tomahawk
+       # 0db0:d1d7 MSI PRO Z790-A WIFI
+       # 0db0:d4fa MSI MPG B850I Edge TI Wifi
+       # 0db0:d6e7 MSI MPG X670E Carbon Wifi
+       # 0db0:e1f8 MSI MEG X670E Godlike
+       # 26ce:0a06 ASRock X670E/Z790 Taichi
+       # 26ce:0a08 ASRock Z790 PG-ITX/TB4, X870 Steel Legend
+       # 26ce:0a0b ASRock X870E Taichi
+       Id "((0414:a0(0e|1[0124]))|(0b05:(19(84|9[69]|ac)|1a(16|2[07]|5[23c]|7a|97|f1)|1b(7c|9b|e1)))|(0db0:(005a|0b58|124b|151f|1feb|3130|36e7|4(19c|22d|240|88c|c84)|543d|62a4|6c[0c]9|70d3|7696|82c7|8af7|961e|9e6d|a(073|228|47c|74b)|b202|c(c78|d0e)|d(1d7|4fa|6e7)|e1f8))|(26ce:0a0[68b]))"
+       Profile "Realtek/ALC4080"
+}
+
+
+Macro.hp-only.StringMatch              "Id='152a:8750' Profile='Common/HeadphonesOnly'"
+Macro.hp-tb-dock.StringMatch           "Id='03f0:0269' Profile='HP/Thunderbolt-Dock-Audio-Headset'"
+Macro.hyperx-solocast.StringMatch      "Id='03f0:0b8b' Profile='HyperX/SoloCast'"
+Macro.gigabyte-aorus-main.StringMatch  "Id='0414:a001' Profile='Gigabyte/Aorus-Master-Main-Audio'"
+Macro.steinberg-ur22c.StringMatch      "Id='0499:172f' Profile='Steinberg/UR22C'"
+Macro.steinberg-ur22mkii.StringMatch   "Id='0499:170f' Profile='Steinberg/UR22mkII'"
+Macro.steinberg-ur24c.StringMatch      "Id='0499:174d' Profile='Steinberg/UR24C'"
+Macro.steinberg-ur44.RegexMatch                "Id='0499:17((00)|(30)|(04))' Profile='Steinberg/UR44'"
+Macro.sony-inzone-h9-h7.StringMatch    "Id='054c:0e53' Profile='Sony/Inzone-H9-H7'"
+
+# 054c:0ce6 Sony Corp. DualSense wireless controller (PS5)
+# 054c:0df2 Sony Corp. DualSense Edge wireless controller (PS5)
+Macro.sony-dualsense-ps5.RegexMatch    "Id='054c:0((ce6)|(df2))' Profile='Sony/DualSense-PS5'"
+
+# 0582:01d8 BOSS Katana HEAD MkII
+# Might work for other models
+# and generations from the same series
+Macro.boss-katana.StringMatch          "Id='0582:01d8' Profile='BOSS/Katana'"
+
+Macro.roland-quadcapture.StringMatch   "Id='0582:012f' Profile='Roland/Quad-Capture'"
+Macro.roland-bridgecast.StringMatch    "Id='0582:02b7' Profile='Roland/BridgeCast'"
+
+# 0582:031e Bridge Cast Firmware V2
+# 0582:030d Bridge Cast One
+Macro.roland-bridgecastv2.RegexMatch   "Id='0582:03((1e)|(0d))' Profile='Roland/BridgeCastV2'"
+
+Macro.roland-bridgecastx.StringMatch   "Id='0582:0321' Profile='Roland/BridgeCastXV2'"
+Macro.tascam-m12.StringMatch           "Id='0644:805f' Profile='TASCAM/Model12'"
 
 If.motu-m246 {
        Condition {
@@ -294,14 +182,7 @@ If.motu-m246 {
        }
 }
 
-If.motu-ultralite-mk5 {
-       Condition {
-               Type String
-               Haystack "${CardComponents}"
-               Needle "USB07fd:000c"
-       }
-       True.Define.ProfileName "MOTU/UltraLite-mk5"
-}
+Macro.motu-ultralite-mk5.StringMatch   "Id='07fd:000c' Profile='MOTU/UltraLite-mk5'"
 
 If.motu-D828 {
        Condition {
@@ -319,329 +200,62 @@ If.motu-D828 {
        }
 }
 
-If.dell-wd15 {
-       Condition {
-               Type RegexMatch
-               String "${CardComponents}"
-               Regex "USB0bda:40(14|2e)"
-       }
-       True.Define.ProfileName "Dell/WD15-Dock"
-}
-
-If.dell-desktop-front {
-       Condition {
-               Type String
-               Haystack "${CardComponents}"
-               Needle "USB0bda:4c54"
-       }
-       True.Define.ProfileName "Dell/Desktop-Front"
-}
-
-If.dell-desktop-rear {
-       Condition {
-               Type String
-               Haystack "${CardComponents}"
-               Needle "USB0bda:4c55"
-       }
-       True.Define.ProfileName "Dell/Desktop-Rear"
-}
-
-If.mbox3 {
-       Condition {
-               Type String
-               Haystack "${CardComponents}"
-               Needle "USB0dba:5000"
-       }
-       True.Define.ProfileName "Digidesign/Digidesign-Mbox-3"
-}
-
-If.goxlr {
-       Condition {
-               Type RegexMatch
-               String "${CardComponents}"
-               Regex "USB1220:8fe[04]"
-       }
-       True.Define.ProfileName "GoXLR/GoXLR"
-}
-
-If.focusrite-scarlett-2i {
-       Condition {
-               Type RegexMatch
-               String "${CardComponents}"
-               # 8006 2i2 1st Gen
-               # 800a 2i4 1st Gen
-               # 801c Solo 1st Gen
-               # 8200 2i4 2nd Gen
-               # 8202 2i2 2nd Gen
-               # 8205 Solo 2nd Gen
-               # 8210 2i2 3rd Gen
-               # 8211 Solo 3rd Gen
-               # 8218 Solo 4th Gen
-               # 8219 2i2 4th Gen
-               Regex "USB1235:8(0(0[6a]|1c)|2(0[025]|1[0189]))"
-       }
-       True.Define.ProfileName "Focusrite/Scarlett-2i"
-}
-
-If.focusrite-scarlett-18i20 {
-       Condition {
-               Type RegexMatch
-               String "${CardComponents}"
-               # 800C 1st Gen
-               # 8201 2nd Gen
-               # 8215 3rd Gen
-               # 821d 4th Gen
-               Regex "USB1235:8(00C|2(01|1(5|d)))"
-       }
-       True.Define.ProfileName "Focusrite/Scarlett-18i20"
-}
-
-If.focusrite-vocaster-one {
-       Condition {
-               Type RegexMatch
-               String "${CardComponents}"
-               Regex "USB1235:8216"
-       }
-       True.Define.ProfileName "Focusrite/Vocaster-One"
-}
-
-If.focusrite-vocaster-two {
-       Condition {
-               Type RegexMatch
-               String "${CardComponents}"
-               Regex "USB1235:8217"
-       }
-       True.Define.ProfileName "Focusrite/Vocaster-Two"
-}
-
-If.behringer-ulm200d {
-       Condition {
-               Type String
-               Haystack "${CardComponents}"
-               Needle "USB1397:00f1"
-       }
-       True.Define.ProfileName "Behringer/ULM200D"
-}
-
-If.behringer-umc202hd {
-       Condition {
-               Type String
-               Haystack "${CardComponents}"
-               Needle "USB1397:0507"
-       }
-       True.Define {
-               ProfileName "Behringer/UMC202HD"
-               MixerRemap yes
-       }
-}
-
-If.behringer-umc204hd {
-       Condition {
-               Type String
-               Haystack "${CardComponents}"
-               Needle "USB1397:0508"
-       }
-       True.Define {
-               ProfileName "Behringer/UMC204HD"
-               MixerRemap yes
-       }
-}
-
-If.behringer-umc404hd {
-       Condition {
-               Type String
-               Haystack "${CardComponents}"
-               Needle "USB1397:0509"
-       }
-       True.Define {
-               ProfileName "Behringer/UMC404HD"
-               MixerRemap yes
-       }
-}
-
-If.behringer-Flow8-Streaming {
-       Condition {
-       Type String
-       Haystack "${CardComponents}"
-               Needle "USB1397:050d"
-       }
-       True.Define.ProfileName "Behringer/Flow8-Streaming"
-}
-
-If.behringer-Flow8-Recording {
-       Condition {
-       Type String
-       Haystack "${CardComponents}"
-               Needle "USB1397:050c"
-       }
-       True.Define.ProfileName "Behringer/Flow8-Recording"
-}
-
-If.Rane-SL-1 {
-       Condition {
-               Type String
-               Haystack "${CardComponents}"
-               Needle "USB13e5:0001"
-       }
-       True.Define.ProfileName "Rane/SL-1"
-}
-
-If.lenovo-p620-rear {
-       Condition {
-               Type String
-               Haystack "${CardComponents}"
-               Needle "USB17aa:1046"
-       }
-       True.Define.ProfileName "Lenovo/ThinkStation-P620-Rear"
-}
-
-If.lenovo-p620-main {
-       Condition {
-               Type String
-               Haystack "${CardComponents}"
-               Needle "USB17aa:104d"
-       }
-       True.Define.ProfileName "Lenovo/ThinkStation-P620-Main"
-}
-
-If.kontrolz1 {
-       Condition {
-               Type String
-               Haystack "${CardComponents}"
-               Needle "USB17cc:1210"
-       }
-       True.Define.ProfileName "NativeInstruments/Traktor-Kontrol-Z1"
-}
-
-If.minifuse4 {
-       Condition {
-               Type String
-               Haystack "${CardComponents}"
-               Needle "USB1c75:af70"
-       }
-       True.Define.ProfileName "Arturia/Minifuse-4"
-}
-
-If.minifuse12 {
-       Condition {
-               Type RegexMatch
-               String "${CardComponents}"
-               Regex "USB1c75:af[89]0"
-       }
-       True.Define.ProfileName "Arturia/Minifuse-12"
-}
-
-If.revelator {
-       Condition {
-               Type String
-               Haystack "${CardComponents}"
-               Needle "USB194f:0424"
-       }
-       True.Define.ProfileName "Presonus/Revelator-IO-44"
-}
-
-If.zedi10 {
-       Condition {
-               Type String
-               Haystack "${CardComponents}"
-               Needle "USB22f0:0016"
-       }
-       True.Define.ProfileName "AllenAndHeath/Zedi10"
-}
-
-If.id4-0003 {
-       Condition {
-               Type String
-               Haystack "${CardComponents}"
-               Needle "USB2708:0003"
-       }
-       True.Define.ProfileName "Audient/Audient-iD4-0003"
-}
-
-If.id4-0009 {
-       Condition {
-               Type String
-               Haystack "${CardComponents}"
-               Needle "USB2708:0009"
-       }
-       True.Define.ProfileName "Audient/Audient-iD4-0009"
-}
-
-If.id14-0008 {
-       Condition {
-               Type String
-               Haystack "${CardComponents}"
-               Needle "USB2708:0008"
-       }
-       True.Define.ProfileName "Audient/Audient-iD14-0008"
-}
-
-If.fireface-ucx {
-       Condition {
-               Type String
-               Haystack "${CardComponents}"
-               Needle "USB0424:3fb9"
-       }
-       True.Define.ProfileName "RME/Fireface-UCX"
-}
-
-If.fireface-ucx-ii {
-       Condition {
-               Type String
-               Haystack "${CardComponents}"
-               Needle "USB2a39:3fd9"
-       }
-       True.Define.ProfileName "RME/Fireface-UCX-II"
-}
-
-If.ua-volt2 {
-       Condition {
-               Type String
-               Haystack "${CardComponents}"
-               Needle "USB2b5a:0021"
-       }
-       True.Define.ProfileName "UniversalAudio/Volt2"
-}
-
-If.teufel-cage-pro {
-       Condition {
-               Type String
-               Haystack "${CardComponents}"
-               Needle "USB2cc2:0033"
-       }
-       True.Define.ProfileName "Teufel/CAGE-PRO"
-}
-
-If.ssl2 {
-       Condition {
-               Type RegexMatch
-               String "${CardComponents}"
-               # 0001 MK I
-               # 0002 Plus MK I
-               # 0008 MK II
-               # 0009 Plus MK II
-               Regex "USB31e9:000[1289]"
-       }
-       True.Define.ProfileName "SolidStateLabs/SSL2"
-}
-
-If.beacn-mic {
-       Condition {
-               Type String
-               Haystack "${CardComponents}"
-               Needle "USB33ae:0001"
-       }
-       True.Define.ProfileName "Beacn/Beacn-Mic"
-}
-
-If.beacn-studio {
-       Condition {
-               Type RegexMatch
-               String "${CardComponents}"
-               Regex "USB33ae:[04]003"
-       }
-       True.Define.ProfileName "Beacn/Beacn-Studio"
-}
+Macro.dell-wd15.RegexMatch             "Id='0bda:40(14|2e)' Profile='Dell/WD15-Dock'"
+Macro.dell-desktop-front.StringMatch   "Id='0bda:4c54' Profile='Dell/Desktop-Front'"
+Macro.dell-desktop-rear.StringMatch    "Id='0bda:4c55' Profile='Dell/Desktop-Rear'"
+Macro.mbox3.StringMatch                        "Id='0dba:5000' Profile='Digidesign/Digidesign-Mbox-3'"
+Macro.goxlr.RegexMatch                 "Id='1220:8fe[04]' Profile='GoXLR/GoXLR'"
+
+# 8006 2i2 1st Gen
+# 800a 2i4 1st Gen
+# 801c Solo 1st Gen
+# 8200 2i4 2nd Gen
+# 8202 2i2 2nd Gen
+# 8205 Solo 2nd Gen
+# 8210 2i2 3rd Gen
+# 8211 Solo 3rd Gen
+# 8218 Solo 4th Gen
+# 8219 2i2 4th Gen
+Macro.focusrite-scarlett-2i.RegexMatch "Id='1235:8(0(0[6a]|1c)|2(0[025]|1[0189]))' Profile='Focusrite/Scarlett-2i'"
+
+# 800C 1st Gen
+# 8201 2nd Gen
+# 8215 3rd Gen
+# 821d 4th Gen
+Macro.focusrite-scarlett-18i20.RegexMatch "Id='1235:8(00C|2(01|1(5|d)))' Profile='Focusrite/Scarlett-18i20'"
+
+Macro.focusrite-vocaster-one.RegexMatch        "Id='1235:8216' Profile='Focusrite/Vocaster-One'"
+Macro.focusrite-vocaster-two.RegexMatch        "Id='1235:8217' Profile='Focusrite/Vocaster-Two'"
+Macro.behringer-ulm200d.StringMatch    "Id='1397:00f1' Profile='Behringer/ULM200D'"
+Macro.behringer-umc202hd.StringMatch   "Id='1397:0507' Profile='Behringer/UMC202HD' Remap='yes'"
+Macro.behringer-umc204hd.StringMatch   "Id='1397:0508' Profile='Behringer/UMC204HD' Remap='yes'"
+Macro.behringer-umc404hd.StringMatch   "Id='1397:0509' Profile='Behringer/UMC404HD' Remap='yes'"
+Macro.behringer-Flow8-Streaming.StringMatch "Id='1397:050d' Profile='Behringer/Flow8-Streaming'"
+Macro.behringer-Flow8-Recording.StringMatch "Id='1397:050c' Profile='Behringer/Flow8-Recording'"
+Macro.Rane-SL-1.StringMatch            "Id='13e5:0001' Profile='Rane/SL-1'"
+Macro.lenovo-p620-rear.StringMatch     "Id='17aa:1046' Profile='Lenovo/ThinkStation-P620-Rear'"
+Macro.lenovo-p620-main.StringMatch     "Id='17aa:104d' Profile='Lenovo/ThinkStation-P620-Main'"
+Macro.kontrolz1.StringMatch            "Id='17cc:1210' Profile='NativeInstruments/Traktor-Kontrol-Z1'"
+Macro.minifuse4.StringMatch            "Id='1c75:af70' Profile='Arturia/Minifuse-4'"
+Macro.minifuse12.RegexMatch            "Id='1c75:af[89]0' Profile='Arturia/Minifuse-12'"
+Macro.revelator.StringMatch            "Id='194f:0424' Profile='Presonus/Revelator-IO-44'"
+Macro.zedi10.StringMatch               "Id='22f0:0016' Profile='AllenAndHeath/Zedi10'"
+Macro.id4-0003.StringMatch             "Id='2708:0003' Profile='Audient/Audient-iD4-0003'"
+Macro.id4-0009.StringMatch             "Id='2708:0009' Profile='Audient/Audient-iD4-0009'"
+Macro.id14-0008.StringMatch            "Id='2708:0008' Profile='Audient/Audient-iD14-0008'"
+Macro.fireface-ucx.StringMatch         "Id='0424:3fb9' Profile='RME/Fireface-UCX'"
+Macro.fireface-ucx-ii.StringMatch      "Id='2a39:3fd9' Profile='RME/Fireface-UCX-II'"
+Macro.ua-volt2.StringMatch             "Id='2b5a:0021' Profile='UniversalAudio/Volt2'"
+Macro.teufel-cage-pro.StringMatch      "Id='2cc2:0033' Profile='Teufel/CAGE-PRO'"
+
+# 0001 MK I
+# 0002 Plus MK I
+# 0008 MK II
+# 0009 Plus MK II
+Macro.ssl2.RegexMatch                  "Id='31e9:000[1289]' Profile='SolidStateLabs/SSL2'"
+
+Macro.beacn-mic.StringMatch            "Id='33ae:0001' Profile='Beacn/Beacn-Mic'"
+Macro.beacn-studio.RegexMatch          "Id='33ae:[04]003' Profile='Beacn/Beacn-Studio'"
 
 #
 # end of device specific configuration block