pulseaudio/0005-alsa-mixer-add-support-for-LucidSound-LS31-and-creat.patch
Takashi Iwai 5dabf3bcba Accepting request 774841 from home:tiwai:branches:multimedia:libs
- 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
2020-02-17 11:47:50 +00:00

200 lines
10 KiB
Diff

From 1ee1f749e154d2f64b4661f833eebaa18ae1a081 Mon Sep 17 00:00:00 2001
From: Dave Chiluk <chiluk@ubuntu.com>
Date: Thu, 8 Aug 2019 23:10:01 -0500
Subject: [PATCH] alsa-mixer: add support for LucidSound LS31, and create
usb-gaming-headset profile
---
src/Makefile.am | 8 ++++----
src/modules/alsa/90-pulseaudio.rules | 10 ++++++----
...tis-7-input.conf => usb-gaming-headset-input.conf} | 12 ++++++++++--
...-mono.conf => usb-gaming-headset-output-mono.conf} | 15 ++++++++++-----
...reo.conf => usb-gaming-headset-output-stereo.conf} | 15 ++++++++++-----
...rctis-7-usb-audio.conf => usb-gaming-headset.conf} | 19 ++++++++++++-------
6 files changed, 52 insertions(+), 27 deletions(-)
rename src/modules/alsa/mixer/paths/{steelseries-arctis-7-input.conf => usb-gaming-headset-input.conf} (66%)
rename src/modules/alsa/mixer/paths/{steelseries-arctis-7-output-mono.conf => usb-gaming-headset-output-mono.conf} (66%)
rename src/modules/alsa/mixer/paths/{steelseries-arctis-7-output-stereo.conf => usb-gaming-headset-output-stereo.conf} (68%)
rename src/modules/alsa/mixer/profile-sets/{steelseries-arctis-7-usb-audio.conf => usb-gaming-headset.conf} (79%)
diff --git a/src/Makefile.am b/src/Makefile.am
index 3db921a07e1b..0f1ded7f96c5 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1354,7 +1354,7 @@ dist_alsaprofilesets_DATA = \
modules/alsa/mixer/profile-sets/kinect-audio.conf \
modules/alsa/mixer/profile-sets/sb-omni-surround-5.1.conf \
modules/alsa/mixer/profile-sets/steelseries-arctis-common-usb-audio.conf \
- modules/alsa/mixer/profile-sets/steelseries-arctis-7-usb-audio.conf \
+ modules/alsa/mixer/profile-sets/usb-gaming-headset.conf \
modules/alsa/mixer/profile-sets/dell-dock-tb16-usb-audio.conf \
modules/alsa/mixer/profile-sets/cmedia-high-speed-true-hdaudio.conf
@@ -1401,9 +1401,9 @@ dist_alsapaths_DATA = \
modules/alsa/mixer/paths/hdmi-output-7.conf \
modules/alsa/mixer/paths/steelseries-arctis-output-chat-common.conf \
modules/alsa/mixer/paths/steelseries-arctis-output-game-common.conf \
- modules/alsa/mixer/paths/steelseries-arctis-7-input.conf \
- modules/alsa/mixer/paths/steelseries-arctis-7-output-mono.conf \
- modules/alsa/mixer/paths/steelseries-arctis-7-output-stereo.conf
+ modules/alsa/mixer/paths/usb-gaming-headset-input.conf \
+ modules/alsa/mixer/paths/usb-gaming-headset-output-mono.conf \
+ modules/alsa/mixer/paths/usb-gaming-headset-output-stereo.conf
endif
diff --git a/src/modules/alsa/90-pulseaudio.rules b/src/modules/alsa/90-pulseaudio.rules
index 61e7692543e8..fa43cb802a8e 100644
--- a/src/modules/alsa/90-pulseaudio.rules
+++ b/src/modules/alsa/90-pulseaudio.rules
@@ -113,10 +113,12 @@ ATTRS{idVendor}=="0bda", ATTRS{idProduct}=="4014", ENV{PULSE_PROFILE_SET}="dell-
# 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).
-ATTRS{idVendor}=="1038", ATTRS{idProduct}=="1260", ENV{PULSE_PROFILE_SET}="steelseries-arctis-7-usb-audio.conf"
-ATTRS{idVendor}=="1038", ATTRS{idProduct}=="12ad", ENV{PULSE_PROFILE_SET}="steelseries-arctis-7-usb-audio.conf"
-ATTRS{idVendor}=="1038", ATTRS{idProduct}=="1294", ENV{PULSE_PROFILE_SET}="steelseries-arctis-7-usb-audio.conf"
-ATTRS{idVendor}=="1038", ATTRS{idProduct}=="1730", ENV{PULSE_PROFILE_SET}="steelseries-arctis-7-usb-audio.conf"
+ATTRS{idVendor}=="1038", ATTRS{idProduct}=="1260", ENV{PULSE_PROFILE_SET}="usb-gaming-headset.conf"
+ATTRS{idVendor}=="1038", ATTRS{idProduct}=="12ad", ENV{PULSE_PROFILE_SET}="usb-gaming-headset.conf"
+ATTRS{idVendor}=="1038", ATTRS{idProduct}=="1294", ENV{PULSE_PROFILE_SET}="usb-gaming-headset.conf"
+ATTRS{idVendor}=="1038", ATTRS{idProduct}=="1730", ENV{PULSE_PROFILE_SET}="usb-gaming-headset.conf"
+# Lucidsound LS31
+ATTRS{idVendor}=="2f12", ATTRS{idProduct}=="0109", ENV{PULSE_PROFILE_SET}="usb-gaming-headset.conf"
# ID 1038:1250 is for the Arctis 5
# ID 1037:12aa is for the Arctis 5 2019
diff --git a/src/modules/alsa/mixer/paths/steelseries-arctis-7-input.conf b/src/modules/alsa/mixer/paths/usb-gaming-headset-input.conf
similarity index 66%
rename from src/modules/alsa/mixer/paths/steelseries-arctis-7-input.conf
rename to src/modules/alsa/mixer/paths/usb-gaming-headset-input.conf
index 3fa36e9385a5..9fa7fe908587 100644
--- a/src/modules/alsa/mixer/paths/steelseries-arctis-7-input.conf
+++ b/src/modules/alsa/mixer/paths/usb-gaming-headset-input.conf
@@ -13,8 +13,16 @@
# You should have received a copy of the GNU Lesser General Public License
# along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
-; Steelseries Arctis 7 USB headset microphone path. Works also with Arctis Pro
-; Wireless.
+; USB gaming headset microphone input path. These headsets usually have two
+; output devices. The first one is mono, meant for voice audio, and the second
+; one is stereo, meant for everything else. The purpose of this unusual design
+; is to provide separate volume controls for voice and other audio, which can
+; be useful in gaming.
+;
+; Works with:
+; Steelseries Arctis 7
+; Steelseries Arctis Pro Wireless.
+; Lucidsound LS31
[General]
description-key = analog-input-microphone-headset
diff --git a/src/modules/alsa/mixer/paths/steelseries-arctis-7-output-mono.conf b/src/modules/alsa/mixer/paths/usb-gaming-headset-output-mono.conf
similarity index 66%
rename from src/modules/alsa/mixer/paths/steelseries-arctis-7-output-mono.conf
rename to src/modules/alsa/mixer/paths/usb-gaming-headset-output-mono.conf
index d8b24a2fbdf2..6df662f069e5 100644
--- a/src/modules/alsa/mixer/paths/steelseries-arctis-7-output-mono.conf
+++ b/src/modules/alsa/mixer/paths/usb-gaming-headset-output-mono.conf
@@ -13,11 +13,16 @@
# You should have received a copy of the GNU Lesser General Public License
# along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
-; Steelseries Arctis 7 USB headset mono output path. Works also with Arctis Pro
-; Wireless. The headset has two output devices. The first one is mono, meant
-; for voice audio, and the second one is stereo, meant for everything else. The
-; purpose of this unusual design is to provide separate volume controls for
-; voice and other audio, which can be useful in gaming.
+; USB gaming headset mono output path. These headsets usually have two
+; output devices. The first one is mono, meant for voice audio, and the second
+; one is stereo, meant for everything else. The purpose of this unusual design
+; is to provide separate volume controls for voice and other audio, which can
+; be useful in gaming.
+;
+; Works with:
+; Steelseries Arctis 7
+; Steelseries Arctis Pro Wireless.
+; Lucidsound LS31
[General]
description-key = analog-output-headphones-mono
diff --git a/src/modules/alsa/mixer/paths/steelseries-arctis-7-output-stereo.conf b/src/modules/alsa/mixer/paths/usb-gaming-headset-output-stereo.conf
similarity index 68%
rename from src/modules/alsa/mixer/paths/steelseries-arctis-7-output-stereo.conf
rename to src/modules/alsa/mixer/paths/usb-gaming-headset-output-stereo.conf
index fcc58a033e2f..e3f91cd6cd2e 100644
--- a/src/modules/alsa/mixer/paths/steelseries-arctis-7-output-stereo.conf
+++ b/src/modules/alsa/mixer/paths/usb-gaming-headset-output-stereo.conf
@@ -13,11 +13,16 @@
# You should have received a copy of the GNU Lesser General Public License
# along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
-; Steelseries Arctis 7 USB headset stereo output path. Works also with Arctis
-; Pro Wireless. The headset has two output devices. The first one is mono,
-; meant for voice audio, and the second one is stereo, meant for everything
-; else. The purpose of this unusual design is to provide separate volume
-; controls for voice and other audio, which can be useful in gaming.
+; USB gaming headset mono output path. These headsets usually have two
+; output devices. The first one is mono, meant for voice audio, and the second
+; one is stereo, meant for everything else. The purpose of this unusual design
+; is to provide separate volume controls for voice and other audio, which can
+; be useful in gaming.
+;
+; Works with:
+; 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
diff --git a/src/modules/alsa/mixer/profile-sets/steelseries-arctis-7-usb-audio.conf b/src/modules/alsa/mixer/profile-sets/usb-gaming-headset.conf
similarity index 79%
rename from src/modules/alsa/mixer/profile-sets/steelseries-arctis-7-usb-audio.conf
rename to src/modules/alsa/mixer/profile-sets/usb-gaming-headset.conf
index e1394dcfcc3b..01ecf864bcf2 100644
--- a/src/modules/alsa/mixer/profile-sets/steelseries-arctis-7-usb-audio.conf
+++ b/src/modules/alsa/mixer/profile-sets/usb-gaming-headset.conf
@@ -13,12 +13,17 @@
# You should have received a copy of the GNU Lesser General Public License
# along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
-; Steelseries Arctis 7 USB and Arctis Pro Wireless USB headset. These headsets
-; have a microphone and two output devices. The first output device is mono,
-; meant for voice audio, and the second one is stereo, meant for everything
-; else. The purpose of this unusual design is to provide separate volume
+; USB gaming headset.
+; These headsets usually have two output devices. The first one is mono,
+; meant for voice audio, and the second one is stereo, meant for everything
+; else. The purpose of this unusual design is to provide separate volume
; controls for voice and other audio, which can be useful in gaming.
;
+; Works with:
+; Steelseries Arctis 7
+; Steelseries Arctis Pro Wireless.
+; Lucidsound LS31
+;
; See default.conf for an explanation on the directives used here.
[General]
@@ -27,13 +32,13 @@ auto-profiles = yes
[Mapping analog-mono]
device-strings = hw:%f,0,0
channel-map = mono
-paths-output = steelseries-arctis-7-output-mono
-paths-input = steelseries-arctis-7-input
+paths-output = usb-gaming-headset-output-mono
+paths-input = usb-gaming-headset-input
[Mapping analog-stereo]
device-strings = hw:%f,1,0
channel-map = left,right
-paths-output = steelseries-arctis-7-output-stereo
+paths-output = usb-gaming-headset-output-stereo
direction = output
[Profile output:analog-mono+output:analog-stereo+input:analog-mono]
--
2.16.4