mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	alsa-profiles: use SB Audigy PCM mixer controls
Creative Labs Sound Blaster Audigy cards (snd_emu10k1 driver) expose mixer controls named 'PCM Front', 'PCM Rear', etc. in addition to the more common 'Front', 'Rear', etc. The latter seem to be intended for a stereo-to-all-speakers mirroring mode that we do not use, and have no effect when we adjust them. https://docs.kernel.org/sound/cards/audigy-mixer.html We therefore define a custom mixer path for Audigy devices, using the PCM mixer controls. This has been tested on an Audigy 5/Rx. Based on a brief look at the ALSA driver, I think all Audigy devices (vendor 0x1102, device 0x0004 or 0x0008) have the same PCM controls, making this change probably safe for our existing Audigy udev rules. Relevant kernel files: sound/pci/emu10k1/emu10k1_main.c sound/pci/emu10k1/emufx.c include/sound/emu10k1.h Fixes #2934
This commit is contained in:
		
							parent
							
								
									f64c21ed81
								
							
						
					
					
						commit
						d5390c7199
					
				
					 2 changed files with 65 additions and 10 deletions
				
			
		
							
								
								
									
										55
									
								
								spa/plugins/alsa/mixer/paths/analog-output-audigy.conf
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										55
									
								
								spa/plugins/alsa/mixer/paths/analog-output-audigy.conf
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,55 @@
 | 
				
			||||||
 | 
					; 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.
 | 
				
			||||||
 | 
					; 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 PCM Front]
 | 
				
			||||||
 | 
					switch = mute
 | 
				
			||||||
 | 
					volume = merge
 | 
				
			||||||
 | 
					override-map.1 = all-front
 | 
				
			||||||
 | 
					override-map.2 = front-left,front-right
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[Element PCM Rear]
 | 
				
			||||||
 | 
					switch = mute
 | 
				
			||||||
 | 
					volume = merge
 | 
				
			||||||
 | 
					override-map.1 = all-rear
 | 
				
			||||||
 | 
					override-map.2 = rear-left,rear-right
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[Element PCM Surround]
 | 
				
			||||||
 | 
					switch = mute
 | 
				
			||||||
 | 
					volume = merge
 | 
				
			||||||
 | 
					override-map.1 = all-rear
 | 
				
			||||||
 | 
					override-map.2 = rear-left,rear-right
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[Element PCM Side]
 | 
				
			||||||
 | 
					switch = mute
 | 
				
			||||||
 | 
					volume = merge
 | 
				
			||||||
 | 
					override-map.1 = all-side
 | 
				
			||||||
 | 
					override-map.2 = side-left,side-right
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[Element PCM Center]
 | 
				
			||||||
 | 
					switch = mute
 | 
				
			||||||
 | 
					volume = merge
 | 
				
			||||||
 | 
					override-map.1 = all-center
 | 
				
			||||||
 | 
					override-map.2 = all-center,all-center
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[Element PCM LFE]
 | 
				
			||||||
 | 
					switch = mute
 | 
				
			||||||
 | 
					volume = merge
 | 
				
			||||||
 | 
					override-map.1 = lfe
 | 
				
			||||||
 | 
					override-map.2 = lfe,lfe
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					.include analog-output.conf.common
 | 
				
			||||||
| 
						 | 
					@ -15,7 +15,8 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
; Creative Sound Blaster Audigy product line
 | 
					; Creative Sound Blaster Audigy product line
 | 
				
			||||||
;
 | 
					;
 | 
				
			||||||
; These are just copies of the mappings we find in default.conf, with the
 | 
					; 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.
 | 
					; small change of making analog-stereo and analog-mono non-fallback mappings.
 | 
				
			||||||
; This is needed because these cards only support duplex profiles with mono
 | 
					; This is needed because these cards only support duplex profiles with mono
 | 
				
			||||||
; inputs, and in the default configuration, with stereo being a fallback
 | 
					; inputs, and in the default configuration, with stereo being a fallback
 | 
				
			||||||
| 
						 | 
					@ -30,7 +31,7 @@ auto-profiles = yes
 | 
				
			||||||
[Mapping analog-stereo]
 | 
					[Mapping analog-stereo]
 | 
				
			||||||
device-strings = hw:%f
 | 
					device-strings = hw:%f
 | 
				
			||||||
channel-map = front-left,front-right
 | 
					channel-map = front-left,front-right
 | 
				
			||||||
paths-output = analog-output analog-output-lineout analog-output-speaker analog-output-headphones analog-output-headphones-2
 | 
					paths-output = analog-output-audigy 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
 | 
					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
 | 
					priority = 1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -38,43 +39,42 @@ priority = 1
 | 
				
			||||||
