[PATCH v5 00/20] ASoC: mediatek: Add support for MT8186 SoC

Jiaxin Yu posted 20 patches 1 year, 10 months ago
There is a newer version of this series
.../devicetree/bindings/sound/mt6358.txt      |    4 +-
.../bindings/sound/mt8186-afe-pcm.yaml        |  175 +
.../sound/mt8186-mt6366-da7219-max98357.yaml  |   75 +
.../sound/mt8186-mt6366-rt1019-rt5682s.yaml   |   75 +
sound/soc/codecs/mt6358.c                     |    1 +
sound/soc/mediatek/Kconfig                    |   44 +
sound/soc/mediatek/Makefile                   |    1 +
sound/soc/mediatek/mt8186/Makefile            |   22 +
sound/soc/mediatek/mt8186/mt8186-afe-clk.c    |  651 ++++
sound/soc/mediatek/mt8186/mt8186-afe-clk.h    |  106 +
sound/soc/mediatek/mt8186/mt8186-afe-common.h |  235 ++
.../soc/mediatek/mt8186/mt8186-afe-control.c  |  261 ++
sound/soc/mediatek/mt8186/mt8186-afe-gpio.c   |  244 ++
sound/soc/mediatek/mt8186/mt8186-afe-gpio.h   |   19 +
sound/soc/mediatek/mt8186/mt8186-afe-pcm.c    | 3009 +++++++++++++++++
sound/soc/mediatek/mt8186/mt8186-audsys-clk.c |  150 +
sound/soc/mediatek/mt8186/mt8186-audsys-clk.h |   15 +
.../soc/mediatek/mt8186/mt8186-audsys-clkid.h |   45 +
sound/soc/mediatek/mt8186/mt8186-dai-adda.c   |  873 +++++
.../soc/mediatek/mt8186/mt8186-dai-hostless.c |  298 ++
.../soc/mediatek/mt8186/mt8186-dai-hw-gain.c  |  236 ++
sound/soc/mediatek/mt8186/mt8186-dai-i2s.c    | 1286 +++++++
sound/soc/mediatek/mt8186/mt8186-dai-pcm.c    |  423 +++
sound/soc/mediatek/mt8186/mt8186-dai-src.c    |  695 ++++
sound/soc/mediatek/mt8186/mt8186-dai-tdm.c    |  698 ++++
.../mediatek/mt8186/mt8186-interconnection.h  |   69 +
.../soc/mediatek/mt8186/mt8186-misc-control.c |  252 ++
.../mediatek/mt8186/mt8186-mt6366-common.c    |   59 +
.../mediatek/mt8186/mt8186-mt6366-common.h    |   17 +
.../mt8186/mt8186-mt6366-da7219-max98357.c    | 1003 ++++++
.../mt8186/mt8186-mt6366-rt1019-rt5682s.c     |  979 ++++++
sound/soc/mediatek/mt8186/mt8186-reg.h        | 2913 ++++++++++++++++
32 files changed, 14932 insertions(+), 1 deletion(-)
create mode 100644 Documentation/devicetree/bindings/sound/mt8186-afe-pcm.yaml
create mode 100644 Documentation/devicetree/bindings/sound/mt8186-mt6366-da7219-max98357.yaml
create mode 100644 Documentation/devicetree/bindings/sound/mt8186-mt6366-rt1019-rt5682s.yaml
create mode 100644 sound/soc/mediatek/mt8186/Makefile
create mode 100644 sound/soc/mediatek/mt8186/mt8186-afe-clk.c
create mode 100644 sound/soc/mediatek/mt8186/mt8186-afe-clk.h
create mode 100644 sound/soc/mediatek/mt8186/mt8186-afe-common.h
create mode 100644 sound/soc/mediatek/mt8186/mt8186-afe-control.c
create mode 100644 sound/soc/mediatek/mt8186/mt8186-afe-gpio.c
create mode 100644 sound/soc/mediatek/mt8186/mt8186-afe-gpio.h
create mode 100644 sound/soc/mediatek/mt8186/mt8186-afe-pcm.c
create mode 100644 sound/soc/mediatek/mt8186/mt8186-audsys-clk.c
create mode 100644 sound/soc/mediatek/mt8186/mt8186-audsys-clk.h
create mode 100644 sound/soc/mediatek/mt8186/mt8186-audsys-clkid.h
create mode 100644 sound/soc/mediatek/mt8186/mt8186-dai-adda.c
create mode 100644 sound/soc/mediatek/mt8186/mt8186-dai-hostless.c
create mode 100644 sound/soc/mediatek/mt8186/mt8186-dai-hw-gain.c
create mode 100644 sound/soc/mediatek/mt8186/mt8186-dai-i2s.c
create mode 100644 sound/soc/mediatek/mt8186/mt8186-dai-pcm.c
create mode 100644 sound/soc/mediatek/mt8186/mt8186-dai-src.c
create mode 100644 sound/soc/mediatek/mt8186/mt8186-dai-tdm.c
create mode 100644 sound/soc/mediatek/mt8186/mt8186-interconnection.h
create mode 100644 sound/soc/mediatek/mt8186/mt8186-misc-control.c
create mode 100644 sound/soc/mediatek/mt8186/mt8186-mt6366-common.c
create mode 100644 sound/soc/mediatek/mt8186/mt8186-mt6366-common.h
create mode 100644 sound/soc/mediatek/mt8186/mt8186-mt6366-da7219-max98357.c
create mode 100644 sound/soc/mediatek/mt8186/mt8186-mt6366-rt1019-rt5682s.c
create mode 100644 sound/soc/mediatek/mt8186/mt8186-reg.h
[PATCH v5 00/20] ASoC: mediatek: Add support for MT8186 SoC
Posted by Jiaxin Yu 1 year, 10 months ago
This series of patches adds support for Mediatek AFE of MT8186 Soc.
Patches are based on broonie tree "for-next" branch.

Changes since v4:
  - [v5 07/20]
    - remove unsusd controls
  - [v5 09/20]
    - correct indent error
  - [v5 10/20]
  - [v5 13/20]
  - [v5 14/20]
    - fix the return value if the value is different from the previous
      value in mixer controls
  - [v5 17/20]
  - [v5 19/20]
    - correct the compatible name with '_' instead of '-'
  - [v5 18/20]
  - [v5 20/20]
    - correct the yaml after 'pip3 install dtschema --upgrade'

Changes since v3:
  - [v4 09/18]
    - remove DEBUG_COEFF debugging code
  - [v4 10/18]
    - simplify the logic of the code
  - [v4 13/18]
    - split out the MT6366 bits into mt8186-mt6366-commom.c
    - fix build error of "error: 'struct dev_pm_info' has no member named 'runtime_error'"
    - fix bug of adda dai driver
    - add route for pcm interface channel 2.
  - [v4 15/18]
  - [v4 17/18]
    - commonize the configuration of the codec
    - move MT6366 common bits into mt8186-mt6366-common.c

Changes since v2:
  - add a new compatible string "mediatek,mt6366-sound"
  - modify the log level for simplicity
  - use dev_err_probe(...) instead of dev_err(...) in dev probe()
  - optimized the logic of some code
  - use BIT() and GENMASK() macros to descript the registers

  Thanks for AngeloGioacchino's careful reviews.

Changes since v1:
  [v2 01/17]
    - add a new ID to the existing mt6358 codec driver
  [v2 03/17]
    - modify log level in DAPM events
    - use standard numeric control with name ending in Switch
    - return 1 when the value changed in mixer control's .get callback
  [v2 05/17]
    - ending in Switch to the standard on/off controls
    - change to "HW Gain 1 Volume" and "HW Gain 2 Volume"
  [v2 09/17]
    - return an error in the default case rather than just picking one of
      the behaviours when do .set_fmt
    - use the new defines that are _PROVIDER_MASK, _DAIFMT_CBP_CFP and
      _DAIFMT_CBC_CFC
  [v2 10/17]
  [v2 11/17]
    - the clock and gpio are aplit out into separate  patches

  The source file's GPL comment use c++ style, and the header fils's GPL
  comment use c style. We have added "Switch" after the names of all the
  controls that just are simple on/off.

