[PATCH 00/10] ASoC: mediatek: Set i2s clock sharing from machine drivers

From: Nícolas F. R. A. Prado
Date: Thu Sep 08 2022 - 12:12:07 EST



The i2s ports on MediaTek SoCs only support a single data lane. In order
to achieve full-duplex operation thus two i2s ports, one for input and
one for output, need to be used together and sharing a single clock from
one of the ports.

This clock sharing setting was previously read by the sound platform
driver from the devicetree, but given that the input/output pairing is
closely related to which codecs are connected to which ports, the
machine sound driver can infer and set it, so that no DT property is
required.

At this point only mt8183-kukui was using the DT property, but given
that this property was never documented, and that the API introduced in
this series makes it obsolete, the undocumented DT property can safely
be removed.

This series adds a function to allow setting the i2s shared clocks,
makes use of it in the machine drivers as required, and removes the no
longer required DT properties and support for them in the drivers, for
all of mt8192, mt8183 and mt8186.


Nícolas F. R. A. Prado (10):
ASoC: mediatek: mt8192: Allow setting shared clocks from machine
driver
ASoC: mediatek: mt8192-mt6359: Make i2s9 share the clock from i2s8
ASoC: mediatek: mt8192: Remove clock share parsing from DT
ASoC: mediatek: mt8183: Allow setting shared clocks from machine
driver
ASoC: mediatek: mt8183: Configure shared clocks
ASoC: mediatek: mt8183: Remove clock share parsing from DT
arm64: dts: mediatek: kukui: Remove i2s-share properties
ASoC: mediatek: mt8186: Allow setting shared clocks from machine
driver
ASoC: mediatek: mt8186: Configure shared clocks
ASoC: mediatek: mt8186: Remove clock share parsing from DT

.../arm64/boot/dts/mediatek/mt8183-kukui.dtsi | 5 --
sound/soc/mediatek/mt8183/mt8183-afe-common.h | 3 ++
.../mediatek/mt8183/mt8183-da7219-max98357.c | 33 +++++++++++++
sound/soc/mediatek/mt8183/mt8183-dai-i2s.c | 45 ++++++++---------
.../mt8183/mt8183-mt6358-ts3a227-max98357.c | 33 +++++++++++++
sound/soc/mediatek/mt8186/mt8186-afe-common.h | 3 ++
sound/soc/mediatek/mt8186/mt8186-dai-i2s.c | 44 ++++++++---------
.../mt8186/mt8186-mt6366-da7219-max98357.c | 18 +++++++
.../mt8186/mt8186-mt6366-rt1019-rt5682s.c | 18 +++++++
sound/soc/mediatek/mt8192/mt8192-afe-common.h | 3 ++
sound/soc/mediatek/mt8192/mt8192-dai-i2s.c | 49 ++++++++-----------
.../mt8192/mt8192-mt6359-rt1015-rt5682.c | 9 ++++
12 files changed, 180 insertions(+), 83 deletions(-)

--
2.37.3