From ae0869fe2dc0e92599df68b5f5819d2896e76076 Mon Sep 17 00:00:00 2001 From: Iuliana Prodan Date: Thu, 6 Apr 2023 16:53:21 +0300 Subject: [PATCH] topology: imx: Add topology file for i.MX8MP with wm8962 codec Add new topology file for i.MX8MP with wm8962 codec. Signed-off-by: Iuliana Prodan --- tools/topology/topology1/CMakeLists.txt | 1 + tools/topology/topology1/sof-imx8mp-wm8960.m4 | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/tools/topology/topology1/CMakeLists.txt b/tools/topology/topology1/CMakeLists.txt index 6192dadb8..93389d3d5 100644 --- a/tools/topology/topology1/CMakeLists.txt +++ b/tools/topology/topology1/CMakeLists.txt @@ -169,6 +169,7 @@ set(TPLGS "sof-imx8mp-wm8960-kwd\;sof-imx8mp-wm8960-kwd" "sof-imx8mp-wm8960\;sof-imx8mp-wm8960\;-DCODEC=wm8960\;-DRATE=48000\;-DPPROC=volume" "sof-imx8mp-wm8960\;sof-imx8mp-wm8904\;-DCODEC=wm8904\;-DRATE=44100\;-DPPROC=volume" + "sof-imx8mp-wm8960\;sof-imx8mp-wm8962\;-DCODEC=wm8962\;-DRATE=48000\;-DPPROC=volume" "sof-imx8mp-wm8960\;sof-imx8mp-eq-iir-wm8960\;-DCODEC=wm8960\;-DRATE=48000\;-DPPROC=eq-iir-volume" "sof-imx8mp-wm8960\;sof-imx8mp-eq-fir-wm8960\;-DCODEC=wm8960\;-DRATE=48000\;-DPPROC=eq-fir-volume" "sof-imx8mp-wm8960\;sof-imx8mp-drc-wm8960\;-DCODEC=wm8960\;-DRATE=48000\;-DPPROC=drc" diff --git a/tools/topology/topology1/sof-imx8mp-wm8960.m4 b/tools/topology/topology1/sof-imx8mp-wm8960.m4 index dd98801d6..0dd4bb85c 100644 --- a/tools/topology/topology1/sof-imx8mp-wm8960.m4 +++ b/tools/topology/topology1/sof-imx8mp-wm8960.m4 @@ -1,7 +1,7 @@ # # Topology for i.MX8MP board with `CODEC' codec # -# CODEC: wm8960, wm8904 +# CODEC: wm8960, wm8904, wm8962 # # Include topology builder @@ -54,6 +54,7 @@ PIPELINE_PCM_ADD(sof/pipe-volume-capture.m4, define(`STREAM_NAME', `ifelse(CODEC, `wm8960', `wm8960-hifi', CODEC, `wm8904', `wm8904-hifi', + CODEC, `wm8962', `wm8962', `fatal_error(`Codec not supported.')')') # define DAI BE dai_link name @@ -98,4 +99,10 @@ ifelse( SAI_CLOCK(fsync, `RATE', codec_provider), SAI_TDM(2, 32, 3, 3), SAI_CONFIG_DATA(SAI, 3, 0)))', + CODEC, `wm8962', ` + SAI_CONFIG(I2S, SAI_CLOCK(mclk, 12288000, codec_mclk_in), + SAI_CLOCK(bclk, 3072000, codec_master), + SAI_CLOCK(fsync, `RATE', codec_master), + SAI_TDM(2, 32, 3, 3), + SAI_CONFIG_DATA(SAI, 3, 0)))', )