mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
acp: sync
This commit is contained in:
parent
4b7b2a9a10
commit
4e9b81960f
11 changed files with 28 additions and 12 deletions
|
|
@ -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);
|
||||
pa_log_warn("Volume element %s with no channels?", buf);
|
||||
return false;
|
||||
} else if (e->n_channels > 2) {
|
||||
} else if (e->n_channels > 8) {
|
||||
/* FIXME: In some places code like this is used:
|
||||
*
|
||||
* e->masks[alsa_channel_ids[p]][e->n_channels-1]
|
||||
*
|
||||
* 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
|
||||
* channels... */
|
||||
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) {
|
||||
pa_alsa_path *p;
|
||||
pa_alsa_element *e;
|
||||
const char *split_state = NULL;
|
||||
const char *split_state = NULL, *s;
|
||||
unsigned i = 0;
|
||||
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"))
|
||||
e->masks[i++][0] = m;
|
||||
else
|
||||
e->masks[i++][1] = m;
|
||||
s = strstr(state->lvalue, ".");
|
||||
if (s) {
|
||||
int idx;
|
||||
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);
|
||||
}
|
||||
|
|
@ -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-dock", N_("Dock 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-radio", N_("Radio"), PA_DEVICE_PORT_TYPE_RADIO },
|
||||
{ "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" },
|
||||
{ "description-key", 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" },
|
||||
{ "type", parse_type, NULL, "General" },
|
||||
{ "eld-device", parse_eld_device, NULL, "General" },
|
||||
|
||||
/* [Option ...] */
|
||||
|
|
|
|||
|
|
@ -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][2];
|
||||
pa_channel_position_mask_t masks[SND_MIXER_SCHN_LAST + 1][8];
|
||||
unsigned n_channels;
|
||||
|
||||
pa_channel_position_mask_t merged_mask;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
[General]
|
||||
description = HDMI / DisplayPort
|
||||
type = hdmi
|
||||
priority = 59
|
||||
eld-device = auto
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
[General]
|
||||
description = HDMI / DisplayPort 2
|
||||
type = hdmi
|
||||
priority = 58
|
||||
eld-device = auto
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
[General]
|
||||
description = HDMI / DisplayPort 3
|
||||
type = hdmi
|
||||
priority = 57
|
||||
eld-device = auto
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
[General]
|
||||
description = HDMI / DisplayPort 4
|
||||
type = hdmi
|
||||
priority = 56
|
||||
eld-device = auto
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
[General]
|
||||
description = HDMI / DisplayPort 5
|
||||
type = hdmi
|
||||
priority = 55
|
||||
eld-device = auto
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
[General]
|
||||
description = HDMI / DisplayPort 6
|
||||
type = hdmi
|
||||
priority = 54
|
||||
eld-device = auto
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
[General]
|
||||
description = HDMI / DisplayPort 7
|
||||
type = hdmi
|
||||
priority = 53
|
||||
eld-device = auto
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
[General]
|
||||
description = HDMI / DisplayPort 8
|
||||
type = hdmi
|
||||
priority = 52
|
||||
eld-device = auto
|
||||
|
||||
|
|
|
|||
|
|
@ -58,6 +58,8 @@
|
|||
; exact-channels = yes | no # If no, and the exact number of channels is not supported,
|
||||
; # allow device to be opened with another channel count
|
||||
; 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]
|
||||
; input-mappings = ... # Lists mappings for sources on this profile, those mapping must be
|
||||
; # defined in this file too
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue