devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/22] ASoC: Cleanup MediaTek soundcard machine drivers
@ 2024-02-27 12:09 AngeloGioacchino Del Regno
  2024-02-27 12:09 ` [PATCH 01/22] ASoC: mediatek: mt8192-afe-pcm: Convert to devm_pm_runtime_enable() AngeloGioacchino Del Regno
                   ` (21 more replies)
  0 siblings, 22 replies; 32+ messages in thread
From: AngeloGioacchino Del Regno @ 2024-02-27 12:09 UTC (permalink / raw)
  To: broonie
  Cc: wenst, lgirdwood, robh, krzysztof.kozlowski+dt, conor+dt,
	matthias.bgg, perex, tiwai, trevor.wu, maso.huang, xiazhengqiao,
	arnd, kuninori.morimoto.gx, shraash, amergnat, nicolas.ferre,
	u.kleine-koenig, dianders, frank.li, allen-kh.cheng,
	eugen.hristev, claudiu.beznea, jarkko.nikula, jiaxin.yu,
	alpernebiyasak, ckeepax, zhourui, nfraprado, alsa-devel,
	shane.chien, linux-sound, devicetree, linux-kernel,
	linux-arm-kernel, linux-mediatek, kernel,
	AngeloGioacchino Del Regno

This series performs a cleanup of most of the MediaTek AFE drivers and
soundcard machine drivers, reducing code duplication and setting a base
to be consistent with their devicetree bindings, as many of those are
using different properties and nodes for no good reason.

Summarizing:
 - Commonizes functions and ops where possible
 - Adds a common probe mechanism, increasing maintainability of
   soundcard drivers for older MediaTek SoCs
 - Migrates all drivers to support the new bindings
   - Obviously retains compatibility with old device trees
 - Reduces machine-specific parameters hardcoding in drivers
   - Can now set machine-specific params in device tree
   - Uses the `audio-routing` and `dai-link` nodes like some
     other non-MediaTek SoC sound drivers
 - Imposes consistency between MediaTek ASoC machine soundcard
   drivers bindings
 - Reduces code size and greatly reduces the amount of code that
   will be required for newer drivers (retaining compatibility with
   the old bindings was costly in terms of code size, otherwise
   this series would've removed ~1000 more lines, or something
   along that line).

This series was (manually) tested on MT8173, MT8192, MT8195 and MT8186
Chromebooks.

AngeloGioacchino Del Regno (22):
  ASoC: mediatek: mt8192-afe-pcm: Convert to devm_pm_runtime_enable()
  ASoC: mediatek: mt8192-afe-pcm: Simplify with dev_err_probe()
  ASoC: mediatek: Commonize ADDA rate transform functions and enums
  ASoC: mediatek: Assign dummy when codec not specified for a DAI link
  ASoC: mediatek: Add common machine soundcard driver probe mechanism
  ASoC: mediatek: common: Constify struct mtk_sof_priv
  ASoC: mediatek: mt8188: Migrate to mtk_soundcard_common_probe
  ASoC: mediatek: mt8195: Migrate to mtk_soundcard_common_probe
  ASoC: mediatek: mt8192: Migrate to mtk_soundcard_common_probe
  ASoC: mediatek: mt8186: Migrate to mtk_soundcard_common_probe
  ASoC: mediatek: Add common snd_soc_ops .startup() callback
  ASoC: mediatek: mt8195: Migrate to the common mtk_soundcard_startup
  ASoC: mediatek: mt8192: Migrate to the common mtk_soundcard_startup
  ASoC: mediatek: mt8186-rt1019: Migrate to the common
    mtk_soundcard_startup
  ASoC: mediatek: Add common mtk_afe_component_probe callback
  ASoC: mediatek: Use common mtk_afe_pcm_platform with common probe cb
  ASoC: mediatek: mt8186: Unify mt8186-mt6366 machine drivers
  ASoC: dt-bindings: mt8195: Document audio-routing and dai-link subnode
  ASoC: dt-bindings: mt8192: Document audio-routing and dai-link subnode
  ASoC: dt-bindings: mt8186: Document audio-routing and dai-link subnode
  arm64: dts: mediatek: mt8195-cherry: Specify sound DAI links and
    routing
  arm64: dts: mediatek: mt8186-corsola: Specify sound DAI links and
    routing

 .../sound/mt8186-mt6366-da7219-max98357.yaml  |  112 +-
 .../sound/mt8186-mt6366-rt1019-rt5682s.yaml   |  112 +-
 .../sound/mt8192-mt6359-rt1015-rt5682.yaml    |  129 +-
 .../bindings/sound/mt8195-mt6359.yaml         |  123 ++
 .../boot/dts/mediatek/mt8186-corsola.dtsi     |   42 +-
 .../boot/dts/mediatek/mt8195-cherry.dtsi      |   45 +
 sound/soc/mediatek/Kconfig                    |   24 +-
 sound/soc/mediatek/common/Makefile            |    2 +
 .../mediatek/common/mtk-afe-platform-driver.c |   18 +
 .../soc/mediatek/common/mtk-dai-adda-common.c |   70 +
 .../soc/mediatek/common/mtk-dai-adda-common.h |   45 +
 .../soc/mediatek/common/mtk-dsp-sof-common.c  |   15 +-
 .../soc/mediatek/common/mtk-dsp-sof-common.h  |    1 -
 sound/soc/mediatek/common/mtk-soc-card.h      |    7 +-
 .../mediatek/common/mtk-soundcard-driver.c    |  205 ++-
 .../mediatek/common/mtk-soundcard-driver.h    |   42 +
 sound/soc/mediatek/mt6797/mt6797-afe-pcm.c    |   14 +-
 sound/soc/mediatek/mt6797/mt6797-dai-adda.c   |   85 +-
 sound/soc/mediatek/mt7986/mt7986-afe-pcm.c    |   14 +-
 sound/soc/mediatek/mt8183/mt8183-afe-pcm.c    |   14 +-
 sound/soc/mediatek/mt8183/mt8183-dai-adda.c   |   90 +-
 sound/soc/mediatek/mt8186/Makefile            |    3 +-
 sound/soc/mediatek/mt8186/mt8186-afe-pcm.c    |   19 +-
 sound/soc/mediatek/mt8186/mt8186-dai-adda.c   |   94 +-
 .../mt8186/mt8186-mt6366-da7219-max98357.c    | 1189 -----------------
 ...t6366-rt1019-rt5682s.c => mt8186-mt6366.c} |  578 ++++----
 sound/soc/mediatek/mt8188/mt8188-afe-pcm.c    |   21 +-
 sound/soc/mediatek/mt8188/mt8188-dai-adda.c   |   89 +-
 sound/soc/mediatek/mt8188/mt8188-mt6359.c     |  203 +--
 sound/soc/mediatek/mt8192/mt8192-afe-pcm.c    |  114 +-
 sound/soc/mediatek/mt8192/mt8192-dai-adda.c   |   90 +-
 .../mt8192/mt8192-mt6359-rt1015-rt5682.c      |  301 ++---
 sound/soc/mediatek/mt8195/mt8195-afe-pcm.c    |   21 +-
 sound/soc/mediatek/mt8195/mt8195-dai-adda.c   |   90 +-
 sound/soc/mediatek/mt8195/mt8195-mt6359.c     |  487 +++----
 35 files changed, 1739 insertions(+), 2769 deletions(-)
 create mode 100644 sound/soc/mediatek/common/mtk-dai-adda-common.c
 create mode 100644 sound/soc/mediatek/common/mtk-dai-adda-common.h
 delete mode 100644 sound/soc/mediatek/mt8186/mt8186-mt6366-da7219-max98357.c
 rename sound/soc/mediatek/mt8186/{mt8186-mt6366-rt1019-rt5682s.c => mt8186-mt6366.c} (72%)

-- 
2.44.0


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

