acp: sync

This commit is contained in:
Wim Taymans 2020-10-13 17:23:36 +02:00
parent 4b7b2a9a10
commit 4e9b81960f
11 changed files with 28 additions and 12 deletions

View file

@ -1795,16 +1795,16 @@ static bool element_probe_volume(pa_alsa_element *e, snd_mixer_elem_t *me) {
alsa_id_str(buf, sizeof(buf), &e->alsa_id); alsa_id_str(buf, sizeof(buf), &e->alsa_id);
pa_log_warn("Volume element %s with no channels?", buf); pa_log_warn("Volume element %s with no channels?", buf);
return false; return false;
} else if (e->n_channels > 2) { } else if (e->n_channels > 8) {
/* FIXME: In some places code like this is used: /* FIXME: In some places code like this is used:
* *
* e->masks[alsa_channel_ids[p]][e->n_channels-1] * e->masks[alsa_channel_ids[p]][e->n_channels-1]
* *
* The definition of e->masks is * The definition of e->masks is
* *
* pa_channel_position_mask_t masks[SND_MIXER_SCHN_LAST + 1][2]; * pa_channel_position_mask_t masks[SND_MIXER_SCHN_LAST + 1][8];
* *
* Since the array size is fixed at 2, we obviously * Since the array size is fixed at 8, we obviously
* don't support elements with more than two * don't support elements with more than two
* channels... */ * channels... */
alsa_id_str(buf, sizeof(buf), &e->alsa_id); alsa_id_str(buf, sizeof(buf), &e->alsa_id);
@ -2464,7 +2464,7 @@ static pa_channel_position_mask_t parse_mask(const char *m) {
static int element_parse_override_map(pa_config_parser_state *state) { static int element_parse_override_map(pa_config_parser_state *state) {
pa_alsa_path *p; pa_alsa_path *p;
pa_alsa_element *e; pa_alsa_element *e;
const char *split_state = NULL; const char *split_state = NULL, *s;
unsigned i = 0; unsigned i = 0;
char *n; char *n;
@ -2490,12 +2490,18 @@ static int element_parse_override_map(pa_config_parser_state *state) {
} }
} }
if (pa_streq(state->lvalue, "override-map.1")) s = strstr(state->lvalue, ".");
e->masks[i++][0] = m; if (s) {
else int idx;
e->masks[i++][1] = m; pa_atoi(s + 1, &idx);
if (idx >= 1 && idx <= 8) {
e->masks[i++][idx-1] = m;
} else {
pa_log("[%s:%u] Override map index '%s' invalid in '%s'", state->filename, state->lineno, state->lvalue, state->section);
}
}
/* Later on we might add override-map.3 and so on here ... */ /* Later on we might add override-map.9 and so on here ... */
pa_xfree(n); pa_xfree(n);
} }
@ -2713,7 +2719,7 @@ static int path_verify(pa_alsa_path *p) {
{ "analog-input-microphone-rear", N_("Rear Microphone"), PA_DEVICE_PORT_TYPE_MIC }, { "analog-input-microphone-rear", N_("Rear Microphone"), PA_DEVICE_PORT_TYPE_MIC },
{ "analog-input-microphone-dock", N_("Dock Microphone"), PA_DEVICE_PORT_TYPE_MIC }, { "analog-input-microphone-dock", N_("Dock Microphone"), PA_DEVICE_PORT_TYPE_MIC },
{ "analog-input-microphone-internal", N_("Internal Microphone"), PA_DEVICE_PORT_TYPE_MIC }, { "analog-input-microphone-internal", N_("Internal Microphone"), PA_DEVICE_PORT_TYPE_MIC },
{ "analog-input-microphone-headset", N_("Headset Microphone"), PA_DEVICE_PORT_TYPE_MIC }, { "analog-input-microphone-headset", N_("Headset Microphone"), PA_DEVICE_PORT_TYPE_HEADSET },
{ "analog-input-linein", N_("Line In"), PA_DEVICE_PORT_TYPE_LINE }, { "analog-input-linein", N_("Line In"), PA_DEVICE_PORT_TYPE_LINE },
{ "analog-input-radio", N_("Radio"), PA_DEVICE_PORT_TYPE_RADIO }, { "analog-input-radio", N_("Radio"), PA_DEVICE_PORT_TYPE_RADIO },
{ "analog-input-video", N_("Video"), PA_DEVICE_PORT_TYPE_VIDEO }, { "analog-input-video", N_("Video"), PA_DEVICE_PORT_TYPE_VIDEO },
@ -2787,8 +2793,8 @@ pa_alsa_path* pa_alsa_path_new(const char *paths_dir, const char *fname, pa_alsa
{ "priority", pa_config_parse_unsigned, NULL, "General" }, { "priority", pa_config_parse_unsigned, NULL, "General" },
{ "description-key", pa_config_parse_string, NULL, "General" }, { "description-key", pa_config_parse_string, NULL, "General" },
{ "description", pa_config_parse_string, NULL, "General" }, { "description", pa_config_parse_string, NULL, "General" },
{ "type", parse_type, NULL, "General" },
{ "mute-during-activation", pa_config_parse_bool, NULL, "General" }, { "mute-during-activation", pa_config_parse_bool, NULL, "General" },
{ "type", parse_type, NULL, "General" },
{ "eld-device", parse_eld_device, NULL, "General" }, { "eld-device", parse_eld_device, NULL, "General" },
/* [Option ...] */ /* [Option ...] */

View file

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

View file

@ -1,5 +1,6 @@
[General] [General]
description = HDMI / DisplayPort description = HDMI / DisplayPort
type = hdmi
priority = 59 priority = 59
eld-device = auto eld-device = auto

View file

@ -1,5 +1,6 @@
[General] [General]
description = HDMI / DisplayPort 2 description = HDMI / DisplayPort 2
type = hdmi
priority = 58 priority = 58
eld-device = auto eld-device = auto

View file

@ -1,5 +1,6 @@
[General] [General]
description = HDMI / DisplayPort 3 description = HDMI / DisplayPort 3
type = hdmi
priority = 57 priority = 57
eld-device = auto eld-device = auto

View file

@ -1,5 +1,6 @@
[General] [General]
description = HDMI / DisplayPort 4 description = HDMI / DisplayPort 4
type = hdmi
priority = 56 priority = 56
eld-device = auto eld-device = auto

View file

@ -1,5 +1,6 @@
[General] [General]
description = HDMI / DisplayPort 5 description = HDMI / DisplayPort 5
type = hdmi
priority = 55 priority = 55
eld-device = auto eld-device = auto

View file

@ -1,5 +1,6 @@
[General] [General]
description = HDMI / DisplayPort 6 description = HDMI / DisplayPort 6
type = hdmi
priority = 54 priority = 54
eld-device = auto eld-device = auto

View file

@ -1,5 +1,6 @@
[General] [General]
description = HDMI / DisplayPort 7 description = HDMI / DisplayPort 7
type = hdmi
priority = 53 priority = 53
eld-device = auto eld-device = auto

View file

@ -1,5 +1,6 @@
[General] [General]
description = HDMI / DisplayPort 8 description = HDMI / DisplayPort 8
type = hdmi
priority = 52 priority = 52
eld-device = auto eld-device = auto

View file

@ -58,6 +58,8 @@
; exact-channels = yes | no # If no, and the exact number of channels is not supported, ; exact-channels = yes | no # If no, and the exact number of channels is not supported,
; # allow device to be opened with another channel count ; # allow device to be opened with another channel count
; fallback = no | yes # This mapping will only be considered if all non-fallback mappings fail ; fallback = no | yes # This mapping will only be considered if all non-fallback mappings fail
; intended-roles = ... # Set the device.intended_roles property for the sink/source.
;
; [Profile id] ; [Profile id]
; input-mappings = ... # Lists mappings for sources on this profile, those mapping must be ; input-mappings = ... # Lists mappings for sources on this profile, those mapping must be
; # defined in this file too ; # defined in this file too