acp: sync with pulseaudio

This commit is contained in:
Wim Taymans 2020-12-17 12:04:18 +01:00
parent 90bdab8414
commit d6530bc0cd
10 changed files with 67 additions and 12 deletions

View file

@ -110,7 +110,9 @@ ATTRS{idVendor}=="0763", ATTRS{idProduct}=="2012", ENV{ACP_PROFILE_SET}="maudio-
ATTRS{idVendor}=="045e", ATTRS{idProduct}=="02bb", ENV{ACP_PROFILE_SET}="kinect-audio.conf"
ATTRS{idVendor}=="041e", ATTRS{idProduct}=="322c", ENV{ACP_PROFILE_SET}="sb-omni-surround-5.1.conf"
ATTRS{idVendor}=="0bda", ATTRS{idProduct}=="4014", ENV{ACP_PROFILE_SET}="dell-dock-tb16-usb-audio.conf"
ATTRS{idVendor}=="08bb", ATTRS{idProduct}=="2902", ENV{ACP_PROFILE_SET}="behringer-umc22.conf"
ATTRS{idVendor}=="03f0", ATTRS{idProduct}=="0269", ENV{ACP_PROFILE_SET}="hp-tbt-dock-120w-g2.conf"
ATTRS{idVendor}=="03f0", ATTRS{idProduct}=="0567", ENV{ACP_PROFILE_SET}="hp-tbt-dock-audio-module.conf"
# ID 1038:12ad is for the 2018 refresh of the Arctis 7.
# ID 1038:1294 is for Arctis Pro Wireless (which works with the Arctis 7 configuration).
@ -145,6 +147,16 @@ ATTRS{idVendor}=="0951", ATTRS{idProduct}=="16ff", ENV{ID_ID}="usb-HyperX_Cloud_
ATTRS{idVendor}=="0951", ATTRS{idProduct}=="1702", ENV{ID_ID}="usb-HyperX_Cloud_Orbit_S_Hi-Res_2Ch-$env{ID_USB_INTERFACE_NUM}"
ATTRS{idVendor}=="0951", ATTRS{idProduct}=="1703", ENV{ID_ID}="usb-HyperX_Cloud_Orbit_S_3D_8Ch-$env{ID_USB_INTERFACE_NUM}"
# OnePlus Type-C Bullets (ED117)
ATTRS{idVendor}=="2a70", ATTRS{idProduct}=="1881", ENV{ACP_PROFILE_SET}="simple-headphones-mic.conf"
# ID 1395:005e is for Sennheiser GSX 1000
# ID 1395:00a0 is for Sennheiser GSX 1000
# ID 1395:005f is for Sennheiser GSX 1200
ATTRS{idVendor}=="1395", ATTRS{idProduct}=="005e", ENV{ACP_PROFILE_SET}="sennheiser-gsx.conf"
ATTRS{idVendor}=="1395", ATTRS{idProduct}=="00a0", ENV{ACP_PROFILE_SET}="sennheiser-gsx.conf"
ATTRS{idVendor}=="1395", ATTRS{idProduct}=="005f", ENV{ACP_PROFILE_SET}="sennheiser-gsx.conf"
GOTO="pipewire_end"
LABEL="pipewire_check_pci"

View file

