# # Jack controls: # "Speaker - Output Jack" # "Headphone - Output Jack" # "IEC958 In - Output Jack" # "Headset - Input Jack" # "Mic - Input Jack" # "Line - Input Jack" # Define { SpeakerMixer "PCM" SpeakerMindex "0" SpeakerJack "Speaker - Output Jack" SpeakerPCM "0" HeadphonesName "Front Headphones" HeadphonesMixer "PCM" HeadphonesMindex "1" HeadphonesJack "Headphone - Output Jack" HeadphonesPCM "1" Mic1Name "Microphone" Mic1Mixer "Mic" Mic1Mindex "0" Mic1Jack "Mic - Input Jack" Mic1PCM "2" Mic2Name "" Mic2Mixer "" Mic2Mindex "0" Mic2Jack "" Mic2PCM "" Line1Name "Line Input" Line1Mixer "Line" Line1Mindex "0" Line1Jack "Line - Input Jack" Line1PCM "1" HeadsetName "" HeadsetMixer "" HeadsetMindex "" HeadsetJack "" HeadsetPCM "" SpdifName "S/PDIF Output" SpdifPCM "3" SpdifMixer "PCM" SpdifMindex "2" } If.speaker_ctl { Condition { Type ControlExists Control "name='Speaker Playback Switch'" } True.Define.SpeakerMixer "Speaker" } If.front_hp_ctl { Condition { Type ControlExists Control "name='Front Headphone Playback Switch'" } True.Define { HeadphonesMixer "Front Headphone" HeadphonesMindex "0" } } If.spdif_ctl { Condition { Type ControlExists Control "name='IEC958 Playback Switch'" } True.Define { SpdifMixer "IEC958" SpdifMindex "0" } } If.headset_ctl { Condition { Type ControlExists Control "name='Headset Capture Switch'" } True.Define { HeadsetName "Headset" HeadsetMixer "Headset" HeadsetMindex "0" HeadsetJack "Headset - Input Jack" HeadsetPCM "1" } } If.spdif_dev2 { Condition { Type RegexMatch String "${CardComponents}" Regex "USB(0b05:(1996|1a5[23c])|0db0:1feb)" } True.Define { SpdifName "S/PDIF Output" SpdifPCM "2" } False.If.spdif_nodev { Condition { Type String Empty "$${find-device:type=pcm,stream=playback,field=subname,regex='Audio #3'}" } True.Define.SpdifName "" } } If.gigabyte-aorus-ultra { Condition { Type RegexMatch String "${CardComponents}" Regex "USB(0414:a014)" } True.Define { Mic1Name "Front Microphone" Mic1PCM "0" Mic2Name "Rear Microphone" Mic2Mixer "Mic" Mic2Mindex "1" Mic2Jack "name='Mic - Input Jack',index=1" Mic2PCM "1" Line1Name "" } } If.asus-rog-usb { Condition { Type RegexMatch String "${CardComponents}" Regex "USB(0b05:1996)" } True.Define { Mic1Name "Front Microphone" Mic2Name "Microphone" Mic2Mixer "Analog In" Mic2Jack "Analog In - Input Jack" Mic2PCM "0" } } If.asrock-taichi { Condition { Type RegexMatch String "${CardComponents}" Regex "USB(26ce:0a0[68b])" } True.Define { Line1Name "" Mic1Name "Rear Input" Mic1PCM "0" Mic2Name "Front Microphone" Mic2Mixer "Mic" Mic2Jack "Front Mic - Input Jack" Mic2PCM "1" } } If.wrx80-sage { Condition { Type RegexMatch String "${CardComponents}" Regex "USB(0b05:1984)" } True.Define { Mic2Name "Front Microphone" Mic2Mixer "Analog In" Mic2Jack "Analog In - Input Jack" Mic2PCM "0" } } If.msi-meg-unify { Condition { Type RegexMatch String "${CardComponents}" Regex "USB(0db0:82c7)" } True.Define { HeadphonesName "" } } If.asus-rog-strix { Condition { Type RegexMatch String "${CardComponents}" Regex "USB(0b05:1999)" } True.Define { Line1PCM "3" HeadphonesName "" } } If.nvidia-dgx-station { Condition { Type RegexMatch String "${CardComponents}" Regex "USB(0955:cf0a)" } True.Define { HeadphonesName "Front Line Out" Mic1Name "Front Microphone" Mic1Mindex "1" Mic1Jack "name='Mic - Input Jack',index=1" Mic2Name "Rear Microphone" Mic2Mixer "Mic" Mic2Jack "Mic - Input Jack" Mic2PCM "0" Line1Name "Rear Line Input" SpdifName "" } } SectionVerb { EnableSequence [ disdevall "" ] Value.TQ "HiFi" } SectionDevice."Speaker" { Comment "Speakers" EnableSequence [ cset "name='${var:SpeakerMixer} Playback Switch',index=${var:SpeakerMindex} on" ] DisableSequence [ cset "name='${var:SpeakerMixer} Playback Switch',index=${var:SpeakerMindex} off" ] Value { PlaybackChannels 2 PlaybackPriority 200 PlaybackPCM "hw:${CardId},${var:SpeakerPCM}" JackControl "${var:SpeakerJack}" PlaybackMixerElem "${var:SpeakerMixer},${var:SpeakerMindex}" } Variant."HiFi 5+1".Value.PlaybackChannels 6 Variant."HiFi 7+1".Value.PlaybackChannels 8 } If.headphones { Condition { Type String Empty "${var:HeadphonesName}" } False.SectionDevice."Headphones" { Comment "${var:HeadphonesName}" EnableSequence [ cset "name='${var:HeadphonesMixer} Playback Switch',index=${var:HeadphonesMindex} on" ] DisableSequence [ cset "name='${var:HeadphonesMixer} Playback Switch',index=${var:HeadphonesMindex} off" ] Value { PlaybackPriority 300 PlaybackPCM "hw:${CardId},${var:HeadphonesPCM}" JackControl "${var:HeadphonesJack}" PlaybackMixerElem "${var:HeadphonesMixer},${var:HeadphonesMindex}" } } } If.spdif { Condition { Type String Empty "${var:SpdifName}" } False.SectionDevice."SPDIF" { Comment "${var:SpdifName}" EnableSequence [ cset "name='${var:SpdifMixer} Playback Switch',index=${var:SpdifMindex} on" ] DisableSequence [ cset "name='${var:SpdifMixer} Playback Switch',index=${var:SpdifMindex} off" ] Value { PlaybackPriority 100 PlaybackPCM "hw:${CardId},${var:SpdifPCM}" PlaybackMixerElem "${var:SpdifMixer},${var:SpdifMindex}" } } } If.line1 { Condition { Type String Empty "${var:Line1Name}" } False.SectionDevice."Line1" { Comment "${var:Line1Name}" EnableSequence [ cset "name='${var:Line1Mixer} Capture Switch',index=${var:Line1Mindex} on" ] DisableSequence [ cset "name='${var:Line1Mixer} Capture Switch',index=${var:Line1Mindex} off" ] Value { CapturePriority 100 CapturePCM "hw:${CardId},${var:Line1PCM}" JackControl "${var:Line1Jack}" CaptureMixerElem "${var:Line1Mixer},${var:Line1Mindex}" } } } If.mic1 { Condition { Type String Empty "${var:Mic1Name}" } False.SectionDevice."Mic1" { Comment "${var:Mic1Name}" EnableSequence [ cset "name='${var:Mic1Mixer} Capture Switch',index=${var:Mic1Mindex} on" ] DisableSequence [ cset "name='${var:Mic1Mixer} Capture Switch',index=${var:Mic1Mindex} off" ] Value { CapturePriority 300 CapturePCM "hw:${CardId},${var:Mic1PCM}" JackControl "${var:Mic1Jack}" CaptureMixerElem "${var:Mic1Mixer},${var:Mic1Mindex}" } } } If.mic2 { Condition { Type String Empty "${var:Mic2Name}" } False.SectionDevice."Mic2" { Comment "${var:Mic2Name}" EnableSequence [ cset "name='${var:Mic2Mixer} Capture Switch',index=${var:Mic2Mindex} on" ] DisableSequence [ cset "name='${var:Mic2Mixer} Capture Switch',index=${var:Mic2Mindex} off" ] Value { CapturePriority 400 CapturePCM "hw:${CardId},${var:Mic2PCM}" JackControl "${var:Mic2Jack}" CaptureMixerElem "${var:Mic2Mixer},${var:Mic2Mindex}" } } } If.headset { Condition { Type String Empty "${var:HeadsetName}" } False.SectionDevice."Headset" { Comment "${var:HeadsetName}" EnableSequence [ cset "name='${var:HeadsetMixer} Capture Switch',index=${var:HeadsetMindex} on" ] DisableSequence [ cset "name='${var:HeadsetMixer} Capture Switch',index=${var:HeadsetMindex} off" ] Value { CapturePriority 500 CapturePCM "hw:${CardId},${var:HeadsetPCM}" JackControl "${var:HeadsetJack}" CaptureMixerElem "${var:HeadsetMixer},${var:HeadsetMindex}" } } }