From 252620a18d836172c0fc84626e636a8625722745 Mon Sep 17 00:00:00 2001 From: Forest Date: Sat, 8 Apr 2023 18:42:48 -0700 Subject: [PATCH] alsa-profiles: SB Audigy: stereo mixer paths This is a follow-up to d5390c7, where we switched to the 'PCM' mixer controls on Sound Blaster Audigy devices, since the ones we used before only work in the stereo-to-all-speakers mirroring mode. It turns out we do use that mode after all, but only in a couple of profiles. Since returning those profiles to the default mixer path yields uneven volume steps similar to #2934, we instead add a new mixer path just for that mode. --- .../paths/audigy-analog-output-mirror.conf | 56 +++++++++++++++++++ .../mixer/paths/audigy-analog-output.conf | 4 +- .../alsa/mixer/profile-sets/audigy.conf | 14 ++--- 3 files changed, 65 insertions(+), 9 deletions(-) create mode 100644 spa/plugins/alsa/mixer/paths/audigy-analog-output-mirror.conf diff --git a/spa/plugins/alsa/mixer/paths/audigy-analog-output-mirror.conf b/spa/plugins/alsa/mixer/paths/audigy-analog-output-mirror.conf new file mode 100644 index 000000000..ff6e86acb --- /dev/null +++ b/spa/plugins/alsa/mixer/paths/audigy-analog-output-mirror.conf @@ -0,0 +1,56 @@ +; Mixer path for the Sound Blaster Audigy series, which uses the EMU10K2 DSP. +; We target 'Wave' and other non-'PCM' controls as a special case for when +; the device's stereo-to-all-speakers mirroring mode is in use. (For example, +; the Analog Stereo Output profile.) +; https://docs.kernel.org/sound/cards/audigy-mixer.html +; +; See analog-output.conf.common for an explanation on the directives + +[General] +priority = 99 +description-key = analog-output + +[Element Master] +switch = mute +volume = merge +override-map.1 = all +override-map.2 = all-left,all-right + +[Element Wave] +volume = merge +override-map.1 = all +override-map.2 = all-left,all-right + +# The following elements also exist in analog-output.conf. We list them here +# instead of including that file, for ideal positioning of the Wave element: +# Placing Wave below the Master element prevents Master from reaching its +# loudest until the user raises the unified volume control to maximum. +# (This should reduce the chance of a surprise speaker blow-out.) +# Placing Wave above the per-channel elements yields even steps at low volume. + +[Element Front] +volume = merge +override-map.1 = all-front +override-map.2 = front-left,front-right + +[Element Surround] +volume = merge +override-map.1 = all-rear +override-map.2 = rear-left,rear-right + +[Element Side] +volume = merge +override-map.1 = all-side +override-map.2 = side-left,side-right + +[Element Center] +volume = merge +override-map.1 = all-center +override-map.2 = all-center,all-center + +[Element LFE] +volume = merge +override-map.1 = lfe +override-map.2 = lfe,lfe + +.include analog-output.conf.common diff --git a/spa/plugins/alsa/mixer/paths/audigy-analog-output.conf b/spa/plugins/alsa/mixer/paths/audigy-analog-output.conf index add4fee92..373613241 100644 --- a/spa/plugins/alsa/mixer/paths/audigy-analog-output.conf +++ b/spa/plugins/alsa/mixer/paths/audigy-analog-output.conf @@ -1,7 +1,7 @@ ; Mixer path for the Sound Blaster Audigy series, which uses the EMU10K2 DSP. ; We target 'PCM Front' and similarly named controls instead of 'Front' et al. -; because the latter have no effect on volume, apparently intended for a -; stereo-to-all-speakers mirroring mode that we do not use. +; because the latter affect volume only in the device's stereo-to-all-speakers +; mirroring mode, which is not used by most profiles. ; https://docs.kernel.org/sound/cards/audigy-mixer.html ; ; See analog-output.conf.common for an explanation on the directives diff --git a/spa/plugins/alsa/mixer/profile-sets/audigy.conf b/spa/plugins/alsa/mixer/profile-sets/audigy.conf index 5d07736f7..18e3ee247 100644 --- a/spa/plugins/alsa/mixer/profile-sets/audigy.conf +++ b/spa/plugins/alsa/mixer/profile-sets/audigy.conf @@ -15,11 +15,11 @@ ; Creative Sound Blaster Audigy product line ; -; These are just copies of the mappings we find in default.conf, with -; an analog mixer path targeting the Audigy driver's PCM outputs, and the -; small change of making analog-stereo and analog-mono non-fallback mappings. -; This is needed because these cards only support duplex profiles with mono -; inputs, and in the default configuration, with stereo being a fallback +; These are copies of the mappings we find in default.conf, but with analog +; mixer paths targeting appropriate Audigy driver controls, and the small +; change of making analog-stereo and analog-mono non-fallback mappings. +; The latter is needed because these cards only support duplex profiles with +; mono inputs, and in the default configuration, with stereo being a fallback ; mapping, the mono mapping is never tried. ; ; See default.conf for an explanation on the directives used here. @@ -31,7 +31,7 @@ auto-profiles = yes [Mapping analog-stereo] device-strings = hw:%f channel-map = front-left,front-right -paths-output = audigy-analog-output analog-output-lineout analog-output-speaker analog-output-headphones analog-output-headphones-2 +paths-output = audigy-analog-output-mirror analog-output-lineout analog-output-speaker analog-output-headphones analog-output-headphones-2 paths-input = analog-input-front-mic analog-input-rear-mic analog-input-internal-mic analog-input-dock-mic analog-input analog-input-mic analog-input-linein analog-input-aux analog-input-video analog-input-tvtuner analog-input-fm analog-input-mic-line analog-input-headphone-mic analog-input-headset-mic priority = 1 @@ -39,7 +39,7 @@ priority = 1 [Mapping analog-mono] device-strings = hw:%f channel-map = mono -paths-output = audigy-analog-output analog-output-lineout analog-output-speaker analog-output-headphones analog-output-headphones-2 analog-output-mono +paths-output = audigy-analog-output-mirror analog-output-lineout analog-output-speaker analog-output-headphones analog-output-headphones-2 analog-output-mono paths-input = analog-input-front-mic analog-input-rear-mic analog-input-internal-mic analog-input-dock-mic analog-input analog-input-mic analog-input-linein analog-input-aux analog-input-video analog-input-tvtuner analog-input-fm analog-input-mic-line analog-input-headset-mic priority = 1