@ -2730,6 +2730,9 @@ static int path_verify(pa_alsa_path *p) {
{ "multichannel-output", N_("Multichannel Output"), PA_DEVICE_PORT_TYPE_LINE },
{ "steelseries-arctis-output-game-common", N_("Game Output"), PA_DEVICE_PORT_TYPE_HEADSET },
{ "steelseries-arctis-output-chat-common", N_("Chat Output"), PA_DEVICE_PORT_TYPE_HEADSET },
{ "analog-chat-output", N_("Chat Output"), PA_DEVICE_PORT_TYPE_HEADSET },
{ "analog-chat-input", N_("Chat Input"), PA_DEVICE_PORT_TYPE_HEADSET },
{ "virtual-surround-7.1", N_("Virtual Surround 7.1"), PA_DEVICE_PORT_TYPE_HEADPHONES },
};
pa_alsa_element *e;
@ -4578,6 +4581,7 @@ static int profile_verify(pa_alsa_profile *p) {
{ "output:iec958-stereo+input:iec958-stereo", N_("Digital Stereo Duplex (IEC958)") },
{ "output:multichannel-output+input:multichannel-input", N_("Multichannel Duplex") },
{ "output:unknown-stereo+input:unknown-stereo", N_("Stereo Duplex") },
{ "output:analog-output-surround71+output:analog-output-chat+input:analog-input", N_("Mono Chat + 7.1 Surround") },
{ "off", N_("Off") }
};
const char *description_key = p->description_key ? p->description_key : p->name;
@ -5127,7 +5131,7 @@ void pa_alsa_profile_set_probe(
if (p->output_mappings)
PA_IDXSET_FOREACH(m, p->output_mappings, idx)
if (m->output_pcm) {
found_output |= !p->fallback_output;
found_output = true;
mapping_paths_probe(m, p, PA_ALSA_DIRECTION_OUTPUT, used_paths, mixers);
pa_alsa_init_proplist_pcm(NULL, m->output_proplist, m->output_pcm);
}
@ -5135,7 +5139,7 @@ void pa_alsa_profile_set_probe(
if (p->input_mappings)
PA_IDXSET_FOREACH(m, p->input_mappings, idx)
if (m->input_pcm) {
found_input |= !p->fallback_input;
found_input = true;
mapping_paths_probe(m, p, PA_ALSA_DIRECTION_INPUT, used_paths, mixers);
pa_alsa_init_proplist_pcm(NULL, m->input_proplist, m->input_pcm);
}

View file

@ -149,7 +149,7 @@ struct pa_alsa_element {
long constant_volume;
unsigned int override_map;
bool override_map:1;
bool direction_try_other:1;
bool has_dB:1;
@ -157,7 +157,7 @@ struct pa_alsa_element {
long volume_limit; /* -1 for no configured limit */
double min_dB, max_dB;
pa_channel_position_mask_t masks[SND_MIXER_SCHN_LAST + 1][8];
pa_channel_position_mask_t masks[SND_MIXER_SCHN_LAST + 1][2];
unsigned n_channels;
pa_channel_position_mask_t merged_mask;

View file

@ -160,4 +160,8 @@ volume = off
switch = off
volume = off
[Element Speaker Center/LFE]
switch = off
volume = off
.include analog-output.conf.common

View file

@ -181,6 +181,12 @@ volume = merge
override-map.1 = all-center
override-map.2 = all-center,lfe
[Element Center/LFE]
switch = mute
volume = merge
override-map.1 = all-center
override-map.2 = all-center,lfe
[Element Bass Speaker]
switch = off
volume = off

View file

@ -174,4 +174,10 @@ volume = merge
override-map.1 = all-center
override-map.2 = all-center,lfe
[Element Center/LFE]
switch = mute
volume = merge
override-map.1 = all-center
override-map.2 = all-center,lfe
.include analog-output.conf.common

View file

@ -88,6 +88,13 @@ override-map.2 = all-left,all-right
switch = off
volume = off
; Make sure the internal speakers are not auto-muted once the system has speakers
[Element Auto-Mute Mode]
enumeration = select
[Option Auto-Mute Mode:Disabled]
name = analog-output-speaker
; This profile path is intended to control the speaker, let's mute headphones
; else there will be a spike when plugging in headphones
[Element Headphone]
@ -220,6 +227,12 @@ volume = merge
override-map.1 = all-center
override-map.2 = all-center,lfe
[Element Center/LFE]
switch = mute
volume = merge
override-map.1 = all-center
override-map.2 = all-center,lfe
[Element Speaker CLFE]
switch = mute
volume = merge

View file

@ -79,4 +79,10 @@ volume = merge
override-map.1 = all-center
override-map.2 = all-center,lfe
[Element Center/LFE]
switch = mute
volume = merge
override-map.1 = all-center
override-map.2 = all-center,lfe
.include analog-output.conf.common

View file

@ -23,10 +23,12 @@
; Steelseries Arctis 7
; Steelseries Arctis Pro Wireless.
; Lucidsound LS31
;
; This path doesn't provide hardware volume control, because the stereo
; output is controlled by the PCM element with index 1, and currently
; PulseAudio only supports elements with index 0.
[General]
description-key = analog-output-headphones
[Element PCM,1]
volume = merge
switch = mute
override-map.1 = all
override-map.2 = all-left,all-right

View file

@ -44,7 +44,11 @@
; [Mapping id]
; device-strings = ... # ALSA device string. %f will be replaced by the card identifier.
; channel-map = ... # Channel mapping to use for this device
; description = ...
; description = ... # Description for the mapping. Note that it's better to set the description
; # in the well_known_descriptions table in alsa-mixer.c than with this
; # option, because the descriptions in alsa-mixer.c are translatable.
; description-key = ... # A custom key for the well_known_descriptions table (by default the mapping
; # name is used).
; paths-input = ... # A list of mixer paths to use. Every path in this list will be probed.
; # If multiple are found to be working they will be available as device ports
; paths-output = ...
@ -464,7 +468,6 @@ exact-channels = false
fallback = yes
priority = 1
direction = output
paths-output = multichannel-output
[Mapping multichannel-input]
device-strings = hw:%f
@ -473,7 +476,6 @@ exact-channels = false
fallback = yes
priority = 1
direction = input
paths-input = multichannel-input
; An example for defining multiple-sink profiles
#[Profile output:analog-stereo+output:iec958-stereo+input:analog-stereo]