From 00175aa645c482111d096c3d8230f182a875d286 Mon Sep 17 00:00:00 2001 From: Romain Pereira Date: Tue, 9 Jun 2026 15:51:06 +0200 Subject: [PATCH] USB-Audio: add Creative Sound Blaster G8 support Fixes: https://github.com/alsa-project/alsa-ucm-conf/pull/771 Signed-off-by: Romain Pereira Signed-off-by: Jaroslav Kysela --- .../Creative/SoundBlaster-G8-HiFi.conf | 95 +++++++++++++++++++ ucm2/USB-Audio/Creative/SoundBlaster-G8.conf | 17 ++++ ucm2/USB-Audio/USB-Audio.conf | 1 + 3 files changed, 113 insertions(+) create mode 100644 ucm2/USB-Audio/Creative/SoundBlaster-G8-HiFi.conf create mode 100644 ucm2/USB-Audio/Creative/SoundBlaster-G8.conf diff --git a/ucm2/USB-Audio/Creative/SoundBlaster-G8-HiFi.conf b/ucm2/USB-Audio/Creative/SoundBlaster-G8-HiFi.conf new file mode 100644 index 0000000..dacbbc6 --- /dev/null +++ b/ucm2/USB-Audio/Creative/SoundBlaster-G8-HiFi.conf @@ -0,0 +1,95 @@ +SectionDevice."Headphones" { + Comment "Headphones / Line Out" + + Value { + PlaybackPriority 200 + PlaybackPCM "hw:${CardId},0" + PlaybackMixerElem "Speaker" + PlaybackVolume "Speaker Playback Volume" + PlaybackSwitch "Speaker Playback Switch" + } +} + +SectionDevice."Mic" { + Comment "Microphone" + ConflictingDevice [ "Line In" "SPDIF In" "Direct 1" ] + + EnableSequence [ + cset "name='PCM Capture Source' 'External Mic'" + cset "name='External Mic Capture Switch' on" + ] + DisableSequence [ + cset "name='External Mic Capture Switch' off" + ] + + Value { + CapturePriority 500 + CapturePCM "hw:${CardId},0" + CaptureMixerElem "External Mic" + CaptureVolume "External Mic Capture Volume" + CaptureSwitch "External Mic Capture Switch" + } +} + +SectionDevice."Line In" { + Comment "Line In (Analog)" + ConflictingDevice [ "Mic" "SPDIF In" "Direct 1" ] + + EnableSequence [ + cset "name='PCM Capture Source' 'Line In'" + cset "name='Line In Capture Switch' on" + ] + DisableSequence [ + cset "name='Line In Capture Switch' off" + ] + + Value { + CapturePriority 400 + CapturePCM "hw:${CardId},0" + CaptureMixerElem "Line In" + CaptureVolume "Line In Capture Volume" + CaptureSwitch "Line In Capture Switch" + } +} + +SectionDevice."SPDIF In" { + Comment "S/PDIF Input" + ConflictingDevice [ "Mic" "Line In" "Direct 1" ] + + EnableSequence [ + cset "name='PCM Capture Source' 'S/PDIF In'" + cset "name='S/PDIF In Capture Switch' on" + ] + DisableSequence [ + cset "name='S/PDIF In Capture Switch' off" + ] + + Value { + CapturePriority 300 + CapturePCM "hw:${CardId},0" + CaptureMixerElem "S/PDIF In" + CaptureVolume "S/PDIF In Capture Volume" + CaptureSwitch "S/PDIF In Capture Switch" + } +} + +SectionDevice."Direct 1" { + Comment "Loopback" + ConflictingDevice [ "Mic" "Line In" "SPDIF In" ] + + EnableSequence [ + cset "name='PCM Capture Source' 'What U Hear'" + cset "name='What U Hear Capture Switch' on" + ] + DisableSequence [ + cset "name='What U Hear Capture Switch' off" + ] + + Value { + CapturePriority 200 + CapturePCM "hw:${CardId},0" + CaptureMixerElem "What U Hear" + CaptureVolume "What U Hear Capture Volume" + CaptureSwitch "What U Hear Capture Switch" + } +} diff --git a/ucm2/USB-Audio/Creative/SoundBlaster-G8.conf b/ucm2/USB-Audio/Creative/SoundBlaster-G8.conf new file mode 100644 index 0000000..fd0b7a3 --- /dev/null +++ b/ucm2/USB-Audio/Creative/SoundBlaster-G8.conf @@ -0,0 +1,17 @@ +Comment "Creative Sound Blaster G8" + +BootSequence [ + cset "name='Speaker Playback Switch' on" + cset "name='Line In Playback Switch' off" + cset "name='S/PDIF In Playback Switch' off" + cset "name='PCM Capture Source' 'External Mic'" +] + +SectionUseCase."HiFi" { + Comment "Default" + File "/USB-Audio/Creative/SoundBlaster-G8-HiFi.conf" +} + +Include.dhw.File "/common/directm.conf" + +Macro.0.DirectUseCase { Id="Direct" PlaybackChannels=2 CaptureChannels=2 } diff --git a/ucm2/USB-Audio/USB-Audio.conf b/ucm2/USB-Audio/USB-Audio.conf index 1bab8e7..ea35792 100644 --- a/ucm2/USB-Audio/USB-Audio.conf +++ b/ucm2/USB-Audio/USB-Audio.conf @@ -138,6 +138,7 @@ 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.creative-g8.StringMatch "Id='041e:329b' Profile='Creative/SoundBlaster-G8'" 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'" -- 2.52.0