sdm660-ext-dai-links.c 62 KB

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