sdm660-ext-dai-links.c 62 KB

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