sdm660-ext-dai-links.c 59 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046
  1. /* Copyright (c) 2015-2017, The Linux Foundation. All rights reserved.
  2. *
  3. * This program is free software; you can redistribute it and/or modify
  4. * it under the terms of the GNU General Public License version 2 and
  5. * only version 2 as published by the Free Software Foundation.
  6. *
  7. * This program is distributed in the hope that it will be useful,
  8. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. * GNU General Public License for more details.
  11. */
  12. #include <linux/of.h>
  13. #include <sound/core.h>
  14. #include <sound/soc.h>
  15. #include <sound/soc-dapm.h>
  16. #include <sound/pcm.h>
  17. #include <sound/pcm_params.h>
  18. #include "msm-pcm-routing-v2.h"
  19. #include "sdm660-common.h"
  20. #include "sdm660-external.h"
  21. #include "codecs/core.h"
  22. #include "codecs/wcd9335.h"
  23. #define DEV_NAME_STR_LEN 32
  24. #define __CHIPSET__ "SDM660 "
  25. #define MSM_DAILINK_NAME(name) (__CHIPSET__#name)
  26. #define WCN_CDC_SLIM_RX_CH_MAX 2
  27. #define WCN_CDC_SLIM_TX_CH_MAX 3
  28. static struct snd_soc_card snd_soc_card_msm_card_tavil = {
  29. .name = "sdm670-tavil-snd-card",
  30. .late_probe = msm_snd_card_tavil_late_probe,
  31. };
  32. static struct snd_soc_card snd_soc_card_msm_card_tasha = {
  33. .name = "sdm670-tasha-snd-card",
  34. .late_probe = msm_snd_card_tasha_late_probe,
  35. };
  36. static struct snd_soc_ops msm_ext_slimbus_be_ops = {
  37. .hw_params = msm_snd_hw_params,
  38. };
  39. static struct snd_soc_ops msm_ext_cpe_ops = {
  40. .hw_params = msm_snd_cpe_hw_params,
  41. };
  42. static struct snd_soc_ops msm_ext_slimbus_2_be_ops = {
  43. .hw_params = msm_ext_slimbus_2_hw_params,
  44. };
  45. static struct snd_soc_ops msm_mi2s_be_ops = {
  46. .startup = msm_mi2s_snd_startup,
  47. .shutdown = msm_mi2s_snd_shutdown,
  48. };
  49. static struct snd_soc_ops msm_aux_pcm_be_ops = {
  50. .startup = msm_aux_pcm_snd_startup,
  51. .shutdown = msm_aux_pcm_snd_shutdown,
  52. };
  53. static int msm_wcn_init(struct snd_soc_pcm_runtime *rtd)
  54. {
  55. unsigned int rx_ch[WCN_CDC_SLIM_RX_CH_MAX] = {157, 158};
  56. unsigned int tx_ch[WCN_CDC_SLIM_TX_CH_MAX] = {159, 160, 161};
  57. struct snd_soc_dai *codec_dai = rtd->codec_dai;
  58. return snd_soc_dai_set_channel_map(codec_dai, ARRAY_SIZE(tx_ch),
  59. tx_ch, ARRAY_SIZE(rx_ch), rx_ch);
  60. }
  61. static int msm_wcn_hw_params(struct snd_pcm_substream *substream,
  62. struct snd_pcm_hw_params *params)
  63. {
  64. struct snd_soc_pcm_runtime *rtd = substream->private_data;
  65. struct snd_soc_dai *codec_dai = rtd->codec_dai;
  66. struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
  67. struct snd_soc_dai_link *dai_link = rtd->dai_link;
  68. u32 rx_ch[WCN_CDC_SLIM_RX_CH_MAX], tx_ch[WCN_CDC_SLIM_TX_CH_MAX];
  69. u32 rx_ch_cnt = 0, tx_ch_cnt = 0;
  70. int ret;
  71. dev_dbg(rtd->dev, "%s: %s_tx_dai_id_%d\n", __func__,
  72. codec_dai->name, codec_dai->id);
  73. ret = snd_soc_dai_get_channel_map(codec_dai,
  74. &tx_ch_cnt, tx_ch, &rx_ch_cnt, rx_ch);
  75. if (ret) {
  76. dev_err(rtd->dev,
  77. "%s: failed to get BTFM codec chan map\n, err:%d\n",
  78. __func__, ret);
  79. goto exit;
  80. }
  81. dev_dbg(rtd->dev, "%s: tx_ch_cnt(%d) id %d\n",
  82. __func__, tx_ch_cnt, dai_link->id);
  83. ret = snd_soc_dai_set_channel_map(cpu_dai,
  84. tx_ch_cnt, tx_ch, rx_ch_cnt, rx_ch);
  85. if (ret)
  86. dev_err(rtd->dev, "%s: failed to set cpu chan map, err:%d\n",
  87. __func__, ret);
  88. exit:
  89. return ret;
  90. }
  91. static struct snd_soc_ops msm_wcn_ops = {
  92. .hw_params = msm_wcn_hw_params,
  93. };
  94. /*TDM default offset currently only supporting TDM_RX_0 and TDM_TX_0 */
  95. static unsigned int tdm_slot_offset[TDM_PORT_MAX][TDM_SLOT_OFFSET_MAX] = {
  96. {0, 4, 8, 12, 16, 20, 24, 28},/* TX_0 | RX_0 */
  97. {AFE_SLOT_MAPPING_OFFSET_INVALID},/* TX_1 | RX_1 */
  98. {AFE_SLOT_MAPPING_OFFSET_INVALID},/* TX_2 | RX_2 */
  99. {AFE_SLOT_MAPPING_OFFSET_INVALID},/* TX_3 | RX_3 */
  100. {AFE_SLOT_MAPPING_OFFSET_INVALID},/* TX_4 | RX_4 */
  101. {AFE_SLOT_MAPPING_OFFSET_INVALID},/* TX_5 | RX_5 */
  102. {AFE_SLOT_MAPPING_OFFSET_INVALID},/* TX_6 | RX_6 */
  103. {AFE_SLOT_MAPPING_OFFSET_INVALID},/* TX_7 | RX_7 */
  104. };
  105. static unsigned int tdm_param_set_slot_mask(u16 port_id, int slot_width,
  106. int slots)
  107. {
  108. unsigned int slot_mask = 0;
  109. int i, j;
  110. unsigned int *slot_offset;
  111. for (i = TDM_0; i < TDM_PORT_MAX; i++) {
  112. slot_offset = tdm_slot_offset[i];
  113. for (j = 0; j < TDM_SLOT_OFFSET_MAX; j++) {
  114. if (slot_offset[j] != AFE_SLOT_MAPPING_OFFSET_INVALID)
  115. slot_mask |=
  116. (1 << ((slot_offset[j] * 8) / slot_width));
  117. else
  118. break;
  119. }
  120. }
  121. return slot_mask;
  122. }
  123. static int msm_tdm_snd_hw_params(struct snd_pcm_substream *substream,
  124. struct snd_pcm_hw_params *params)
  125. {
  126. struct snd_soc_pcm_runtime *rtd = substream->private_data;
  127. struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
  128. int ret = 0;
  129. int channels, slot_width, slots;
  130. unsigned int slot_mask;
  131. unsigned int *slot_offset;
  132. int offset_channels = 0;
  133. int i;
  134. pr_debug("%s: dai id = 0x%x\n", __func__, cpu_dai->id);
  135. channels = params_channels(params);
  136. switch (channels) {
  137. case 1:
  138. case 2:
  139. case 3:
  140. case 4:
  141. case 5:
  142. case 6:
  143. case 7:
  144. case 8:
  145. switch (params_format(params)) {
  146. case SNDRV_PCM_FORMAT_S32_LE:
  147. case SNDRV_PCM_FORMAT_S24_LE:
  148. case SNDRV_PCM_FORMAT_S16_LE:
  149. /*
  150. * up to 8 channels HW config should
  151. * use 32 bit slot width for max support of
  152. * stream bit width. (slot_width > bit_width)
  153. */
  154. slot_width = 32;
  155. break;
  156. default:
  157. pr_err("%s: invalid param format 0x%x\n",
  158. __func__, params_format(params));
  159. return -EINVAL;
  160. }
  161. slots = 8;
  162. slot_mask = tdm_param_set_slot_mask(cpu_dai->id,
  163. slot_width,
  164. slots);
  165. if (!slot_mask) {
  166. pr_err("%s: invalid slot_mask 0x%x\n",
  167. __func__, slot_mask);
  168. return -EINVAL;
  169. }
  170. break;
  171. default:
  172. pr_err("%s: invalid param channels %d\n",
  173. __func__, channels);
  174. return -EINVAL;
  175. }
  176. /* currently only supporting TDM_RX_0 and TDM_TX_0 */
  177. switch (cpu_dai->id) {
  178. case AFE_PORT_ID_PRIMARY_TDM_RX:
  179. case AFE_PORT_ID_SECONDARY_TDM_RX:
  180. case AFE_PORT_ID_TERTIARY_TDM_RX:
  181. case AFE_PORT_ID_QUATERNARY_TDM_RX:
  182. case AFE_PORT_ID_PRIMARY_TDM_TX:
  183. case AFE_PORT_ID_SECONDARY_TDM_TX:
  184. case AFE_PORT_ID_TERTIARY_TDM_TX:
  185. case AFE_PORT_ID_QUATERNARY_TDM_TX:
  186. slot_offset = tdm_slot_offset[TDM_0];
  187. break;
  188. default:
  189. pr_err("%s: dai id 0x%x not supported\n",
  190. __func__, cpu_dai->id);
  191. return -EINVAL;
  192. }
  193. for (i = 0; i < TDM_SLOT_OFFSET_MAX; i++) {
  194. if (slot_offset[i] != AFE_SLOT_MAPPING_OFFSET_INVALID)
  195. offset_channels++;
  196. else
  197. break;
  198. }
  199. if (offset_channels == 0) {
  200. pr_err("%s: slot offset not supported, offset_channels %d\n",
  201. __func__, offset_channels);
  202. return -EINVAL;
  203. }
  204. if (channels > offset_channels) {
  205. pr_err("%s: channels %d exceed offset_channels %d\n",
  206. __func__, channels, offset_channels);
  207. return -EINVAL;
  208. }
  209. if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
  210. ret = snd_soc_dai_set_tdm_slot(cpu_dai, 0, slot_mask,
  211. slots, slot_width);
  212. if (ret < 0) {
  213. pr_err("%s: failed to set tdm slot, err:%d\n",
  214. __func__, ret);
  215. goto end;
  216. }
  217. ret = snd_soc_dai_set_channel_map(cpu_dai, 0, NULL,
  218. channels, slot_offset);
  219. if (ret < 0) {
  220. pr_err("%s: failed to set channel map, err:%d\n",
  221. __func__, ret);
  222. goto end;
  223. }
  224. } else {
  225. ret = snd_soc_dai_set_tdm_slot(cpu_dai, slot_mask, 0,
  226. slots, slot_width);
  227. if (ret < 0) {
  228. pr_err("%s: failed to set tdm slot, err:%d\n",
  229. __func__, ret);
  230. goto end;
  231. }
  232. ret = snd_soc_dai_set_channel_map(cpu_dai, channels,
  233. slot_offset, 0, NULL);
  234. if (ret < 0) {
  235. pr_err("%s: failed to set channel map, err:%d\n",
  236. __func__, ret);
  237. goto end;
  238. }
  239. }
  240. end:
  241. return ret;
  242. }
  243. static struct snd_soc_ops msm_tdm_be_ops = {
  244. .hw_params = msm_tdm_snd_hw_params
  245. };
  246. static struct snd_soc_dai_link msm_ext_tasha_fe_dai[] = {
  247. /* tasha_vifeedback for speaker protection */
  248. {
  249. .name = LPASS_BE_SLIMBUS_4_TX,
  250. .stream_name = "Slimbus4 Capture",
  251. .cpu_dai_name = "msm-dai-q6-dev.16393",
  252. .platform_name = "msm-pcm-hostless",
  253. .codec_name = "tasha_codec",
  254. .codec_dai_name = "tasha_vifeedback",
  255. .id = MSM_BACKEND_DAI_SLIMBUS_4_TX,
  256. .be_hw_params_fixup = msm_ext_be_hw_params_fixup,
  257. .ops = &msm_ext_slimbus_be_ops,
  258. .no_host_mode = SND_SOC_DAI_LINK_NO_HOST,
  259. .ignore_suspend = 1,
  260. },
  261. /* Ultrasound RX DAI Link */
  262. {
  263. .name = "SLIMBUS_2 Hostless Playback",
  264. .stream_name = "SLIMBUS_2 Hostless Playback",
  265. .cpu_dai_name = "msm-dai-q6-dev.16388",
  266. .platform_name = "msm-pcm-hostless",
  267. .codec_name = "tasha_codec",
  268. .codec_dai_name = "tasha_rx2",
  269. .ignore_suspend = 1,
  270. .dpcm_playback = 1,
  271. .dpcm_capture = 1,
  272. .no_host_mode = SND_SOC_DAI_LINK_NO_HOST,
  273. .ops = &msm_ext_slimbus_2_be_ops,
  274. },
  275. /* Ultrasound TX DAI Link */
  276. {
  277. .name = "SLIMBUS_2 Hostless Capture",
  278. .stream_name = "SLIMBUS_2 Hostless Capture",
  279. .cpu_dai_name = "msm-dai-q6-dev.16389",
  280. .platform_name = "msm-pcm-hostless",
  281. .codec_name = "tasha_codec",
  282. .codec_dai_name = "tasha_tx2",
  283. .ignore_suspend = 1,
  284. .dpcm_capture = 1,
  285. .no_host_mode = SND_SOC_DAI_LINK_NO_HOST,
  286. .ops = &msm_ext_slimbus_2_be_ops,
  287. },
  288. /* CPE LSM direct dai-link */
  289. {
  290. .name = "CPE Listen service",
  291. .stream_name = "CPE Listen Audio Service",
  292. .cpu_dai_name = "msm-dai-slim",
  293. .platform_name = "msm-cpe-lsm",
  294. .trigger = {SND_SOC_DPCM_TRIGGER_POST,
  295. SND_SOC_DPCM_TRIGGER_POST},
  296. .no_host_mode = SND_SOC_DAI_LINK_NO_HOST,
  297. .ignore_suspend = 1,
  298. .dpcm_capture = 1,
  299. .ignore_pmdown_time = 1,
  300. .codec_dai_name = "tasha_mad1",
  301. .codec_name = "tasha_codec",
  302. .ops = &msm_ext_cpe_ops,
  303. },
  304. {
  305. .name = "SLIMBUS_6 Hostless Playback",
  306. .stream_name = "SLIMBUS_6 Hostless",
  307. .cpu_dai_name = "SLIMBUS6_HOSTLESS",
  308. .platform_name = "msm-pcm-hostless",
  309. .dynamic = 1,
  310. .dpcm_playback = 1,
  311. .trigger = {SND_SOC_DPCM_TRIGGER_POST,
  312. SND_SOC_DPCM_TRIGGER_POST},
  313. .no_host_mode = SND_SOC_DAI_LINK_NO_HOST,
  314. .ignore_suspend = 1,
  315. /* this dailink has playback support */
  316. .ignore_pmdown_time = 1,
  317. .codec_dai_name = "snd-soc-dummy-dai",
  318. .codec_name = "snd-soc-dummy",
  319. },
  320. /* CPE LSM EC PP direct dai-link */
  321. {
  322. .name = "CPE Listen service ECPP",
  323. .stream_name = "CPE Listen Audio Service ECPP",
  324. .cpu_dai_name = "CPE_LSM_NOHOST",
  325. .platform_name = "msm-cpe-lsm.3",
  326. .trigger = {SND_SOC_DPCM_TRIGGER_POST,
  327. SND_SOC_DPCM_TRIGGER_POST},
  328. .no_host_mode = SND_SOC_DAI_LINK_NO_HOST,
  329. .ignore_suspend = 1,
  330. .ignore_pmdown_time = 1,
  331. .codec_dai_name = "tasha_cpe",
  332. .codec_name = "tasha_codec",
  333. },
  334. };
  335. static struct snd_soc_dai_link msm_ext_tavil_fe_dai[] = {
  336. {
  337. .name = LPASS_BE_SLIMBUS_4_TX,
  338. .stream_name = "Slimbus4 Capture",
  339. .cpu_dai_name = "msm-dai-q6-dev.16393",
  340. .platform_name = "msm-pcm-hostless",
  341. .codec_name = "tavil_codec",
  342. .codec_dai_name = "tavil_vifeedback",
  343. .id = MSM_BACKEND_DAI_SLIMBUS_4_TX,
  344. .be_hw_params_fixup = msm_ext_be_hw_params_fixup,
  345. .ops = &msm_ext_slimbus_be_ops,
  346. .no_host_mode = SND_SOC_DAI_LINK_NO_HOST,
  347. .ignore_suspend = 1,
  348. },
  349. /* Ultrasound RX DAI Link */
  350. {
  351. .name = "SLIMBUS_2 Hostless Playback",
  352. .stream_name = "SLIMBUS_2 Hostless Playback",
  353. .cpu_dai_name = "msm-dai-q6-dev.16388",
  354. .platform_name = "msm-pcm-hostless",
  355. .codec_name = "tavil_codec",
  356. .codec_dai_name = "tavil_rx2",
  357. .ignore_suspend = 1,
  358. .no_host_mode = SND_SOC_DAI_LINK_NO_HOST,
  359. .ops = &msm_ext_slimbus_2_be_ops,
  360. },
  361. /* Ultrasound TX DAI Link */
  362. {
  363. .name = "SLIMBUS_2 Hostless Capture",
  364. .stream_name = "SLIMBUS_2 Hostless Capture",
  365. .cpu_dai_name = "msm-dai-q6-dev.16389",
  366. .platform_name = "msm-pcm-hostless",
  367. .codec_name = "tavil_codec",
  368. .codec_dai_name = "tavil_tx2",
  369. .ignore_suspend = 1,
  370. .no_host_mode = SND_SOC_DAI_LINK_NO_HOST,
  371. .ops = &msm_ext_slimbus_2_be_ops,
  372. },
  373. };
  374. static struct snd_soc_dai_link msm_ext_tasha_be_dai[] = {
  375. /* Backend DAI Links */
  376. {
  377. .name = LPASS_BE_SLIMBUS_0_RX,
  378. .stream_name = "Slimbus Playback",
  379. .cpu_dai_name = "msm-dai-q6-dev.16384",
  380. .platform_name = "msm-pcm-routing",
  381. .codec_name = "tasha_codec",
  382. .codec_dai_name = "tasha_mix_rx1",
  383. .no_pcm = 1,
  384. .dpcm_playback = 1,
  385. .id = MSM_BACKEND_DAI_SLIMBUS_0_RX,
  386. .init = &msm_audrx_init,
  387. .be_hw_params_fixup = msm_ext_be_hw_params_fixup,
  388. /* this dainlink has playback support */
  389. .ignore_pmdown_time = 1,
  390. .ignore_suspend = 1,
  391. .ops = &msm_ext_slimbus_be_ops,
  392. },
  393. {
  394. .name = LPASS_BE_SLIMBUS_0_TX,
  395. .stream_name = "Slimbus Capture",
  396. .cpu_dai_name = "msm-dai-q6-dev.16385",
  397. .platform_name = "msm-pcm-routing",
  398. .codec_name = "tasha_codec",
  399. .codec_dai_name = "tasha_tx1",
  400. .no_pcm = 1,
  401. .dpcm_capture = 1,
  402. .id = MSM_BACKEND_DAI_SLIMBUS_0_TX,
  403. .be_hw_params_fixup = msm_ext_be_hw_params_fixup,
  404. .ignore_suspend = 1,
  405. .ops = &msm_ext_slimbus_be_ops,
  406. },
  407. {
  408. .name = LPASS_BE_SLIMBUS_1_RX,
  409. .stream_name = "Slimbus1 Playback",
  410. .cpu_dai_name = "msm-dai-q6-dev.16386",
  411. .platform_name = "msm-pcm-routing",
  412. .codec_name = "tasha_codec",
  413. .codec_dai_name = "tasha_mix_rx1",
  414. .no_pcm = 1,
  415. .dpcm_playback = 1,
  416. .id = MSM_BACKEND_DAI_SLIMBUS_1_RX,
  417. .be_hw_params_fixup = msm_ext_be_hw_params_fixup,
  418. .ops = &msm_ext_slimbus_be_ops,
  419. /* dai link has playback support */
  420. .ignore_pmdown_time = 1,
  421. .ignore_suspend = 1,
  422. },
  423. {
  424. .name = LPASS_BE_SLIMBUS_1_TX,
  425. .stream_name = "Slimbus1 Capture",
  426. .cpu_dai_name = "msm-dai-q6-dev.16387",
  427. .platform_name = "msm-pcm-routing",
  428. .codec_name = "tasha_codec",
  429. .codec_dai_name = "tasha_tx3",
  430. .no_pcm = 1,
  431. .dpcm_capture = 1,
  432. .id = MSM_BACKEND_DAI_SLIMBUS_1_TX,
  433. .be_hw_params_fixup = msm_ext_be_hw_params_fixup,
  434. .ops = &msm_ext_slimbus_be_ops,
  435. .ignore_suspend = 1,
  436. },
  437. {
  438. .name = LPASS_BE_SLIMBUS_3_RX,
  439. .stream_name = "Slimbus3 Playback",
  440. .cpu_dai_name = "msm-dai-q6-dev.16390",
  441. .platform_name = "msm-pcm-routing",
  442. .codec_name = "tasha_codec",
  443. .codec_dai_name = "tasha_mix_rx1",
  444. .no_pcm = 1,
  445. .dpcm_playback = 1,
  446. .id = MSM_BACKEND_DAI_SLIMBUS_3_RX,
  447. .be_hw_params_fixup = msm_ext_be_hw_params_fixup,
  448. .ops = &msm_ext_slimbus_be_ops,
  449. /* dai link has playback support */
  450. .ignore_pmdown_time = 1,
  451. .ignore_suspend = 1,
  452. },
  453. {
  454. .name = LPASS_BE_SLIMBUS_3_TX,
  455. .stream_name = "Slimbus3 Capture",
  456. .cpu_dai_name = "msm-dai-q6-dev.16391",
  457. .platform_name = "msm-pcm-routing",
  458. .codec_name = "tasha_codec",
  459. .codec_dai_name = "tasha_tx1",
  460. .no_pcm = 1,
  461. .dpcm_capture = 1,
  462. .dpcm_playback = 1,
  463. .id = MSM_BACKEND_DAI_SLIMBUS_3_TX,
  464. .be_hw_params_fixup = msm_ext_be_hw_params_fixup,
  465. .ops = &msm_ext_slimbus_be_ops,
  466. .ignore_suspend = 1,
  467. },
  468. {
  469. .name = LPASS_BE_SLIMBUS_4_RX,
  470. .stream_name = "Slimbus4 Playback",
  471. .cpu_dai_name = "msm-dai-q6-dev.16392",
  472. .platform_name = "msm-pcm-routing",
  473. .codec_name = "tasha_codec",
  474. .codec_dai_name = "tasha_mix_rx1",
  475. .no_pcm = 1,
  476. .dpcm_playback = 1,
  477. .id = MSM_BACKEND_DAI_SLIMBUS_4_RX,
  478. .be_hw_params_fixup = msm_ext_be_hw_params_fixup,
  479. .ops = &msm_ext_slimbus_be_ops,
  480. /* dai link has playback support */
  481. .ignore_pmdown_time = 1,
  482. .ignore_suspend = 1,
  483. },
  484. {
  485. .name = LPASS_BE_SLIMBUS_5_RX,
  486. .stream_name = "Slimbus5 Playback",
  487. .cpu_dai_name = "msm-dai-q6-dev.16394",
  488. .platform_name = "msm-pcm-routing",
  489. .codec_name = "tasha_codec",
  490. .codec_dai_name = "tasha_rx3",
  491. .no_pcm = 1,
  492. .dpcm_playback = 1,
  493. .id = MSM_BACKEND_DAI_SLIMBUS_5_RX,
  494. .be_hw_params_fixup = msm_ext_be_hw_params_fixup,
  495. .ops = &msm_ext_slimbus_be_ops,
  496. /* dai link has playback support */
  497. .ignore_pmdown_time = 1,
  498. .ignore_suspend = 1,
  499. },
  500. /* MAD BE */
  501. {
  502. .name = LPASS_BE_SLIMBUS_5_TX,
  503. .stream_name = "Slimbus5 Capture",
  504. .cpu_dai_name = "msm-dai-q6-dev.16395",
  505. .platform_name = "msm-pcm-routing",
  506. .codec_name = "tasha_codec",
  507. .codec_dai_name = "tasha_mad1",
  508. .no_pcm = 1,
  509. .dpcm_capture = 1,
  510. .id = MSM_BACKEND_DAI_SLIMBUS_5_TX,
  511. .be_hw_params_fixup = msm_ext_be_hw_params_fixup,
  512. .ops = &msm_ext_slimbus_be_ops,
  513. .ignore_suspend = 1,
  514. },
  515. {
  516. .name = LPASS_BE_SLIMBUS_6_RX,
  517. .stream_name = "Slimbus6 Playback",
  518. .cpu_dai_name = "msm-dai-q6-dev.16396",
  519. .platform_name = "msm-pcm-routing",
  520. .codec_name = "tasha_codec",
  521. .codec_dai_name = "tasha_rx4",
  522. .no_pcm = 1,
  523. .dpcm_playback = 1,
  524. .id = MSM_BACKEND_DAI_SLIMBUS_6_RX,
  525. .be_hw_params_fixup = msm_ext_be_hw_params_fixup,
  526. .ops = &msm_ext_slimbus_be_ops,
  527. /* dai link has playback support */
  528. .ignore_pmdown_time = 1,
  529. .ignore_suspend = 1,
  530. },
  531. };
  532. static struct snd_soc_dai_link msm_ext_tavil_be_dai[] = {
  533. {
  534. .name = LPASS_BE_SLIMBUS_0_RX,
  535. .stream_name = "Slimbus Playback",
  536. .cpu_dai_name = "msm-dai-q6-dev.16384",
  537. .platform_name = "msm-pcm-routing",
  538. .codec_name = "tavil_codec",
  539. .codec_dai_name = "tavil_rx1",
  540. .no_pcm = 1,
  541. .dpcm_playback = 1,
  542. .id = MSM_BACKEND_DAI_SLIMBUS_0_RX,
  543. .init = &msm_audrx_init,
  544. .be_hw_params_fixup = msm_ext_be_hw_params_fixup,
  545. /* this dainlink has playback support */
  546. .ignore_pmdown_time = 1,
  547. .ignore_suspend = 1,
  548. .ops = &msm_ext_slimbus_be_ops,
  549. },
  550. {
  551. .name = LPASS_BE_SLIMBUS_0_TX,
  552. .stream_name = "Slimbus Capture",
  553. .cpu_dai_name = "msm-dai-q6-dev.16385",
  554. .platform_name = "msm-pcm-routing",
  555. .codec_name = "tavil_codec",
  556. .codec_dai_name = "tavil_tx1",
  557. .no_pcm = 1,
  558. .dpcm_capture = 1,
  559. .id = MSM_BACKEND_DAI_SLIMBUS_0_TX,
  560. .be_hw_params_fixup = msm_ext_be_hw_params_fixup,
  561. .ignore_suspend = 1,
  562. .ops = &msm_ext_slimbus_be_ops,
  563. },
  564. {
  565. .name = LPASS_BE_SLIMBUS_1_RX,
  566. .stream_name = "Slimbus1 Playback",
  567. .cpu_dai_name = "msm-dai-q6-dev.16386",
  568. .platform_name = "msm-pcm-routing",
  569. .codec_name = "tavil_codec",
  570. .codec_dai_name = "tavil_rx1",
  571. .no_pcm = 1,
  572. .dpcm_playback = 1,
  573. .id = MSM_BACKEND_DAI_SLIMBUS_1_RX,
  574. .be_hw_params_fixup = msm_ext_be_hw_params_fixup,
  575. .ops = &msm_ext_slimbus_be_ops,
  576. /* dai link has playback support */
  577. .ignore_pmdown_time = 1,
  578. .ignore_suspend = 1,
  579. },
  580. {
  581. .name = LPASS_BE_SLIMBUS_1_TX,
  582. .stream_name = "Slimbus1 Capture",
  583. .cpu_dai_name = "msm-dai-q6-dev.16387",
  584. .platform_name = "msm-pcm-routing",
  585. .codec_name = "tavil_codec",
  586. .codec_dai_name = "tavil_tx3",
  587. .no_pcm = 1,
  588. .dpcm_capture = 1,
  589. .id = MSM_BACKEND_DAI_SLIMBUS_1_TX,
  590. .be_hw_params_fixup = msm_ext_be_hw_params_fixup,
  591. .ops = &msm_ext_slimbus_be_ops,
  592. .ignore_suspend = 1,
  593. },
  594. {
  595. .name = LPASS_BE_SLIMBUS_2_RX,
  596. .stream_name = "Slimbus2 Playback",
  597. .cpu_dai_name = "msm-dai-q6-dev.16388",
  598. .platform_name = "msm-pcm-routing",
  599. .codec_name = "tavil_codec",
  600. .codec_dai_name = "tavil_rx2",
  601. .no_pcm = 1,
  602. .dpcm_playback = 1,
  603. .id = MSM_BACKEND_DAI_SLIMBUS_2_RX,
  604. .be_hw_params_fixup = msm_ext_be_hw_params_fixup,
  605. .ops = &msm_ext_slimbus_be_ops,
  606. .ignore_pmdown_time = 1,
  607. .ignore_suspend = 1,
  608. },
  609. {
  610. .name = LPASS_BE_SLIMBUS_3_RX,
  611. .stream_name = "Slimbus3 Playback",
  612. .cpu_dai_name = "msm-dai-q6-dev.16390",
  613. .platform_name = "msm-pcm-routing",
  614. .codec_name = "tavil_codec",
  615. .codec_dai_name = "tavil_rx1",
  616. .no_pcm = 1,
  617. .dpcm_playback = 1,
  618. .id = MSM_BACKEND_DAI_SLIMBUS_3_RX,
  619. .be_hw_params_fixup = msm_ext_be_hw_params_fixup,
  620. .ops = &msm_ext_slimbus_be_ops,
  621. /* dai link has playback support */
  622. .ignore_pmdown_time = 1,
  623. .ignore_suspend = 1,
  624. },
  625. {
  626. .name = LPASS_BE_SLIMBUS_3_TX,
  627. .stream_name = "Slimbus3 Capture",
  628. .cpu_dai_name = "msm-dai-q6-dev.16391",
  629. .platform_name = "msm-pcm-routing",
  630. .codec_name = "tavil_codec",
  631. .codec_dai_name = "tavil_tx1",
  632. .no_pcm = 1,
  633. .dpcm_capture = 1,
  634. .id = MSM_BACKEND_DAI_SLIMBUS_3_TX,
  635. .be_hw_params_fixup = msm_ext_be_hw_params_fixup,
  636. .ops = &msm_ext_slimbus_be_ops,
  637. .ignore_suspend = 1,
  638. },
  639. {
  640. .name = LPASS_BE_SLIMBUS_4_RX,
  641. .stream_name = "Slimbus4 Playback",
  642. .cpu_dai_name = "msm-dai-q6-dev.16392",
  643. .platform_name = "msm-pcm-routing",
  644. .codec_name = "tavil_codec",
  645. .codec_dai_name = "tavil_rx1",
  646. .no_pcm = 1,
  647. .dpcm_playback = 1,
  648. .id = MSM_BACKEND_DAI_SLIMBUS_4_RX,
  649. .be_hw_params_fixup = msm_ext_be_hw_params_fixup,
  650. .ops = &msm_ext_slimbus_be_ops,
  651. /* dai link has playback support */
  652. .ignore_pmdown_time = 1,
  653. .ignore_suspend = 1,
  654. },
  655. {
  656. .name = LPASS_BE_SLIMBUS_5_RX,
  657. .stream_name = "Slimbus5 Playback",
  658. .cpu_dai_name = "msm-dai-q6-dev.16394",
  659. .platform_name = "msm-pcm-routing",
  660. .codec_name = "tavil_codec",
  661. .codec_dai_name = "tavil_rx3",
  662. .no_pcm = 1,
  663. .dpcm_playback = 1,
  664. .id = MSM_BACKEND_DAI_SLIMBUS_5_RX,
  665. .be_hw_params_fixup = msm_ext_be_hw_params_fixup,
  666. .ops = &msm_ext_slimbus_be_ops,
  667. /* dai link has playback support */
  668. .ignore_pmdown_time = 1,
  669. .ignore_suspend = 1,
  670. },
  671. /* MAD BE */
  672. {
  673. .name = LPASS_BE_SLIMBUS_5_TX,
  674. .stream_name = "Slimbus5 Capture",
  675. .cpu_dai_name = "msm-dai-q6-dev.16395",
  676. .platform_name = "msm-pcm-routing",
  677. .codec_name = "tavil_codec",
  678. .codec_dai_name = "tavil_mad1",
  679. .no_pcm = 1,
  680. .dpcm_capture = 1,
  681. .id = MSM_BACKEND_DAI_SLIMBUS_5_TX,
  682. .be_hw_params_fixup = msm_ext_be_hw_params_fixup,
  683. .ops = &msm_ext_slimbus_be_ops,
  684. .ignore_suspend = 1,
  685. },
  686. {
  687. .name = LPASS_BE_SLIMBUS_6_RX,
  688. .stream_name = "Slimbus6 Playback",
  689. .cpu_dai_name = "msm-dai-q6-dev.16396",
  690. .platform_name = "msm-pcm-routing",
  691. .codec_name = "tavil_codec",
  692. .codec_dai_name = "tavil_rx4",
  693. .no_pcm = 1,
  694. .dpcm_playback = 1,
  695. .id = MSM_BACKEND_DAI_SLIMBUS_6_RX,
  696. .be_hw_params_fixup = msm_ext_be_hw_params_fixup,
  697. .ops = &msm_ext_slimbus_be_ops,
  698. /* dai link has playback support */
  699. .ignore_pmdown_time = 1,
  700. .ignore_suspend = 1,
  701. },
  702. };
  703. static struct snd_soc_dai_link msm_ext_common_fe_dai[] = {
  704. /* FrontEnd DAI Links */
  705. {/* hw:x,0 */
  706. .name = MSM_DAILINK_NAME(Media1),
  707. .stream_name = "MultiMedia1",
  708. .cpu_dai_name = "MultiMedia1",
  709. .platform_name = "msm-pcm-dsp.0",
  710. .dynamic = 1,
  711. .trigger = {SND_SOC_DPCM_TRIGGER_POST,
  712. SND_SOC_DPCM_TRIGGER_POST},
  713. .codec_dai_name = "snd-soc-dummy-dai",
  714. .codec_name = "snd-soc-dummy",
  715. .ignore_suspend = 1,
  716. .dpcm_playback = 1,
  717. .dpcm_capture = 1,
  718. /* this dai link has playback support */
  719. .ignore_pmdown_time = 1,
  720. .id = MSM_FRONTEND_DAI_MULTIMEDIA1
  721. },
  722. {/* hw:x,1 */
  723. .name = MSM_DAILINK_NAME(Media2),
  724. .stream_name = "MultiMedia2",
  725. .cpu_dai_name = "MultiMedia2",
  726. .platform_name = "msm-pcm-dsp.0",
  727. .dynamic = 1,
  728. .dpcm_playback = 1,
  729. .dpcm_capture = 1,
  730. .codec_dai_name = "snd-soc-dummy-dai",
  731. .codec_name = "snd-soc-dummy",
  732. .trigger = {SND_SOC_DPCM_TRIGGER_POST,
  733. SND_SOC_DPCM_TRIGGER_POST},
  734. .ignore_suspend = 1,
  735. /* this dai link has playback support */
  736. .ignore_pmdown_time = 1,
  737. .id = MSM_FRONTEND_DAI_MULTIMEDIA2,
  738. },
  739. {/* hw:x,2 */
  740. .name = "VoiceMMode1",
  741. .stream_name = "VoiceMMode1",
  742. .cpu_dai_name = "VoiceMMode1",
  743. .platform_name = "msm-pcm-voice",
  744. .dynamic = 1,
  745. .dpcm_capture = 1,
  746. .dpcm_playback = 1,
  747. .trigger = {SND_SOC_DPCM_TRIGGER_POST,
  748. SND_SOC_DPCM_TRIGGER_POST},
  749. .no_host_mode = SND_SOC_DAI_LINK_NO_HOST,
  750. .ignore_suspend = 1,
  751. .ignore_pmdown_time = 1,
  752. .codec_dai_name = "snd-soc-dummy-dai",
  753. .codec_name = "snd-soc-dummy",
  754. .id = MSM_FRONTEND_DAI_VOICEMMODE1,
  755. },
  756. {/* hw:x,3 */
  757. .name = "MSM VoIP",
  758. .stream_name = "VoIP",
  759. .cpu_dai_name = "VoIP",
  760. .platform_name = "msm-voip-dsp",
  761. .dynamic = 1,
  762. .dpcm_playback = 1,
  763. .dpcm_capture = 1,
  764. .trigger = {SND_SOC_DPCM_TRIGGER_POST,
  765. SND_SOC_DPCM_TRIGGER_POST},
  766. .codec_dai_name = "snd-soc-dummy-dai",
  767. .codec_name = "snd-soc-dummy",
  768. .ignore_suspend = 1,
  769. /* this dai link has playback support */
  770. .ignore_pmdown_time = 1,
  771. .id = MSM_FRONTEND_DAI_VOIP,
  772. },
  773. {/* hw:x,4 */
  774. .name = MSM_DAILINK_NAME(ULL),
  775. .stream_name = "ULL",
  776. .cpu_dai_name = "MultiMedia3",
  777. .platform_name = "msm-pcm-dsp.2",
  778. .dynamic = 1,
  779. .dpcm_playback = 1,
  780. .trigger = {SND_SOC_DPCM_TRIGGER_POST,
  781. SND_SOC_DPCM_TRIGGER_POST},
  782. .codec_dai_name = "snd-soc-dummy-dai",
  783. .codec_name = "snd-soc-dummy",
  784. .ignore_suspend = 1,
  785. /* this dai link has playback support */
  786. .ignore_pmdown_time = 1,
  787. .id = MSM_FRONTEND_DAI_MULTIMEDIA3,
  788. },
  789. /* Hostless PCM purpose */
  790. {/* hw:x,5 */
  791. .name = "SLIMBUS_0 Hostless",
  792. .stream_name = "SLIMBUS_0 Hostless",
  793. .cpu_dai_name = "SLIMBUS0_HOSTLESS",
  794. .platform_name = "msm-pcm-hostless",
  795. .dynamic = 1,
  796. .dpcm_capture = 1,
  797. .dpcm_playback = 1,
  798. .trigger = {SND_SOC_DPCM_TRIGGER_POST,
  799. SND_SOC_DPCM_TRIGGER_POST},
  800. .no_host_mode = SND_SOC_DAI_LINK_NO_HOST,
  801. .ignore_suspend = 1,
  802. .ignore_pmdown_time = 1,
  803. /* This dai link has MI2S support */
  804. .codec_dai_name = "snd-soc-dummy-dai",
  805. .codec_name = "snd-soc-dummy",
  806. },
  807. {/* hw:x,6 */
  808. .name = "MSM AFE-PCM RX",
  809. .stream_name = "AFE-PROXY RX",
  810. .cpu_dai_name = "msm-dai-q6-dev.241",
  811. .codec_name = "msm-stub-codec.1",
  812. .codec_dai_name = "msm-stub-rx",
  813. .platform_name = "msm-pcm-afe",
  814. .ignore_suspend = 1,
  815. /* this dai link has playback support */
  816. .ignore_pmdown_time = 1,
  817. },
  818. {/* hw:x,7 */
  819. .name = "MSM AFE-PCM TX",
  820. .stream_name = "AFE-PROXY TX",
  821. .cpu_dai_name = "msm-dai-q6-dev.240",
  822. .codec_name = "msm-stub-codec.1",
  823. .codec_dai_name = "msm-stub-tx",
  824. .platform_name = "msm-pcm-afe",
  825. .ignore_suspend = 1,
  826. },
  827. {/* hw:x,8 */
  828. .name = MSM_DAILINK_NAME(Compress1),
  829. .stream_name = "Compress1",
  830. .cpu_dai_name = "MultiMedia4",
  831. .platform_name = "msm-compress-dsp",
  832. .async_ops = ASYNC_DPCM_SND_SOC_HW_PARAMS,
  833. .dynamic = 1,
  834. .dpcm_capture = 1,
  835. .dpcm_playback = 1,
  836. .trigger = {SND_SOC_DPCM_TRIGGER_POST,
  837. SND_SOC_DPCM_TRIGGER_POST},
  838. .codec_dai_name = "snd-soc-dummy-dai",
  839. .codec_name = "snd-soc-dummy",
  840. .ignore_suspend = 1,
  841. .ignore_pmdown_time = 1,
  842. /* this dai link has playback support */
  843. .id = MSM_FRONTEND_DAI_MULTIMEDIA4,
  844. },
  845. {/* hw:x,9*/
  846. .name = "AUXPCM Hostless",
  847. .stream_name = "AUXPCM Hostless",
  848. .cpu_dai_name = "AUXPCM_HOSTLESS",
  849. .platform_name = "msm-pcm-hostless",
  850. .dynamic = 1,
  851. .dpcm_capture = 1,
  852. .dpcm_playback = 1,
  853. .trigger = {SND_SOC_DPCM_TRIGGER_POST,
  854. SND_SOC_DPCM_TRIGGER_POST},
  855. .no_host_mode = SND_SOC_DAI_LINK_NO_HOST,
  856. .ignore_suspend = 1,
  857. /* this dai link has playback support */
  858. .ignore_pmdown_time = 1,
  859. .codec_dai_name = "snd-soc-dummy-dai",
  860. .codec_name = "snd-soc-dummy",
  861. },
  862. {/* hw:x,10 */
  863. .name = "SLIMBUS_1 Hostless",
  864. .stream_name = "SLIMBUS_1 Hostless",
  865. .cpu_dai_name = "SLIMBUS1_HOSTLESS",
  866. .platform_name = "msm-pcm-hostless",
  867. .dynamic = 1,
  868. .dpcm_capture = 1,
  869. .dpcm_playback = 1,
  870. .trigger = {SND_SOC_DPCM_TRIGGER_POST,
  871. SND_SOC_DPCM_TRIGGER_POST},
  872. .no_host_mode = SND_SOC_DAI_LINK_NO_HOST,
  873. .ignore_suspend = 1,
  874. .ignore_pmdown_time = 1, /* dai link has playback support */
  875. .codec_dai_name = "snd-soc-dummy-dai",
  876. .codec_name = "snd-soc-dummy",
  877. },
  878. {/* hw:x,11 */
  879. .name = "SLIMBUS_3 Hostless",
  880. .stream_name = "SLIMBUS_3 Hostless",
  881. .cpu_dai_name = "SLIMBUS3_HOSTLESS",
  882. .platform_name = "msm-pcm-hostless",
  883. .dynamic = 1,
  884. .dpcm_capture = 1,
  885. .dpcm_playback = 1,
  886. .trigger = {SND_SOC_DPCM_TRIGGER_POST,
  887. SND_SOC_DPCM_TRIGGER_POST},
  888. .no_host_mode = SND_SOC_DAI_LINK_NO_HOST,
  889. .ignore_suspend = 1,
  890. .ignore_pmdown_time = 1, /* dai link has playback support */
  891. .codec_dai_name = "snd-soc-dummy-dai",
  892. .codec_name = "snd-soc-dummy",
  893. },
  894. {/* hw:x,12 */
  895. .name = "SLIMBUS_4 Hostless",
  896. .stream_name = "SLIMBUS_4 Hostless",
  897. .cpu_dai_name = "SLIMBUS4_HOSTLESS",
  898. .platform_name = "msm-pcm-hostless",
  899. .dynamic = 1,
  900. .dpcm_capture = 1,
  901. .dpcm_playback = 1,
  902. .trigger = {SND_SOC_DPCM_TRIGGER_POST,
  903. SND_SOC_DPCM_TRIGGER_POST},
  904. .no_host_mode = SND_SOC_DAI_LINK_NO_HOST,
  905. .ignore_suspend = 1,
  906. .ignore_pmdown_time = 1, /* dai link has playback support */
  907. .codec_dai_name = "snd-soc-dummy-dai",
  908. .codec_name = "snd-soc-dummy",
  909. },
  910. {/* hw:x,13 */
  911. .name = MSM_DAILINK_NAME(LowLatency),
  912. .stream_name = "MultiMedia5",
  913. .cpu_dai_name = "MultiMedia5",
  914. .platform_name = "msm-pcm-dsp.1",
  915. .dynamic = 1,
  916. .dpcm_capture = 1,
  917. .dpcm_playback = 1,
  918. .codec_dai_name = "snd-soc-dummy-dai",
  919. .codec_name = "snd-soc-dummy",
  920. .trigger = {SND_SOC_DPCM_TRIGGER_POST,
  921. SND_SOC_DPCM_TRIGGER_POST},
  922. .ignore_suspend = 1,
  923. /* this dai link has playback support */
  924. .ignore_pmdown_time = 1,
  925. .id = MSM_FRONTEND_DAI_MULTIMEDIA5,
  926. },
  927. /* LSM FE */
  928. {/* hw:x,14 */
  929. .name = "Listen 1 Audio Service",
  930. .stream_name = "Listen 1 Audio Service",
  931. .cpu_dai_name = "LSM1",
  932. .platform_name = "msm-lsm-client",
  933. .dynamic = 1,
  934. .dpcm_capture = 1,
  935. .trigger = {SND_SOC_DPCM_TRIGGER_POST,
  936. SND_SOC_DPCM_TRIGGER_POST },
  937. .no_host_mode = SND_SOC_DAI_LINK_NO_HOST,
  938. .ignore_suspend = 1,
  939. .ignore_pmdown_time = 1,
  940. .codec_dai_name = "snd-soc-dummy-dai",
  941. .codec_name = "snd-soc-dummy",
  942. .id = MSM_FRONTEND_DAI_LSM1,
  943. },
  944. {/* hw:x,15 */
  945. .name = MSM_DAILINK_NAME(Compress2),
  946. .stream_name = "Compress2",
  947. .cpu_dai_name = "MultiMedia7",
  948. .platform_name = "msm-compress-dsp",
  949. .dynamic = 1,
  950. .dpcm_capture = 1,
  951. .dpcm_playback = 1,
  952. .codec_dai_name = "snd-soc-dummy-dai",
  953. .codec_name = "snd-soc-dummy",
  954. .trigger = {SND_SOC_DPCM_TRIGGER_POST,
  955. SND_SOC_DPCM_TRIGGER_POST},
  956. .ignore_suspend = 1,
  957. /* this dai link has playback support */
  958. .ignore_pmdown_time = 1,
  959. .id = MSM_FRONTEND_DAI_MULTIMEDIA7,
  960. },
  961. {/* hw:x,16 */
  962. .name = MSM_DAILINK_NAME(MultiMedia10),
  963. .stream_name = "MultiMedia10",
  964. .cpu_dai_name = "MultiMedia10",
  965. .platform_name = "msm-pcm-dsp.1",
  966. .dynamic = 1,
  967. .dpcm_capture = 1,
  968. .dpcm_playback = 1,
  969. .dpcm_capture = 1,
  970. .trigger = {SND_SOC_DPCM_TRIGGER_POST,
  971. SND_SOC_DPCM_TRIGGER_POST},
  972. .codec_dai_name = "snd-soc-dummy-dai",
  973. .codec_name = "snd-soc-dummy",
  974. .ignore_suspend = 1,
  975. .ignore_pmdown_time = 1,
  976. /* this dai link has playback support */
  977. .id = MSM_FRONTEND_DAI_MULTIMEDIA10,
  978. },
  979. {/* hw:x,17 */
  980. .name = MSM_DAILINK_NAME(ULL_NOIRQ),
  981. .stream_name = "MM_NOIRQ",
  982. .cpu_dai_name = "MultiMedia8",
  983. .platform_name = "msm-pcm-dsp-noirq",
  984. .dynamic = 1,
  985. .dpcm_capture = 1,
  986. .dpcm_playback = 1,
  987. .trigger = {SND_SOC_DPCM_TRIGGER_POST,
  988. SND_SOC_DPCM_TRIGGER_POST},
  989. .codec_dai_name = "snd-soc-dummy-dai",
  990. .codec_name = "snd-soc-dummy",
  991. .ignore_suspend = 1,
  992. .ignore_pmdown_time = 1,
  993. /* this dai link has playback support */
  994. .id = MSM_FRONTEND_DAI_MULTIMEDIA8,
  995. },
  996. {/* hw:x,18 */
  997. .name = "HDMI_RX_HOSTLESS",
  998. .stream_name = "HDMI_RX_HOSTLESS",
  999. .cpu_dai_name = "HDMI_HOSTLESS",
  1000. .platform_name = "msm-pcm-hostless",
  1001. .dynamic = 1,
  1002. .dpcm_playback = 1,
  1003. .trigger = {SND_SOC_DPCM_TRIGGER_POST,
  1004. SND_SOC_DPCM_TRIGGER_POST},
  1005. .no_host_mode = SND_SOC_DAI_LINK_NO_HOST,
  1006. .ignore_suspend = 1,
  1007. .ignore_pmdown_time = 1,
  1008. .codec_dai_name = "snd-soc-dummy-dai",
  1009. .codec_name = "snd-soc-dummy",
  1010. },
  1011. {/* hw:x,19 */
  1012. .name = "VoiceMMode2",
  1013. .stream_name = "VoiceMMode2",
  1014. .cpu_dai_name = "VoiceMMode2",
  1015. .platform_name = "msm-pcm-voice",
  1016. .dynamic = 1,
  1017. .dpcm_capture = 1,
  1018. .dpcm_playback = 1,
  1019. .trigger = {SND_SOC_DPCM_TRIGGER_POST,
  1020. SND_SOC_DPCM_TRIGGER_POST},
  1021. .no_host_mode = SND_SOC_DAI_LINK_NO_HOST,
  1022. .ignore_suspend = 1,
  1023. .ignore_pmdown_time = 1,
  1024. .codec_dai_name = "snd-soc-dummy-dai",
  1025. .codec_name = "snd-soc-dummy",
  1026. .id = MSM_FRONTEND_DAI_VOICEMMODE2,
  1027. },
  1028. {/* hw:x,20 */
  1029. .name = "Listen 2 Audio Service",
  1030. .stream_name = "Listen 2 Audio Service",
  1031. .cpu_dai_name = "LSM2",
  1032. .platform_name = "msm-lsm-client",
  1033. .dynamic = 1,
  1034. .dpcm_capture = 1,
  1035. .trigger = {SND_SOC_DPCM_TRIGGER_POST,
  1036. SND_SOC_DPCM_TRIGGER_POST },
  1037. .no_host_mode = SND_SOC_DAI_LINK_NO_HOST,
  1038. .ignore_suspend = 1,
  1039. .ignore_pmdown_time = 1,
  1040. .codec_dai_name = "snd-soc-dummy-dai",
  1041. .codec_name = "snd-soc-dummy",
  1042. .id = MSM_FRONTEND_DAI_LSM2,
  1043. },
  1044. {/* hw:x,21 */
  1045. .name = "Listen 3 Audio Service",
  1046. .stream_name = "Listen 3 Audio Service",
  1047. .cpu_dai_name = "LSM3",
  1048. .platform_name = "msm-lsm-client",
  1049. .dynamic = 1,
  1050. .dpcm_capture = 1,
  1051. .trigger = {SND_SOC_DPCM_TRIGGER_POST,
  1052. SND_SOC_DPCM_TRIGGER_POST },
  1053. .no_host_mode = SND_SOC_DAI_LINK_NO_HOST,
  1054. .ignore_suspend = 1,
  1055. .ignore_pmdown_time = 1,
  1056. .codec_dai_name = "snd-soc-dummy-dai",
  1057. .codec_name = "snd-soc-dummy",
  1058. .id = MSM_FRONTEND_DAI_LSM3,
  1059. },
  1060. {/* hw:x,22 */
  1061. .name = "Listen 4 Audio Service",
  1062. .stream_name = "Listen 4 Audio Service",
  1063. .cpu_dai_name = "LSM4",
  1064. .platform_name = "msm-lsm-client",
  1065. .dynamic = 1,
  1066. .dpcm_capture = 1,
  1067. .trigger = {SND_SOC_DPCM_TRIGGER_POST,
  1068. SND_SOC_DPCM_TRIGGER_POST },
  1069. .no_host_mode = SND_SOC_DAI_LINK_NO_HOST,
  1070. .ignore_suspend = 1,
  1071. .ignore_pmdown_time = 1,
  1072. .codec_dai_name = "snd-soc-dummy-dai",
  1073. .codec_name = "snd-soc-dummy",
  1074. .id = MSM_FRONTEND_DAI_LSM4,
  1075. },
  1076. {/* hw:x,23 */
  1077. .name = "Listen 5 Audio Service",
  1078. .stream_name = "Listen 5 Audio Service",
  1079. .cpu_dai_name = "LSM5",
  1080. .platform_name = "msm-lsm-client",
  1081. .dynamic = 1,
  1082. .dpcm_capture = 1,
  1083. .trigger = {SND_SOC_DPCM_TRIGGER_POST,
  1084. SND_SOC_DPCM_TRIGGER_POST },
  1085. .no_host_mode = SND_SOC_DAI_LINK_NO_HOST,
  1086. .ignore_suspend = 1,
  1087. .ignore_pmdown_time = 1,
  1088. .codec_dai_name = "snd-soc-dummy-dai",
  1089. .codec_name = "snd-soc-dummy",
  1090. .id = MSM_FRONTEND_DAI_LSM5,
  1091. },
  1092. {/* hw:x,24 */
  1093. .name = "Listen 6 Audio Service",
  1094. .stream_name = "Listen 6 Audio Service",
  1095. .cpu_dai_name = "LSM6",
  1096. .platform_name = "msm-lsm-client",
  1097. .dynamic = 1,
  1098. .dpcm_capture = 1,
  1099. .trigger = {SND_SOC_DPCM_TRIGGER_POST,
  1100. SND_SOC_DPCM_TRIGGER_POST },
  1101. .no_host_mode = SND_SOC_DAI_LINK_NO_HOST,
  1102. .ignore_suspend = 1,
  1103. .ignore_pmdown_time = 1,
  1104. .codec_dai_name = "snd-soc-dummy-dai",
  1105. .codec_name = "snd-soc-dummy",
  1106. .id = MSM_FRONTEND_DAI_LSM6
  1107. },
  1108. {/* hw:x,25 */
  1109. .name = "Listen 7 Audio Service",
  1110. .stream_name = "Listen 7 Audio Service",
  1111. .cpu_dai_name = "LSM7",
  1112. .platform_name = "msm-lsm-client",
  1113. .dynamic = 1,
  1114. .dpcm_capture = 1,
  1115. .trigger = {SND_SOC_DPCM_TRIGGER_POST,
  1116. SND_SOC_DPCM_TRIGGER_POST },
  1117. .no_host_mode = SND_SOC_DAI_LINK_NO_HOST,
  1118. .ignore_suspend = 1,
  1119. .ignore_pmdown_time = 1,
  1120. .codec_dai_name = "snd-soc-dummy-dai",
  1121. .codec_name = "snd-soc-dummy",
  1122. .id = MSM_FRONTEND_DAI_LSM7,
  1123. },
  1124. {/* hw:x,26 */
  1125. .name = "Listen 8 Audio Service",
  1126. .stream_name = "Listen 8 Audio Service",
  1127. .cpu_dai_name = "LSM8",
  1128. .platform_name = "msm-lsm-client",
  1129. .dynamic = 1,
  1130. .dpcm_capture = 1,
  1131. .trigger = {SND_SOC_DPCM_TRIGGER_POST,
  1132. SND_SOC_DPCM_TRIGGER_POST },
  1133. .no_host_mode = SND_SOC_DAI_LINK_NO_HOST,
  1134. .ignore_suspend = 1,
  1135. .ignore_pmdown_time = 1,
  1136. .codec_dai_name = "snd-soc-dummy-dai",
  1137. .codec_name = "snd-soc-dummy",
  1138. .id = MSM_FRONTEND_DAI_LSM8,
  1139. },
  1140. {/* hw:x,27 */
  1141. .name = MSM_DAILINK_NAME(Media9),
  1142. .stream_name = "MultiMedia9",
  1143. .cpu_dai_name = "MultiMedia9",
  1144. .platform_name = "msm-pcm-dsp.0",
  1145. .dynamic = 1,
  1146. .dpcm_capture = 1,
  1147. .dpcm_playback = 1,
  1148. .trigger = {SND_SOC_DPCM_TRIGGER_POST,
  1149. SND_SOC_DPCM_TRIGGER_POST},
  1150. .codec_dai_name = "snd-soc-dummy-dai",
  1151. .codec_name = "snd-soc-dummy",
  1152. .ignore_suspend = 1,
  1153. .ignore_pmdown_time = 1,
  1154. /* this dai link has playback support */
  1155. .id = MSM_FRONTEND_DAI_MULTIMEDIA9,
  1156. },
  1157. {/* hw:x,28 */
  1158. .name = MSM_DAILINK_NAME(Compress4),
  1159. .stream_name = "Compress4",
  1160. .cpu_dai_name = "MultiMedia11",
  1161. .platform_name = "msm-compress-dsp",
  1162. .dynamic = 1,
  1163. .dpcm_capture = 1,
  1164. .dpcm_playback = 1,
  1165. .trigger = {SND_SOC_DPCM_TRIGGER_POST,
  1166. SND_SOC_DPCM_TRIGGER_POST},
  1167. .codec_dai_name = "snd-soc-dummy-dai",
  1168. .codec_name = "snd-soc-dummy",
  1169. .ignore_suspend = 1,
  1170. .ignore_pmdown_time = 1,
  1171. /* this dai link has playback support */
  1172. .id = MSM_FRONTEND_DAI_MULTIMEDIA11,
  1173. },
  1174. {/* hw:x,29 */
  1175. .name = MSM_DAILINK_NAME(Compress5),
  1176. .stream_name = "Compress5",
  1177. .cpu_dai_name = "MultiMedia12",
  1178. .platform_name = "msm-compress-dsp",
  1179. .dynamic = 1,
  1180. .dpcm_capture = 1,
  1181. .dpcm_playback = 1,
  1182. .trigger = {SND_SOC_DPCM_TRIGGER_POST,
  1183. SND_SOC_DPCM_TRIGGER_POST},
  1184. .codec_dai_name = "snd-soc-dummy-dai",
  1185. .codec_name = "snd-soc-dummy",
  1186. .ignore_suspend = 1,
  1187. .ignore_pmdown_time = 1,
  1188. /* this dai link has playback support */
  1189. .id = MSM_FRONTEND_DAI_MULTIMEDIA12,
  1190. },
  1191. {/* hw:x,30 */
  1192. .name = MSM_DAILINK_NAME(Compress6),
  1193. .stream_name = "Compress6",
  1194. .cpu_dai_name = "MultiMedia13",
  1195. .platform_name = "msm-compress-dsp",
  1196. .dynamic = 1,
  1197. .dpcm_capture = 1,
  1198. .dpcm_playback = 1,
  1199. .trigger = {SND_SOC_DPCM_TRIGGER_POST,
  1200. SND_SOC_DPCM_TRIGGER_POST},
  1201. .codec_dai_name = "snd-soc-dummy-dai",
  1202. .codec_name = "snd-soc-dummy",
  1203. .ignore_suspend = 1,
  1204. .ignore_pmdown_time = 1,
  1205. /* this dai link has playback support */
  1206. .id = MSM_FRONTEND_DAI_MULTIMEDIA13,
  1207. },
  1208. {/* hw:x,31 */
  1209. .name = MSM_DAILINK_NAME(Compress7),
  1210. .stream_name = "Compress7",
  1211. .cpu_dai_name = "MultiMedia14",
  1212. .platform_name = "msm-compress-dsp",
  1213. .dynamic = 1,
  1214. .dpcm_capture = 1,
  1215. .dpcm_playback = 1,
  1216. .trigger = {SND_SOC_DPCM_TRIGGER_POST,
  1217. SND_SOC_DPCM_TRIGGER_POST},
  1218. .codec_dai_name = "snd-soc-dummy-dai",
  1219. .codec_name = "snd-soc-dummy",
  1220. .ignore_suspend = 1,
  1221. .ignore_pmdown_time = 1,
  1222. /* this dai link has playback support */
  1223. .id = MSM_FRONTEND_DAI_MULTIMEDIA14,
  1224. },
  1225. {/* hw:x,32 */
  1226. .name = MSM_DAILINK_NAME(Compress8),
  1227. .stream_name = "Compress8",
  1228. .cpu_dai_name = "MultiMedia15",
  1229. .platform_name = "msm-compress-dsp",
  1230. .dynamic = 1,
  1231. .dpcm_capture = 1,
  1232. .dpcm_playback = 1,
  1233. .trigger = {SND_SOC_DPCM_TRIGGER_POST,
  1234. SND_SOC_DPCM_TRIGGER_POST},
  1235. .codec_dai_name = "snd-soc-dummy-dai",
  1236. .codec_name = "snd-soc-dummy",
  1237. .ignore_suspend = 1,
  1238. .ignore_pmdown_time = 1,
  1239. /* this dai link has playback support */
  1240. .id = MSM_FRONTEND_DAI_MULTIMEDIA15,
  1241. },
  1242. {/* hw:x,33 */
  1243. .name = MSM_DAILINK_NAME(ULL_NOIRQ_2),
  1244. .stream_name = "MM_NOIRQ_2",
  1245. .cpu_dai_name = "MultiMedia16",
  1246. .platform_name = "msm-pcm-dsp-noirq",
  1247. .dynamic = 1,
  1248. .dpcm_capture = 1,
  1249. .dpcm_playback = 1,
  1250. .trigger = {SND_SOC_DPCM_TRIGGER_POST,
  1251. SND_SOC_DPCM_TRIGGER_POST},
  1252. .codec_dai_name = "snd-soc-dummy-dai",
  1253. .codec_name = "snd-soc-dummy",
  1254. .ignore_suspend = 1,
  1255. .ignore_pmdown_time = 1,
  1256. /* this dai link has playback support */
  1257. .id = MSM_FRONTEND_DAI_MULTIMEDIA16,
  1258. },
  1259. {/* hw:x,34 */
  1260. .name = "SLIMBUS_8 Hostless",
  1261. .stream_name = "SLIMBUS8_HOSTLESS Capture",
  1262. .cpu_dai_name = "SLIMBUS8_HOSTLESS",
  1263. .platform_name = "msm-pcm-hostless",
  1264. .dynamic = 1,
  1265. .dpcm_capture = 1,
  1266. .trigger = {SND_SOC_DPCM_TRIGGER_POST,
  1267. SND_SOC_DPCM_TRIGGER_POST},
  1268. .no_host_mode = SND_SOC_DAI_LINK_NO_HOST,
  1269. .ignore_suspend = 1,
  1270. .ignore_pmdown_time = 1,
  1271. .codec_dai_name = "snd-soc-dummy-dai",
  1272. .codec_name = "snd-soc-dummy",
  1273. },
  1274. {/* hw:x,35 */
  1275. .name = "SLIMBUS7 Hostless",
  1276. .stream_name = "SLIMBUS7 Hostless",
  1277. .cpu_dai_name = "SLIMBUS7_HOSTLESS",
  1278. .platform_name = "msm-pcm-hostless",
  1279. .dynamic = 1,
  1280. .dpcm_playback = 1,
  1281. .dpcm_capture = 1,
  1282. .trigger = {SND_SOC_DPCM_TRIGGER_POST,
  1283. SND_SOC_DPCM_TRIGGER_POST},
  1284. .no_host_mode = SND_SOC_DAI_LINK_NO_HOST,
  1285. .ignore_suspend = 1,
  1286. .ignore_pmdown_time = 1,
  1287. .codec_dai_name = "snd-soc-dummy-dai",
  1288. .codec_name = "snd-soc-dummy",
  1289. },
  1290. {/* hw:x,36 */
  1291. .name = "SDM660 HFP TX",
  1292. .stream_name = "MultiMedia6",
  1293. .cpu_dai_name = "MultiMedia6",
  1294. .platform_name = "msm-pcm-loopback",
  1295. .dynamic = 1,
  1296. .dpcm_playback = 1,
  1297. .dpcm_capture = 1,
  1298. .codec_dai_name = "snd-soc-dummy-dai",
  1299. .codec_name = "snd-soc-dummy",
  1300. .trigger = {SND_SOC_DPCM_TRIGGER_POST,
  1301. SND_SOC_DPCM_TRIGGER_POST},
  1302. .ignore_suspend = 1,
  1303. .no_host_mode = SND_SOC_DAI_LINK_NO_HOST,
  1304. .ignore_pmdown_time = 1,
  1305. .id = MSM_FRONTEND_DAI_MULTIMEDIA6,
  1306. },
  1307. };
  1308. static struct snd_soc_dai_link msm_ext_common_be_dai[] = {
  1309. {
  1310. .name = LPASS_BE_AFE_PCM_RX,
  1311. .stream_name = "AFE Playback",
  1312. .cpu_dai_name = "msm-dai-q6-dev.224",
  1313. .platform_name = "msm-pcm-routing",
  1314. .codec_name = "msm-stub-codec.1",
  1315. .codec_dai_name = "msm-stub-rx",
  1316. .no_pcm = 1,
  1317. .dpcm_playback = 1,
  1318. .id = MSM_BACKEND_DAI_AFE_PCM_RX,
  1319. .be_hw_params_fixup = msm_common_be_hw_params_fixup,
  1320. /* this dai link has playback support */
  1321. .ignore_pmdown_time = 1,
  1322. .ignore_suspend = 1,
  1323. },
  1324. {
  1325. .name = LPASS_BE_AFE_PCM_TX,
  1326. .stream_name = "AFE Capture",
  1327. .cpu_dai_name = "msm-dai-q6-dev.225",
  1328. .platform_name = "msm-pcm-routing",
  1329. .codec_name = "msm-stub-codec.1",
  1330. .codec_dai_name = "msm-stub-tx",
  1331. .no_pcm = 1,
  1332. .dpcm_capture = 1,
  1333. .id = MSM_BACKEND_DAI_AFE_PCM_TX,
  1334. .be_hw_params_fixup = msm_common_be_hw_params_fixup,
  1335. .ignore_suspend = 1,
  1336. },
  1337. /* Incall Record Uplink BACK END DAI Link */
  1338. {
  1339. .name = LPASS_BE_INCALL_RECORD_TX,
  1340. .stream_name = "Voice Uplink Capture",
  1341. .cpu_dai_name = "msm-dai-q6-dev.32772",
  1342. .platform_name = "msm-pcm-routing",
  1343. .codec_name = "msm-stub-codec.1",
  1344. .codec_dai_name = "msm-stub-tx",
  1345. .no_pcm = 1,
  1346. .dpcm_capture = 1,
  1347. .id = MSM_BACKEND_DAI_INCALL_RECORD_TX,
  1348. .be_hw_params_fixup = msm_ext_be_hw_params_fixup,
  1349. .ignore_suspend = 1,
  1350. },
  1351. /* Incall Record Downlink BACK END DAI Link */
  1352. {
  1353. .name = LPASS_BE_INCALL_RECORD_RX,
  1354. .stream_name = "Voice Downlink Capture",
  1355. .cpu_dai_name = "msm-dai-q6-dev.32771",
  1356. .platform_name = "msm-pcm-routing",
  1357. .codec_name = "msm-stub-codec.1",
  1358. .codec_dai_name = "msm-stub-tx",
  1359. .no_pcm = 1,
  1360. .dpcm_capture = 1,
  1361. .id = MSM_BACKEND_DAI_INCALL_RECORD_RX,
  1362. .be_hw_params_fixup = msm_ext_be_hw_params_fixup,
  1363. .ignore_suspend = 1,
  1364. },
  1365. /* Incall Music BACK END DAI Link */
  1366. {
  1367. .name = LPASS_BE_VOICE_PLAYBACK_TX,
  1368. .stream_name = "Voice Farend Playback",
  1369. .cpu_dai_name = "msm-dai-q6-dev.32773",
  1370. .platform_name = "msm-pcm-routing",
  1371. .codec_name = "msm-stub-codec.1",
  1372. .codec_dai_name = "msm-stub-rx",
  1373. .no_pcm = 1,
  1374. .dpcm_playback = 1,
  1375. .id = MSM_BACKEND_DAI_VOICE_PLAYBACK_TX,
  1376. .be_hw_params_fixup = msm_ext_be_hw_params_fixup,
  1377. .ignore_suspend = 1,
  1378. },
  1379. /* Incall Music 2 BACK END DAI Link */
  1380. {
  1381. .name = LPASS_BE_VOICE2_PLAYBACK_TX,
  1382. .stream_name = "Voice2 Farend Playback",
  1383. .cpu_dai_name = "msm-dai-q6-dev.32770",
  1384. .platform_name = "msm-pcm-routing",
  1385. .codec_name = "msm-stub-codec.1",
  1386. .codec_dai_name = "msm-stub-rx",
  1387. .no_pcm = 1,
  1388. .dpcm_playback = 1,
  1389. .id = MSM_BACKEND_DAI_VOICE2_PLAYBACK_TX,
  1390. .be_hw_params_fixup = msm_ext_be_hw_params_fixup,
  1391. .ignore_suspend = 1,
  1392. },
  1393. {
  1394. .name = LPASS_BE_USB_AUDIO_RX,
  1395. .stream_name = "USB Audio Playback",
  1396. .cpu_dai_name = "msm-dai-q6-dev.28672",
  1397. .platform_name = "msm-pcm-routing",
  1398. .codec_name = "msm-stub-codec.1",
  1399. .codec_dai_name = "msm-stub-rx",
  1400. .no_pcm = 1,
  1401. .dpcm_playback = 1,
  1402. .id = MSM_BACKEND_DAI_USB_RX,
  1403. .be_hw_params_fixup = msm_common_be_hw_params_fixup,
  1404. .ignore_pmdown_time = 1,
  1405. .ignore_suspend = 1,
  1406. },
  1407. {
  1408. .name = LPASS_BE_USB_AUDIO_TX,
  1409. .stream_name = "USB Audio Capture",
  1410. .cpu_dai_name = "msm-dai-q6-dev.28673",
  1411. .platform_name = "msm-pcm-routing",
  1412. .codec_name = "msm-stub-codec.1",
  1413. .codec_dai_name = "msm-stub-tx",
  1414. .no_pcm = 1,
  1415. .dpcm_capture = 1,
  1416. .id = MSM_BACKEND_DAI_USB_TX,
  1417. .be_hw_params_fixup = msm_common_be_hw_params_fixup,
  1418. .ignore_suspend = 1,
  1419. },
  1420. {
  1421. .name = LPASS_BE_PRI_TDM_RX_0,
  1422. .stream_name = "Primary TDM0 Playback",
  1423. .cpu_dai_name = "msm-dai-q6-tdm.36864",
  1424. .platform_name = "msm-pcm-routing",
  1425. .codec_name = "msm-stub-codec.1",
  1426. .codec_dai_name = "msm-stub-rx",
  1427. .no_pcm = 1,
  1428. .dpcm_playback = 1,
  1429. .id = MSM_BACKEND_DAI_PRI_TDM_RX_0,
  1430. .be_hw_params_fixup = msm_common_be_hw_params_fixup,
  1431. .ops = &msm_tdm_be_ops,
  1432. .ignore_suspend = 1,
  1433. },
  1434. {
  1435. .name = LPASS_BE_PRI_TDM_TX_0,
  1436. .stream_name = "Primary TDM0 Capture",
  1437. .cpu_dai_name = "msm-dai-q6-tdm.36865",
  1438. .platform_name = "msm-pcm-routing",
  1439. .codec_name = "msm-stub-codec.1",
  1440. .codec_dai_name = "msm-stub-tx",
  1441. .no_pcm = 1,
  1442. .dpcm_capture = 1,
  1443. .id = MSM_BACKEND_DAI_PRI_TDM_TX_0,
  1444. .be_hw_params_fixup = msm_common_be_hw_params_fixup,
  1445. .ops = &msm_tdm_be_ops,
  1446. .ignore_suspend = 1,
  1447. },
  1448. {
  1449. .name = LPASS_BE_SEC_TDM_RX_0,
  1450. .stream_name = "Secondary TDM0 Playback",
  1451. .cpu_dai_name = "msm-dai-q6-tdm.36880",
  1452. .platform_name = "msm-pcm-routing",
  1453. .codec_name = "msm-stub-codec.1",
  1454. .codec_dai_name = "msm-stub-rx",
  1455. .no_pcm = 1,
  1456. .dpcm_playback = 1,
  1457. .id = MSM_BACKEND_DAI_SEC_TDM_RX_0,
  1458. .be_hw_params_fixup = msm_common_be_hw_params_fixup,
  1459. .ops = &msm_tdm_be_ops,
  1460. .ignore_suspend = 1,
  1461. },
  1462. {
  1463. .name = LPASS_BE_SEC_TDM_TX_0,
  1464. .stream_name = "Secondary TDM0 Capture",
  1465. .cpu_dai_name = "msm-dai-q6-tdm.36881",
  1466. .platform_name = "msm-pcm-routing",
  1467. .codec_name = "msm-stub-codec.1",
  1468. .codec_dai_name = "msm-stub-tx",
  1469. .no_pcm = 1,
  1470. .dpcm_capture = 1,
  1471. .id = MSM_BACKEND_DAI_SEC_TDM_TX_0,
  1472. .be_hw_params_fixup = msm_common_be_hw_params_fixup,
  1473. .ops = &msm_tdm_be_ops,
  1474. .ignore_suspend = 1,
  1475. },
  1476. {
  1477. .name = LPASS_BE_TERT_TDM_RX_0,
  1478. .stream_name = "Tertiary TDM0 Playback",
  1479. .cpu_dai_name = "msm-dai-q6-tdm.36896",
  1480. .platform_name = "msm-pcm-routing",
  1481. .codec_name = "msm-stub-codec.1",
  1482. .codec_dai_name = "msm-stub-rx",
  1483. .no_pcm = 1,
  1484. .dpcm_playback = 1,
  1485. .id = MSM_BACKEND_DAI_TERT_TDM_RX_0,
  1486. .be_hw_params_fixup = msm_common_be_hw_params_fixup,
  1487. .ops = &msm_tdm_be_ops,
  1488. .ignore_suspend = 1,
  1489. },
  1490. {
  1491. .name = LPASS_BE_TERT_TDM_TX_0,
  1492. .stream_name = "Tertiary TDM0 Capture",
  1493. .cpu_dai_name = "msm-dai-q6-tdm.36897",
  1494. .platform_name = "msm-pcm-routing",
  1495. .codec_name = "msm-stub-codec.1",
  1496. .codec_dai_name = "msm-stub-tx",
  1497. .no_pcm = 1,
  1498. .dpcm_capture = 1,
  1499. .id = MSM_BACKEND_DAI_TERT_TDM_TX_0,
  1500. .be_hw_params_fixup = msm_common_be_hw_params_fixup,
  1501. .ops = &msm_tdm_be_ops,
  1502. .ignore_suspend = 1,
  1503. },
  1504. {
  1505. .name = LPASS_BE_QUAT_TDM_RX_0,
  1506. .stream_name = "Quaternary TDM0 Playback",
  1507. .cpu_dai_name = "msm-dai-q6-tdm.36912",
  1508. .platform_name = "msm-pcm-routing",
  1509. .codec_name = "msm-stub-codec.1",
  1510. .codec_dai_name = "msm-stub-rx",
  1511. .no_pcm = 1,
  1512. .dpcm_playback = 1,
  1513. .id = MSM_BACKEND_DAI_QUAT_TDM_RX_0,
  1514. .be_hw_params_fixup = msm_common_be_hw_params_fixup,
  1515. .ops = &msm_tdm_be_ops,
  1516. .ignore_suspend = 1,
  1517. },
  1518. {
  1519. .name = LPASS_BE_QUAT_TDM_TX_0,
  1520. .stream_name = "Quaternary TDM0 Capture",
  1521. .cpu_dai_name = "msm-dai-q6-tdm.36913",
  1522. .platform_name = "msm-pcm-routing",
  1523. .codec_name = "msm-stub-codec.1",
  1524. .codec_dai_name = "msm-stub-tx",
  1525. .no_pcm = 1,
  1526. .dpcm_capture = 1,
  1527. .id = MSM_BACKEND_DAI_QUAT_TDM_TX_0,
  1528. .be_hw_params_fixup = msm_common_be_hw_params_fixup,
  1529. .ops = &msm_tdm_be_ops,
  1530. .ignore_suspend = 1,
  1531. },
  1532. };
  1533. static struct snd_soc_dai_link msm_mi2s_be_dai_links[] = {
  1534. {
  1535. .name = LPASS_BE_PRI_MI2S_RX,
  1536. .stream_name = "Primary MI2S Playback",
  1537. .cpu_dai_name = "msm-dai-q6-mi2s.0",
  1538. .platform_name = "msm-pcm-routing",
  1539. .codec_name = "msm-stub-codec.1",
  1540. .codec_dai_name = "msm-stub-rx",
  1541. .no_pcm = 1,
  1542. .dpcm_playback = 1,
  1543. .id = MSM_BACKEND_DAI_PRI_MI2S_RX,
  1544. .be_hw_params_fixup = msm_common_be_hw_params_fixup,
  1545. .ops = &msm_mi2s_be_ops,
  1546. .ignore_suspend = 1,
  1547. .ignore_pmdown_time = 1,
  1548. },
  1549. {
  1550. .name = LPASS_BE_PRI_MI2S_TX,
  1551. .stream_name = "Primary MI2S Capture",
  1552. .cpu_dai_name = "msm-dai-q6-mi2s.0",
  1553. .platform_name = "msm-pcm-routing",
  1554. .codec_name = "msm-stub-codec.1",
  1555. .codec_dai_name = "msm-stub-tx",
  1556. .no_pcm = 1,
  1557. .dpcm_capture = 1,
  1558. .id = MSM_BACKEND_DAI_PRI_MI2S_TX,
  1559. .be_hw_params_fixup = msm_common_be_hw_params_fixup,
  1560. .ops = &msm_mi2s_be_ops,
  1561. .ignore_suspend = 1,
  1562. },
  1563. {
  1564. .name = LPASS_BE_SEC_MI2S_RX,
  1565. .stream_name = "Secondary MI2S Playback",
  1566. .cpu_dai_name = "msm-dai-q6-mi2s.1",
  1567. .platform_name = "msm-pcm-routing",
  1568. .codec_name = "msm-stub-codec.1",
  1569. .codec_dai_name = "msm-stub-rx",
  1570. .no_pcm = 1,
  1571. .dpcm_playback = 1,
  1572. .id = MSM_BACKEND_DAI_SECONDARY_MI2S_RX,
  1573. .be_hw_params_fixup = msm_common_be_hw_params_fixup,
  1574. .ops = &msm_mi2s_be_ops,
  1575. .ignore_suspend = 1,
  1576. .ignore_pmdown_time = 1,
  1577. },
  1578. {
  1579. .name = LPASS_BE_SEC_MI2S_TX,
  1580. .stream_name = "Secondary MI2S Capture",
  1581. .cpu_dai_name = "msm-dai-q6-mi2s.1",
  1582. .platform_name = "msm-pcm-routing",
  1583. .codec_name = "msm-stub-codec.1",
  1584. .codec_dai_name = "msm-stub-tx",
  1585. .no_pcm = 1,
  1586. .dpcm_capture = 1,
  1587. .id = MSM_BACKEND_DAI_SECONDARY_MI2S_TX,
  1588. .be_hw_params_fixup = msm_common_be_hw_params_fixup,
  1589. .ops = &msm_mi2s_be_ops,
  1590. .ignore_suspend = 1,
  1591. },
  1592. {
  1593. .name = LPASS_BE_TERT_MI2S_RX,
  1594. .stream_name = "Tertiary MI2S Playback",
  1595. .cpu_dai_name = "msm-dai-q6-mi2s.2",
  1596. .platform_name = "msm-pcm-routing",
  1597. .codec_name = "msm-stub-codec.1",
  1598. .codec_dai_name = "msm-stub-rx",
  1599. .no_pcm = 1,
  1600. .dpcm_playback = 1,
  1601. .id = MSM_BACKEND_DAI_TERTIARY_MI2S_RX,
  1602. .be_hw_params_fixup = msm_common_be_hw_params_fixup,
  1603. .ops = &msm_mi2s_be_ops,
  1604. .ignore_suspend = 1,
  1605. .ignore_pmdown_time = 1,
  1606. },
  1607. {
  1608. .name = LPASS_BE_TERT_MI2S_TX,
  1609. .stream_name = "Tertiary MI2S Capture",
  1610. .cpu_dai_name = "msm-dai-q6-mi2s.2",
  1611. .platform_name = "msm-pcm-routing",
  1612. .codec_name = "msm-stub-codec.1",
  1613. .codec_dai_name = "msm-stub-tx",
  1614. .no_pcm = 1,
  1615. .dpcm_capture = 1,
  1616. .id = MSM_BACKEND_DAI_TERTIARY_MI2S_TX,
  1617. .be_hw_params_fixup = msm_common_be_hw_params_fixup,
  1618. .ops = &msm_mi2s_be_ops,
  1619. .ignore_suspend = 1,
  1620. },
  1621. {
  1622. .name = LPASS_BE_QUAT_MI2S_RX,
  1623. .stream_name = "Quaternary MI2S Playback",
  1624. .cpu_dai_name = "msm-dai-q6-mi2s.3",
  1625. .platform_name = "msm-pcm-routing",
  1626. .codec_name = "msm-stub-codec.1",
  1627. .codec_dai_name = "msm-stub-rx",
  1628. .no_pcm = 1,
  1629. .dpcm_playback = 1,
  1630. .id = MSM_BACKEND_DAI_QUATERNARY_MI2S_RX,
  1631. .be_hw_params_fixup = msm_common_be_hw_params_fixup,
  1632. .ops = &msm_mi2s_be_ops,
  1633. .ignore_suspend = 1,
  1634. .ignore_pmdown_time = 1,
  1635. },
  1636. {
  1637. .name = LPASS_BE_QUAT_MI2S_TX,
  1638. .stream_name = "Quaternary MI2S Capture",
  1639. .cpu_dai_name = "msm-dai-q6-mi2s.3",
  1640. .platform_name = "msm-pcm-routing",
  1641. .codec_name = "msm-stub-codec.1",
  1642. .codec_dai_name = "msm-stub-tx",
  1643. .no_pcm = 1,
  1644. .dpcm_capture = 1,
  1645. .id = MSM_BACKEND_DAI_QUATERNARY_MI2S_TX,
  1646. .be_hw_params_fixup = msm_common_be_hw_params_fixup,
  1647. .ops = &msm_mi2s_be_ops,
  1648. .ignore_suspend = 1,
  1649. },
  1650. };
  1651. static struct snd_soc_dai_link msm_auxpcm_be_dai_links[] = {
  1652. /* Primary AUX PCM Backend DAI Links */
  1653. {
  1654. .name = LPASS_BE_AUXPCM_RX,
  1655. .stream_name = "AUX PCM Playback",
  1656. .cpu_dai_name = "msm-dai-q6-auxpcm.1",
  1657. .platform_name = "msm-pcm-routing",
  1658. .codec_name = "msm-stub-codec.1",
  1659. .codec_dai_name = "msm-stub-rx",
  1660. .no_pcm = 1,
  1661. .dpcm_playback = 1,
  1662. .id = MSM_BACKEND_DAI_AUXPCM_RX,
  1663. .be_hw_params_fixup = msm_common_be_hw_params_fixup,
  1664. .ignore_pmdown_time = 1,
  1665. .ignore_suspend = 1,
  1666. .ops = &msm_aux_pcm_be_ops,
  1667. },
  1668. {
  1669. .name = LPASS_BE_AUXPCM_TX,
  1670. .stream_name = "AUX PCM Capture",
  1671. .cpu_dai_name = "msm-dai-q6-auxpcm.1",
  1672. .platform_name = "msm-pcm-routing",
  1673. .codec_name = "msm-stub-codec.1",
  1674. .codec_dai_name = "msm-stub-tx",
  1675. .no_pcm = 1,
  1676. .dpcm_capture = 1,
  1677. .id = MSM_BACKEND_DAI_AUXPCM_TX,
  1678. .be_hw_params_fixup = msm_common_be_hw_params_fixup,
  1679. .ignore_pmdown_time = 1,
  1680. .ignore_suspend = 1,
  1681. .ops = &msm_aux_pcm_be_ops,
  1682. },
  1683. /* Secondary AUX PCM Backend DAI Links */
  1684. {
  1685. .name = LPASS_BE_SEC_AUXPCM_RX,
  1686. .stream_name = "Sec AUX PCM Playback",
  1687. .cpu_dai_name = "msm-dai-q6-auxpcm.2",
  1688. .platform_name = "msm-pcm-routing",
  1689. .codec_name = "msm-stub-codec.1",
  1690. .codec_dai_name = "msm-stub-rx",
  1691. .no_pcm = 1,
  1692. .dpcm_playback = 1,
  1693. .id = MSM_BACKEND_DAI_SEC_AUXPCM_RX,
  1694. .be_hw_params_fixup = msm_common_be_hw_params_fixup,
  1695. .ignore_pmdown_time = 1,
  1696. .ignore_suspend = 1,
  1697. .ops = &msm_aux_pcm_be_ops,
  1698. },
  1699. {
  1700. .name = LPASS_BE_SEC_AUXPCM_TX,
  1701. .stream_name = "Sec AUX PCM Capture",
  1702. .cpu_dai_name = "msm-dai-q6-auxpcm.2",
  1703. .platform_name = "msm-pcm-routing",
  1704. .codec_name = "msm-stub-codec.1",
  1705. .codec_dai_name = "msm-stub-tx",
  1706. .no_pcm = 1,
  1707. .dpcm_capture = 1,
  1708. .id = MSM_BACKEND_DAI_SEC_AUXPCM_TX,
  1709. .be_hw_params_fixup = msm_common_be_hw_params_fixup,
  1710. .ignore_suspend = 1,
  1711. .ignore_pmdown_time = 1,
  1712. .ops = &msm_aux_pcm_be_ops,
  1713. },
  1714. /* Tertiary AUX PCM Backend DAI Links */
  1715. {
  1716. .name = LPASS_BE_TERT_AUXPCM_RX,
  1717. .stream_name = "Tert AUX PCM Playback",
  1718. .cpu_dai_name = "msm-dai-q6-auxpcm.3",
  1719. .platform_name = "msm-pcm-routing",
  1720. .codec_name = "msm-stub-codec.1",
  1721. .codec_dai_name = "msm-stub-rx",
  1722. .no_pcm = 1,
  1723. .dpcm_playback = 1,
  1724. .id = MSM_BACKEND_DAI_TERT_AUXPCM_RX,
  1725. .be_hw_params_fixup = msm_common_be_hw_params_fixup,
  1726. .ignore_pmdown_time = 1,
  1727. .ignore_suspend = 1,
  1728. .ops = &msm_aux_pcm_be_ops,
  1729. },
  1730. {
  1731. .name = LPASS_BE_TERT_AUXPCM_TX,
  1732. .stream_name = "Tert AUX PCM Capture",
  1733. .cpu_dai_name = "msm-dai-q6-auxpcm.3",
  1734. .platform_name = "msm-pcm-routing",
  1735. .codec_name = "msm-stub-codec.1",
  1736. .codec_dai_name = "msm-stub-tx",
  1737. .no_pcm = 1,
  1738. .dpcm_capture = 1,
  1739. .id = MSM_BACKEND_DAI_TERT_AUXPCM_TX,
  1740. .be_hw_params_fixup = msm_common_be_hw_params_fixup,
  1741. .ignore_suspend = 1,
  1742. .ignore_pmdown_time = 1,
  1743. .ops = &msm_aux_pcm_be_ops,
  1744. },
  1745. /* Quaternary AUX PCM Backend DAI Links */
  1746. {
  1747. .name = LPASS_BE_QUAT_AUXPCM_RX,
  1748. .stream_name = "Quat AUX PCM Playback",
  1749. .cpu_dai_name = "msm-dai-q6-auxpcm.4",
  1750. .platform_name = "msm-pcm-routing",
  1751. .codec_name = "msm-stub-codec.1",
  1752. .codec_dai_name = "msm-stub-rx",
  1753. .no_pcm = 1,
  1754. .dpcm_playback = 1,
  1755. .id = MSM_BACKEND_DAI_QUAT_AUXPCM_RX,
  1756. .be_hw_params_fixup = msm_common_be_hw_params_fixup,
  1757. .ignore_pmdown_time = 1,
  1758. .ignore_suspend = 1,
  1759. .ops = &msm_aux_pcm_be_ops,
  1760. },
  1761. {
  1762. .name = LPASS_BE_QUAT_AUXPCM_TX,
  1763. .stream_name = "Quat AUX PCM Capture",
  1764. .cpu_dai_name = "msm-dai-q6-auxpcm.4",
  1765. .platform_name = "msm-pcm-routing",
  1766. .codec_name = "msm-stub-codec.1",
  1767. .codec_dai_name = "msm-stub-tx",
  1768. .no_pcm = 1,
  1769. .dpcm_capture = 1,
  1770. .id = MSM_BACKEND_DAI_QUAT_AUXPCM_TX,
  1771. .be_hw_params_fixup = msm_common_be_hw_params_fixup,
  1772. .ignore_suspend = 1,
  1773. .ignore_pmdown_time = 1,
  1774. .ops = &msm_aux_pcm_be_ops,
  1775. },
  1776. };
  1777. static struct snd_soc_dai_link msm_wcn_be_dai_links[] = {
  1778. {
  1779. .name = LPASS_BE_SLIMBUS_7_RX,
  1780. .stream_name = "Slimbus7 Playback",
  1781. .cpu_dai_name = "msm-dai-q6-dev.16398",
  1782. .platform_name = "msm-pcm-routing",
  1783. .codec_name = "btfmslim_slave",
  1784. /* BT codec driver determines capabilities based on
  1785. * dai name, bt codecdai name should always contains
  1786. * supported usecase information
  1787. */
  1788. .codec_dai_name = "btfm_bt_sco_a2dp_slim_rx",
  1789. .no_pcm = 1,
  1790. .dpcm_playback = 1,
  1791. .id = MSM_BACKEND_DAI_SLIMBUS_7_RX,
  1792. .be_hw_params_fixup = msm_ext_be_hw_params_fixup,
  1793. .ops = &msm_wcn_ops,
  1794. /* dai link has playback support */
  1795. .ignore_pmdown_time = 1,
  1796. .ignore_suspend = 1,
  1797. },
  1798. {
  1799. .name = LPASS_BE_SLIMBUS_7_TX,
  1800. .stream_name = "Slimbus7 Capture",
  1801. .cpu_dai_name = "msm-dai-q6-dev.16399",
  1802. .platform_name = "msm-pcm-routing",
  1803. .codec_name = "btfmslim_slave",
  1804. .codec_dai_name = "btfm_bt_sco_slim_tx",
  1805. .no_pcm = 1,
  1806. .dpcm_capture = 1,
  1807. .id = MSM_BACKEND_DAI_SLIMBUS_7_TX,
  1808. .be_hw_params_fixup = msm_ext_be_hw_params_fixup,
  1809. .ops = &msm_wcn_ops,
  1810. .ignore_suspend = 1,
  1811. },
  1812. {
  1813. .name = LPASS_BE_SLIMBUS_8_TX,
  1814. .stream_name = "Slimbus8 Capture",
  1815. .cpu_dai_name = "msm-dai-q6-dev.16401",
  1816. .platform_name = "msm-pcm-routing",
  1817. .codec_name = "btfmslim_slave",
  1818. .codec_dai_name = "btfm_fm_slim_tx",
  1819. .no_pcm = 1,
  1820. .dpcm_capture = 1,
  1821. .id = MSM_BACKEND_DAI_SLIMBUS_8_TX,
  1822. .be_hw_params_fixup = msm_ext_be_hw_params_fixup,
  1823. .init = &msm_wcn_init,
  1824. .ops = &msm_wcn_ops,
  1825. .ignore_suspend = 1,
  1826. },
  1827. };
  1828. static struct snd_soc_dai_link ext_disp_be_dai_link[] = {
  1829. /* DISP PORT BACK END DAI Link */
  1830. {
  1831. .name = LPASS_BE_DISPLAY_PORT,
  1832. .stream_name = "Display Port Playback",
  1833. .cpu_dai_name = "msm-dai-q6-dp.24608",
  1834. .platform_name = "msm-pcm-routing",
  1835. .codec_name = "msm-ext-disp-audio-codec-rx",
  1836. .codec_dai_name = "msm_dp_audio_codec_rx_dai",
  1837. .no_pcm = 1,
  1838. .dpcm_playback = 1,
  1839. .id = MSM_BACKEND_DAI_DISPLAY_PORT_RX,
  1840. .be_hw_params_fixup = msm_common_be_hw_params_fixup,
  1841. .ignore_pmdown_time = 1,
  1842. .ignore_suspend = 1,
  1843. },
  1844. };
  1845. static struct snd_soc_dai_link msm_ext_tasha_dai_links[
  1846. ARRAY_SIZE(msm_ext_common_fe_dai) +
  1847. ARRAY_SIZE(msm_ext_tasha_fe_dai) +
  1848. ARRAY_SIZE(msm_ext_common_be_dai) +
  1849. ARRAY_SIZE(msm_ext_tasha_be_dai) +
  1850. ARRAY_SIZE(msm_mi2s_be_dai_links) +
  1851. ARRAY_SIZE(msm_auxpcm_be_dai_links) +
  1852. ARRAY_SIZE(msm_wcn_be_dai_links) +
  1853. ARRAY_SIZE(ext_disp_be_dai_link)];
  1854. static struct snd_soc_dai_link msm_ext_tavil_dai_links[
  1855. ARRAY_SIZE(msm_ext_common_fe_dai) +
  1856. ARRAY_SIZE(msm_ext_tavil_fe_dai) +
  1857. ARRAY_SIZE(msm_ext_common_be_dai) +
  1858. ARRAY_SIZE(msm_ext_tavil_be_dai) +
  1859. ARRAY_SIZE(msm_mi2s_be_dai_links) +
  1860. ARRAY_SIZE(msm_auxpcm_be_dai_links) +
  1861. ARRAY_SIZE(msm_wcn_be_dai_links) +
  1862. ARRAY_SIZE(ext_disp_be_dai_link)];
  1863. /**
  1864. * populate_snd_card_dailinks - prepares dailink array and initializes card.
  1865. *
  1866. * @dev: device handle
  1867. *
  1868. * Returns card on success or NULL on failure.
  1869. */
  1870. struct snd_soc_card *populate_snd_card_dailinks(struct device *dev,
  1871. int snd_card_val)
  1872. {
  1873. struct snd_soc_card *card;
  1874. struct snd_soc_dai_link *msm_ext_dai_links = NULL;
  1875. int ret, len1, len2, len3, len4;
  1876. enum codec_variant codec_ver = 0;
  1877. if (snd_card_val == EXT_SND_CARD_TASHA) {
  1878. card = &snd_soc_card_msm_card_tasha;
  1879. } else if (snd_card_val == EXT_SND_CARD_TAVIL) {
  1880. card = &snd_soc_card_msm_card_tavil;
  1881. } else {
  1882. dev_err(dev, "%s: failing as no matching card name\n",
  1883. __func__);
  1884. return NULL;
  1885. }
  1886. card->dev = dev;
  1887. ret = snd_soc_of_parse_card_name(card, "qcom,model");
  1888. if (ret) {
  1889. dev_err(dev, "%s: parse card name failed, err:%d\n",
  1890. __func__, ret);
  1891. return NULL;
  1892. }
  1893. if (strnstr(card->name, "tasha", strlen(card->name))) {
  1894. codec_ver = tasha_codec_ver();
  1895. if (codec_ver == WCD9326)
  1896. card->name = "sdm660-tashalite-snd-card";
  1897. len1 = ARRAY_SIZE(msm_ext_common_fe_dai);
  1898. len2 = len1 + ARRAY_SIZE(msm_ext_tasha_fe_dai);
  1899. len3 = len2 + ARRAY_SIZE(msm_ext_common_be_dai);
  1900. memcpy(msm_ext_tasha_dai_links, msm_ext_common_fe_dai,
  1901. sizeof(msm_ext_common_fe_dai));
  1902. memcpy(msm_ext_tasha_dai_links + len1,
  1903. msm_ext_tasha_fe_dai, sizeof(msm_ext_tasha_fe_dai));
  1904. memcpy(msm_ext_tasha_dai_links + len2,
  1905. msm_ext_common_be_dai, sizeof(msm_ext_common_be_dai));
  1906. memcpy(msm_ext_tasha_dai_links + len3,
  1907. msm_ext_tasha_be_dai, sizeof(msm_ext_tasha_be_dai));
  1908. len4 = len3 + ARRAY_SIZE(msm_ext_tasha_be_dai);
  1909. if (of_property_read_bool(dev->of_node,
  1910. "qcom,mi2s-audio-intf")) {
  1911. memcpy(msm_ext_tasha_dai_links + len4,
  1912. msm_mi2s_be_dai_links,
  1913. sizeof(msm_mi2s_be_dai_links));
  1914. len4 += ARRAY_SIZE(msm_mi2s_be_dai_links);
  1915. }
  1916. if (of_property_read_bool(dev->of_node,
  1917. "qcom,auxpcm-audio-intf")) {
  1918. memcpy(msm_ext_tasha_dai_links + len4,
  1919. msm_auxpcm_be_dai_links,
  1920. sizeof(msm_auxpcm_be_dai_links));
  1921. len4 += ARRAY_SIZE(msm_auxpcm_be_dai_links);
  1922. }
  1923. if (of_property_read_bool(dev->of_node, "qcom,wcn-btfm")) {
  1924. dev_dbg(dev, "%s(): WCN BTFM support present\n",
  1925. __func__);
  1926. memcpy(msm_ext_tasha_dai_links + len4,
  1927. msm_wcn_be_dai_links,
  1928. sizeof(msm_wcn_be_dai_links));
  1929. len4 += ARRAY_SIZE(msm_wcn_be_dai_links);
  1930. }
  1931. if (of_property_read_bool(dev->of_node,
  1932. "qcom,ext-disp-audio-rx")) {
  1933. dev_dbg(dev, "%s(): ext disp audio support present\n",
  1934. __func__);
  1935. memcpy(msm_ext_tasha_dai_links + len4,
  1936. ext_disp_be_dai_link,
  1937. sizeof(ext_disp_be_dai_link));
  1938. len4 += ARRAY_SIZE(ext_disp_be_dai_link);
  1939. }
  1940. msm_ext_dai_links = msm_ext_tasha_dai_links;
  1941. } else if (strnstr(card->name, "tavil", strlen(card->name))) {
  1942. len1 = ARRAY_SIZE(msm_ext_common_fe_dai);
  1943. len2 = len1 + ARRAY_SIZE(msm_ext_tavil_fe_dai);
  1944. len3 = len2 + ARRAY_SIZE(msm_ext_common_be_dai);
  1945. memcpy(msm_ext_tavil_dai_links, msm_ext_common_fe_dai,
  1946. sizeof(msm_ext_common_fe_dai));
  1947. memcpy(msm_ext_tavil_dai_links + len1,
  1948. msm_ext_tavil_fe_dai, sizeof(msm_ext_tavil_fe_dai));
  1949. memcpy(msm_ext_tavil_dai_links + len2,
  1950. msm_ext_common_be_dai, sizeof(msm_ext_common_be_dai));
  1951. memcpy(msm_ext_tavil_dai_links + len3,
  1952. msm_ext_tavil_be_dai, sizeof(msm_ext_tavil_be_dai));
  1953. len4 = len3 + ARRAY_SIZE(msm_ext_tavil_be_dai);
  1954. if (of_property_read_bool(dev->of_node,
  1955. "qcom,mi2s-audio-intf")) {
  1956. memcpy(msm_ext_tavil_dai_links + len4,
  1957. msm_mi2s_be_dai_links,
  1958. sizeof(msm_mi2s_be_dai_links));
  1959. len4 += ARRAY_SIZE(msm_mi2s_be_dai_links);
  1960. }
  1961. if (of_property_read_bool(dev->of_node,
  1962. "qcom,auxpcm-audio-intf")) {
  1963. memcpy(msm_ext_tavil_dai_links + len4,
  1964. msm_auxpcm_be_dai_links,
  1965. sizeof(msm_auxpcm_be_dai_links));
  1966. len4 += ARRAY_SIZE(msm_auxpcm_be_dai_links);
  1967. }
  1968. if (of_property_read_bool(dev->of_node, "qcom,wcn-btfm")) {
  1969. dev_dbg(dev, "%s(): WCN BTFM support present\n",
  1970. __func__);
  1971. memcpy(msm_ext_tavil_dai_links + len4,
  1972. msm_wcn_be_dai_links,
  1973. sizeof(msm_wcn_be_dai_links));
  1974. len4 += ARRAY_SIZE(msm_wcn_be_dai_links);
  1975. }
  1976. if (of_property_read_bool(dev->of_node,
  1977. "qcom,ext-disp-audio-rx")) {
  1978. dev_dbg(dev, "%s(): ext disp audio support present\n",
  1979. __func__);
  1980. memcpy(msm_ext_tavil_dai_links + len4,
  1981. ext_disp_be_dai_link,
  1982. sizeof(ext_disp_be_dai_link));
  1983. len4 += ARRAY_SIZE(ext_disp_be_dai_link);
  1984. }
  1985. msm_ext_dai_links = msm_ext_tavil_dai_links;
  1986. } else {
  1987. dev_err(dev, "%s: failing as no matching card name\n",
  1988. __func__);
  1989. return NULL;
  1990. }
  1991. card->dai_link = msm_ext_dai_links;
  1992. card->num_links = len4;
  1993. return card;
  1994. }
  1995. EXPORT_SYMBOL(populate_snd_card_dailinks);