Takashi Iwai
5dabf3bcba
- Backport upstream fixes / enhancements about alsa modules: mainly for UCM support (boo#1160914): 0001-alsa-mixer-path-test-Hide-unused-functions-when-buil.patch 0002-alsa-mixer-recognize-the-Speaker-Jack-control.patch 0003-alsa-mixer-add-support-for-SteelSeries-Arctis-Pro-20.patch 0004-alsa-mixer-Add-support-for-SteelSeries-Arctis-5-2019.patch 0005-alsa-mixer-add-support-for-LucidSound-LS31-and-creat.patch 0006-alsa-ucm-use-ucm2-name-for-the-direct-card-index-ope.patch 0007-alsa-ucm-add-mixer-IDs-to-ucm_items.patch 0008-alsa-mixer-handle-the-index-for-ALSA-mixer-element-i.patch 0009-alsa-mixer-improve-alsa_id_decode-function.patch 0010-alsa-ucm-Support-Playback-CaptureVolume.patch 0011-alsa-ucm-Fix-volume-control-based-on-review.patch 0012-alsa-ucm-use-the-correct-mixer-identifiers-as-first.patch 0013-alsa-ucm-add-support-for-master-volume.patch 0014-alsa-ucm-split-correctly-JackHWMute-device-names.patch 0015-alsa-ucm-fix-parsing-for-JackControl.patch 0016-alsa-ucm-add-comments-to-ucm_get_mixer_id.patch 0017-alsa-ucm-validate-access-to-PA_DEVICE_PORT_DATA.patch 0018-alsa-Skip-resume-PCM-if-hardware-doesn-t-support-it.patch 0019-alsa-ucm-parse-correctly-the-device-values.patch 0020-alsa-ucm-do-not-try-to-use-UCM-device-name-as-jack-n.patch 0021-alsa-util-do-not-try-to-guess-the-mixer-name-from-th.patch 0022-alsa-ucm-add-control-and-mixer-device-items.patch 0023-alsa-ucm-get-the-mixer-names-from-ucm-don-t-guess.patch 0024-alsa-ucm-use-the-proper-mixer-name-for-ucm-pcm-sink-.patch 0025-alsa-mixer-handle-interface-type-CARD-PCM-for-mixer-.patch 0026-alsa-mixer-Add-the-ability-to-pass-the-intended-role.patch 0027-alsa-mixer-Set-the-intended-role-of-Steelseries-Arct.patch 0028-alsa-rewrite-mixer-open-close-cache-mixer-accesses-i.patch OBS-URL: https://build.opensuse.org/request/show/774841 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/pulseaudio?expand=0&rev=217
52 lines
1.8 KiB
Diff
52 lines
1.8 KiB
Diff
From c6a0665618975eedc98bdf23e4140935a1af38c2 Mon Sep 17 00:00:00 2001
|
|
From: Laurent Bigonville <bigon@bigon.be>
|
|
Date: Thu, 7 Mar 2019 11:35:30 +0100
|
|
Subject: [PATCH] alsa-mixer: Add the ability to pass the intended-role to the
|
|
mapping
|
|
|
|
https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/640
|
|
---
|
|
src/modules/alsa/alsa-mixer.c | 19 +++++++++++++++++++
|
|
1 file changed, 19 insertions(+)
|
|
|
|
diff --git a/src/modules/alsa/alsa-mixer.c b/src/modules/alsa/alsa-mixer.c
|
|
index 094cff817df7..7956371b604b 100644
|
|
--- a/src/modules/alsa/alsa-mixer.c
|
|
+++ b/src/modules/alsa/alsa-mixer.c
|
|
@@ -3978,6 +3978,24 @@ static int mapping_parse_fallback(pa_config_parser_state *state) {
|
|
return 0;
|
|
}
|
|
|
|
+static int mapping_parse_intended_roles(pa_config_parser_state *state) {
|
|
+ pa_alsa_profile_set *ps;
|
|
+ pa_alsa_mapping *m;
|
|
+
|
|
+ pa_assert(state);
|
|
+
|
|
+ ps = state->userdata;
|
|
+
|
|
+ if (!(m = pa_alsa_mapping_get(ps, state->section))) {
|
|
+ pa_log("[%s:%u] %s invalid in section %s", state->filename, state->lineno, state->lvalue, state->section);
|
|
+ return -1;
|
|
+ }
|
|
+
|
|
+ pa_proplist_sets(m->proplist, PA_PROP_DEVICE_INTENDED_ROLES, state->rvalue);
|
|
+
|
|
+ return 0;
|
|
+}
|
|
+
|
|
|
|
static int profile_parse_mappings(pa_config_parser_state *state) {
|
|
pa_alsa_profile_set *ps;
|
|
@@ -4569,6 +4587,7 @@ pa_alsa_profile_set* pa_alsa_profile_set_new(const char *fname, const pa_channel
|
|
{ "element-output", mapping_parse_element, NULL, NULL },
|
|
{ "direction", mapping_parse_direction, NULL, NULL },
|
|
{ "exact-channels", mapping_parse_exact_channels, NULL, NULL },
|
|
+ { "intended-roles", mapping_parse_intended_roles, NULL, NULL },
|
|
|
|
/* Shared by [Mapping ...] and [Profile ...] */
|
|
{ "description", mapping_parse_description, NULL, NULL },
|
|
--
|
|
2.16.4
|
|
|