Jiaxin Yu (20):
  ASoC: mediatek: mt6366: support for mt6366 codec
  dt-bindings: mediatek: mt6358: add new compatible for using mt6366
  ASoC: mediatek: mt8186: support audsys clock control
  ASoC: mediatek: mt8186: support adda in platform driver
  ASoC: mediatek: mt8186: support hostless in platform driver
  ASoC: mediatek: mt8186: support hw gain in platform driver
  ASoC: mediatek: mt8186: support i2s in platform driver
  ASoC: mediatek: mt8186: support pcm in platform driver
  ASoC: mediatek: mt8186: support src in platform driver
  ASoC: mediatek: mt8186: support tdm in platform driver
  ASoC: mediatek: mt8186: support audio clock control in platform driver
  ASoC: mediatek: mt8186: support gpio control in platform driver
  ASoC: mediatek: mt8186: add misc driver and register definitions
  ASoC: mediatek: mt8186: add platform driver
  ASoC: mediatek: mt8186: add mt8186-mt6366 common driver
  dt-bindings: mediatek: mt8186: add audio afe document
  ASoC: mediatek: mt8186: add machine driver with mt6366, da7219 and
    max98357
  dt-bindings: mediatek: mt8186: add mt8186-mt6366-da7219-max98357
    document
  ASoC: mediatek: mt8186: add machine driver with mt6366, rt1019 and
    rt5682s
  dt-bindings: mediatek: mt8186: add mt8186-mt6366-rt1019-rt5682s
    document

 .../devicetree/bindings/sound/mt6358.txt      |    4 +-
 .../bindings/sound/mt8186-afe-pcm.yaml        |  175 +
 .../sound/mt8186-mt6366-da7219-max98357.yaml  |   75 +
 .../sound/mt8186-mt6366-rt1019-rt5682s.yaml   |   75 +
 sound/soc/codecs/mt6358.c                     |    1 +
 sound/soc/mediatek/Kconfig                    |   44 +
 sound/soc/mediatek/Makefile                   |    1 +
 sound/soc/mediatek/mt8186/Makefile            |   22 +
 sound/soc/mediatek/mt8186/mt8186-afe-clk.c    |  651 ++++
 sound/soc/mediatek/mt8186/mt8186-afe-clk.h    |  106 +
 sound/soc/mediatek/mt8186/mt8186-afe-common.h |  235 ++
 .../soc/mediatek/mt8186/mt8186-afe-control.c  |  261 ++
 sound/soc/mediatek/mt8186/mt8186-afe-gpio.c   |  244 ++
 sound/soc/mediatek/mt8186/mt8186-afe-gpio.h   |   19 +
 sound/soc/mediatek/mt8186/mt8186-afe-pcm.c    | 3009 +++++++++++++++++
 sound/soc/mediatek/mt8186/mt8186-audsys-clk.c |  150 +
 sound/soc/mediatek/mt8186/mt8186-audsys-clk.h |   15 +
 .../soc/mediatek/mt8186/mt8186-audsys-clkid.h |   45 +
 sound/soc/mediatek/mt8186/mt8186-dai-adda.c   |  873 +++++
 .../soc/mediatek/mt8186/mt8186-dai-hostless.c |  298 ++
 .../soc/mediatek/mt8186/mt8186-dai-hw-gain.c  |  236 ++
 sound/soc/mediatek/mt8186/mt8186-dai-i2s.c    | 1286 +++++++
 sound/soc/mediatek/mt8186/mt8186-dai-pcm.c    |  423 +++
 sound/soc/mediatek/mt8186/mt8186-dai-src.c    |  695 ++++
 sound/soc/mediatek/mt8186/mt8186-dai-tdm.c    |  698 ++++
 .../mediatek/mt8186/mt8186-interconnection.h  |   69 +
 .../soc/mediatek/mt8186/mt8186-misc-control.c |  252 ++
 .../mediatek/mt8186/mt8186-mt6366-common.c    |   59 +
 .../mediatek/mt8186/mt8186-mt6366-common.h    |   17 +
 .../mt8186/mt8186-mt6366-da7219-max98357.c    | 1003 ++++++
 .../mt8186/mt8186-mt6366-rt1019-rt5682s.c     |  979 ++++++
 sound/soc/mediatek/mt8186/mt8186-reg.h        | 2913 ++++++++++++++++
 32 files changed, 14932 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/devicetree/bindings/sound/mt8186-afe-pcm.yaml
 create mode 100644 Documentation/devicetree/bindings/sound/mt8186-mt6366-da7219-max98357.yaml
 create mode 100644 Documentation/devicetree/bindings/sound/mt8186-mt6366-rt1019-rt5682s.yaml
 create mode 100644 sound/soc/mediatek/mt8186/Makefile
 create mode 100644 sound/soc/mediatek/mt8186/mt8186-afe-clk.c
 create mode 100644 sound/soc/mediatek/mt8186/mt8186-afe-clk.h
 create mode 100644 sound/soc/mediatek/mt8186/mt8186-afe-common.h
 create mode 100644 sound/soc/mediatek/mt8186/mt8186-afe-control.c
 create mode 100644 sound/soc/mediatek/mt8186/mt8186-afe-gpio.c
 create mode 100644 sound/soc/mediatek/mt8186/mt8186-afe-gpio.h
 create mode 100644 sound/soc/mediatek/mt8186/mt8186-afe-pcm.c
 create mode 100644 sound/soc/mediatek/mt8186/mt8186-audsys-clk.c
 create mode 100644 sound/soc/mediatek/mt8186/mt8186-audsys-clk.h
 create mode 100644 sound/soc/mediatek/mt8186/mt8186-audsys-clkid.h
 create mode 100644 sound/soc/mediatek/mt8186/mt8186-dai-adda.c
 create mode 100644 sound/soc/mediatek/mt8186/mt8186-dai-hostless.c
 create mode 100644 sound/soc/mediatek/mt8186/mt8186-dai-hw-gain.c
 create mode 100644 sound/soc/mediatek/mt8186/mt8186-dai-i2s.c
 create mode 100644 sound/soc/mediatek/mt8186/mt8186-dai-pcm.c
 create mode 100644 sound/soc/mediatek/mt8186/mt8186-dai-src.c
 create mode 100644 sound/soc/mediatek/mt8186/mt8186-dai-tdm.c
 create mode 100644 sound/soc/mediatek/mt8186/mt8186-interconnection.h
 create mode 100644 sound/soc/mediatek/mt8186/mt8186-misc-control.c
 create mode 100644 sound/soc/mediatek/mt8186/mt8186-mt6366-common.c
 create mode 100644 sound/soc/mediatek/mt8186/mt8186-mt6366-common.h
 create mode 100644 sound/soc/mediatek/mt8186/mt8186-mt6366-da7219-max98357.c
 create mode 100644 sound/soc/mediatek/mt8186/mt8186-mt6366-rt1019-rt5682s.c
 create mode 100644 sound/soc/mediatek/mt8186/mt8186-reg.h