end of thread, other threads:[~2024-03-07 14:26 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-27 12:09 [PATCH 00/22] ASoC: Cleanup MediaTek soundcard machine drivers AngeloGioacchino Del Regno
2024-02-27 12:09 ` [PATCH 01/22] ASoC: mediatek: mt8192-afe-pcm: Convert to devm_pm_runtime_enable() AngeloGioacchino Del Regno
2024-02-29  3:23   ` Chen-Yu Tsai
2024-02-27 12:09 ` [PATCH 02/22] ASoC: mediatek: mt8192-afe-pcm: Simplify with dev_err_probe() AngeloGioacchino Del Regno
2024-02-29  3:25   ` Chen-Yu Tsai
2024-02-27 12:09 ` [PATCH 03/22] ASoC: mediatek: Commonize ADDA rate transform functions and enums AngeloGioacchino Del Regno
2024-02-27 12:09 ` [PATCH 04/22] ASoC: mediatek: Assign dummy when codec not specified for a DAI link AngeloGioacchino Del Regno
2024-02-27 12:09 ` [PATCH 05/22] ASoC: mediatek: Add common machine soundcard driver probe mechanism AngeloGioacchino Del Regno
2024-02-27 12:09 ` [PATCH 06/22] ASoC: mediatek: common: Constify struct mtk_sof_priv AngeloGioacchino Del Regno
2024-02-27 12:09 ` [PATCH 07/22] ASoC: mediatek: mt8188: Migrate to mtk_soundcard_common_probe AngeloGioacchino Del Regno
2024-02-27 12:09 ` [PATCH 08/22] ASoC: mediatek: mt8195: " AngeloGioacchino Del Regno
2024-02-27 12:09 ` [PATCH 09/22] ASoC: mediatek: mt8192: " AngeloGioacchino Del Regno
2024-02-27 12:09 ` [PATCH 10/22] ASoC: mediatek: mt8186: " AngeloGioacchino Del Regno
2024-02-27 12:09 ` [PATCH 11/22] ASoC: mediatek: Add common snd_soc_ops .startup() callback AngeloGioacchino Del Regno
2024-02-27 12:09 ` [PATCH 12/22] ASoC: mediatek: mt8195: Migrate to the common mtk_soundcard_startup AngeloGioacchino Del Regno
2024-02-27 12:09 ` [PATCH 13/22] ASoC: mediatek: mt8192: " AngeloGioacchino Del Regno
2024-02-27 12:09 ` [PATCH 14/22] ASoC: mediatek: mt8186-rt1019: " AngeloGioacchino Del Regno
2024-02-27 12:09 ` [PATCH 15/22] ASoC: mediatek: Add common mtk_afe_component_probe callback AngeloGioacchino Del Regno
2024-02-27 12:09 ` [PATCH 16/22] ASoC: mediatek: Use common mtk_afe_pcm_platform with common probe cb AngeloGioacchino Del Regno
2024-02-27 12:09 ` [PATCH 17/22] ASoC: mediatek: mt8186: Unify mt8186-mt6366 machine drivers AngeloGioacchino Del Regno
2024-02-27 12:09 ` [PATCH 18/22] ASoC: dt-bindings: mt8195: Document audio-routing and dai-link subnode AngeloGioacchino Del Regno
2024-02-29  8:25   ` Krzysztof Kozlowski
2024-02-29  9:10     ` AngeloGioacchino Del Regno
2024-02-27 12:09 ` [PATCH 19/22] ASoC: dt-bindings: mt8192: " AngeloGioacchino Del Regno
2024-03-04 14:23   ` Rob Herring
2024-03-05 11:20     ` AngeloGioacchino Del Regno
2024-03-07 14:03       ` Rob Herring
2024-03-07 14:26         ` AngeloGioacchino Del Regno
2024-02-27 12:09 ` [PATCH 20/22] ASoC: dt-bindings: mt8186: " AngeloGioacchino Del Regno
2024-03-04 14:24   ` Rob Herring
2024-02-27 12:09 ` [PATCH 21/22] arm64: dts: mediatek: mt8195-cherry: Specify sound DAI links and routing AngeloGioacchino Del Regno
2024-02-27 12:09 ` [PATCH 22/22] arm64: dts: mediatek: mt8186-corsola: " AngeloGioacchino Del Regno

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).