[pulseaudio-commits] [Git][pulseaudio/pulseaudio][master] 2 commits: alsa-mixer: Add support for HP Thunderbolt Dock
Arun Raghavan
gitlab at gitlab.freedesktop.org
Mon Nov 23 22:42:07 UTC 2020
Arun Raghavan pushed to branch master at PulseAudio / pulseaudio
Commits:
05c373d9 by Kai-Heng Feng at 2020-11-23T17:35:01-05:00
alsa-mixer: Add support for HP Thunderbolt Dock
The HP Thunderbolt Dock [1] has two separate USB cards, a headset jack
and an optional module which is a speakerphone.
This patch adds new description for them, and mark the intended-roles as
phone for the speakerphone module.
[1] https://store.hp.com/us/en/pdp/hp-thunderbolt-dock-120w-g2-with-audio
- - - - -
a73ec2a3 by Tanu Kaskinen at 2020-11-23T17:35:03-05:00
alsa-mixer: Expand comments in the HP Thunderbolt Dock configuration
- - - - -
5 changed files:
- src/Makefile.am
- src/modules/alsa/90-pulseaudio.rules
- src/modules/alsa/alsa-mixer.c
- + src/modules/alsa/mixer/profile-sets/hp-tbt-dock-120w-g2.conf
- + src/modules/alsa/mixer/profile-sets/hp-tbt-dock-audio-module.conf
Changes:
=====================================
src/Makefile.am
=====================================
@@ -1367,7 +1367,9 @@ dist_alsaprofilesets_DATA = \
modules/alsa/mixer/profile-sets/steelseries-arctis-common-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
+ modules/alsa/mixer/profile-sets/cmedia-high-speed-true-hdaudio.conf \
+ modules/alsa/mixer/profile-sets/hp-tbt-dock-120w-g2.conf \
+ modules/alsa/mixer/profile-sets/hp-tbt-dock-audio-module.conf
if HAVE_UDEV
dist_udevrules_DATA = \
=====================================
src/modules/alsa/90-pulseaudio.rules
=====================================
@@ -111,6 +111,8 @@ ATTRS{idVendor}=="045e", ATTRS{idProduct}=="02bb", ENV{PULSE_PROFILE_SET}="kinec
ATTRS{idVendor}=="041e", ATTRS{idProduct}=="322c", ENV{PULSE_PROFILE_SET}="sb-omni-surround-5.1.conf"
ATTRS{idVendor}=="0bda", ATTRS{idProduct}=="4014", ENV{PULSE_PROFILE_SET}="dell-dock-tb16-usb-audio.conf"
ATTRS{idVendor}=="08bb", ATTRS{idProduct}=="2902", ENV{PULSE_PROFILE_SET}="behringer-umc22.conf"
+ATTRS{idVendor}=="03f0", ATTRS{idProduct}=="0269", ENV{PULSE_PROFILE_SET}="hp-tbt-dock-120w-g2.conf"
+ATTRS{idVendor}=="03f0", ATTRS{idProduct}=="0567", ENV{PULSE_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).
=====================================
src/modules/alsa/alsa-mixer.c
=====================================
@@ -4404,6 +4404,8 @@ static int mapping_verify(pa_alsa_mapping *m, const pa_channel_map *bonus) {
* multichannel-input and multichannel-output. */
{ "analog-stereo-input", N_("Analog Stereo") },
{ "analog-stereo-output", N_("Analog Stereo") },
+ { "analog-stereo-headset", N_("Headset") },
+ { "analog-stereo-speakerphone", N_("Speakerphone") },
{ "multichannel-input", N_("Multichannel") },
{ "multichannel-output", N_("Multichannel") },
{ "analog-surround-21", N_("Analog Surround 2.1") },
@@ -4560,6 +4562,8 @@ static int profile_verify(pa_alsa_profile *p) {
static const struct description_map well_known_descriptions[] = {
{ "output:analog-mono+input:analog-mono", N_("Analog Mono Duplex") },
{ "output:analog-stereo+input:analog-stereo", N_("Analog Stereo Duplex") },
+ { "output:analog-stereo-headset+input:analog-stereo-headset", N_("Headset") },
+ { "output:analog-stereo-speakerphone+input:analog-stereo-speakerphone", N_("Speakerphone") },
{ "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") },
=====================================
src/modules/alsa/mixer/profile-sets/hp-tbt-dock-120w-g2.conf
=====================================
@@ -0,0 +1,35 @@
+# This file is part of PulseAudio.
+#
+# PulseAudio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as
+# published by the Free Software Foundation; either version 2.1 of the
+# License, or (at your option) any later version.
+#
+# PulseAudio is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
+
+; HP Thunderbolt Dock 120W G2
+;
+; This dock has a 3.5mm headset connector. Both input and output are stereo.
+;
+; There's a separate speakerphone module called "HP Thunderbolt Dock Audio
+; Module", which can be attached to this dock. The module will appear in ALSA
+; as a separate USB sound card, configuration for it is in
+; hp-tbt-dock-audio-module.conf.
+
+[General]
+auto-profiles = no
+
+[Mapping analog-stereo-headset]
+device-strings = hw:%f,0,0
+channel-map = left,right
+
+[Profile output:analog-stereo-headset+input:analog-stereo-headset]
+output-mappings = analog-stereo-headset
+input-mappings = analog-stereo-headset
+skip-probe = yes
=====================================
src/modules/alsa/mixer/profile-sets/hp-tbt-dock-audio-module.conf
=====================================
@@ -0,0 +1,36 @@
+# This file is part of PulseAudio.
+#
+# PulseAudio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as
+# published by the Free Software Foundation; either version 2.1 of the
+# License, or (at your option) any later version.
+#
+# PulseAudio is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
+
+; HP Thunderbolt Dock Audio Module
+;
+; This device attaches to the "HP Thunderbolt Dock 120W G2" dock. The audio
+; module provides a speakerphone with echo cancellation and appears in ALSA as
+; a USB sound card with stereo input and output.
+;
+; The dock itself has a 3.5mm headset connector and appears as a separate USB
+; sound card, configuration for it is in hp-tbt-dock-120w-g2.conf.
+
+[General]
+auto-profiles = no
+
+[Mapping analog-stereo-speakerphone]
+device-strings = hw:%f,0,0
+channel-map = left,right
+intended-roles = phone
+
+[Profile output:analog-stereo-speakerphone+input:analog-stereo-speakerphone]
+output-mappings = analog-stereo-speakerphone
+input-mappings = analog-stereo-speakerphone
+skip-probe = yes
View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/compare/69ba5a2b58ad6e98c8899aa297afd8276dbbe052...a73ec2a3f4f03829575761dc17546cf3226861c7
--
View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/compare/69ba5a2b58ad6e98c8899aa297afd8276dbbe052...a73ec2a3f4f03829575761dc17546cf3226861c7
You're receiving this email because of your account on gitlab.freedesktop.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/pulseaudio-commits/attachments/20201123/bac8a011/attachment-0001.htm>
More information about the pulseaudio-commits
mailing list