-- 
2.18.0
Re: [PATCH v5 00/20] ASoC: mediatek: Add support for MT8186 SoC
Posted by Mark Brown 1 year, 9 months ago
On Mon, 23 May 2022 21:28:38 +0800, Jiaxin Yu wrote:
> This series of patches adds support for Mediatek AFE of MT8186 Soc.
> Patches are based on broonie tree "for-next" branch.
> 
> Changes since v4:
>   - [v5 07/20]
>     - remove unsusd controls
>   - [v5 09/20]
>     - correct indent error
>   - [v5 10/20]
>   - [v5 13/20]
>   - [v5 14/20]
>     - fix the return value if the value is different from the previous
>       value in mixer controls
>   - [v5 17/20]
>   - [v5 19/20]
>     - correct the compatible name with '_' instead of '-'
>   - [v5 18/20]
>   - [v5 20/20]
>     - correct the yaml after 'pip3 install dtschema --upgrade'
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[01/20] ASoC: mediatek: mt6366: support for mt6366 codec
        commit: 612c4695e312c753a8b06f6b052cea3d8338e3c3
[02/20] dt-bindings: mediatek: mt6358: add new compatible for using mt6366
        (no commit info)
[03/20] ASoC: mediatek: mt8186: support audsys clock control
        commit: 58949aa35c0f74a98b03864817354d85f452a51c
[04/20] ASoC: mediatek: mt8186: support adda in platform driver
        commit: b65c466220b336f5044c1be75ebc771d087ee7ca
[05/20] ASoC: mediatek: mt8186: support hostless in platform driver
        commit: 55cac93d271166a2aa431d453bf31fdcb19bd5e6
[06/20] ASoC: mediatek: mt8186: support hw gain in platform driver
        commit: 2567ccae9105cbc881828f2ea09954c1b5fd975d
[07/20] ASoC: mediatek: mt8186: support i2s in platform driver
        commit: 2907d261276e09bd84fdc8bad35930a046a99d4d
[08/20] ASoC: mediatek: mt8186: support pcm in platform driver
        commit: 920508f9fe2fc90f19916d74f4c23088030d32e0
[09/20] ASoC: mediatek: mt8186: support src in platform driver
        commit: e118015db7bd0dad1744221d0fe18333ebf9c622
[10/20] ASoC: mediatek: mt8186: support tdm in platform driver
        commit: ae92dcbee8b6a6f63198a2a6fea0fc9f6a0fe07b
[11/20] ASoC: mediatek: mt8186: support audio clock control in platform driver
        commit: 55b423d5623ccd6785429431c2cf5f3e073b73ba
[12/20] ASoC: mediatek: mt8186: support gpio control in platform driver
        commit: cfa9a966f12a91a269e50f1c3237c006ffe2ee9a
[13/20] ASoC: mediatek: mt8186: add misc driver and register definitions
        commit: 80d8cad2e9ce21517d50c7084c12a59d38a778f7
[14/20] ASoC: mediatek: mt8186: add platform driver
        (no commit info)
[15/20] ASoC: mediatek: mt8186: add mt8186-mt6366 common driver
        (no commit info)
[16/20] dt-bindings: mediatek: mt8186: add audio afe document
        (no commit info)
[17/20] ASoC: mediatek: mt8186: add machine driver with mt6366, da7219 and max98357
        (no commit info)
[18/20] dt-bindings: mediatek: mt8186: add mt8186-mt6366-da7219-max98357 document
        (no commit info)
[19/20] ASoC: mediatek: mt8186: add machine driver with mt6366, rt1019 and rt5682s
        (no commit info)
[20/20] dt-bindings: mediatek: mt8186: add mt8186-mt6366-rt1019-rt5682s document
        (no commit info)

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark