Skip to content

Commit

Permalink
USB-Audio: fix selector for Gigabyte USB ID 0414:a00d
Browse files Browse the repository at this point in the history
The USB ID 0414:a00d may identify two different USB devices
(TRX40 and Z590). Use DMI product name to select ALC4080 configuration
for Z590 boards.

Fixes: #310
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
  • Loading branch information
perexg committed Oct 30, 2023
1 parent e5f212e commit eb97aca
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions ucm2/USB-Audio/USB-Audio.conf
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,21 @@ If.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))"
Regex "USB((0414:a002)|(0b05:191[78])|(0db0:(0d64|543d))|(26ce:0a01))"
}
True.Define.ProfileName "Realtek/ALC1220-VB-Desktop"
}

If.realtek-alc4080 {

Condition {
Type RegexMatch
String "${CardComponents}"
Expand Down Expand Up @@ -86,6 +83,25 @@ If.realtek-alc4080 {
True.Define.ProfileName "Realtek/ALC4080"
}

If.realtek-gigabyte-a00d {
Condition {
Type String
Haystack "${CardComponents}"
# 0414:a00d Gigabyte TRX40 Aorus Pro WiFi Rev 1.2
# 0414:a00d Gigabyte Z590 AORUS ULTRA
Needle "USB0414:a00d"
}
True {
Condition {
Type String
Haystack "${sys:devices/virtual/dmi/id/product_name}"
Needle "Z590"
}
True.Define.ProfileName "Realtek/ALC4080"
False.Define.ProfileName "Realtek/ALC1220-VB-Desktop"
}
}

If.gigabyte-aorus-main {
Condition {
Type String
Expand Down

0 comments on commit eb97aca

Please sign in to comment.