mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 00/27] ASoC: Map missing jack kcontrols
@ 2023-08-02 17:57 Alper Nebi Yasak
  2023-08-02 17:57 ` [PATCH 01/27] ASoC: amd: acp-da7219-max98357a: " Alper Nebi Yasak
                   ` (27 more replies)
  0 siblings, 28 replies; 35+ messages in thread
From: Alper Nebi Yasak @ 2023-08-02 17:57 UTC (permalink / raw)
  To: alsa-devel
  Cc: Cezary Rojewski, Alper Nebi Yasak, Mark Brown, Liam Girdwood,
	Takashi Iwai, AngeloGioacchino Del Regno, Jaroslav Kysela,
	linux-kernel, Akihiko Odaki, Pierre-Louis Bossart,
	Matthias Brugger, Nícolas F . R . A . Prado

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


^ permalink raw reply	[flat|nested] 35+ messages in thread

end of thread, other threads:[~2023-08-08 19:10 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-02 17:57 [PATCH 00/27] ASoC: Map missing jack kcontrols Alper Nebi Yasak
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

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®