[Mapping analog-mono]
 | 
					[Mapping analog-mono]
 | 
				
			||||||
device-strings = hw:%f
 | 
					device-strings = hw:%f
 | 
				
			||||||
channel-map = mono
 | 
					channel-map = mono
 | 
				
			||||||
paths-output = analog-output analog-output-lineout analog-output-speaker analog-output-headphones analog-output-headphones-2 analog-output-mono
 | 
					paths-output = analog-output-audigy 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
 | 
					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
 | 
					priority = 1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# The rest of these are identical to what's in default.conf
 | 
					 | 
				
			||||||
[Mapping analog-surround-21]
 | 
					[Mapping analog-surround-21]
 | 
				
			||||||
device-strings = surround21:%f
 | 
					device-strings = surround21:%f
 | 
				
			||||||
channel-map = front-left,front-right,lfe
 | 
					channel-map = front-left,front-right,lfe
 | 
				
			||||||
paths-output = analog-output analog-output-lineout analog-output-speaker
 | 
					paths-output = analog-output-audigy analog-output-lineout analog-output-speaker
 | 
				
			||||||
priority = 13
 | 
					priority = 13
 | 
				
			||||||
direction = output
 | 
					direction = output
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[Mapping analog-surround-40]
 | 
					[Mapping analog-surround-40]
 | 
				
			||||||
device-strings = surround40:%f
 | 
					device-strings = surround40:%f
 | 
				
			||||||
channel-map = front-left,front-right,rear-left,rear-right
 | 
					channel-map = front-left,front-right,rear-left,rear-right
 | 
				
			||||||
paths-output = analog-output analog-output-lineout analog-output-speaker
 | 
					paths-output = analog-output-audigy analog-output-lineout analog-output-speaker
 | 
				
			||||||
priority = 12
 | 
					priority = 12
 | 
				
			||||||
direction = output
 | 
					direction = output
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[Mapping analog-surround-41]
 | 
					[Mapping analog-surround-41]
 | 
				
			||||||
device-strings = surround41:%f
 | 
					device-strings = surround41:%f
 | 
				
			||||||
channel-map = front-left,front-right,rear-left,rear-right,lfe
 | 
					channel-map = front-left,front-right,rear-left,rear-right,lfe
 | 
				
			||||||
paths-output = analog-output analog-output-lineout analog-output-speaker
 | 
					paths-output = analog-output-audigy analog-output-lineout analog-output-speaker
 | 
				
			||||||
priority = 13
 | 
					priority = 13
 | 
				
			||||||
direction = output
 | 
					direction = output
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[Mapping analog-surround-50]
 | 
					[Mapping analog-surround-50]
 | 
				
			||||||
device-strings = surround50:%f
 | 
					device-strings = surround50:%f
 | 
				
			||||||
channel-map = front-left,front-right,rear-left,rear-right,front-center
 | 
					channel-map = front-left,front-right,rear-left,rear-right,front-center
 | 
				
			||||||
paths-output = analog-output analog-output-lineout analog-output-speaker
 | 
					paths-output = analog-output-audigy analog-output-lineout analog-output-speaker
 | 
				
			||||||
priority = 12
 | 
					priority = 12
 | 
				
			||||||
direction = output
 | 
					direction = output
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[Mapping analog-surround-51]
 | 
					[Mapping analog-surround-51]
 | 
				
			||||||
device-strings = surround51:%f
 | 
					device-strings = surround51:%f
 | 
				
			||||||
channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe
 | 
					channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe
 | 
				
			||||||
paths-output = analog-output analog-output-lineout analog-output-speaker
 | 
					paths-output = analog-output-audigy analog-output-lineout analog-output-speaker
 | 
				
			||||||
priority = 13
 | 
					priority = 13
 | 
				
			||||||
direction = output
 | 
					direction = output
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -82,7 +82,7 @@ direction = output
 | 
				
			||||||
device-strings = surround71:%f
 | 
					device-strings = surround71:%f
 | 
				
			||||||
channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe,side-left,side-right
 | 
					channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe,side-left,side-right
 | 
				
			||||||
description = Analog Surround 7.1
 | 
					description = Analog Surround 7.1
 | 
				
			||||||
paths-output = analog-output analog-output-lineout analog-output-speaker
 | 
					paths-output = analog-output-audigy analog-output-lineout analog-output-speaker
 | 
				
			||||||
priority = 12
 | 
					priority = 12
 | 
				
			||||||
direction = output
 | 
					direction = output
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue