From: Alper Nebi Yasak <alpernebiyasak@gmail.com>
To: alsa-devel@alsa-project.org
Cc: "Cezary Rojewski" <cezary.rojewski@intel.com>,
"Alper Nebi Yasak" <alpernebiyasak@gmail.com>,
"Mark Brown" <broonie@kernel.org>,
"Liam Girdwood" <lgirdwood@gmail.com>,
"Takashi Iwai" <tiwai@suse.com>,
"AngeloGioacchino Del Regno"
<angelogioacchino.delregno@collabora.com>,
"Jaroslav Kysela" <perex@perex.cz>,
linux-kernel@vger.kernel.org,
"Akihiko Odaki" <akihiko.odaki@gmail.com>,
"Pierre-Louis Bossart" <pierre-louis.bossart@linux.intel.com>,
"Matthias Brugger" <matthias.bgg@gmail.com>,
"Nícolas F . R . A . Prado" <nfraprado@collabora.com>
Subject: [PATCH 00/27] ASoC: Map missing jack kcontrols
Date: Wed, 2 Aug 2023 20:57:10 +0300 [thread overview]
Message-ID: <20230802175737.263412-1-alpernebiyasak@gmail.com> (raw)
This patchset adds missing jack kcontrols for each independently
detectable audio peripheral and maps jack pins to those kcontrols
accordingly, with the primary intent to enable/improve jack detection
handling in PulseAudio and PipeWire through JackControl UCM values.
Usually it's just splitting a joint anything-is-connected "Headset Jack"
kcontrol (from [1]) into those like "Headphone Jack" and "Headset Mic"
(similar to a previous series for Intel Chromebooks [2]). This split is
important to avoid automatically switching to a nonexistent external
microphone when a headphone-only device is connected.
When the underlying hardware seems to support it, this also adds a "Line
Out" kcontrol. This is important in case the hardware can actually
support a line-level connection via a different configuration (bypassing
output amplifiers?), or simply for userspace to display "Line Out"
instead of "Headphones" to the user for connected line-out devices.
Beyond the mappings, I had to add PIN_SWITCH card kcontrols and DAPM
widgets to avoid "unknown pin" errors on my devices, so tried to do them
for all. For Intel devices I saw a pattern of routing things to
"Platform Clock" and added to that as well. Looking at patch 5/7 of a
Mediatek-related series [3], I can only guess that routes could be
further improved, but don't know exactly how for each device. And one
more concern is I don't know if the names conflict with any controls
from codecs, although I tried to keep to names of existing widgets.
As far as I can tell, the root cause for most of why these are missing
originates to things being developed for ChromeOS, whose userspace reads
the jack input device and doesn't care for these kcontrols. There's
non-ChromeOS cases as well, maybe things got copy-pasted around and
people didn't need or couldn't figure out how to get more specific than
a single jack kcontrol. The secondary intent in this patchset is to fix
this *everywhere*, so future copy-pastes result in the right behaviour.
For more context also see:
[1] ASoC: soc-card: Create jack kcontrol without pins
https://lore.kernel.org/alsa-devel/20220408041114.6024-1-akihiko.odaki@gmail.com/
[2] ASoC: Intel: Chromebooks: remap jack pins
https://lore.kernel.org/alsa-devel/20220616214055.134943-1-pierre-louis.bossart@linux.intel.com/
[3] ASoC: mediatek: Allow separate handling of headphone and headset mic jack
https://lore.kernel.org/alsa-devel/20220922235951.252532-1-nfraprado@collabora.com/
[4] ASoC: rk3399_gru_sound: Add DAPM pins, kcontrols for jack detection
https://lore.kernel.org/alsa-devel/20200721182709.6895-1-alpernebiyasak@gmail.com/
This applies onto next-20230802. Unfortunately most of it is untested
except for a few Chromebooks I have (Kevin, Lick, Hana, Cozmo), because
I'm intentionally generalizing to everything.
Alper Nebi Yasak (27):
ASoC: amd: acp-da7219-max98357a: Map missing jack kcontrols
ASoC: amd: acp-rt5645: Map missing jack kcontrols
ASoC: amd: acp: Map missing jack kcontrols
ASoC: amd: acp3x-rt5682-max9836: Map missing jack kcontrols
ASoC: Intel: avs: da7219: Map missing jack kcontrols
ASoC: Intel: bxt_da7219_max98357a: Map missing Line Out jack kcontrol
ASoC: Intel: bytcr_wm5102: Map missing Line Out jack kcontrol
ASoC: Intel: kbl_da7219_max98357a: Map missing Line Out jack kcontrol
ASoC: Intel: kbl_da7219_max98927: Map missing Line Out jack kcontrol
ASoC: Intel: sof_da7219_max98373: Map missing Line Out jack kcontrol
ASoC: imx-es8328: Map missing jack kcontrols
ASoC: mediatek: mt8173-max98090: Configure jack as a Headset jack
ASoC: mediatek: mt8173-rt5650-rt5514: Map missing jack kcontrols
ASoC: mediatek: mt8173-rt5650-rt5676: Map missing jack kcontrols
ASoC: mediatek: mt8173-rt5650: Map missing jack kcontrols
ASoC: mediatek: mt8183-da7219-max98357: Map missing jack kcontrols
ASoC: mediatek: mt8183-mt6358-ts3a227-max98357: Map missing jack
kcontrols
ASoC: mediatek: mt8186-mt6366-da7219-max98357: Map missing jack
kcontrols
ASoC: qcom: apq8016_sbc: Map missing jack kcontrols
ASoC: qcom: sc7180: Map missing jack kcontrols
ASoC: qcom: sc7280: Map missing jack kcontrols
ASoC: qcom: sdm845: Map missing jack kcontrols
ASoC: rk3399-gru-sound: Map missing Line Out jack kcontrol
ASoC: rockchip: rockchip_rt5645: Map missing jack kcontrols
ASoC: samsung: littlemill: Map missing jack kcontrols
ASoC: samsung: lowland: Split Line Out jack kcontrol from Headphone
ASoC: samsung: midas_wm1811: Map missing jack kcontrols
sound/soc/amd/acp-da7219-max98357a.c | 41 +++-
sound/soc/amd/acp-rt5645.c | 22 +-
sound/soc/amd/acp/acp-mach-common.c | 226 ++++++++++++++----
sound/soc/amd/acp3x-rt5682-max9836.c | 23 +-
sound/soc/fsl/imx-es8328.c | 25 +-
sound/soc/intel/avs/boards/da7219.c | 34 ++-
sound/soc/intel/boards/bxt_da7219_max98357a.c | 7 +
sound/soc/intel/boards/bytcr_wm5102.c | 7 +
sound/soc/intel/boards/kbl_da7219_max98357a.c | 7 +
sound/soc/intel/boards/kbl_da7219_max98927.c | 7 +
sound/soc/intel/boards/sof_da7219_max98373.c | 10 +
sound/soc/mediatek/mt8173/mt8173-max98090.c | 2 +-
.../mediatek/mt8173/mt8173-rt5650-rt5514.c | 23 +-
.../mediatek/mt8173/mt8173-rt5650-rt5676.c | 23 +-
sound/soc/mediatek/mt8173/mt8173-rt5650.c | 23 +-
.../mediatek/mt8183/mt8183-da7219-max98357.c | 43 +++-
.../mt8183/mt8183-mt6358-ts3a227-max98357.c | 53 +++-
.../mt8186/mt8186-mt6366-da7219-max98357.c | 6 +
sound/soc/qcom/apq8016_sbc.c | 37 ++-
sound/soc/qcom/sc7180.c | 40 +++-
sound/soc/qcom/sc7280.c | 34 ++-
sound/soc/qcom/sdm845.c | 32 ++-
sound/soc/rockchip/rk3399_gru_sound.c | 7 +-
sound/soc/rockchip/rockchip_rt5645.c | 22 +-
sound/soc/samsung/littlemill.c | 27 ++-
sound/soc/samsung/lowland.c | 8 +-
sound/soc/samsung/midas_wm1811.c | 25 +-
27 files changed, 668 insertions(+), 146 deletions(-)
base-commit: 626c67169f9972fffcdf3bc3864de421f162ebf5
--
2.40.1
next reply other threads:[~2023-08-02 17:58 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-02 17:57 Alper Nebi Yasak [this message]
2023-08-02 17:57 ` [PATCH 01/27] ASoC: amd: acp-da7219-max98357a: " Alper Nebi Yasak
2023-08-02 17:57 ` [PATCH 02/27] ASoC: amd: acp-rt5645: " Alper Nebi Yasak
2023-08-02 17:57 ` [PATCH 03/27] ASoC: amd: acp: " Alper Nebi Yasak
2023-08-02 17:57 ` [PATCH 04/27] ASoC: amd: acp3x-rt5682-max9836: " Alper Nebi Yasak
2023-08-04 8:04 ` Akihiko Odaki
2023-08-04 13:11 ` Mark Brown
2023-08-04 13:19 ` Akihiko Odaki
2023-08-04 13:22 ` Mark Brown
2023-08-08 7:47 ` Akihiko Odaki
2023-08-08 7:49 ` Akihiko Odaki
2023-08-02 17:57 ` [PATCH 05/27] ASoC: Intel: avs: da7219: " Alper Nebi Yasak
2023-08-02 17:57 ` [PATCH 06/27] ASoC: Intel: bxt_da7219_max98357a: Map missing Line Out jack kcontrol Alper Nebi Yasak
2023-08-02 17:57 ` [PATCH 07/27] ASoC: Intel: bytcr_wm5102: " Alper Nebi Yasak
2023-08-02 17:57 ` [PATCH 08/27] ASoC: Intel: kbl_da7219_max98357a: " Alper Nebi Yasak
2023-08-02 17:57 ` [PATCH 09/27] ASoC: Intel: kbl_da7219_max98927: " Alper Nebi Yasak
2023-08-02 17:57 ` [PATCH 10/27] ASoC: Intel: sof_da7219_max98373: " Alper Nebi Yasak
2023-08-02 17:57 ` [PATCH 11/27] ASoC: imx-es8328: Map missing jack kcontrols Alper Nebi Yasak
2023-08-02 17:57 ` [PATCH 12/27] ASoC: mediatek: mt8173-max98090: Configure jack as a Headset jack Alper Nebi Yasak
2023-08-02 17:57 ` [PATCH 13/27] ASoC: mediatek: mt8173-rt5650-rt5514: Map missing jack kcontrols Alper Nebi Yasak
2023-08-02 17:57 ` [PATCH 14/27] ASoC: mediatek: mt8173-rt5650-rt5676: " Alper Nebi Yasak
2023-08-02 17:57 ` [PATCH 15/27] ASoC: mediatek: mt8173-rt5650: " Alper Nebi Yasak
2023-08-02 17:57 ` [PATCH 16/27] ASoC: mediatek: mt8183-da7219-max98357: " Alper Nebi Yasak
2023-08-02 17:57 ` [PATCH 17/27] ASoC: mediatek: mt8183-mt6358-ts3a227-max98357: " Alper Nebi Yasak
2023-08-02 17:57 ` [PATCH 18/27] ASoC: mediatek: mt8186-mt6366-da7219-max98357: " Alper Nebi Yasak
2023-08-02 17:57 ` [PATCH 19/27] ASoC: qcom: apq8016_sbc: " Alper Nebi Yasak
2023-08-02 17:57 ` [PATCH 20/27] ASoC: qcom: sc7180: " Alper Nebi Yasak
2023-08-02 17:57 ` [PATCH 21/27] ASoC: qcom: sc7280: " Alper Nebi Yasak
2023-08-02 17:57 ` [PATCH 22/27] ASoC: qcom: sdm845: " Alper Nebi Yasak
2023-08-02 17:57 ` [PATCH 23/27] ASoC: rk3399-gru-sound: Map missing Line Out jack kcontrol Alper Nebi Yasak
2023-08-02 17:57 ` [PATCH 24/27] ASoC: rockchip: rockchip_rt5645: Map missing jack kcontrols Alper Nebi Yasak
2023-08-02 17:57 ` [PATCH 25/27] ASoC: samsung: littlemill: " Alper Nebi Yasak
2023-08-02 17:57 ` [PATCH 26/27] ASoC: samsung: lowland: Split Line Out jack kcontrol from Headphone Alper Nebi Yasak
2023-08-02 17:57 ` [PATCH 27/27] ASoC: samsung: midas_wm1811: Map missing jack kcontrols Alper Nebi Yasak
2023-08-07 19:54 ` [PATCH 00/27] ASoC: " Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230802175737.263412-1-alpernebiyasak@gmail.com \
--to=alpernebiyasak@gmail.com \
--cc=akihiko.odaki@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=angelogioacchino.delregno@collabora.com \
--cc=broonie@kernel.org \
--cc=cezary.rojewski@intel.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=matthias.bgg@gmail.com \
--cc=nfraprado@collabora.com \
--cc=perex@perex.cz \
--cc=pierre-louis.bossart@linux.intel.com \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®