162306a36Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0 262306a36Sopenharmony_ci// Copyright (c) 2020, Linaro Limited 362306a36Sopenharmony_ci 462306a36Sopenharmony_ci#include <sound/pcm.h> 562306a36Sopenharmony_ci#include <sound/soc.h> 662306a36Sopenharmony_ci#include <sound/pcm_params.h> 762306a36Sopenharmony_ci#include <dt-bindings/sound/qcom,q6afe.h> 862306a36Sopenharmony_ci#include "q6dsp-lpass-ports.h" 962306a36Sopenharmony_ci 1062306a36Sopenharmony_ci#define Q6AFE_TDM_PB_DAI(pre, num, did) { \ 1162306a36Sopenharmony_ci .playback = { \ 1262306a36Sopenharmony_ci .stream_name = pre" TDM"#num" Playback", \ 1362306a36Sopenharmony_ci .rates = SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_16000 |\ 1462306a36Sopenharmony_ci SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_48000 |\ 1562306a36Sopenharmony_ci SNDRV_PCM_RATE_176400, \ 1662306a36Sopenharmony_ci .formats = SNDRV_PCM_FMTBIT_S16_LE | \ 1762306a36Sopenharmony_ci SNDRV_PCM_FMTBIT_S24_LE | \ 1862306a36Sopenharmony_ci SNDRV_PCM_FMTBIT_S32_LE, \ 1962306a36Sopenharmony_ci .channels_min = 1, \ 2062306a36Sopenharmony_ci .channels_max = 8, \ 2162306a36Sopenharmony_ci .rate_min = 8000, \ 2262306a36Sopenharmony_ci .rate_max = 176400, \ 2362306a36Sopenharmony_ci }, \ 2462306a36Sopenharmony_ci .name = #did, \ 2562306a36Sopenharmony_ci .id = did, \ 2662306a36Sopenharmony_ci } 2762306a36Sopenharmony_ci 2862306a36Sopenharmony_ci#define Q6AFE_TDM_CAP_DAI(pre, num, did) { \ 2962306a36Sopenharmony_ci .capture = { \ 3062306a36Sopenharmony_ci .stream_name = pre" TDM"#num" Capture", \ 3162306a36Sopenharmony_ci .rates = SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_16000 |\ 3262306a36Sopenharmony_ci SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_48000 |\ 3362306a36Sopenharmony_ci SNDRV_PCM_RATE_176400, \ 3462306a36Sopenharmony_ci .formats = SNDRV_PCM_FMTBIT_S16_LE | \ 3562306a36Sopenharmony_ci SNDRV_PCM_FMTBIT_S24_LE | \ 3662306a36Sopenharmony_ci SNDRV_PCM_FMTBIT_S32_LE, \ 3762306a36Sopenharmony_ci .channels_min = 1, \ 3862306a36Sopenharmony_ci .channels_max = 8, \ 3962306a36Sopenharmony_ci .rate_min = 8000, \ 4062306a36Sopenharmony_ci .rate_max = 176400, \ 4162306a36Sopenharmony_ci }, \ 4262306a36Sopenharmony_ci .name = #did, \ 4362306a36Sopenharmony_ci .id = did, \ 4462306a36Sopenharmony_ci } 4562306a36Sopenharmony_ci 4662306a36Sopenharmony_ci#define Q6AFE_CDC_DMA_RX_DAI(did) { \ 4762306a36Sopenharmony_ci .playback = { \ 4862306a36Sopenharmony_ci .stream_name = #did" Playback", \ 4962306a36Sopenharmony_ci .rates = SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_16000 |\ 5062306a36Sopenharmony_ci SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_48000 |\ 5162306a36Sopenharmony_ci SNDRV_PCM_RATE_176400, \ 5262306a36Sopenharmony_ci .formats = SNDRV_PCM_FMTBIT_S16_LE | \ 5362306a36Sopenharmony_ci SNDRV_PCM_FMTBIT_S24_LE | \ 5462306a36Sopenharmony_ci SNDRV_PCM_FMTBIT_S32_LE, \ 5562306a36Sopenharmony_ci .channels_min = 1, \ 5662306a36Sopenharmony_ci .channels_max = 8, \ 5762306a36Sopenharmony_ci .rate_min = 8000, \ 5862306a36Sopenharmony_ci .rate_max = 176400, \ 5962306a36Sopenharmony_ci }, \ 6062306a36Sopenharmony_ci .name = #did, \ 6162306a36Sopenharmony_ci .id = did, \ 6262306a36Sopenharmony_ci } 6362306a36Sopenharmony_ci 6462306a36Sopenharmony_ci#define Q6AFE_CDC_DMA_TX_DAI(did) { \ 6562306a36Sopenharmony_ci .capture = { \ 6662306a36Sopenharmony_ci .stream_name = #did" Capture", \ 6762306a36Sopenharmony_ci .rates = SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_16000 |\ 6862306a36Sopenharmony_ci SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_48000 |\ 6962306a36Sopenharmony_ci SNDRV_PCM_RATE_176400, \ 7062306a36Sopenharmony_ci .formats = SNDRV_PCM_FMTBIT_S16_LE | \ 7162306a36Sopenharmony_ci SNDRV_PCM_FMTBIT_S24_LE | \ 7262306a36Sopenharmony_ci SNDRV_PCM_FMTBIT_S32_LE, \ 7362306a36Sopenharmony_ci .channels_min = 1, \ 7462306a36Sopenharmony_ci .channels_max = 8, \ 7562306a36Sopenharmony_ci .rate_min = 8000, \ 7662306a36Sopenharmony_ci .rate_max = 176400, \ 7762306a36Sopenharmony_ci }, \ 7862306a36Sopenharmony_ci .name = #did, \ 7962306a36Sopenharmony_ci .id = did, \ 8062306a36Sopenharmony_ci } 8162306a36Sopenharmony_ci 8262306a36Sopenharmony_ci#define Q6AFE_DP_RX_DAI(did) { \ 8362306a36Sopenharmony_ci .playback = { \ 8462306a36Sopenharmony_ci .stream_name = #did" Playback", \ 8562306a36Sopenharmony_ci .rates = SNDRV_PCM_RATE_48000 | \ 8662306a36Sopenharmony_ci SNDRV_PCM_RATE_96000 | \ 8762306a36Sopenharmony_ci SNDRV_PCM_RATE_192000, \ 8862306a36Sopenharmony_ci .formats = SNDRV_PCM_FMTBIT_S16_LE | \ 8962306a36Sopenharmony_ci SNDRV_PCM_FMTBIT_S24_LE, \ 9062306a36Sopenharmony_ci .channels_min = 2, \ 9162306a36Sopenharmony_ci .channels_max = 8, \ 9262306a36Sopenharmony_ci .rate_min = 48000, \ 9362306a36Sopenharmony_ci .rate_max = 192000, \ 9462306a36Sopenharmony_ci }, \ 9562306a36Sopenharmony_ci .name = #did, \ 9662306a36Sopenharmony_ci .id = did, \ 9762306a36Sopenharmony_ci } 9862306a36Sopenharmony_ci 9962306a36Sopenharmony_cistatic struct snd_soc_dai_driver q6dsp_audio_fe_dais[] = { 10062306a36Sopenharmony_ci { 10162306a36Sopenharmony_ci .playback = { 10262306a36Sopenharmony_ci .stream_name = "HDMI Playback", 10362306a36Sopenharmony_ci .rates = SNDRV_PCM_RATE_48000 | 10462306a36Sopenharmony_ci SNDRV_PCM_RATE_96000 | 10562306a36Sopenharmony_ci SNDRV_PCM_RATE_192000, 10662306a36Sopenharmony_ci .formats = SNDRV_PCM_FMTBIT_S16_LE | 10762306a36Sopenharmony_ci SNDRV_PCM_FMTBIT_S24_LE, 10862306a36Sopenharmony_ci .channels_min = 2, 10962306a36Sopenharmony_ci .channels_max = 8, 11062306a36Sopenharmony_ci .rate_max = 192000, 11162306a36Sopenharmony_ci .rate_min = 48000, 11262306a36Sopenharmony_ci }, 11362306a36Sopenharmony_ci .id = HDMI_RX, 11462306a36Sopenharmony_ci .name = "HDMI", 11562306a36Sopenharmony_ci }, { 11662306a36Sopenharmony_ci .name = "SLIMBUS_0_RX", 11762306a36Sopenharmony_ci .id = SLIMBUS_0_RX, 11862306a36Sopenharmony_ci .playback = { 11962306a36Sopenharmony_ci .stream_name = "Slimbus Playback", 12062306a36Sopenharmony_ci .rates = SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_8000 | 12162306a36Sopenharmony_ci SNDRV_PCM_RATE_16000 | SNDRV_PCM_RATE_96000 | 12262306a36Sopenharmony_ci SNDRV_PCM_RATE_192000, 12362306a36Sopenharmony_ci .formats = SNDRV_PCM_FMTBIT_S16_LE | 12462306a36Sopenharmony_ci SNDRV_PCM_FMTBIT_S24_LE, 12562306a36Sopenharmony_ci .channels_min = 1, 12662306a36Sopenharmony_ci .channels_max = 8, 12762306a36Sopenharmony_ci .rate_min = 8000, 12862306a36Sopenharmony_ci .rate_max = 192000, 12962306a36Sopenharmony_ci }, 13062306a36Sopenharmony_ci }, { 13162306a36Sopenharmony_ci .name = "SLIMBUS_0_TX", 13262306a36Sopenharmony_ci .id = SLIMBUS_0_TX, 13362306a36Sopenharmony_ci .capture = { 13462306a36Sopenharmony_ci .stream_name = "Slimbus Capture", 13562306a36Sopenharmony_ci .rates = SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_8000 | 13662306a36Sopenharmony_ci SNDRV_PCM_RATE_16000 | SNDRV_PCM_RATE_96000 | 13762306a36Sopenharmony_ci SNDRV_PCM_RATE_192000, 13862306a36Sopenharmony_ci .formats = SNDRV_PCM_FMTBIT_S16_LE | 13962306a36Sopenharmony_ci SNDRV_PCM_FMTBIT_S24_LE, 14062306a36Sopenharmony_ci .channels_min = 1, 14162306a36Sopenharmony_ci .channels_max = 8, 14262306a36Sopenharmony_ci .rate_min = 8000, 14362306a36Sopenharmony_ci .rate_max = 192000, 14462306a36Sopenharmony_ci }, 14562306a36Sopenharmony_ci }, { 14662306a36Sopenharmony_ci .playback = { 14762306a36Sopenharmony_ci .stream_name = "Slimbus1 Playback", 14862306a36Sopenharmony_ci .rates = SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_16000 | 14962306a36Sopenharmony_ci SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_96000 | 15062306a36Sopenharmony_ci SNDRV_PCM_RATE_192000, 15162306a36Sopenharmony_ci .formats = SNDRV_PCM_FMTBIT_S16_LE | 15262306a36Sopenharmony_ci SNDRV_PCM_FMTBIT_S24_LE, 15362306a36Sopenharmony_ci .channels_min = 1, 15462306a36Sopenharmony_ci .channels_max = 2, 15562306a36Sopenharmony_ci .rate_min = 8000, 15662306a36Sopenharmony_ci .rate_max = 192000, 15762306a36Sopenharmony_ci }, 15862306a36Sopenharmony_ci .name = "SLIMBUS_1_RX", 15962306a36Sopenharmony_ci .id = SLIMBUS_1_RX, 16062306a36Sopenharmony_ci }, { 16162306a36Sopenharmony_ci .name = "SLIMBUS_1_TX", 16262306a36Sopenharmony_ci .id = SLIMBUS_1_TX, 16362306a36Sopenharmony_ci .capture = { 16462306a36Sopenharmony_ci .stream_name = "Slimbus1 Capture", 16562306a36Sopenharmony_ci .rates = SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_8000 | 16662306a36Sopenharmony_ci SNDRV_PCM_RATE_16000 | SNDRV_PCM_RATE_96000 | 16762306a36Sopenharmony_ci SNDRV_PCM_RATE_192000, 16862306a36Sopenharmony_ci .formats = SNDRV_PCM_FMTBIT_S16_LE | 16962306a36Sopenharmony_ci SNDRV_PCM_FMTBIT_S24_LE, 17062306a36Sopenharmony_ci .channels_min = 1, 17162306a36Sopenharmony_ci .channels_max = 8, 17262306a36Sopenharmony_ci .rate_min = 8000, 17362306a36Sopenharmony_ci .rate_max = 192000, 17462306a36Sopenharmony_ci }, 17562306a36Sopenharmony_ci }, { 17662306a36Sopenharmony_ci .playback = { 17762306a36Sopenharmony_ci .stream_name = "Slimbus2 Playback", 17862306a36Sopenharmony_ci .rates = SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_8000 | 17962306a36Sopenharmony_ci SNDRV_PCM_RATE_16000 | SNDRV_PCM_RATE_96000 | 18062306a36Sopenharmony_ci SNDRV_PCM_RATE_192000, 18162306a36Sopenharmony_ci .formats = SNDRV_PCM_FMTBIT_S16_LE | 18262306a36Sopenharmony_ci SNDRV_PCM_FMTBIT_S24_LE, 18362306a36Sopenharmony_ci .channels_min = 1, 18462306a36Sopenharmony_ci .channels_max = 8, 18562306a36Sopenharmony_ci .rate_min = 8000, 18662306a36Sopenharmony_ci .rate_max = 192000, 18762306a36Sopenharmony_ci }, 18862306a36Sopenharmony_ci .name = "SLIMBUS_2_RX", 18962306a36Sopenharmony_ci .id = SLIMBUS_2_RX, 19062306a36Sopenharmony_ci 19162306a36Sopenharmony_ci }, { 19262306a36Sopenharmony_ci .name = "SLIMBUS_2_TX", 19362306a36Sopenharmony_ci .id = SLIMBUS_2_TX, 19462306a36Sopenharmony_ci .capture = { 19562306a36Sopenharmony_ci .stream_name = "Slimbus2 Capture", 19662306a36Sopenharmony_ci .rates = SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_8000 | 19762306a36Sopenharmony_ci SNDRV_PCM_RATE_16000 | SNDRV_PCM_RATE_96000 | 19862306a36Sopenharmony_ci SNDRV_PCM_RATE_192000, 19962306a36Sopenharmony_ci .formats = SNDRV_PCM_FMTBIT_S16_LE | 20062306a36Sopenharmony_ci SNDRV_PCM_FMTBIT_S24_LE, 20162306a36Sopenharmony_ci .channels_min = 1, 20262306a36Sopenharmony_ci .channels_max = 8, 20362306a36Sopenharmony_ci .rate_min = 8000, 20462306a36Sopenharmony_ci .rate_max = 192000, 20562306a36Sopenharmony_ci }, 20662306a36Sopenharmony_ci }, { 20762306a36Sopenharmony_ci .playback = { 20862306a36Sopenharmony_ci .stream_name = "Slimbus3 Playback", 20962306a36Sopenharmony_ci .rates = SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_16000 | 21062306a36Sopenharmony_ci SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_96000 | 21162306a36Sopenharmony_ci SNDRV_PCM_RATE_192000, 21262306a36Sopenharmony_ci .formats = SNDRV_PCM_FMTBIT_S16_LE | 21362306a36Sopenharmony_ci SNDRV_PCM_FMTBIT_S24_LE, 21462306a36Sopenharmony_ci .channels_min = 1, 21562306a36Sopenharmony_ci .channels_max = 2, 21662306a36Sopenharmony_ci .rate_min = 8000, 21762306a36Sopenharmony_ci .rate_max = 192000, 21862306a36Sopenharmony_ci }, 21962306a36Sopenharmony_ci .name = "SLIMBUS_3_RX", 22062306a36Sopenharmony_ci .id = SLIMBUS_3_RX, 22162306a36Sopenharmony_ci 22262306a36Sopenharmony_ci }, { 22362306a36Sopenharmony_ci .name = "SLIMBUS_3_TX", 22462306a36Sopenharmony_ci .id = SLIMBUS_3_TX, 22562306a36Sopenharmony_ci .capture = { 22662306a36Sopenharmony_ci .stream_name = "Slimbus3 Capture", 22762306a36Sopenharmony_ci .rates = SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_8000 | 22862306a36Sopenharmony_ci SNDRV_PCM_RATE_16000 | SNDRV_PCM_RATE_96000 | 22962306a36Sopenharmony_ci SNDRV_PCM_RATE_192000, 23062306a36Sopenharmony_ci .formats = SNDRV_PCM_FMTBIT_S16_LE | 23162306a36Sopenharmony_ci SNDRV_PCM_FMTBIT_S24_LE, 23262306a36Sopenharmony_ci .channels_min = 1, 23362306a36Sopenharmony_ci .channels_max = 8, 23462306a36Sopenharmony_ci .rate_min = 8000, 23562306a36Sopenharmony_ci .rate_max = 192000, 23662306a36Sopenharmony_ci }, 23762306a36Sopenharmony_ci }, { 23862306a36Sopenharmony_ci .playback = { 23962306a36Sopenharmony_ci .stream_name = "Slimbus4 Playback", 24062306a36Sopenharmony_ci .rates = SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_16000 | 24162306a36Sopenharmony_ci SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_96000 | 24262306a36Sopenharmony_ci SNDRV_PCM_RATE_192000, 24362306a36Sopenharmony_ci .formats = SNDRV_PCM_FMTBIT_S16_LE | 24462306a36Sopenharmony_ci SNDRV_PCM_FMTBIT_S24_LE, 24562306a36Sopenharmony_ci .channels_min = 1, 24662306a36Sopenharmony_ci .channels_max = 2, 24762306a36Sopenharmony_ci .rate_min = 8000, 24862306a36Sopenharmony_ci .rate_max = 192000, 24962306a36Sopenharmony_ci }, 25062306a36Sopenharmony_ci .name = "SLIMBUS_4_RX", 25162306a36Sopenharmony_ci .id = SLIMBUS_4_RX, 25262306a36Sopenharmony_ci 25362306a36Sopenharmony_ci }, { 25462306a36Sopenharmony_ci .name = "SLIMBUS_4_TX", 25562306a36Sopenharmony_ci .id = SLIMBUS_4_TX, 25662306a36Sopenharmony_ci .capture = { 25762306a36Sopenharmony_ci .stream_name = "Slimbus4 Capture", 25862306a36Sopenharmony_ci .rates = SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_8000 | 25962306a36Sopenharmony_ci SNDRV_PCM_RATE_16000 | SNDRV_PCM_RATE_96000 | 26062306a36Sopenharmony_ci SNDRV_PCM_RATE_192000, 26162306a36Sopenharmony_ci .formats = SNDRV_PCM_FMTBIT_S16_LE | 26262306a36Sopenharmony_ci SNDRV_PCM_FMTBIT_S24_LE, 26362306a36Sopenharmony_ci .channels_min = 1, 26462306a36Sopenharmony_ci .channels_max = 8, 26562306a36Sopenharmony_ci .rate_min = 8000, 26662306a36Sopenharmony_ci .rate_max = 192000, 26762306a36Sopenharmony_ci }, 26862306a36Sopenharmony_ci }, { 26962306a36Sopenharmony_ci .playback = { 27062306a36Sopenharmony_ci .stream_name = "Slimbus5 Playback", 27162306a36Sopenharmony_ci .rates = SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_16000 | 27262306a36Sopenharmony_ci SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_96000 | 27362306a36Sopenharmony_ci SNDRV_PCM_RATE_192000, 27462306a36Sopenharmony_ci .formats = SNDRV_PCM_FMTBIT_S16_LE | 27562306a36Sopenharmony_ci SNDRV_PCM_FMTBIT_S24_LE, 27662306a36Sopenharmony_ci .channels_min = 1, 27762306a36Sopenharmony_ci .channels_max = 2, 27862306a36Sopenharmony_ci .rate_min = 8000, 27962306a36Sopenharmony_ci .rate_max = 192000, 28062306a36Sopenharmony_ci }, 28162306a36Sopenharmony_ci .name = "SLIMBUS_5_RX", 28262306a36Sopenharmony_ci .id = SLIMBUS_5_RX, 28362306a36Sopenharmony_ci 28462306a36Sopenharmony_ci }, { 28562306a36Sopenharmony_ci .name = "SLIMBUS_5_TX", 28662306a36Sopenharmony_ci .id = SLIMBUS_5_TX, 28762306a36Sopenharmony_ci .capture = { 28862306a36Sopenharmony_ci .stream_name = "Slimbus5 Capture", 28962306a36Sopenharmony_ci .rates = SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_8000 | 29062306a36Sopenharmony_ci SNDRV_PCM_RATE_16000 | SNDRV_PCM_RATE_96000 | 29162306a36Sopenharmony_ci SNDRV_PCM_RATE_192000, 29262306a36Sopenharmony_ci .formats = SNDRV_PCM_FMTBIT_S16_LE | 29362306a36Sopenharmony_ci SNDRV_PCM_FMTBIT_S24_LE, 29462306a36Sopenharmony_ci .channels_min = 1, 29562306a36Sopenharmony_ci .channels_max = 8, 29662306a36Sopenharmony_ci .rate_min = 8000, 29762306a36Sopenharmony_ci .rate_max = 192000, 29862306a36Sopenharmony_ci }, 29962306a36Sopenharmony_ci }, { 30062306a36Sopenharmony_ci .playback = { 30162306a36Sopenharmony_ci .stream_name = "Slimbus6 Playback", 30262306a36Sopenharmony_ci .rates = SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_16000 | 30362306a36Sopenharmony_ci SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_96000 | 30462306a36Sopenharmony_ci SNDRV_PCM_RATE_192000, 30562306a36Sopenharmony_ci .formats = SNDRV_PCM_FMTBIT_S16_LE | 30662306a36Sopenharmony_ci SNDRV_PCM_FMTBIT_S24_LE, 30762306a36Sopenharmony_ci .channels_min = 1, 30862306a36Sopenharmony_ci .channels_max = 2, 30962306a36Sopenharmony_ci .rate_min = 8000, 31062306a36Sopenharmony_ci .rate_max = 192000, 31162306a36Sopenharmony_ci }, 31262306a36Sopenharmony_ci .name = "SLIMBUS_6_RX", 31362306a36Sopenharmony_ci .id = SLIMBUS_6_RX, 31462306a36Sopenharmony_ci 31562306a36Sopenharmony_ci }, { 31662306a36Sopenharmony_ci .name = "SLIMBUS_6_TX", 31762306a36Sopenharmony_ci .id = SLIMBUS_6_TX, 31862306a36Sopenharmony_ci .capture = { 31962306a36Sopenharmony_ci .stream_name = "Slimbus6 Capture", 32062306a36Sopenharmony_ci .rates = SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_8000 | 32162306a36Sopenharmony_ci SNDRV_PCM_RATE_16000 | SNDRV_PCM_RATE_96000 | 32262306a36Sopenharmony_ci SNDRV_PCM_RATE_192000, 32362306a36Sopenharmony_ci .formats = SNDRV_PCM_FMTBIT_S16_LE | 32462306a36Sopenharmony_ci SNDRV_PCM_FMTBIT_S24_LE, 32562306a36Sopenharmony_ci .channels_min = 1, 32662306a36Sopenharmony_ci .channels_max = 8, 32762306a36Sopenharmony_ci .rate_min = 8000, 32862306a36Sopenharmony_ci .rate_max = 192000, 32962306a36Sopenharmony_ci }, 33062306a36Sopenharmony_ci }, { 33162306a36Sopenharmony_ci .playback = { 33262306a36Sopenharmony_ci .stream_name = "Primary MI2S Playback", 33362306a36Sopenharmony_ci .rates = SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_8000 | 33462306a36Sopenharmony_ci SNDRV_PCM_RATE_16000, 33562306a36Sopenharmony_ci .formats = SNDRV_PCM_FMTBIT_S16_LE | 33662306a36Sopenharmony_ci SNDRV_PCM_FMTBIT_S24_LE, 33762306a36Sopenharmony_ci .channels_min = 1, 33862306a36Sopenharmony_ci .channels_max = 8, 33962306a36Sopenharmony_ci .rate_min = 8000, 34062306a36Sopenharmony_ci .rate_max = 48000, 34162306a36Sopenharmony_ci }, 34262306a36Sopenharmony_ci .id = PRIMARY_MI2S_RX, 34362306a36Sopenharmony_ci .name = "PRI_MI2S_RX", 34462306a36Sopenharmony_ci }, { 34562306a36Sopenharmony_ci .capture = { 34662306a36Sopenharmony_ci .stream_name = "Primary MI2S Capture", 34762306a36Sopenharmony_ci .rates = SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_8000 | 34862306a36Sopenharmony_ci SNDRV_PCM_RATE_16000, 34962306a36Sopenharmony_ci .formats = SNDRV_PCM_FMTBIT_S16_LE | 35062306a36Sopenharmony_ci SNDRV_PCM_FMTBIT_S24_LE, 35162306a36Sopenharmony_ci .channels_min = 1, 35262306a36Sopenharmony_ci .channels_max = 8, 35362306a36Sopenharmony_ci .rate_min = 8000, 35462306a36Sopenharmony_ci .rate_max = 48000, 35562306a36Sopenharmony_ci }, 35662306a36Sopenharmony_ci .id = PRIMARY_MI2S_TX, 35762306a36Sopenharmony_ci .name = "PRI_MI2S_TX", 35862306a36Sopenharmony_ci }, { 35962306a36Sopenharmony_ci .playback = { 36062306a36Sopenharmony_ci .stream_name = "Secondary MI2S Playback", 36162306a36Sopenharmony_ci .rates = SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_8000 | 36262306a36Sopenharmony_ci SNDRV_PCM_RATE_16000, 36362306a36Sopenharmony_ci .formats = SNDRV_PCM_FMTBIT_S16_LE, 36462306a36Sopenharmony_ci .channels_min = 1, 36562306a36Sopenharmony_ci .channels_max = 8, 36662306a36Sopenharmony_ci .rate_min = 8000, 36762306a36Sopenharmony_ci .rate_max = 48000, 36862306a36Sopenharmony_ci }, 36962306a36Sopenharmony_ci .name = "SEC_MI2S_RX", 37062306a36Sopenharmony_ci .id = SECONDARY_MI2S_RX, 37162306a36Sopenharmony_ci }, { 37262306a36Sopenharmony_ci .capture = { 37362306a36Sopenharmony_ci .stream_name = "Secondary MI2S Capture", 37462306a36Sopenharmony_ci .rates = SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_8000 | 37562306a36Sopenharmony_ci SNDRV_PCM_RATE_16000, 37662306a36Sopenharmony_ci .formats = SNDRV_PCM_FMTBIT_S16_LE | 37762306a36Sopenharmony_ci SNDRV_PCM_FMTBIT_S24_LE, 37862306a36Sopenharmony_ci .channels_min = 1, 37962306a36Sopenharmony_ci .channels_max = 8, 38062306a36Sopenharmony_ci .rate_min = 8000, 38162306a36Sopenharmony_ci .rate_max = 48000, 38262306a36Sopenharmony_ci }, 38362306a36Sopenharmony_ci .id = SECONDARY_MI2S_TX, 38462306a36Sopenharmony_ci .name = "SEC_MI2S_TX", 38562306a36Sopenharmony_ci }, { 38662306a36Sopenharmony_ci .playback = { 38762306a36Sopenharmony_ci .stream_name = "Tertiary MI2S Playback", 38862306a36Sopenharmony_ci .rates = SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_8000 | 38962306a36Sopenharmony_ci SNDRV_PCM_RATE_16000, 39062306a36Sopenharmony_ci .formats = SNDRV_PCM_FMTBIT_S16_LE, 39162306a36Sopenharmony_ci .channels_min = 1, 39262306a36Sopenharmony_ci .channels_max = 8, 39362306a36Sopenharmony_ci .rate_min = 8000, 39462306a36Sopenharmony_ci .rate_max = 48000, 39562306a36Sopenharmony_ci }, 39662306a36Sopenharmony_ci .name = "TERT_MI2S_RX", 39762306a36Sopenharmony_ci .id = TERTIARY_MI2S_RX, 39862306a36Sopenharmony_ci }, { 39962306a36Sopenharmony_ci .capture = { 40062306a36Sopenharmony_ci .stream_name = "Tertiary MI2S Capture", 40162306a36Sopenharmony_ci .rates = SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_8000 | 40262306a36Sopenharmony_ci SNDRV_PCM_RATE_16000, 40362306a36Sopenharmony_ci .formats = SNDRV_PCM_FMTBIT_S16_LE | 40462306a36Sopenharmony_ci SNDRV_PCM_FMTBIT_S24_LE, 40562306a36Sopenharmony_ci .channels_min = 1, 40662306a36Sopenharmony_ci .channels_max = 8, 40762306a36Sopenharmony_ci .rate_min = 8000, 40862306a36Sopenharmony_ci .rate_max = 48000, 40962306a36Sopenharmony_ci }, 41062306a36Sopenharmony_ci .id = TERTIARY_MI2S_TX, 41162306a36Sopenharmony_ci .name = "TERT_MI2S_TX", 41262306a36Sopenharmony_ci }, { 41362306a36Sopenharmony_ci .playback = { 41462306a36Sopenharmony_ci .stream_name = "Quaternary MI2S Playback", 41562306a36Sopenharmony_ci .rates = SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_8000 | 41662306a36Sopenharmony_ci SNDRV_PCM_RATE_16000, 41762306a36Sopenharmony_ci .formats = SNDRV_PCM_FMTBIT_S16_LE, 41862306a36Sopenharmony_ci .channels_min = 1, 41962306a36Sopenharmony_ci .channels_max = 8, 42062306a36Sopenharmony_ci .rate_min = 8000, 42162306a36Sopenharmony_ci .rate_max = 48000, 42262306a36Sopenharmony_ci }, 42362306a36Sopenharmony_ci .name = "QUAT_MI2S_RX", 42462306a36Sopenharmony_ci .id = QUATERNARY_MI2S_RX, 42562306a36Sopenharmony_ci }, { 42662306a36Sopenharmony_ci .capture = { 42762306a36Sopenharmony_ci .stream_name = "Quaternary MI2S Capture", 42862306a36Sopenharmony_ci .rates = SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_8000 | 42962306a36Sopenharmony_ci SNDRV_PCM_RATE_16000, 43062306a36Sopenharmony_ci .formats = SNDRV_PCM_FMTBIT_S16_LE | 43162306a36Sopenharmony_ci SNDRV_PCM_FMTBIT_S24_LE, 43262306a36Sopenharmony_ci .channels_min = 1, 43362306a36Sopenharmony_ci .channels_max = 8, 43462306a36Sopenharmony_ci .rate_min = 8000, 43562306a36Sopenharmony_ci .rate_max = 48000, 43662306a36Sopenharmony_ci }, 43762306a36Sopenharmony_ci .id = QUATERNARY_MI2S_TX, 43862306a36Sopenharmony_ci .name = "QUAT_MI2S_TX", 43962306a36Sopenharmony_ci }, { 44062306a36Sopenharmony_ci .playback = { 44162306a36Sopenharmony_ci .stream_name = "Quinary MI2S Playback", 44262306a36Sopenharmony_ci .rates = SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_8000 | 44362306a36Sopenharmony_ci SNDRV_PCM_RATE_16000 | SNDRV_PCM_RATE_96000 | 44462306a36Sopenharmony_ci SNDRV_PCM_RATE_192000, 44562306a36Sopenharmony_ci .formats = SNDRV_PCM_FMTBIT_S16_LE, 44662306a36Sopenharmony_ci .channels_min = 1, 44762306a36Sopenharmony_ci .channels_max = 8, 44862306a36Sopenharmony_ci .rate_min = 8000, 44962306a36Sopenharmony_ci .rate_max = 192000, 45062306a36Sopenharmony_ci }, 45162306a36Sopenharmony_ci .id = QUINARY_MI2S_RX, 45262306a36Sopenharmony_ci .name = "QUIN_MI2S_RX", 45362306a36Sopenharmony_ci }, { 45462306a36Sopenharmony_ci .capture = { 45562306a36Sopenharmony_ci .stream_name = "Quinary MI2S Capture", 45662306a36Sopenharmony_ci .rates = SNDRV_PCM_RATE_48000 | SNDRV_PCM_RATE_8000 | 45762306a36Sopenharmony_ci SNDRV_PCM_RATE_16000, 45862306a36Sopenharmony_ci .formats = SNDRV_PCM_FMTBIT_S16_LE, 45962306a36Sopenharmony_ci .channels_min = 1, 46062306a36Sopenharmony_ci .channels_max = 8, 46162306a36Sopenharmony_ci .rate_min = 8000, 46262306a36Sopenharmony_ci .rate_max = 48000, 46362306a36Sopenharmony_ci }, 46462306a36Sopenharmony_ci .id = QUINARY_MI2S_TX, 46562306a36Sopenharmony_ci .name = "QUIN_MI2S_TX", 46662306a36Sopenharmony_ci }, 46762306a36Sopenharmony_ci Q6AFE_TDM_PB_DAI("Primary", 0, PRIMARY_TDM_RX_0), 46862306a36Sopenharmony_ci Q6AFE_TDM_PB_DAI("Primary", 1, PRIMARY_TDM_RX_1), 46962306a36Sopenharmony_ci Q6AFE_TDM_PB_DAI("Primary", 2, PRIMARY_TDM_RX_2), 47062306a36Sopenharmony_ci Q6AFE_TDM_PB_DAI("Primary", 3, PRIMARY_TDM_RX_3), 47162306a36Sopenharmony_ci Q6AFE_TDM_PB_DAI("Primary", 4, PRIMARY_TDM_RX_4), 47262306a36Sopenharmony_ci Q6AFE_TDM_PB_DAI("Primary", 5, PRIMARY_TDM_RX_5), 47362306a36Sopenharmony_ci Q6AFE_TDM_PB_DAI("Primary", 6, PRIMARY_TDM_RX_6), 47462306a36Sopenharmony_ci Q6AFE_TDM_PB_DAI("Primary", 7, PRIMARY_TDM_RX_7), 47562306a36Sopenharmony_ci Q6AFE_TDM_CAP_DAI("Primary", 0, PRIMARY_TDM_TX_0), 47662306a36Sopenharmony_ci Q6AFE_TDM_CAP_DAI("Primary", 1, PRIMARY_TDM_TX_1), 47762306a36Sopenharmony_ci Q6AFE_TDM_CAP_DAI("Primary", 2, PRIMARY_TDM_TX_2), 47862306a36Sopenharmony_ci Q6AFE_TDM_CAP_DAI("Primary", 3, PRIMARY_TDM_TX_3), 47962306a36Sopenharmony_ci Q6AFE_TDM_CAP_DAI("Primary", 4, PRIMARY_TDM_TX_4), 48062306a36Sopenharmony_ci Q6AFE_TDM_CAP_DAI("Primary", 5, PRIMARY_TDM_TX_5), 48162306a36Sopenharmony_ci Q6AFE_TDM_CAP_DAI("Primary", 6, PRIMARY_TDM_TX_6), 48262306a36Sopenharmony_ci Q6AFE_TDM_CAP_DAI("Primary", 7, PRIMARY_TDM_TX_7), 48362306a36Sopenharmony_ci Q6AFE_TDM_PB_DAI("Secondary", 0, SECONDARY_TDM_RX_0), 48462306a36Sopenharmony_ci Q6AFE_TDM_PB_DAI("Secondary", 1, SECONDARY_TDM_RX_1), 48562306a36Sopenharmony_ci Q6AFE_TDM_PB_DAI("Secondary", 2, SECONDARY_TDM_RX_2), 48662306a36Sopenharmony_ci Q6AFE_TDM_PB_DAI("Secondary", 3, SECONDARY_TDM_RX_3), 48762306a36Sopenharmony_ci Q6AFE_TDM_PB_DAI("Secondary", 4, SECONDARY_TDM_RX_4), 48862306a36Sopenharmony_ci Q6AFE_TDM_PB_DAI("Secondary", 5, SECONDARY_TDM_RX_5), 48962306a36Sopenharmony_ci Q6AFE_TDM_PB_DAI("Secondary", 6, SECONDARY_TDM_RX_6), 49062306a36Sopenharmony_ci Q6AFE_TDM_PB_DAI("Secondary", 7, SECONDARY_TDM_RX_7), 49162306a36Sopenharmony_ci Q6AFE_TDM_CAP_DAI("Secondary", 0, SECONDARY_TDM_TX_0), 49262306a36Sopenharmony_ci Q6AFE_TDM_CAP_DAI("Secondary", 1, SECONDARY_TDM_TX_1), 49362306a36Sopenharmony_ci Q6AFE_TDM_CAP_DAI("Secondary", 2, SECONDARY_TDM_TX_2), 49462306a36Sopenharmony_ci Q6AFE_TDM_CAP_DAI("Secondary", 3, SECONDARY_TDM_TX_3), 49562306a36Sopenharmony_ci Q6AFE_TDM_CAP_DAI("Secondary", 4, SECONDARY_TDM_TX_4), 49662306a36Sopenharmony_ci Q6AFE_TDM_CAP_DAI("Secondary", 5, SECONDARY_TDM_TX_5), 49762306a36Sopenharmony_ci Q6AFE_TDM_CAP_DAI("Secondary", 6, SECONDARY_TDM_TX_6), 49862306a36Sopenharmony_ci Q6AFE_TDM_CAP_DAI("Secondary", 7, SECONDARY_TDM_TX_7), 49962306a36Sopenharmony_ci Q6AFE_TDM_PB_DAI("Tertiary", 0, TERTIARY_TDM_RX_0), 50062306a36Sopenharmony_ci Q6AFE_TDM_PB_DAI("Tertiary", 1, TERTIARY_TDM_RX_1), 50162306a36Sopenharmony_ci Q6AFE_TDM_PB_DAI("Tertiary", 2, TERTIARY_TDM_RX_2), 50262306a36Sopenharmony_ci Q6AFE_TDM_PB_DAI("Tertiary", 3, TERTIARY_TDM_RX_3), 50362306a36Sopenharmony_ci Q6AFE_TDM_PB_DAI("Tertiary", 4, TERTIARY_TDM_RX_4), 50462306a36Sopenharmony_ci Q6AFE_TDM_PB_DAI("Tertiary", 5, TERTIARY_TDM_RX_5), 50562306a36Sopenharmony_ci Q6AFE_TDM_PB_DAI("Tertiary", 6, TERTIARY_TDM_RX_6), 50662306a36Sopenharmony_ci Q6AFE_TDM_PB_DAI("Tertiary", 7, TERTIARY_TDM_RX_7), 50762306a36Sopenharmony_ci Q6AFE_TDM_CAP_DAI("Tertiary", 0, TERTIARY_TDM_TX_0), 50862306a36Sopenharmony_ci Q6AFE_TDM_CAP_DAI("Tertiary", 1, TERTIARY_TDM_TX_1), 50962306a36Sopenharmony_ci Q6AFE_TDM_CAP_DAI("Tertiary", 2, TERTIARY_TDM_TX_2), 51062306a36Sopenharmony_ci Q6AFE_TDM_CAP_DAI("Tertiary", 3, TERTIARY_TDM_TX_3), 51162306a36Sopenharmony_ci Q6AFE_TDM_CAP_DAI("Tertiary", 4, TERTIARY_TDM_TX_4), 51262306a36Sopenharmony_ci Q6AFE_TDM_CAP_DAI("Tertiary", 5, TERTIARY_TDM_TX_5), 51362306a36Sopenharmony_ci Q6AFE_TDM_CAP_DAI("Tertiary", 6, TERTIARY_TDM_TX_6), 51462306a36Sopenharmony_ci Q6AFE_TDM_CAP_DAI("Tertiary", 7, TERTIARY_TDM_TX_7), 51562306a36Sopenharmony_ci Q6AFE_TDM_PB_DAI("Quaternary", 0, QUATERNARY_TDM_RX_0), 51662306a36Sopenharmony_ci Q6AFE_TDM_PB_DAI("Quaternary", 1, QUATERNARY_TDM_RX_1), 51762306a36Sopenharmony_ci Q6AFE_TDM_PB_DAI("Quaternary", 2, QUATERNARY_TDM_RX_2), 51862306a36Sopenharmony_ci Q6AFE_TDM_PB_DAI("Quaternary", 3, QUATERNARY_TDM_RX_3), 51962306a36Sopenharmony_ci Q6AFE_TDM_PB_DAI("Quaternary", 4, QUATERNARY_TDM_RX_4), 52062306a36Sopenharmony_ci Q6AFE_TDM_PB_DAI("Quaternary", 5, QUATERNARY_TDM_RX_5), 52162306a36Sopenharmony_ci Q6AFE_TDM_PB_DAI("Quaternary", 6, QUATERNARY_TDM_RX_6), 52262306a36Sopenharmony_ci Q6AFE_TDM_PB_DAI("Quaternary", 7, QUATERNARY_TDM_RX_7), 52362306a36Sopenharmony_ci Q6AFE_TDM_CAP_DAI("Quaternary", 0, QUATERNARY_TDM_TX_0), 52462306a36Sopenharmony_ci Q6AFE_TDM_CAP_DAI("Quaternary", 1, QUATERNARY_TDM_TX_1), 52562306a36Sopenharmony_ci Q6AFE_TDM_CAP_DAI("Quaternary", 2, QUATERNARY_TDM_TX_2), 52662306a36Sopenharmony_ci Q6AFE_TDM_CAP_DAI("Quaternary", 3, QUATERNARY_TDM_TX_3), 52762306a36Sopenharmony_ci Q6AFE_TDM_CAP_DAI("Quaternary", 4, QUATERNARY_TDM_TX_4), 52862306a36Sopenharmony_ci Q6AFE_TDM_CAP_DAI("Quaternary", 5, QUATERNARY_TDM_TX_5), 52962306a36Sopenharmony_ci Q6AFE_TDM_CAP_DAI("Quaternary", 6, QUATERNARY_TDM_TX_6), 53062306a36Sopenharmony_ci Q6AFE_TDM_CAP_DAI("Quaternary", 7, QUATERNARY_TDM_TX_7), 53162306a36Sopenharmony_ci Q6AFE_TDM_PB_DAI("Quinary", 0, QUINARY_TDM_RX_0), 53262306a36Sopenharmony_ci Q6AFE_TDM_PB_DAI("Quinary", 1, QUINARY_TDM_RX_1), 53362306a36Sopenharmony_ci Q6AFE_TDM_PB_DAI("Quinary", 2, QUINARY_TDM_RX_2), 53462306a36Sopenharmony_ci Q6AFE_TDM_PB_DAI("Quinary", 3, QUINARY_TDM_RX_3), 53562306a36Sopenharmony_ci Q6AFE_TDM_PB_DAI("Quinary", 4, QUINARY_TDM_RX_4), 53662306a36Sopenharmony_ci Q6AFE_TDM_PB_DAI("Quinary", 5, QUINARY_TDM_RX_5), 53762306a36Sopenharmony_ci Q6AFE_TDM_PB_DAI("Quinary", 6, QUINARY_TDM_RX_6), 53862306a36Sopenharmony_ci Q6AFE_TDM_PB_DAI("Quinary", 7, QUINARY_TDM_RX_7), 53962306a36Sopenharmony_ci Q6AFE_TDM_CAP_DAI("Quinary", 0, QUINARY_TDM_TX_0), 54062306a36Sopenharmony_ci Q6AFE_TDM_CAP_DAI("Quinary", 1, QUINARY_TDM_TX_1), 54162306a36Sopenharmony_ci Q6AFE_TDM_CAP_DAI("Quinary", 2, QUINARY_TDM_TX_2), 54262306a36Sopenharmony_ci Q6AFE_TDM_CAP_DAI("Quinary", 3, QUINARY_TDM_TX_3), 54362306a36Sopenharmony_ci Q6AFE_TDM_CAP_DAI("Quinary", 4, QUINARY_TDM_TX_4), 54462306a36Sopenharmony_ci Q6AFE_TDM_CAP_DAI("Quinary", 5, QUINARY_TDM_TX_5), 54562306a36Sopenharmony_ci Q6AFE_TDM_CAP_DAI("Quinary", 6, QUINARY_TDM_TX_6), 54662306a36Sopenharmony_ci Q6AFE_TDM_CAP_DAI("Quinary", 7, QUINARY_TDM_TX_7), 54762306a36Sopenharmony_ci Q6AFE_DP_RX_DAI(DISPLAY_PORT_RX_0), 54862306a36Sopenharmony_ci Q6AFE_DP_RX_DAI(DISPLAY_PORT_RX_1), 54962306a36Sopenharmony_ci Q6AFE_DP_RX_DAI(DISPLAY_PORT_RX_2), 55062306a36Sopenharmony_ci Q6AFE_DP_RX_DAI(DISPLAY_PORT_RX_3), 55162306a36Sopenharmony_ci Q6AFE_DP_RX_DAI(DISPLAY_PORT_RX_4), 55262306a36Sopenharmony_ci Q6AFE_DP_RX_DAI(DISPLAY_PORT_RX_5), 55362306a36Sopenharmony_ci Q6AFE_DP_RX_DAI(DISPLAY_PORT_RX_6), 55462306a36Sopenharmony_ci Q6AFE_DP_RX_DAI(DISPLAY_PORT_RX_7), 55562306a36Sopenharmony_ci Q6AFE_CDC_DMA_RX_DAI(WSA_CODEC_DMA_RX_0), 55662306a36Sopenharmony_ci Q6AFE_CDC_DMA_TX_DAI(WSA_CODEC_DMA_TX_0), 55762306a36Sopenharmony_ci Q6AFE_CDC_DMA_RX_DAI(WSA_CODEC_DMA_RX_1), 55862306a36Sopenharmony_ci Q6AFE_CDC_DMA_TX_DAI(WSA_CODEC_DMA_TX_1), 55962306a36Sopenharmony_ci Q6AFE_CDC_DMA_TX_DAI(WSA_CODEC_DMA_TX_2), 56062306a36Sopenharmony_ci Q6AFE_CDC_DMA_TX_DAI(VA_CODEC_DMA_TX_0), 56162306a36Sopenharmony_ci Q6AFE_CDC_DMA_TX_DAI(VA_CODEC_DMA_TX_1), 56262306a36Sopenharmony_ci Q6AFE_CDC_DMA_TX_DAI(VA_CODEC_DMA_TX_2), 56362306a36Sopenharmony_ci Q6AFE_CDC_DMA_RX_DAI(RX_CODEC_DMA_RX_0), 56462306a36Sopenharmony_ci Q6AFE_CDC_DMA_TX_DAI(TX_CODEC_DMA_TX_0), 56562306a36Sopenharmony_ci Q6AFE_CDC_DMA_RX_DAI(RX_CODEC_DMA_RX_1), 56662306a36Sopenharmony_ci Q6AFE_CDC_DMA_TX_DAI(TX_CODEC_DMA_TX_1), 56762306a36Sopenharmony_ci Q6AFE_CDC_DMA_RX_DAI(RX_CODEC_DMA_RX_2), 56862306a36Sopenharmony_ci Q6AFE_CDC_DMA_TX_DAI(TX_CODEC_DMA_TX_2), 56962306a36Sopenharmony_ci Q6AFE_CDC_DMA_RX_DAI(RX_CODEC_DMA_RX_3), 57062306a36Sopenharmony_ci Q6AFE_CDC_DMA_TX_DAI(TX_CODEC_DMA_TX_3), 57162306a36Sopenharmony_ci Q6AFE_CDC_DMA_RX_DAI(RX_CODEC_DMA_RX_4), 57262306a36Sopenharmony_ci Q6AFE_CDC_DMA_TX_DAI(TX_CODEC_DMA_TX_4), 57362306a36Sopenharmony_ci Q6AFE_CDC_DMA_RX_DAI(RX_CODEC_DMA_RX_5), 57462306a36Sopenharmony_ci Q6AFE_CDC_DMA_TX_DAI(TX_CODEC_DMA_TX_5), 57562306a36Sopenharmony_ci Q6AFE_CDC_DMA_RX_DAI(RX_CODEC_DMA_RX_6), 57662306a36Sopenharmony_ci Q6AFE_CDC_DMA_RX_DAI(RX_CODEC_DMA_RX_7), 57762306a36Sopenharmony_ci}; 57862306a36Sopenharmony_ci 57962306a36Sopenharmony_ciint q6dsp_audio_ports_of_xlate_dai_name(struct snd_soc_component *component, 58062306a36Sopenharmony_ci const struct of_phandle_args *args, 58162306a36Sopenharmony_ci const char **dai_name) 58262306a36Sopenharmony_ci{ 58362306a36Sopenharmony_ci int id = args->args[0]; 58462306a36Sopenharmony_ci int ret = -EINVAL; 58562306a36Sopenharmony_ci int i; 58662306a36Sopenharmony_ci 58762306a36Sopenharmony_ci for (i = 0; i < ARRAY_SIZE(q6dsp_audio_fe_dais); i++) { 58862306a36Sopenharmony_ci if (q6dsp_audio_fe_dais[i].id == id) { 58962306a36Sopenharmony_ci *dai_name = q6dsp_audio_fe_dais[i].name; 59062306a36Sopenharmony_ci ret = 0; 59162306a36Sopenharmony_ci break; 59262306a36Sopenharmony_ci } 59362306a36Sopenharmony_ci } 59462306a36Sopenharmony_ci 59562306a36Sopenharmony_ci return ret; 59662306a36Sopenharmony_ci} 59762306a36Sopenharmony_ciEXPORT_SYMBOL_GPL(q6dsp_audio_ports_of_xlate_dai_name); 59862306a36Sopenharmony_ci 59962306a36Sopenharmony_cistruct snd_soc_dai_driver *q6dsp_audio_ports_set_config(struct device *dev, 60062306a36Sopenharmony_ci struct q6dsp_audio_port_dai_driver_config *cfg, 60162306a36Sopenharmony_ci int *num_dais) 60262306a36Sopenharmony_ci{ 60362306a36Sopenharmony_ci int i; 60462306a36Sopenharmony_ci 60562306a36Sopenharmony_ci for (i = 0; i < ARRAY_SIZE(q6dsp_audio_fe_dais); i++) { 60662306a36Sopenharmony_ci switch (q6dsp_audio_fe_dais[i].id) { 60762306a36Sopenharmony_ci case HDMI_RX: 60862306a36Sopenharmony_ci case DISPLAY_PORT_RX: 60962306a36Sopenharmony_ci q6dsp_audio_fe_dais[i].ops = cfg->q6hdmi_ops; 61062306a36Sopenharmony_ci break; 61162306a36Sopenharmony_ci case DISPLAY_PORT_RX_1 ... DISPLAY_PORT_RX_7: 61262306a36Sopenharmony_ci q6dsp_audio_fe_dais[i].ops = cfg->q6hdmi_ops; 61362306a36Sopenharmony_ci break; 61462306a36Sopenharmony_ci case SLIMBUS_0_RX ... SLIMBUS_6_TX: 61562306a36Sopenharmony_ci q6dsp_audio_fe_dais[i].ops = cfg->q6slim_ops; 61662306a36Sopenharmony_ci break; 61762306a36Sopenharmony_ci case QUINARY_MI2S_RX ... QUINARY_MI2S_TX: 61862306a36Sopenharmony_ci case PRIMARY_MI2S_RX ... QUATERNARY_MI2S_TX: 61962306a36Sopenharmony_ci q6dsp_audio_fe_dais[i].ops = cfg->q6i2s_ops; 62062306a36Sopenharmony_ci break; 62162306a36Sopenharmony_ci case PRIMARY_TDM_RX_0 ... QUINARY_TDM_TX_7: 62262306a36Sopenharmony_ci q6dsp_audio_fe_dais[i].ops = cfg->q6tdm_ops; 62362306a36Sopenharmony_ci break; 62462306a36Sopenharmony_ci case WSA_CODEC_DMA_RX_0 ... RX_CODEC_DMA_RX_7: 62562306a36Sopenharmony_ci q6dsp_audio_fe_dais[i].ops = cfg->q6dma_ops; 62662306a36Sopenharmony_ci break; 62762306a36Sopenharmony_ci default: 62862306a36Sopenharmony_ci break; 62962306a36Sopenharmony_ci } 63062306a36Sopenharmony_ci } 63162306a36Sopenharmony_ci 63262306a36Sopenharmony_ci *num_dais = ARRAY_SIZE(q6dsp_audio_fe_dais); 63362306a36Sopenharmony_ci return q6dsp_audio_fe_dais; 63462306a36Sopenharmony_ci} 63562306a36Sopenharmony_ciEXPORT_SYMBOL_GPL(q6dsp_audio_ports_set_config); 636