tegra210_sfc.c 88 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640
  1. // SPDX-License-Identifier: GPL-2.0-only
  2. //
  3. // tegra210_sfc.c - Tegra210 SFC driver
  4. //
  5. // Copyright (c) 2021-2023 NVIDIA CORPORATION. All rights reserved.
  6. #include <linux/clk.h>
  7. #include <linux/device.h>
  8. #include <linux/io.h>
  9. #include <linux/module.h>
  10. #include <linux/of.h>
  11. #include <linux/platform_device.h>
  12. #include <linux/pm_runtime.h>
  13. #include <linux/regmap.h>
  14. #include <sound/core.h>
  15. #include <sound/pcm.h>
  16. #include <sound/pcm_params.h>
  17. #include <sound/soc.h>
  18. #include "tegra210_sfc.h"
  19. #include "tegra_cif.h"
  20. #define UNSUPP_CONV ((void *)(-EOPNOTSUPP))
  21. #define BYPASS_CONV NULL
  22. static const struct reg_default tegra210_sfc_reg_defaults[] = {
  23. { TEGRA210_SFC_RX_INT_MASK, 0x00000001},
  24. { TEGRA210_SFC_RX_CIF_CTRL, 0x00007700},
  25. { TEGRA210_SFC_TX_INT_MASK, 0x00000001},
  26. { TEGRA210_SFC_TX_CIF_CTRL, 0x00007700},
  27. { TEGRA210_SFC_CG, 0x1},
  28. { TEGRA210_SFC_CFG_RAM_CTRL, 0x00004000},
  29. };
  30. static const int tegra210_sfc_rates[TEGRA210_SFC_NUM_RATES] = {
  31. 8000,
  32. 11025,
  33. 16000,
  34. 22050,
  35. 24000,
  36. 32000,
  37. 44100,
  38. 48000,
  39. 64000,
  40. 88200,
  41. 96000,
  42. 176400,
  43. 192000,
  44. };
  45. /* coeff RAM tables required for SFC */
  46. static u32 coef_8to11[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  47. 0x000c6102,//header
  48. 0x0001d727,//input gain
  49. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  50. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  51. 0x00d13397, 0xfff232f8, 0x00683337,
  52. 0x00000002,//output gain
  53. 0x0018a102,//header
  54. 0x000005d6,//input gain
  55. 0x00c6543e, 0xff342935, 0x0052f116,
  56. 0x000a1d78, 0xff3330c0, 0x005f88a3,
  57. 0xffbee7c0, 0xff2b5ba5, 0x0073eb26,
  58. 0x00000003,//output gain
  59. 0x00235204,//farrow
  60. 0x000aaaab,
  61. 0xffaaaaab,
  62. 0xfffaaaab,
  63. 0x00555555,
  64. 0xff600000,
  65. 0xfff55555,
  66. 0x00155555,
  67. 0x00055555,
  68. 0xffeaaaab,
  69. 0x00200000,
  70. 0x00005102,//header
  71. 0x0000015f,//input gain
  72. 0x00a7909c, 0xff241c71, 0x005f5e00,
  73. 0xffca77f4, 0xff20dd50, 0x006855eb,
  74. 0xff86c552, 0xff18137a, 0x00773648,
  75. 0x00000001//output gain
  76. };
  77. static u32 coef_8to16[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  78. 0x00006102,//header
  79. 0x0001d727,//input gain
  80. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  81. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  82. 0x00d13397, 0xfff232f8, 0x00683337,
  83. 0x00000002//output gain
  84. };
  85. static u32 coef_8to22[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  86. 0x000c6102,//header
  87. 0x0001d727,//input gain
  88. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  89. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  90. 0x00d13397, 0xfff232f8, 0x00683337,
  91. 0x00000002,//output gain
  92. 0x0018a102,//header
  93. 0x000005d6,//input gain
  94. 0x00c6543e, 0xff342935, 0x0052f116,
  95. 0x000a1d78, 0xff3330c0, 0x005f88a3,
  96. 0xffbee7c0, 0xff2b5ba5, 0x0073eb26,
  97. 0x00000003,//output gain
  98. 0x00230204,//farrow
  99. 0x000aaaab,
  100. 0xffaaaaab,
  101. 0xfffaaaab,
  102. 0x00555555,
  103. 0xff600000,
  104. 0xfff55555,
  105. 0x00155555,
  106. 0x00055555,
  107. 0xffeaaaab,
  108. 0x00200000,
  109. 0x00005102,//header
  110. 0x000005f3,//input gain
  111. 0x00d816d6, 0xff385383, 0x004fe566,
  112. 0x003c548d, 0xff38c23d, 0x005d0b1c,
  113. 0xfff02f7d, 0xff31e983, 0x0072d65d,
  114. 0x00000001//output gain
  115. };
  116. static u32 coef_8to24[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  117. 0x0000a105,//header
  118. 0x000005e1,//input gain
  119. 0x00dca92f, 0xff45647a, 0x0046b59c,
  120. 0x00429d1e, 0xff4fec62, 0x00516d30,
  121. 0xffdea779, 0xff5e08ba, 0x0060185e,
  122. 0xffafbab2, 0xff698d5a, 0x006ce3ae,
  123. 0xff9a82d2, 0xff704674, 0x007633c5,
  124. 0xff923433, 0xff721128, 0x007cff42,
  125. 0x00000003//output gain
  126. };
  127. static u32 coef_8to32[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  128. 0x000c6102,//header
  129. 0x0001d727,//input gain
  130. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  131. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  132. 0x00d13397, 0xfff232f8, 0x00683337,
  133. 0x00000002,//output gain
  134. 0x00006102,//header
  135. 0x000013d9,//input gain
  136. 0x00ebd477, 0xff4ce383, 0x0042049d,
  137. 0x0089c278, 0xff54414d, 0x00531ded,
  138. 0x004a5e07, 0xff53cf41, 0x006efbdc,
  139. 0x00000002//output gain
  140. };
  141. static u32 coef_8to44[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  142. 0x0156105,//interpolation + IIR filter
  143. 0x0000d649,//input gain
  144. 0x00e87afb, 0xff5f69d0, 0x003df3cf,
  145. 0x007ce488, 0xff99a5c8, 0x0056a6a0,
  146. 0x00344928, 0xffcba3e5, 0x006be470,
  147. 0x00137aa7, 0xffe60276, 0x00773410,
  148. 0x0005fa2a, 0xfff1ac11, 0x007c795b,
  149. 0x00012d36, 0xfff5eca2, 0x007f10ef,
  150. 0x00000002,//ouptut gain
  151. 0x0021a102,//interpolation + IIR filter
  152. 0x00000e00,//input gain
  153. 0x00e2e000, 0xff6e1a00, 0x002aaa00,
  154. 0x00610a00, 0xff5dda00, 0x003ccc00,
  155. 0x00163a00, 0xff3c0400, 0x00633200,
  156. 0x00000003,//Output gain
  157. 0x00000204,//Farrow filter
  158. 0x000aaaab,
  159. 0xffaaaaab,
  160. 0xfffaaaab,
  161. 0x00555555,
  162. 0xff600000,
  163. 0xfff55555,
  164. 0x00155555,
  165. 0x00055555,
  166. 0xffeaaaab,
  167. 0x00200000
  168. };
  169. static u32 coef_8to48[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  170. 0x00156105,//interpolation + IIR Filter
  171. 0x0000d649,//input gain
  172. 0x00e87afb, 0xff5f69d0, 0x003df3cf,
  173. 0x007ce488, 0xff99a5c8, 0x0056a6a0,
  174. 0x00344928, 0xffcba3e5, 0x006be470,
  175. 0x00137aa7, 0xffe60276, 0x00773410,
  176. 0x0005fa2a, 0xfff1ac11, 0x007c795b,
  177. 0x00012d36, 0xfff5eca2, 0x007f10ef,
  178. 0x00000002,//ouptut gain
  179. 0x0000a102,//interpolation + IIR filter
  180. 0x00000e00,//input gain
  181. 0x00e2e000, 0xff6e1a00, 0x002aaa00,
  182. 0x00610a00, 0xff5dda00, 0x003ccc00,
  183. 0x00163a00, 0xff3c0400, 0x00633200,
  184. 0x00000003//output gain
  185. };
  186. static u32 coef_8to88[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  187. 0x000c6102,//header
  188. 0x0001d727,//input gain
  189. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  190. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  191. 0x00d13397, 0xfff232f8, 0x00683337,
  192. 0x00000002,//output gain
  193. 0x00186102,//header
  194. 0x000013d9,//input gain
  195. 0x00ebd477, 0xff4ce383, 0x0042049d,
  196. 0x0089c278, 0xff54414d, 0x00531ded,
  197. 0x004a5e07, 0xff53cf41, 0x006efbdc,
  198. 0x00000002,//output gain
  199. 0x0024a102,//header
  200. 0x0000007d,//input gain
  201. 0x007d1f20, 0xff1a540e, 0x00678bf9,
  202. 0xff916625, 0xff16b0ff, 0x006e433a,
  203. 0xff5af660, 0xff0eb91f, 0x00797356,
  204. 0x00000003,//output gain
  205. 0x00000204,//farrow
  206. 0x000aaaab,
  207. 0xffaaaaab,
  208. 0xfffaaaab,
  209. 0x00555555,
  210. 0xff600000,
  211. 0xfff55555,
  212. 0x00155555,
  213. 0x00055555,
  214. 0xffeaaaab,
  215. 0x00200000
  216. };
  217. static u32 coef_8to96[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  218. 0x000c6102,//header
  219. 0x0001d727,//input gain
  220. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  221. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  222. 0x00d13397, 0xfff232f8, 0x00683337,
  223. 0x00000002,//output gain
  224. 0x00186102,//header
  225. 0x000013d9,//input gain
  226. 0x00ebd477, 0xff4ce383, 0x0042049d,
  227. 0x0089c278, 0xff54414d, 0x00531ded,
  228. 0x004a5e07, 0xff53cf41, 0x006efbdc,
  229. 0x00000002,//output gain
  230. 0x0000a102,//header
  231. 0x0000007d,//input gain
  232. 0x007d1f20, 0xff1a540e, 0x00678bf9,
  233. 0xff916625, 0xff16b0ff, 0x006e433a,
  234. 0xff5af660, 0xff0eb91f, 0x00797356,
  235. 0x00000003//output gain
  236. };
  237. static u32 coef_11to8[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  238. 0x000c6102,//header
  239. 0x0000015f,//input gain
  240. 0x00a7909c, 0xff241c71, 0x005f5e00,
  241. 0xffca77f4, 0xff20dd50, 0x006855eb,
  242. 0xff86c552, 0xff18137a, 0x00773648,
  243. 0x00000002,//output gain
  244. 0x00186102,//header
  245. 0x000005f3,//input gain
  246. 0x00d816d6, 0xff385383, 0x004fe566,
  247. 0x003c548d, 0xff38c23d, 0x005d0b1c,
  248. 0xfff02f7d, 0xff31e983, 0x0072d65d,
  249. 0x00000002,//output gain
  250. 0x00239204,//farrow
  251. 0x000aaaab,
  252. 0xffaaaaab,
  253. 0xfffaaaab,
  254. 0x00555555,
  255. 0xff600000,
  256. 0xfff55555,
  257. 0x00155555,
  258. 0x00055555,
  259. 0xffeaaaab,
  260. 0x00200000,
  261. 0x00005102,//header
  262. 0x0001d727,//input gain
  263. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  264. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  265. 0x00d13397, 0xfff232f8, 0x00683337,
  266. 0x00000001//output gain
  267. };
  268. static u32 coef_11to16[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  269. 0x000c6102,//header
  270. 0x0001d727,//input gain
  271. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  272. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  273. 0x00d13397, 0xfff232f8, 0x00683337,
  274. 0x00000002,//output gain
  275. 0x00186102,//header
  276. 0x000013d9,//input gain
  277. 0x00ebd477, 0xff4ce383, 0x0042049d,
  278. 0x0089c278, 0xff54414d, 0x00531ded,
  279. 0x004a5e07, 0xff53cf41, 0x006efbdc,
  280. 0x00000002,//output gain
  281. 0x00009204,//farrow
  282. 0x000aaaab,
  283. 0xffaaaaab,
  284. 0xfffaaaab,
  285. 0x00555555,
  286. 0xff600000,
  287. 0xfff55555,
  288. 0x00155555,
  289. 0x00055555,
  290. 0xffeaaaab,
  291. 0x00200000
  292. };
  293. static u32 coef_11to22[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  294. 0x00006102,//header
  295. 0x0001d727,//input gain
  296. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  297. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  298. 0x00d13397, 0xfff232f8, 0x00683337,
  299. 0x00000002//output gain
  300. };
  301. static u32 coef_11to24[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  302. 0x000c6102,//header
  303. 0x0001d727,//input gain
  304. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  305. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  306. 0x00d13397, 0xfff232f8, 0x00683337,
  307. 0x00000002,//output gain
  308. 0x00186102,//header
  309. 0x000013d9,//input gain
  310. 0x00ebd477, 0xff4ce383, 0x0042049d,
  311. 0x0089c278, 0xff54414d, 0x00531ded,
  312. 0x004a5e07, 0xff53cf41, 0x006efbdc,
  313. 0x00000002,//output gain
  314. 0x00005204,//farrow
  315. 0x000aaaab,
  316. 0xffaaaaab,
  317. 0xfffaaaab,
  318. 0x00555555,
  319. 0xff600000,
  320. 0xfff55555,
  321. 0x00155555,
  322. 0x00055555,
  323. 0xffeaaaab,
  324. 0x00200000
  325. };
  326. static u32 coef_11to32[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  327. 0x000c6102,//header
  328. 0x0001d727,//input gain
  329. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  330. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  331. 0x00d13397, 0xfff232f8, 0x00683337,
  332. 0x00000002,//output gain
  333. 0x00186102,//header
  334. 0x000013d9,//input gain
  335. 0x00ebd477, 0xff4ce383, 0x0042049d,
  336. 0x0089c278, 0xff54414d, 0x00531ded,
  337. 0x004a5e07, 0xff53cf41, 0x006efbdc,
  338. 0x00000002,//output gain
  339. 0x00246102,//header
  340. 0x0000010a,//input gain
  341. 0x00c93dc4, 0xff26f5f6, 0x005d1041,
  342. 0x001002c4, 0xff245b76, 0x00666002,
  343. 0xffc30a45, 0xff1baecd, 0x00765921,
  344. 0x00000002,//output gain
  345. 0x00009204,//farrow
  346. 0x000aaaab,
  347. 0xffaaaaab,
  348. 0xfffaaaab,
  349. 0x00555555,
  350. 0xff600000,
  351. 0xfff55555,
  352. 0x00155555,
  353. 0x00055555,
  354. 0xffeaaaab,
  355. 0x00200000
  356. };
  357. static u32 coef_11to44[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  358. 0x000c6102,//header
  359. 0x0001d727,//input gain
  360. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  361. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  362. 0x00d13397, 0xfff232f8, 0x00683337,
  363. 0x00000002,//output gain
  364. 0x00006102,//header
  365. 0x000013d9,//input gain
  366. 0x00ebd477, 0xff4ce383, 0x0042049d,
  367. 0x0089c278, 0xff54414d, 0x00531ded,
  368. 0x004a5e07, 0xff53cf41, 0x006efbdc,
  369. 0x00000002//output gain
  370. };
  371. static u32 coef_11to48[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  372. 0x000c6102,//header
  373. 0x0001d727,//input gain
  374. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  375. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  376. 0x00d13397, 0xfff232f8, 0x00683337,
  377. 0x00000002,//output gain
  378. 0x00186102,//header
  379. 0x000013d9,//input gain
  380. 0x00ebd477, 0xff4ce383, 0x0042049d,
  381. 0x0089c278, 0xff54414d, 0x00531ded,
  382. 0x004a5e07, 0xff53cf41, 0x006efbdc,
  383. 0x00000002,//output gain
  384. 0x00246102,//header
  385. 0x0000010a,//input gain
  386. 0x00c93dc4, 0xff26f5f6, 0x005d1041,
  387. 0x001002c4, 0xff245b76, 0x00666002,
  388. 0xffc30a45, 0xff1baecd, 0x00765921,
  389. 0x00000002,//output gain
  390. 0x00005204,//farrow
  391. 0x000aaaab,
  392. 0xffaaaaab,
  393. 0xfffaaaab,
  394. 0x00555555,
  395. 0xff600000,
  396. 0xfff55555,
  397. 0x00155555,
  398. 0x00055555,
  399. 0xffeaaaab,
  400. 0x00200000
  401. };
  402. static u32 coef_11to88[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  403. 0x000c6102,//header
  404. 0x0001d727,//input gain
  405. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  406. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  407. 0x00d13397, 0xfff232f8, 0x00683337,
  408. 0x00000002,//output gain
  409. 0x00186102,//header
  410. 0x000013d9,//input gain
  411. 0x00ebd477, 0xff4ce383, 0x0042049d,
  412. 0x0089c278, 0xff54414d, 0x00531ded,
  413. 0x004a5e07, 0xff53cf41, 0x006efbdc,
  414. 0x00000002,//output gain
  415. 0x00006102,//header
  416. 0x0000010a,//input gain
  417. 0x00c93dc4, 0xff26f5f6, 0x005d1041,
  418. 0x001002c4, 0xff245b76, 0x00666002,
  419. 0xffc30a45, 0xff1baecd, 0x00765921,
  420. 0x00000002//output gain
  421. };
  422. static u32 coef_11to96[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  423. 0x000c6102,//header
  424. 0x0001d727,//input gain
  425. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  426. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  427. 0x00d13397, 0xfff232f8, 0x00683337,
  428. 0x00000002,//output gain
  429. 0x00186102,//header
  430. 0x000013d9,//input gain
  431. 0x00ebd477, 0xff4ce383, 0x0042049d,
  432. 0x0089c278, 0xff54414d, 0x00531ded,
  433. 0x004a5e07, 0xff53cf41, 0x006efbdc,
  434. 0x00000002,//output gain
  435. 0x00246102,//header
  436. 0x0000010a,//input gain
  437. 0x00c93dc4, 0xff26f5f6, 0x005d1041,
  438. 0x001002c4, 0xff245b76, 0x00666002,
  439. 0xffc30a45, 0xff1baecd, 0x00765921,
  440. 0x00000002,//output gain
  441. 0x00000204,//farrow
  442. 0x000aaaab,
  443. 0xffaaaaab,
  444. 0xfffaaaab,
  445. 0x00555555,
  446. 0xff600000,
  447. 0xfff55555,
  448. 0x00155555,
  449. 0x00055555,
  450. 0xffeaaaab,
  451. 0x00200000
  452. };
  453. static u32 coef_16to8[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  454. 0x00005102,//header
  455. 0x0001d727,//input gain
  456. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  457. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  458. 0x00d13397, 0xfff232f8, 0x00683337,
  459. 0x00000001//output gain
  460. };
  461. static u32 coef_16to11[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  462. 0x000fa103,//header
  463. 0x000001e0,//input gain
  464. 0x00de44c0, 0xff380b7f, 0x004ffc73,
  465. 0x00494b44, 0xff3d493a, 0x005908bf,
  466. 0xffe9a3c8, 0xff425647, 0x006745f7,
  467. 0xffc42d61, 0xff40a6c7, 0x00776709,
  468. 0x00000003,//output gain
  469. 0x001a5204,//farrow
  470. 0x000aaaab,
  471. 0xffaaaaab,
  472. 0xfffaaaab,
  473. 0x00555555,
  474. 0xff600000,
  475. 0xfff55555,
  476. 0x00155555,
  477. 0x00055555,
  478. 0xffeaaaab,
  479. 0x00200000,
  480. 0x00005102,//header
  481. 0x0001d727,//input gain
  482. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  483. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  484. 0x00d13397, 0xfff232f8, 0x00683337,
  485. 0x00000001//output gain
  486. };
  487. static u32 coef_16to22[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  488. 0x000c6102,//header
  489. 0x0001d727,//input gain
  490. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  491. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  492. 0x00d13397, 0xfff232f8, 0x00683337,
  493. 0x00000002,//output gain
  494. 0x0018a102,//header
  495. 0x000005d6,//input gain
  496. 0x00c6543e, 0xff342935, 0x0052f116,
  497. 0x000a1d78, 0xff3330c0, 0x005f88a3,
  498. 0xffbee7c0, 0xff2b5ba5, 0x0073eb26,
  499. 0x00000003,//output gain
  500. 0x00235204,//farrow
  501. 0x000aaaab,
  502. 0xffaaaaab,
  503. 0xfffaaaab,
  504. 0x00555555,
  505. 0xff600000,
  506. 0xfff55555,
  507. 0x00155555,
  508. 0x00055555,
  509. 0xffeaaaab,
  510. 0x00200000,
  511. 0x00005102,//header
  512. 0x0000015f,//input gain
  513. 0x00a7909c, 0xff241c71, 0x005f5e00,
  514. 0xffca77f4, 0xff20dd50, 0x006855eb,
  515. 0xff86c552, 0xff18137a, 0x00773648,
  516. 0x00000001//output gain
  517. };
  518. static u32 coef_16to24[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  519. 0x0015a105,//header
  520. 0x00000292,//input gain
  521. 0x00e4320a, 0xff41d2d9, 0x004911ac,
  522. 0x005dd9e3, 0xff4c7d80, 0x0052103e,
  523. 0xfff8ebef, 0xff5b6fab, 0x005f0a0d,
  524. 0xffc4b414, 0xff68582c, 0x006b38e5,
  525. 0xffabb861, 0xff704bec, 0x0074de52,
  526. 0xffa19f4c, 0xff729059, 0x007c7e90,
  527. 0x00000003,//output gain
  528. 0x00005105,//header
  529. 0x00000292,//input gain
  530. 0x00e4320a, 0xff41d2d9, 0x004911ac,
  531. 0x005dd9e3, 0xff4c7d80, 0x0052103e,
  532. 0xfff8ebef, 0xff5b6fab, 0x005f0a0d,
  533. 0xffc4b414, 0xff68582c, 0x006b38e5,
  534. 0xffabb861, 0xff704bec, 0x0074de52,
  535. 0xffa19f4c, 0xff729059, 0x007c7e90,
  536. 0x00000001//output gain
  537. };
  538. static u32 coef_16to32[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  539. 0x00006102,//header
  540. 0x0001d727,//input gain
  541. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  542. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  543. 0x00d13397, 0xfff232f8, 0x00683337,
  544. 0x00000002//output gain
  545. };
  546. static u32 coef_16to44[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  547. 0x00156105,//interpolation + IIR filter
  548. 0x0000d649,//input gain
  549. 0x00e87afb, 0xff5f69d0, 0x003df3cf,
  550. 0x007ce488, 0xff99a5c8, 0x0056a6a0,
  551. 0x00344928, 0xffcba3e5, 0x006be470,
  552. 0x00137aa7, 0xffe60276, 0x00773410,
  553. 0x0005fa2a, 0xfff1ac11, 0x007c795b,
  554. 0x00012d36, 0xfff5eca2, 0x007f10ef,
  555. 0x00000002,//output gain
  556. 0x0021a102,//interpolation + IIR filter
  557. 0x00000e00,//input gain
  558. 0x00e2e000, 0xff6e1a00, 0x002aaa00,
  559. 0x00610a00, 0xff5dda00, 0x003ccc00,
  560. 0x00163a00, 0xff3c0400, 0x00633200,
  561. 0x00000003,//output gain
  562. 0x002c0204,//Farrow Filter
  563. 0x000aaaab,
  564. 0xffaaaaab,
  565. 0xfffaaaab,
  566. 0x00555555,
  567. 0xff600000,
  568. 0xfff55555,
  569. 0x00155555,
  570. 0x00055555,
  571. 0xffeaaaab,
  572. 0x00200000,
  573. 0x00005101,//IIR Filter + Decimator
  574. 0x0000203c,//input gain
  575. 0x00f52d35, 0xff2e2162, 0x005a21e0,
  576. 0x00c6f0f0, 0xff2ecd69, 0x006fa78d,
  577. 0x00000001//output gain
  578. };
  579. static u32 coef_16to48[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  580. 0x0000a105,//interpolation + IIR Filter
  581. 0x00000784,//input gain
  582. 0x00cc516e, 0xff2c9639, 0x005ad5b3,
  583. 0x0013ad0d, 0xff3d4799, 0x0063ce75,
  584. 0xffb6f398, 0xff5138d1, 0x006e9e1f,
  585. 0xff9186e5, 0xff5f96a4, 0x0076a86e,
  586. 0xff82089c, 0xff676b81, 0x007b9f8a,
  587. 0xff7c48a5, 0xff6a31e7, 0x007ebb7b,
  588. 0x00000003//output gain
  589. };
  590. static u32 coef_16to88[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  591. 0x000c6102,//header
  592. 0x0001d727,//input gain
  593. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  594. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  595. 0x00d13397, 0xfff232f8, 0x00683337,
  596. 0x00000002,//output gain
  597. 0x0018a102,//header
  598. 0x000005d6,//input gain
  599. 0x00c6543e, 0xff342935, 0x0052f116,
  600. 0x000a1d78, 0xff3330c0, 0x005f88a3,
  601. 0xffbee7c0, 0xff2b5ba5, 0x0073eb26,
  602. 0x00000003,//output gain
  603. 0x00000204,//farrow
  604. 0x000aaaab,
  605. 0xffaaaaab,
  606. 0xfffaaaab,
  607. 0x00555555,
  608. 0xff600000,
  609. 0xfff55555,
  610. 0x00155555,
  611. 0x00055555,
  612. 0xffeaaaab,
  613. 0x00200000
  614. };
  615. static u32 coef_16to96[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  616. 0x000c6102,//header
  617. 0x0001d727,//input gain
  618. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  619. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  620. 0x00d13397, 0xfff232f8, 0x00683337,
  621. 0x00000002,//output gain
  622. 0x0000a102,//header
  623. 0x000005d6,//input gain
  624. 0x00c6543e, 0xff342935, 0x0052f116,
  625. 0x000a1d78, 0xff3330c0, 0x005f88a3,
  626. 0xffbee7c0, 0xff2b5ba5, 0x0073eb26,
  627. 0x00000003//output gain
  628. };
  629. static u32 coef_16to176[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  630. 0x000c6102,//header
  631. 0x0001d727,//input gain
  632. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  633. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  634. 0x00d13397, 0xfff232f8, 0x00683337,
  635. 0x00000002,//output gain
  636. 0x00186102,//header
  637. 0x000013d9,//input gain
  638. 0x00ebd477, 0xff4ce383, 0x0042049d,
  639. 0x0089c278, 0xff54414d, 0x00531ded,
  640. 0x004a5e07, 0xff53cf41, 0x006efbdc,
  641. 0x00000002,//output gain
  642. 0x0024a102,//header
  643. 0x0000007d,//input gain
  644. 0x007d1f20, 0xff1a540e, 0x00678bf9,
  645. 0xff916625, 0xff16b0ff, 0x006e433a,
  646. 0xff5af660, 0xff0eb91f, 0x00797356,
  647. 0x00000003,//output gain
  648. 0x00000204,//farrow
  649. 0x000aaaab,
  650. 0xffaaaaab,
  651. 0xfffaaaab,
  652. 0x00555555,
  653. 0xff600000,
  654. 0xfff55555,
  655. 0x00155555,
  656. 0x00055555,
  657. 0xffeaaaab,
  658. 0x00200000
  659. };
  660. static u32 coef_16to192[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  661. 0x000c6102,//header
  662. 0x0001d727,//input gain
  663. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  664. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  665. 0x00d13397, 0xfff232f8, 0x00683337,
  666. 0x00000002,//output gain
  667. 0x00186102,//header
  668. 0x000013d9,//input gain
  669. 0x00ebd477, 0xff4ce383, 0x0042049d,
  670. 0x0089c278, 0xff54414d, 0x00531ded,
  671. 0x004a5e07, 0xff53cf41, 0x006efbdc,
  672. 0x00000002,//output gain
  673. 0x0000a102,//header
  674. 0x0000007d,//input gain
  675. 0x007d1f20, 0xff1a540e, 0x00678bf9,
  676. 0xff916625, 0xff16b0ff, 0x006e433a,
  677. 0xff5af660, 0xff0eb91f, 0x00797356,
  678. 0x00000003//output gain
  679. };
  680. static u32 coef_22to8[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  681. 0x000c6102,//header
  682. 0x000005f3,//input gain
  683. 0x00d816d6, 0xff385383, 0x004fe566,
  684. 0x003c548d, 0xff38c23d, 0x005d0b1c,
  685. 0xfff02f7d, 0xff31e983, 0x0072d65d,
  686. 0x00000002,//output gain
  687. 0x00179204,//farrow
  688. 0x000aaaab,
  689. 0xffaaaaab,
  690. 0xfffaaaab,
  691. 0x00555555,
  692. 0xff600000,
  693. 0xfff55555,
  694. 0x00155555,
  695. 0x00055555,
  696. 0xffeaaaab,
  697. 0x00200000,
  698. 0x00005102,//header
  699. 0x0001d727,//input gain
  700. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  701. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  702. 0x00d13397, 0xfff232f8, 0x00683337,
  703. 0x00000001//output gain
  704. };
  705. static u32 coef_22to11[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  706. 0x00005102,//header
  707. 0x0001d727,//input gain
  708. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  709. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  710. 0x00d13397, 0xfff232f8, 0x00683337,
  711. 0x00000001//output gain
  712. };
  713. static u32 coef_22to16[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  714. 0x000c6102,//header
  715. 0x0000015f,//input gain
  716. 0x00a7909c, 0xff241c71, 0x005f5e00,
  717. 0xffca77f4, 0xff20dd50, 0x006855eb,
  718. 0xff86c552, 0xff18137a, 0x00773648,
  719. 0x00000002,//output gain
  720. 0x00186102,//header
  721. 0x000005f3,//input gain
  722. 0x00d816d6, 0xff385383, 0x004fe566,
  723. 0x003c548d, 0xff38c23d, 0x005d0b1c,
  724. 0xfff02f7d, 0xff31e983, 0x0072d65d,
  725. 0x00000002,//output gain
  726. 0x00239204,//farrow
  727. 0x000aaaab,
  728. 0xffaaaaab,
  729. 0xfffaaaab,
  730. 0x00555555,
  731. 0xff600000,
  732. 0xfff55555,
  733. 0x00155555,
  734. 0x00055555,
  735. 0xffeaaaab,
  736. 0x00200000,
  737. 0x00005102,//header
  738. 0x0001d727,//input gain
  739. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  740. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  741. 0x00d13397, 0xfff232f8, 0x00683337,
  742. 0x00000001//output gain
  743. };
  744. static u32 coef_22to24[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  745. 0x000c6102,//header
  746. 0x0001d727,//input gain
  747. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  748. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  749. 0x00d13397, 0xfff232f8, 0x00683337,
  750. 0x00000002,//output gain
  751. 0x00186102,//header
  752. 0x000013d9,//input gain
  753. 0x00ebd477, 0xff4ce383, 0x0042049d,
  754. 0x0089c278, 0xff54414d, 0x00531ded,
  755. 0x004a5e07, 0xff53cf41, 0x006efbdc,
  756. 0x00000002,//output gain
  757. 0x00235204,//farrow
  758. 0x000aaaab,
  759. 0xffaaaaab,
  760. 0xfffaaaab,
  761. 0x00555555,
  762. 0xff600000,
  763. 0xfff55555,
  764. 0x00155555,
  765. 0x00055555,
  766. 0xffeaaaab,
  767. 0x00200000,
  768. 0x00005102,//header
  769. 0x0001d029,//input gain
  770. 0x00f2a98b, 0xff92aa71, 0x001fcd16,
  771. 0x00ae9004, 0xffb85140, 0x0041813a,
  772. 0x007f8ed1, 0xffd585fc, 0x006a69e6,
  773. 0x00000001//output gain
  774. };
  775. static u32 coef_22to32[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  776. 0x000c6102,//header
  777. 0x0001d727,//input gain
  778. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  779. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  780. 0x00d13397, 0xfff232f8, 0x00683337,
  781. 0x00000002,//output gain
  782. 0x00186102,//header
  783. 0x000013d9,//input gain
  784. 0x00ebd477, 0xff4ce383, 0x0042049d,
  785. 0x0089c278, 0xff54414d, 0x00531ded,
  786. 0x004a5e07, 0xff53cf41, 0x006efbdc,
  787. 0x00000002,//output gain
  788. 0x00009204,//farrow
  789. 0x000aaaab,
  790. 0xffaaaaab,
  791. 0xfffaaaab,
  792. 0x00555555,
  793. 0xff600000,
  794. 0xfff55555,
  795. 0x00155555,
  796. 0x00055555,
  797. 0xffeaaaab,
  798. 0x00200000
  799. };
  800. static u32 coef_22to44[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  801. 0x00006102,//header
  802. 0x0001d727,//input gain
  803. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  804. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  805. 0x00d13397, 0xfff232f8, 0x00683337,
  806. 0x00000002//output gain
  807. };
  808. static u32 coef_22to48[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  809. 0x000c6102,//header
  810. 0x0001d727,//input gain
  811. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  812. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  813. 0x00d13397, 0xfff232f8, 0x00683337,
  814. 0x00000002,//output gain
  815. 0x00186102,//header
  816. 0x000013d9,//input gain
  817. 0x00ebd477, 0xff4ce383, 0x0042049d,
  818. 0x0089c278, 0xff54414d, 0x00531ded,
  819. 0x004a5e07, 0xff53cf41, 0x006efbdc,
  820. 0x00000002,//output gain
  821. 0x00005204,//farrow
  822. 0x000aaaab,
  823. 0xffaaaaab,
  824. 0xfffaaaab,
  825. 0x00555555,
  826. 0xff600000,
  827. 0xfff55555,
  828. 0x00155555,
  829. 0x00055555,
  830. 0xffeaaaab,
  831. 0x00200000
  832. };
  833. static u32 coef_22to88[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  834. 0x000c6102,//header
  835. 0x0001d727,//input gain
  836. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  837. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  838. 0x00d13397, 0xfff232f8, 0x00683337,
  839. 0x00000002,//output gain
  840. 0x00006102,//header
  841. 0x000013d9,//input gain
  842. 0x00ebd477, 0xff4ce383, 0x0042049d,
  843. 0x0089c278, 0xff54414d, 0x00531ded,
  844. 0x004a5e07, 0xff53cf41, 0x006efbdc,
  845. 0x00000002//output gain
  846. };
  847. static u32 coef_22to96[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  848. 0x000c6102,//header
  849. 0x0001d727,//input gain
  850. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  851. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  852. 0x00d13397, 0xfff232f8, 0x00683337,
  853. 0x00000002,//output gain
  854. 0x00186102,//header
  855. 0x000013d9,//input gain
  856. 0x00ebd477, 0xff4ce383, 0x0042049d,
  857. 0x0089c278, 0xff54414d, 0x00531ded,
  858. 0x004a5e07, 0xff53cf41, 0x006efbdc,
  859. 0x00000002,//output gain
  860. 0x00246102,//header
  861. 0x0000010a,//input gain
  862. 0x00c93dc4, 0xff26f5f6, 0x005d1041,
  863. 0x001002c4, 0xff245b76, 0x00666002,
  864. 0xffc30a45, 0xff1baecd, 0x00765921,
  865. 0x00000002,//output gain
  866. 0x00005204,//farrow
  867. 0x000aaaab,
  868. 0xffaaaaab,
  869. 0xfffaaaab,
  870. 0x00555555,
  871. 0xff600000,
  872. 0xfff55555,
  873. 0x00155555,
  874. 0x00055555,
  875. 0xffeaaaab,
  876. 0x00200000
  877. };
  878. static u32 coef_22to176[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  879. 0x000c6102,//header
  880. 0x0001d727,//input gain
  881. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  882. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  883. 0x00d13397, 0xfff232f8, 0x00683337,
  884. 0x00000002,//output gain
  885. 0x00186102,//header
  886. 0x000013d9,//input gain
  887. 0x00ebd477, 0xff4ce383, 0x0042049d,
  888. 0x0089c278, 0xff54414d, 0x00531ded,
  889. 0x004a5e07, 0xff53cf41, 0x006efbdc,
  890. 0x00000002,//output gain
  891. 0x00006102,//header
  892. 0x0000010a,//input gain
  893. 0x00c93dc4, 0xff26f5f6, 0x005d1041,
  894. 0x001002c4, 0xff245b76, 0x00666002,
  895. 0xffc30a45, 0xff1baecd, 0x00765921,
  896. 0x00000002//output gain
  897. };
  898. static u32 coef_22to192[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  899. 0x000c6102,//header
  900. 0x0001d727,//input gain
  901. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  902. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  903. 0x00d13397, 0xfff232f8, 0x00683337,
  904. 0x00000002,//output gain
  905. 0x00186102,//header
  906. 0x000013d9,//input gain
  907. 0x00ebd477, 0xff4ce383, 0x0042049d,
  908. 0x0089c278, 0xff54414d, 0x00531ded,
  909. 0x004a5e07, 0xff53cf41, 0x006efbdc,
  910. 0x00000002,//output gain
  911. 0x00246102,//header
  912. 0x0000010a,//input gain
  913. 0x00c93dc4, 0xff26f5f6, 0x005d1041,
  914. 0x001002c4, 0xff245b76, 0x00666002,
  915. 0xffc30a45, 0xff1baecd, 0x00765921,
  916. 0x00000002,//output gain
  917. 0x00000204,//farrow
  918. 0x000aaaab,
  919. 0xffaaaaab,
  920. 0xfffaaaab,
  921. 0x00555555,
  922. 0xff600000,
  923. 0xfff55555,
  924. 0x00155555,
  925. 0x00055555,
  926. 0xffeaaaab,
  927. 0x00200000
  928. };
  929. static u32 coef_24to8[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  930. 0x00009105,//header
  931. 0x000005e1,//input gain
  932. 0x00dca92f, 0xff45647a, 0x0046b59c,
  933. 0x00429d1e, 0xff4fec62, 0x00516d30,
  934. 0xffdea779, 0xff5e08ba, 0x0060185e,
  935. 0xffafbab2, 0xff698d5a, 0x006ce3ae,
  936. 0xff9a82d2, 0xff704674, 0x007633c5,
  937. 0xff923433, 0xff721128, 0x007cff42,
  938. 0x00000001//output gain
  939. };
  940. static u32 coef_24to11[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  941. 0x000f6103,//header
  942. 0x000001e0,//input gain
  943. 0x00de44c0, 0xff380b7f, 0x004ffc73,
  944. 0x00494b44, 0xff3d493a, 0x005908bf,
  945. 0xffe9a3c8, 0xff425647, 0x006745f7,
  946. 0xffc42d61, 0xff40a6c7, 0x00776709,
  947. 0x00000002,//output gain
  948. 0x001a5204,//farrow
  949. 0x000aaaab,
  950. 0xffaaaaab,
  951. 0xfffaaaab,
  952. 0x00555555,
  953. 0xff600000,
  954. 0xfff55555,
  955. 0x00155555,
  956. 0x00055555,
  957. 0xffeaaaab,
  958. 0x00200000,
  959. 0x00005102,//header
  960. 0x0001d727,//input gain
  961. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  962. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  963. 0x00d13397, 0xfff232f8, 0x00683337,
  964. 0x00000001//output gain
  965. };
  966. static u32 coef_24to16[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  967. 0x00156105,//header
  968. 0x00000292,//input gain
  969. 0x00e4320a, 0xff41d2d9, 0x004911ac,
  970. 0x005dd9e3, 0xff4c7d80, 0x0052103e,
  971. 0xfff8ebef, 0xff5b6fab, 0x005f0a0d,
  972. 0xffc4b414, 0xff68582c, 0x006b38e5,
  973. 0xffabb861, 0xff704bec, 0x0074de52,
  974. 0xffa19f4c, 0xff729059, 0x007c7e90,
  975. 0x00000002,//output gain
  976. 0x00009105,//header
  977. 0x00000292,//input gain
  978. 0x00e4320a, 0xff41d2d9, 0x004911ac,
  979. 0x005dd9e3, 0xff4c7d80, 0x0052103e,
  980. 0xfff8ebef, 0xff5b6fab, 0x005f0a0d,
  981. 0xffc4b414, 0xff68582c, 0x006b38e5,
  982. 0xffabb861, 0xff704bec, 0x0074de52,
  983. 0xffa19f4c, 0xff729059, 0x007c7e90,
  984. 0x00000001//output gain
  985. };
  986. static u32 coef_24to22[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  987. 0x000c6102,//header
  988. 0x0001d029,//input gain
  989. 0x00f2a98b, 0xff92aa71, 0x001fcd16,
  990. 0x00ae9004, 0xffb85140, 0x0041813a,
  991. 0x007f8ed1, 0xffd585fc, 0x006a69e6,
  992. 0x00000002,//output gain
  993. 0x001b6103,//header
  994. 0x000001e0,//input gain
  995. 0x00de44c0, 0xff380b7f, 0x004ffc73,
  996. 0x00494b44, 0xff3d493a, 0x005908bf,
  997. 0xffe9a3c8, 0xff425647, 0x006745f7,
  998. 0xffc42d61, 0xff40a6c7, 0x00776709,
  999. 0x00000002,//output gain
  1000. 0x00265204,//farrow
  1001. 0x000aaaab,
  1002. 0xffaaaaab,
  1003. 0xfffaaaab,
  1004. 0x00555555,
  1005. 0xff600000,
  1006. 0xfff55555,
  1007. 0x00155555,
  1008. 0x00055555,
  1009. 0xffeaaaab,
  1010. 0x00200000,
  1011. 0x00005102,//header
  1012. 0x0001d727,//input gain
  1013. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  1014. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  1015. 0x00d13397, 0xfff232f8, 0x00683337,
  1016. 0x00000001//output gain
  1017. };
  1018. static u32 coef_24to32[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  1019. 0x000c6102,//header
  1020. 0x0001d727,//input gain
  1021. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  1022. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  1023. 0x00d13397, 0xfff232f8, 0x00683337,
  1024. 0x00000002,//output gain
  1025. 0x00186102,//header
  1026. 0x000013d9,//input gain
  1027. 0x00ebd477, 0xff4ce383, 0x0042049d,
  1028. 0x0089c278, 0xff54414d, 0x00531ded,
  1029. 0x004a5e07, 0xff53cf41, 0x006efbdc,
  1030. 0x00000002,//output gain
  1031. 0x00009102,//header
  1032. 0x000013d9,//input gain
  1033. 0x00ebd477, 0xff4ce383, 0x0042049d,
  1034. 0x0089c278, 0xff54414d, 0x00531ded,
  1035. 0x004a5e07, 0xff53cf41, 0x006efbdc,
  1036. 0x00000001//output gain
  1037. };
  1038. static u32 coef_24to44[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  1039. 0x000c6102,//header
  1040. 0x0001d727,//input gain
  1041. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  1042. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  1043. 0x00d13397, 0xfff232f8, 0x00683337,
  1044. 0x00000002,//output gain
  1045. 0x00186102,//header
  1046. 0x000013d9,//input gain
  1047. 0x00ebd477, 0xff4ce383, 0x0042049d,
  1048. 0x0089c278, 0xff54414d, 0x00531ded,
  1049. 0x004a5e07, 0xff53cf41, 0x006efbdc,
  1050. 0x00000002,//output gain
  1051. 0x00230204,//farrow
  1052. 0x000aaaab,
  1053. 0xffaaaaab,
  1054. 0xfffaaaab,
  1055. 0x00555555,
  1056. 0xff600000,
  1057. 0xfff55555,
  1058. 0x00155555,
  1059. 0x00055555,
  1060. 0xffeaaaab,
  1061. 0x00200000,
  1062. 0x00005102,//header
  1063. 0x00001685,//input gain
  1064. 0x00f53ae9, 0xff52f196, 0x003e3e08,
  1065. 0x00b9f857, 0xff5d8985, 0x0050070a,
  1066. 0x008c3e86, 0xff6053f0, 0x006d98ef,
  1067. 0x00000001//output gain
  1068. };
  1069. static u32 coef_24to48[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  1070. 0x00006102,//header
  1071. 0x0001d727,//input gain
  1072. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  1073. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  1074. 0x00d13397, 0xfff232f8, 0x00683337,
  1075. 0x00000002//output gain
  1076. };
  1077. static u32 coef_24to88[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  1078. 0x000c6102,//header
  1079. 0x0001d727,//input gain
  1080. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  1081. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  1082. 0x00d13397, 0xfff232f8, 0x00683337,
  1083. 0x00000002,//output gain
  1084. 0x00186102,//header
  1085. 0x000013d9,//input gain
  1086. 0x00ebd477, 0xff4ce383, 0x0042049d,
  1087. 0x0089c278, 0xff54414d, 0x00531ded,
  1088. 0x004a5e07, 0xff53cf41, 0x006efbdc,
  1089. 0x00000002,//output gain
  1090. 0x00246102,//header
  1091. 0x0000010a,//input gain
  1092. 0x00c93dc4, 0xff26f5f6, 0x005d1041,
  1093. 0x001002c4, 0xff245b76, 0x00666002,
  1094. 0xffc30a45, 0xff1baecd, 0x00765921,
  1095. 0x00000002,//output gain
  1096. 0x002f0204,//farrow
  1097. 0x000aaaab,
  1098. 0xffaaaaab,
  1099. 0xfffaaaab,
  1100. 0x00555555,
  1101. 0xff600000,
  1102. 0xfff55555,
  1103. 0x00155555,
  1104. 0x00055555,
  1105. 0xffeaaaab,
  1106. 0x00200000,
  1107. 0x00005102,//header
  1108. 0x00000138,//input gain
  1109. 0x00d5d232, 0xff2a3bf8, 0x005a785c,
  1110. 0x0034001b, 0xff283109, 0x006462a6,
  1111. 0xffe6746a, 0xff1fb09c, 0x00758a91,
  1112. 0x00000001//output gain
  1113. };
  1114. static u32 coef_24to96[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  1115. 0x000c6102,//header
  1116. 0x0001d727,//input gain
  1117. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  1118. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  1119. 0x00d13397, 0xfff232f8, 0x00683337,
  1120. 0x00000002,//output gain
  1121. 0x00006102,//header
  1122. 0x000013d9,//input gain
  1123. 0x00ebd477, 0xff4ce383, 0x0042049d,
  1124. 0x0089c278, 0xff54414d, 0x00531ded,
  1125. 0x004a5e07, 0xff53cf41, 0x006efbdc,
  1126. 0x00000002//output gain
  1127. };
  1128. static u32 coef_24to176[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  1129. 0x000c6102,//header
  1130. 0x0001d727,//input gain
  1131. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  1132. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  1133. 0x00d13397, 0xfff232f8, 0x00683337,
  1134. 0x00000002,//output gain
  1135. 0x00186102,//header
  1136. 0x000013d9,//input gain
  1137. 0x00ebd477, 0xff4ce383, 0x0042049d,
  1138. 0x0089c278, 0xff54414d, 0x00531ded,
  1139. 0x004a5e07, 0xff53cf41, 0x006efbdc,
  1140. 0x00000002,//output gain
  1141. 0x00246102,//header
  1142. 0x0000010a,//input gain
  1143. 0x00c93dc4, 0xff26f5f6, 0x005d1041,
  1144. 0x001002c4, 0xff245b76, 0x00666002,
  1145. 0xffc30a45, 0xff1baecd, 0x00765921,
  1146. 0x00000002,//output gain
  1147. 0x00000204,//farrow
  1148. 0x000aaaab,
  1149. 0xffaaaaab,
  1150. 0xfffaaaab,
  1151. 0x00555555,
  1152. 0xff600000,
  1153. 0xfff55555,
  1154. 0x00155555,
  1155. 0x00055555,
  1156. 0xffeaaaab,
  1157. 0x00200000
  1158. };
  1159. static u32 coef_24to192[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  1160. 0x000c6102,//header
  1161. 0x0001d727,//input gain
  1162. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  1163. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  1164. 0x00d13397, 0xfff232f8, 0x00683337,
  1165. 0x00000002,//output gain
  1166. 0x00186102,//header
  1167. 0x000013d9,//input gain
  1168. 0x00ebd477, 0xff4ce383, 0x0042049d,
  1169. 0x0089c278, 0xff54414d, 0x00531ded,
  1170. 0x004a5e07, 0xff53cf41, 0x006efbdc,
  1171. 0x00000002,//output gain
  1172. 0x00006102,//header
  1173. 0x0000010a,//input gain
  1174. 0x00c93dc4, 0xff26f5f6, 0x005d1041,
  1175. 0x001002c4, 0xff245b76, 0x00666002,
  1176. 0xffc30a45, 0xff1baecd, 0x00765921,
  1177. 0x00000002//output gain
  1178. };
  1179. static u32 coef_32to8[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  1180. 0x000c5102,//header
  1181. 0x000013d9,//input gain
  1182. 0x00ebd477, 0xff4ce383, 0x0042049d,
  1183. 0x0089c278, 0xff54414d, 0x00531ded,
  1184. 0x004a5e07, 0xff53cf41, 0x006efbdc,
  1185. 0x00000001,//output gain
  1186. 0x00005102,//header
  1187. 0x0001d727,//input gain
  1188. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  1189. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  1190. 0x00d13397, 0xfff232f8, 0x00683337,
  1191. 0x00000001//output gain
  1192. };
  1193. static u32 coef_32to11[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  1194. 0x000ca102,//header
  1195. 0x000000af,//input gain
  1196. 0x00c65663, 0xff23d2ce, 0x005f97d6,
  1197. 0x00086ad6, 0xff20ec4f, 0x00683201,
  1198. 0xffbbbef6, 0xff184447, 0x00770963,
  1199. 0x00000003,//output gain
  1200. 0x00175204,//farrow
  1201. 0x000aaaab,
  1202. 0xffaaaaab,
  1203. 0xfffaaaab,
  1204. 0x00555555,
  1205. 0xff600000,
  1206. 0xfff55555,
  1207. 0x00155555,
  1208. 0x00055555,
  1209. 0xffeaaaab,
  1210. 0x00200000,
  1211. 0x0000d102,//header
  1212. 0x000013d9,//input gain
  1213. 0x00ebd477, 0xff4ce383, 0x0042049d,
  1214. 0x0089c278, 0xff54414d, 0x00531ded,
  1215. 0x004a5e07, 0xff53cf41, 0x006efbdc,
  1216. 0x00000001//output gain
  1217. };
  1218. static u32 coef_32to16[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  1219. 0x00005102,//header
  1220. 0x0001d727,//input gain
  1221. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  1222. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  1223. 0x00d13397, 0xfff232f8, 0x00683337,
  1224. 0x00000001//output gain
  1225. };
  1226. static u32 coef_32to22[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  1227. 0x000fa103,//header
  1228. 0x000001e0,//input gain
  1229. 0x00de44c0, 0xff380b7f, 0x004ffc73,
  1230. 0x00494b44, 0xff3d493a, 0x005908bf,
  1231. 0xffe9a3c8, 0xff425647, 0x006745f7,
  1232. 0xffc42d61, 0xff40a6c7, 0x00776709,
  1233. 0x00000003,//output gain
  1234. 0x001a5204,//farrow
  1235. 0x000aaaab,
  1236. 0xffaaaaab,
  1237. 0xfffaaaab,
  1238. 0x00555555,
  1239. 0xff600000,
  1240. 0xfff55555,
  1241. 0x00155555,
  1242. 0x00055555,
  1243. 0xffeaaaab,
  1244. 0x00200000,
  1245. 0x00005102,//header
  1246. 0x0001d727,//input gain
  1247. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  1248. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  1249. 0x00d13397, 0xfff232f8, 0x00683337,
  1250. 0x00000001//output gain
  1251. };
  1252. static u32 coef_32to24[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  1253. 0x000ca102,//header
  1254. 0x000013d9,//input gain
  1255. 0x00ebd477, 0xff4ce383, 0x0042049d,
  1256. 0x0089c278, 0xff54414d, 0x00531ded,
  1257. 0x004a5e07, 0xff53cf41, 0x006efbdc,
  1258. 0x00000003,//output gain
  1259. 0x0000d102,//header
  1260. 0x000013d9,//input gain
  1261. 0x00ebd477, 0xff4ce383, 0x0042049d,
  1262. 0x0089c278, 0xff54414d, 0x00531ded,
  1263. 0x004a5e07, 0xff53cf41, 0x006efbdc,
  1264. 0x00000001//output gain
  1265. };
  1266. static u32 coef_32to44[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  1267. 0x000c6102,//header
  1268. 0x0001d727,//input gain
  1269. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  1270. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  1271. 0x00d13397, 0xfff232f8, 0x00683337,
  1272. 0x00000002,//output gain
  1273. 0x0018a102,//header
  1274. 0x000005d6,//input gain
  1275. 0x00c6543e, 0xff342935, 0x0052f116,
  1276. 0x000a1d78, 0xff3330c0, 0x005f88a3,
  1277. 0xffbee7c0, 0xff2b5ba5, 0x0073eb26,
  1278. 0x00000003,//output gain
  1279. 0x00235204,//farrow
  1280. 0x000aaaab,
  1281. 0xffaaaaab,
  1282. 0xfffaaaab,
  1283. 0x00555555,
  1284. 0xff600000,
  1285. 0xfff55555,
  1286. 0x00155555,
  1287. 0x00055555,
  1288. 0xffeaaaab,
  1289. 0x00200000,
  1290. 0x00005102,//header
  1291. 0x0000015f,//input gain
  1292. 0x00a7909c, 0xff241c71, 0x005f5e00,
  1293. 0xffca77f4, 0xff20dd50, 0x006855eb,
  1294. 0xff86c552, 0xff18137a, 0x00773648,
  1295. 0x00000001//output gain
  1296. };
  1297. static u32 coef_32to48[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  1298. 0x0015a105,//header
  1299. 0x00000292,//input gain
  1300. 0x00e4320a, 0xff41d2d9, 0x004911ac,
  1301. 0x005dd9e3, 0xff4c7d80, 0x0052103e,
  1302. 0xfff8ebef, 0xff5b6fab, 0x005f0a0d,
  1303. 0xffc4b414, 0xff68582c, 0x006b38e5,
  1304. 0xffabb861, 0xff704bec, 0x0074de52,
  1305. 0xffa19f4c, 0xff729059, 0x007c7e90,
  1306. 0x00000003,//output gain
  1307. 0x00005105,//header
  1308. 0x00000292,//input gain
  1309. 0x00e4320a, 0xff41d2d9, 0x004911ac,
  1310. 0x005dd9e3, 0xff4c7d80, 0x0052103e,
  1311. 0xfff8ebef, 0xff5b6fab, 0x005f0a0d,
  1312. 0xffc4b414, 0xff68582c, 0x006b38e5,
  1313. 0xffabb861, 0xff704bec, 0x0074de52,
  1314. 0xffa19f4c, 0xff729059, 0x007c7e90,
  1315. 0x00000001//output gain
  1316. };
  1317. static u32 coef_32to88[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  1318. 0x000c6102,//header
  1319. 0x0001d727,//input gain
  1320. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  1321. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  1322. 0x00d13397, 0xfff232f8, 0x00683337,
  1323. 0x00000002,//output gain
  1324. 0x0018a102,//header
  1325. 0x000005d6,//input gain
  1326. 0x00c6543e, 0xff342935, 0x0052f116,
  1327. 0x000a1d78, 0xff3330c0, 0x005f88a3,
  1328. 0xffbee7c0, 0xff2b5ba5, 0x0073eb26,
  1329. 0x00000003,//output gain
  1330. 0x00230204,//farrow
  1331. 0x000aaaab,
  1332. 0xffaaaaab,
  1333. 0xfffaaaab,
  1334. 0x00555555,
  1335. 0xff600000,
  1336. 0xfff55555,
  1337. 0x00155555,
  1338. 0x00055555,
  1339. 0xffeaaaab,
  1340. 0x00200000,
  1341. 0x00005102,//header
  1342. 0x000005f3,//input gain
  1343. 0x00d816d6, 0xff385383, 0x004fe566,
  1344. 0x003c548d, 0xff38c23d, 0x005d0b1c,
  1345. 0xfff02f7d, 0xff31e983, 0x0072d65d,
  1346. 0x00000001//output gain
  1347. };
  1348. static u32 coef_32to96[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  1349. 0x0000a105,//header
  1350. 0x00000292,//input gain
  1351. 0x00e4320a, 0xff41d2d9, 0x004911ac,
  1352. 0x005dd9e3, 0xff4c7d80, 0x0052103e,
  1353. 0xfff8ebef, 0xff5b6fab, 0x005f0a0d,
  1354. 0xffc4b414, 0xff68582c, 0x006b38e5,
  1355. 0xffabb861, 0xff704bec, 0x0074de52,
  1356. 0xffa19f4c, 0xff729059, 0x007c7e90,
  1357. 0x00000003//output gain
  1358. };
  1359. static u32 coef_32to176[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  1360. 0x000c6102,//header
  1361. 0x0001d727,//input gain
  1362. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  1363. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  1364. 0x00d13397, 0xfff232f8, 0x00683337,
  1365. 0x00000002,//output gain
  1366. 0x0018a102,//header
  1367. 0x000005d6,//input gain
  1368. 0x00c6543e, 0xff342935, 0x0052f116,
  1369. 0x000a1d78, 0xff3330c0, 0x005f88a3,
  1370. 0xffbee7c0, 0xff2b5ba5, 0x0073eb26,
  1371. 0x00000003,//output gain
  1372. 0x00000204,//farrow
  1373. 0x000aaaab,
  1374. 0xffaaaaab,
  1375. 0xfffaaaab,
  1376. 0x00555555,
  1377. 0xff600000,
  1378. 0xfff55555,
  1379. 0x00155555,
  1380. 0x00055555,
  1381. 0xffeaaaab,
  1382. 0x00200000
  1383. };
  1384. static u32 coef_32to192[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  1385. 0x000c6102,//header
  1386. 0x0001d727,//input gain
  1387. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  1388. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  1389. 0x00d13397, 0xfff232f8, 0x00683337,
  1390. 0x00000002,//output gain
  1391. 0x0000a102,//header
  1392. 0x000005d6,//input gain
  1393. 0x00c6543e, 0xff342935, 0x0052f116,
  1394. 0x000a1d78, 0xff3330c0, 0x005f88a3,
  1395. 0xffbee7c0, 0xff2b5ba5, 0x0073eb26,
  1396. 0x00000003//output gain
  1397. };
  1398. static u32 coef_44to8[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  1399. 0x00120104,//IIR Filter
  1400. 0x00000af2,//input gain
  1401. 0x0057eebe, 0xff1e9863, 0x00652604,
  1402. 0xff7206ea, 0xff22ad7e, 0x006d47e1,
  1403. 0xff42a4d7, 0xff26e722, 0x0075fd83,
  1404. 0xff352f66, 0xff29312b, 0x007b986b,
  1405. 0xff310a07, 0xff296f51, 0x007eca7c,
  1406. 0x00000001,//output gain
  1407. 0x001d9204,//Farrow Filter + decimation
  1408. 0x000aaaab,
  1409. 0xffaaaaab,
  1410. 0xfffaaaab,
  1411. 0x00555555,
  1412. 0xff600000,
  1413. 0xfff55555,
  1414. 0x00155555,
  1415. 0x00055555,
  1416. 0xffeaaaab,
  1417. 0x00200000,
  1418. 0x00005105,//IIR Filter + Decimator
  1419. 0x0000d649,//input gain
  1420. 0x00e87afb, 0xff5f69d0, 0x003df3cf,
  1421. 0x007ce488, 0xff99a5c8, 0x0056a6a0,
  1422. 0x00344928, 0xffcba3e5, 0x006be470,
  1423. 0x00137aa7, 0xffe60276, 0x00773410,
  1424. 0x0005fa2a, 0xfff1ac11, 0x007c795b,
  1425. 0x00012d36, 0xfff5eca2, 0x007f10ef,
  1426. 0x00000001//output gain
  1427. };
  1428. static u32 coef_44to11[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  1429. 0x000c5102,//header
  1430. 0x000013d9,//input gain
  1431. 0x00ebd477, 0xff4ce383, 0x0042049d,
  1432. 0x0089c278, 0xff54414d, 0x00531ded,
  1433. 0x004a5e07, 0xff53cf41, 0x006efbdc,
  1434. 0x00000001,//output gain
  1435. 0x00005102,//header
  1436. 0x0001d727,//input gain
  1437. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  1438. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  1439. 0x00d13397, 0xfff232f8, 0x00683337,
  1440. 0x00000001//output gain
  1441. };
  1442. static u32 coef_44to16[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  1443. 0x00126104,//IIR Filter + interpolation
  1444. 0x00000af2,//input gain
  1445. 0x0057eebe, 0xff1e9863, 0x00652604,
  1446. 0xff7206ea, 0xff22ad7e, 0x006d47e1,
  1447. 0xff42a4d7, 0xff26e722, 0x0075fd83,
  1448. 0xff352f66, 0xff29312b, 0x007b986b,
  1449. 0xff310a07, 0xff296f51, 0x007eca7c,
  1450. 0x00000002,//output gain
  1451. 0x001d9204,//Farrow Filter + decimation
  1452. 0x000aaaab,
  1453. 0xffaaaaab,
  1454. 0xfffaaaab,
  1455. 0x00555555,
  1456. 0xff600000,
  1457. 0xfff55555,
  1458. 0x00155555,
  1459. 0x00055555,
  1460. 0xffeaaaab,
  1461. 0x00200000,
  1462. 0x00005105,//IIR Filter + Decimator
  1463. 0x0000d649,//input gain
  1464. 0x00e87afb, 0xff5f69d0, 0x003df3cf,
  1465. 0x007ce488, 0xff99a5c8, 0x0056a6a0,
  1466. 0x00344928, 0xffcba3e5, 0x006be470,
  1467. 0x00137aa7, 0xffe60276, 0x00773410,
  1468. 0x0005fa2a, 0xfff1ac11, 0x007c795b,
  1469. 0x00012d36, 0xfff5eca2, 0x007f10ef,
  1470. 0x00000001//output gain
  1471. };
  1472. static u32 coef_44to22[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  1473. 0x00005102,//header
  1474. 0x0001d727,//input gain
  1475. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  1476. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  1477. 0x00d13397, 0xfff232f8, 0x00683337,
  1478. 0x00000001//output gain
  1479. };
  1480. static u32 coef_44to24[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  1481. 0x000c6102,//header
  1482. 0x00001685,//input gain
  1483. 0x00f53ae9, 0xff52f196, 0x003e3e08,
  1484. 0x00b9f857, 0xff5d8985, 0x0050070a,
  1485. 0x008c3e86, 0xff6053f0, 0x006d98ef,
  1486. 0x00000002,//output gain
  1487. 0x00175204,//farrow
  1488. 0x000aaaab,
  1489. 0xffaaaaab,
  1490. 0xfffaaaab,
  1491. 0x00555555,
  1492. 0xff600000,
  1493. 0xfff55555,
  1494. 0x00155555,
  1495. 0x00055555,
  1496. 0xffeaaaab,
  1497. 0x00200000,
  1498. 0x00005102,//header
  1499. 0x0001d727,//input gain
  1500. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  1501. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  1502. 0x00d13397, 0xfff232f8, 0x00683337,
  1503. 0x00000001//output gain
  1504. };
  1505. static u32 coef_44to32[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  1506. 0x000c6102,//header
  1507. 0x0000015f,//input gain
  1508. 0x00a7909c, 0xff241c71, 0x005f5e00,
  1509. 0xffca77f4, 0xff20dd50, 0x006855eb,
  1510. 0xff86c552, 0xff18137a, 0x00773648,
  1511. 0x00000002,//output gain
  1512. 0x00186102,//header
  1513. 0x000005f3,//input gain
  1514. 0x00d816d6, 0xff385383, 0x004fe566,
  1515. 0x003c548d, 0xff38c23d, 0x005d0b1c,
  1516. 0xfff02f7d, 0xff31e983, 0x0072d65d,
  1517. 0x00000002,//output gain
  1518. 0x00239204,//farrow
  1519. 0x000aaaab,
  1520. 0xffaaaaab,
  1521. 0xfffaaaab,
  1522. 0x00555555,
  1523. 0xff600000,
  1524. 0xfff55555,
  1525. 0x00155555,
  1526. 0x00055555,
  1527. 0xffeaaaab,
  1528. 0x00200000,
  1529. 0x00005102,//header
  1530. 0x0001d727,//input gain
  1531. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  1532. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  1533. 0x00d13397, 0xfff232f8, 0x00683337,
  1534. 0x00000001//output gain
  1535. };
  1536. static u32 coef_44to48[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  1537. 0x000c6102,//header
  1538. 0x0001d727,//input gain
  1539. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  1540. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  1541. 0x00d13397, 0xfff232f8, 0x00683337,
  1542. 0x00000002,//output gain
  1543. 0x00186102,//header
  1544. 0x000013d9,//input gain
  1545. 0x00ebd477, 0xff4ce383, 0x0042049d,
  1546. 0x0089c278, 0xff54414d, 0x00531ded,
  1547. 0x004a5e07, 0xff53cf41, 0x006efbdc,
  1548. 0x00000002,//output gain
  1549. 0x00235204,//farrow
  1550. 0x000aaaab,
  1551. 0xffaaaaab,
  1552. 0xfffaaaab,
  1553. 0x00555555,
  1554. 0xff600000,
  1555. 0xfff55555,
  1556. 0x00155555,
  1557. 0x00055555,
  1558. 0xffeaaaab,
  1559. 0x00200000,
  1560. 0x00005102,//header
  1561. 0x0001d029,//input gain
  1562. 0x00f2a98b, 0xff92aa71, 0x001fcd16,
  1563. 0x00ae9004, 0xffb85140, 0x0041813a,
  1564. 0x007f8ed1, 0xffd585fc, 0x006a69e6,
  1565. 0x00000001//output gain
  1566. };
  1567. static u32 coef_44to88[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  1568. 0x00006102,//header
  1569. 0x0001d727,//input gain
  1570. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  1571. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  1572. 0x00d13397, 0xfff232f8, 0x00683337,
  1573. 0x00000002//output gain
  1574. };
  1575. static u32 coef_44to96[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  1576. 0x000c6102,//header
  1577. 0x0001d727,//input gain
  1578. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  1579. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  1580. 0x00d13397, 0xfff232f8, 0x00683337,
  1581. 0x00000002,//output gain
  1582. 0x00186102,//header
  1583. 0x000013d9,//input gain
  1584. 0x00ebd477, 0xff4ce383, 0x0042049d,
  1585. 0x0089c278, 0xff54414d, 0x00531ded,
  1586. 0x004a5e07, 0xff53cf41, 0x006efbdc,
  1587. 0x00000002,//output gain
  1588. 0x00005204,//farrow
  1589. 0x000aaaab,
  1590. 0xffaaaaab,
  1591. 0xfffaaaab,
  1592. 0x00555555,
  1593. 0xff600000,
  1594. 0xfff55555,
  1595. 0x00155555,
  1596. 0x00055555,
  1597. 0xffeaaaab,
  1598. 0x00200000
  1599. };
  1600. static u32 coef_44to176[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  1601. 0x000c6102,//header
  1602. 0x0001d727,//input gain
  1603. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  1604. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  1605. 0x00d13397, 0xfff232f8, 0x00683337,
  1606. 0x00000002,//output gain
  1607. 0x00006102,//header
  1608. 0x000013d9,//input gain
  1609. 0x00ebd477, 0xff4ce383, 0x0042049d,
  1610. 0x0089c278, 0xff54414d, 0x00531ded,
  1611. 0x004a5e07, 0xff53cf41, 0x006efbdc,
  1612. 0x00000002//output gain
  1613. };
  1614. static u32 coef_44to192[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  1615. 0x000c6102,//header
  1616. 0x0001d727,//input gain
  1617. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  1618. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  1619. 0x00d13397, 0xfff232f8, 0x00683337,
  1620. 0x00000002,//output gain
  1621. 0x00186102,//header
  1622. 0x000013d9,//input gain
  1623. 0x00ebd477, 0xff4ce383, 0x0042049d,
  1624. 0x0089c278, 0xff54414d, 0x00531ded,
  1625. 0x004a5e07, 0xff53cf41, 0x006efbdc,
  1626. 0x00000002,//output gain
  1627. 0x00246102,//header
  1628. 0x0000010a,//input gain
  1629. 0x00c93dc4, 0xff26f5f6, 0x005d1041,
  1630. 0x001002c4, 0xff245b76, 0x00666002,
  1631. 0xffc30a45, 0xff1baecd, 0x00765921,
  1632. 0x00000002,//output gain
  1633. 0x00005204,//farrow
  1634. 0x000aaaab,
  1635. 0xffaaaaab,
  1636. 0xfffaaaab,
  1637. 0x00555555,
  1638. 0xff600000,
  1639. 0xfff55555,
  1640. 0x00155555,
  1641. 0x00055555,
  1642. 0xffeaaaab,
  1643. 0x00200000
  1644. };
  1645. static u32 coef_48to8[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  1646. 0x000c9102,//IIR Filter + Decimator
  1647. 0x00000e00,//input gain
  1648. 0x00e2e000, 0xff6e1a00, 0x002aaa00,
  1649. 0x00610a00, 0xff5dda00, 0x003ccc00,
  1650. 0x00163a00, 0xff3c0400, 0x00633200,
  1651. 0x00000001,//output gain
  1652. 0x00005105,//IIR Filter + Decimator
  1653. 0x0000d649,//input gain
  1654. 0x00e87afb, 0xff5f69d0, 0x003df3cf,
  1655. 0x007ce488, 0xff99a5c8, 0x0056a6a0,
  1656. 0x00344928, 0xffcba3e5, 0x006be470,
  1657. 0x00137aa7, 0xffe60276, 0x00773410,
  1658. 0x0005fa2a, 0xfff1ac11, 0x007c795b,
  1659. 0x00012d36, 0xfff5eca2, 0x007f10ef,
  1660. 0x00000001//output gain
  1661. };
  1662. static u32 coef_48to11[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  1663. 0x000c6102,//header
  1664. 0x000000af,//input gain
  1665. 0x00c65663, 0xff23d2ce, 0x005f97d6,
  1666. 0x00086ad6, 0xff20ec4f, 0x00683201,
  1667. 0xffbbbef6, 0xff184447, 0x00770963,
  1668. 0x00000002,//output gain
  1669. 0x00175204,//farrow
  1670. 0x000aaaab,
  1671. 0xffaaaaab,
  1672. 0xfffaaaab,
  1673. 0x00555555,
  1674. 0xff600000,
  1675. 0xfff55555,
  1676. 0x00155555,
  1677. 0x00055555,
  1678. 0xffeaaaab,
  1679. 0x00200000,
  1680. 0x00235102,//header
  1681. 0x000013d9,//input gain
  1682. 0x00ebd477, 0xff4ce383, 0x0042049d,
  1683. 0x0089c278, 0xff54414d, 0x00531ded,
  1684. 0x004a5e07, 0xff53cf41, 0x006efbdc,
  1685. 0x00000001,//output gain
  1686. 0x00005102,//header
  1687. 0x0001d727,//input gain
  1688. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  1689. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  1690. 0x00d13397, 0xfff232f8, 0x00683337,
  1691. 0x00000001//output gain
  1692. };
  1693. static u32 coef_48to16[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  1694. 0x00009105,//IIR Filter + Decimator
  1695. 0x00000784,//input gain
  1696. 0x00cc516e, 0xff2c9639, 0x005ad5b3,
  1697. 0x0013ad0d, 0xff3d4799, 0x0063ce75,
  1698. 0xffb6f398, 0xff5138d1, 0x006e9e1f,
  1699. 0xff9186e5, 0xff5f96a4, 0x0076a86e,
  1700. 0xff82089c, 0xff676b81, 0x007b9f8a,
  1701. 0xff7c48a5, 0xff6a31e7, 0x007ebb7b,
  1702. 0x00000001//output gain
  1703. };
  1704. static u32 coef_48to22[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  1705. 0x000f6103,//header
  1706. 0x000001e0,//input gain
  1707. 0x00de44c0, 0xff380b7f, 0x004ffc73,
  1708. 0x00494b44, 0xff3d493a, 0x005908bf,
  1709. 0xffe9a3c8, 0xff425647, 0x006745f7,
  1710. 0xffc42d61, 0xff40a6c7, 0x00776709,
  1711. 0x00000002,//output gain
  1712. 0x001a5204,//farrow
  1713. 0x000aaaab,
  1714. 0xffaaaaab,
  1715. 0xfffaaaab,
  1716. 0x00555555,
  1717. 0xff600000,
  1718. 0xfff55555,
  1719. 0x00155555,
  1720. 0x00055555,
  1721. 0xffeaaaab,
  1722. 0x00200000,
  1723. 0x00005102,//header
  1724. 0x0001d727,//input gain
  1725. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  1726. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  1727. 0x00d13397, 0xfff232f8, 0x00683337,
  1728. 0x00000001//output gain
  1729. };
  1730. static u32 coef_48to24[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  1731. 0x00005102,//header
  1732. 0x0001d727,//input gain
  1733. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  1734. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  1735. 0x00d13397, 0xfff232f8, 0x00683337,
  1736. 0x00000001//output gain
  1737. };
  1738. static u32 coef_48to32[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  1739. 0x00156105,//header
  1740. 0x00000292,//input gain
  1741. 0x00e4320a, 0xff41d2d9, 0x004911ac,
  1742. 0x005dd9e3, 0xff4c7d80, 0x0052103e,
  1743. 0xfff8ebef, 0xff5b6fab, 0x005f0a0d,
  1744. 0xffc4b414, 0xff68582c, 0x006b38e5,
  1745. 0xffabb861, 0xff704bec, 0x0074de52,
  1746. 0xffa19f4c, 0xff729059, 0x007c7e90,
  1747. 0x00000002,//output gain
  1748. 0x00009105,//header
  1749. 0x00000292,//input gain
  1750. 0x00e4320a, 0xff41d2d9, 0x004911ac,
  1751. 0x005dd9e3, 0xff4c7d80, 0x0052103e,
  1752. 0xfff8ebef, 0xff5b6fab, 0x005f0a0d,
  1753. 0xffc4b414, 0xff68582c, 0x006b38e5,
  1754. 0xffabb861, 0xff704bec, 0x0074de52,
  1755. 0xffa19f4c, 0xff729059, 0x007c7e90,
  1756. 0x00000001//output gain
  1757. };
  1758. static u32 coef_48to44[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  1759. 0x000c6102,//header
  1760. 0x0001d029,//input gain
  1761. 0x00f2a98b, 0xff92aa71, 0x001fcd16,
  1762. 0x00ae9004, 0xffb85140, 0x0041813a,
  1763. 0x007f8ed1, 0xffd585fc, 0x006a69e6,
  1764. 0x00000002,//output gain
  1765. 0x001b6103,//header
  1766. 0x000001e0,//input gain
  1767. 0x00de44c0, 0xff380b7f, 0x004ffc73,
  1768. 0x00494b44, 0xff3d493a, 0x005908bf,
  1769. 0xffe9a3c8, 0xff425647, 0x006745f7,
  1770. 0xffc42d61, 0xff40a6c7, 0x00776709,
  1771. 0x00000002,//output gain
  1772. 0x00265204,//farrow
  1773. 0x000aaaab,
  1774. 0xffaaaaab,
  1775. 0xfffaaaab,
  1776. 0x00555555,
  1777. 0xff600000,
  1778. 0xfff55555,
  1779. 0x00155555,
  1780. 0x00055555,
  1781. 0xffeaaaab,
  1782. 0x00200000,
  1783. 0x00005102,//header
  1784. 0x0001d727,//input gain
  1785. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  1786. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  1787. 0x00d13397, 0xfff232f8, 0x00683337,
  1788. 0x00000001//output gain
  1789. };
  1790. static u32 coef_48to88[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  1791. 0x000c6102,//header
  1792. 0x0001d727,//input gain
  1793. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  1794. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  1795. 0x00d13397, 0xfff232f8, 0x00683337,
  1796. 0x00000002,//output gain
  1797. 0x00186102,//header
  1798. 0x000013d9,//input gain
  1799. 0x00ebd477, 0xff4ce383, 0x0042049d,
  1800. 0x0089c278, 0xff54414d, 0x00531ded,
  1801. 0x004a5e07, 0xff53cf41, 0x006efbdc,
  1802. 0x00000002,//output gain
  1803. 0x00230204,//farrow
  1804. 0x000aaaab,
  1805. 0xffaaaaab,
  1806. 0xfffaaaab,
  1807. 0x00555555,
  1808. 0xff600000,
  1809. 0xfff55555,
  1810. 0x00155555,
  1811. 0x00055555,
  1812. 0xffeaaaab,
  1813. 0x00200000,
  1814. 0x00005102,//header
  1815. 0x00001685,//input gain
  1816. 0x00f53ae9, 0xff52f196, 0x003e3e08,
  1817. 0x00b9f857, 0xff5d8985, 0x0050070a,
  1818. 0x008c3e86, 0xff6053f0, 0x006d98ef,
  1819. 0x00000001//output gain
  1820. };
  1821. static u32 coef_48to96[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  1822. 0x00006102,//header
  1823. 0x0001d727,//input gain
  1824. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  1825. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  1826. 0x00d13397, 0xfff232f8, 0x00683337,
  1827. 0x00000002//output gain
  1828. };
  1829. static u32 coef_48to176[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  1830. 0x000c6102,//header
  1831. 0x0001d727,//input gain
  1832. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  1833. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  1834. 0x00d13397, 0xfff232f8, 0x00683337,
  1835. 0x00000002,//output gain
  1836. 0x00186102,//header
  1837. 0x000013d9,//input gain
  1838. 0x00ebd477, 0xff4ce383, 0x0042049d,
  1839. 0x0089c278, 0xff54414d, 0x00531ded,
  1840. 0x004a5e07, 0xff53cf41, 0x006efbdc,
  1841. 0x00000002,//output gain
  1842. 0x00246102,//header
  1843. 0x0000010a,//input gain
  1844. 0x00c93dc4, 0xff26f5f6, 0x005d1041,
  1845. 0x001002c4, 0xff245b76, 0x00666002,
  1846. 0xffc30a45, 0xff1baecd, 0x00765921,
  1847. 0x00000002,//output gain
  1848. 0x002f0204,//farrow
  1849. 0x000aaaab,
  1850. 0xffaaaaab,
  1851. 0xfffaaaab,
  1852. 0x00555555,
  1853. 0xff600000,
  1854. 0xfff55555,
  1855. 0x00155555,
  1856. 0x00055555,
  1857. 0xffeaaaab,
  1858. 0x00200000,
  1859. 0x00005102,//header
  1860. 0x00000138,//input gain
  1861. 0x00d5d232, 0xff2a3bf8, 0x005a785c,
  1862. 0x0034001b, 0xff283109, 0x006462a6,
  1863. 0xffe6746a, 0xff1fb09c, 0x00758a91,
  1864. 0x00000001//output gain
  1865. };
  1866. static u32 coef_48to192[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  1867. 0x000c6102,//header
  1868. 0x0001d727,//input gain
  1869. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  1870. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  1871. 0x00d13397, 0xfff232f8, 0x00683337,
  1872. 0x00000002,//output gain
  1873. 0x00006102,//header
  1874. 0x000013d9,//input gain
  1875. 0x00ebd477, 0xff4ce383, 0x0042049d,
  1876. 0x0089c278, 0xff54414d, 0x00531ded,
  1877. 0x004a5e07, 0xff53cf41, 0x006efbdc,
  1878. 0x00000002//output gain
  1879. };
  1880. static u32 coef_88to8[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  1881. 0x000c0102,//header
  1882. 0x00000057,//input gain
  1883. 0x00a8e717, 0xff1c748d, 0x0065b976,
  1884. 0xffcbccab, 0xff190aff, 0x006cc1cf,
  1885. 0xff871ce1, 0xff10d878, 0x0078cfc5,
  1886. 0x00000001,//output gain
  1887. 0x00179204,//farrow
  1888. 0x000aaaab,
  1889. 0xffaaaaab,
  1890. 0xfffaaaab,
  1891. 0x00555555,
  1892. 0xff600000,
  1893. 0xfff55555,
  1894. 0x00155555,
  1895. 0x00055555,
  1896. 0xffeaaaab,
  1897. 0x00200000,
  1898. 0x00235102,//header
  1899. 0x000013d9,//input gain
  1900. 0x00ebd477, 0xff4ce383, 0x0042049d,
  1901. 0x0089c278, 0xff54414d, 0x00531ded,
  1902. 0x004a5e07, 0xff53cf41, 0x006efbdc,
  1903. 0x00000001,//output gain
  1904. 0x00005102,//header
  1905. 0x0001d727,//input gain
  1906. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  1907. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  1908. 0x00d13397, 0xfff232f8, 0x00683337,
  1909. 0x00000001//output gain
  1910. };
  1911. static u32 coef_88to11[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  1912. 0x000c5102,//header
  1913. 0x0000010a,//input gain
  1914. 0x00c93dc4, 0xff26f5f6, 0x005d1041,
  1915. 0x001002c4, 0xff245b76, 0x00666002,
  1916. 0xffc30a45, 0xff1baecd, 0x00765921,
  1917. 0x00000001,//output gain
  1918. 0x00185102,//header
  1919. 0x000013d9,//input gain
  1920. 0x00ebd477, 0xff4ce383, 0x0042049d,
  1921. 0x0089c278, 0xff54414d, 0x00531ded,
  1922. 0x004a5e07, 0xff53cf41, 0x006efbdc,
  1923. 0x00000001,//output gain
  1924. 0x00005102,//header
  1925. 0x0001d727,//input gain
  1926. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  1927. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  1928. 0x00d13397, 0xfff232f8, 0x00683337,
  1929. 0x00000001//output gain
  1930. };
  1931. static u32 coef_88to16[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  1932. 0x000c0102,//header
  1933. 0x000005f3,//input gain
  1934. 0x00d816d6, 0xff385383, 0x004fe566,
  1935. 0x003c548d, 0xff38c23d, 0x005d0b1c,
  1936. 0xfff02f7d, 0xff31e983, 0x0072d65d,
  1937. 0x00000001,//output gain
  1938. 0x00179204,//farrow
  1939. 0x000aaaab,
  1940. 0xffaaaaab,
  1941. 0xfffaaaab,
  1942. 0x00555555,
  1943. 0xff600000,
  1944. 0xfff55555,
  1945. 0x00155555,
  1946. 0x00055555,
  1947. 0xffeaaaab,
  1948. 0x00200000,
  1949. 0x00005102,//header
  1950. 0x0001d727,//input gain
  1951. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  1952. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  1953. 0x00d13397, 0xfff232f8, 0x00683337,
  1954. 0x00000001//output gain
  1955. };
  1956. static u32 coef_88to22[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  1957. 0x000c5102,//header
  1958. 0x000013d9,//input gain
  1959. 0x00ebd477, 0xff4ce383, 0x0042049d,
  1960. 0x0089c278, 0xff54414d, 0x00531ded,
  1961. 0x004a5e07, 0xff53cf41, 0x006efbdc,
  1962. 0x00000001,//output gain
  1963. 0x00005102,//header
  1964. 0x0001d727,//input gain
  1965. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  1966. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  1967. 0x00d13397, 0xfff232f8, 0x00683337,
  1968. 0x00000001//output gain
  1969. };
  1970. static u32 coef_88to24[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  1971. 0x000c0102,//header
  1972. 0x00001685,//input gain
  1973. 0x00f53ae9, 0xff52f196, 0x003e3e08,
  1974. 0x00b9f857, 0xff5d8985, 0x0050070a,
  1975. 0x008c3e86, 0xff6053f0, 0x006d98ef,
  1976. 0x00000001,//output gain
  1977. 0x00175204,//farrow
  1978. 0x000aaaab,
  1979. 0xffaaaaab,
  1980. 0xfffaaaab,
  1981. 0x00555555,
  1982. 0xff600000,
  1983. 0xfff55555,
  1984. 0x00155555,
  1985. 0x00055555,
  1986. 0xffeaaaab,
  1987. 0x00200000,
  1988. 0x00005102,//header
  1989. 0x0001d727,//input gain
  1990. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  1991. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  1992. 0x00d13397, 0xfff232f8, 0x00683337,
  1993. 0x00000001//output gain
  1994. };
  1995. static u32 coef_88to32[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  1996. 0x000c6102,//header
  1997. 0x000005f3,//input gain
  1998. 0x00d816d6, 0xff385383, 0x004fe566,
  1999. 0x003c548d, 0xff38c23d, 0x005d0b1c,
  2000. 0xfff02f7d, 0xff31e983, 0x0072d65d,
  2001. 0x00000002,//output gain
  2002. 0x00179204,//farrow
  2003. 0x000aaaab,
  2004. 0xffaaaaab,
  2005. 0xfffaaaab,
  2006. 0x00555555,
  2007. 0xff600000,
  2008. 0xfff55555,
  2009. 0x00155555,
  2010. 0x00055555,
  2011. 0xffeaaaab,
  2012. 0x00200000,
  2013. 0x00005102,//header
  2014. 0x0001d727,//input gain
  2015. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  2016. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  2017. 0x00d13397, 0xfff232f8, 0x00683337,
  2018. 0x00000001//output gain
  2019. };
  2020. static u32 coef_88to44[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  2021. 0x00005102,//header
  2022. 0x0001d727,//input gain
  2023. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  2024. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  2025. 0x00d13397, 0xfff232f8, 0x00683337,
  2026. 0x00000001//output gain
  2027. };
  2028. static u32 coef_88to48[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  2029. 0x000c6102,//header
  2030. 0x00001685,//input gain
  2031. 0x00f53ae9, 0xff52f196, 0x003e3e08,
  2032. 0x00b9f857, 0xff5d8985, 0x0050070a,
  2033. 0x008c3e86, 0xff6053f0, 0x006d98ef,
  2034. 0x00000002,//output gain
  2035. 0x00175204,//farrow
  2036. 0x000aaaab,
  2037. 0xffaaaaab,
  2038. 0xfffaaaab,
  2039. 0x00555555,
  2040. 0xff600000,
  2041. 0xfff55555,
  2042. 0x00155555,
  2043. 0x00055555,
  2044. 0xffeaaaab,
  2045. 0x00200000,
  2046. 0x00005102,//header
  2047. 0x0001d727,//input gain
  2048. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  2049. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  2050. 0x00d13397, 0xfff232f8, 0x00683337,
  2051. 0x00000001//output gain
  2052. };
  2053. static u32 coef_88to96[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  2054. 0x000c6102,//header
  2055. 0x000013d9,//input gain
  2056. 0x00ebd477, 0xff4ce383, 0x0042049d,
  2057. 0x0089c278, 0xff54414d, 0x00531ded,
  2058. 0x004a5e07, 0xff53cf41, 0x006efbdc,
  2059. 0x00000002,//output gain
  2060. 0x00005204,//farrow
  2061. 0x000aaaab,
  2062. 0xffaaaaab,
  2063. 0xfffaaaab,
  2064. 0x00555555,
  2065. 0xff600000,
  2066. 0xfff55555,
  2067. 0x00155555,
  2068. 0x00055555,
  2069. 0xffeaaaab,
  2070. 0x00200000
  2071. };
  2072. static u32 coef_88to176[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  2073. 0x00006102,//header
  2074. 0x000013d9,//input gain
  2075. 0x00ebd477, 0xff4ce383, 0x0042049d,
  2076. 0x0089c278, 0xff54414d, 0x00531ded,
  2077. 0x004a5e07, 0xff53cf41, 0x006efbdc,
  2078. 0x00000002//output gain
  2079. };
  2080. static u32 coef_88to192[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  2081. 0x000c6102,//header
  2082. 0x000013d9,//input gain
  2083. 0x00ebd477, 0xff4ce383, 0x0042049d,
  2084. 0x0089c278, 0xff54414d, 0x00531ded,
  2085. 0x004a5e07, 0xff53cf41, 0x006efbdc,
  2086. 0x00000002,//output gain
  2087. 0x00186102,//header
  2088. 0x0000010a,//input gain
  2089. 0x00c93dc4, 0xff26f5f6, 0x005d1041,
  2090. 0x001002c4, 0xff245b76, 0x00666002,
  2091. 0xffc30a45, 0xff1baecd, 0x00765921,
  2092. 0x00000002,//output gain
  2093. 0x00005204,//farrow
  2094. 0x000aaaab,
  2095. 0xffaaaaab,
  2096. 0xfffaaaab,
  2097. 0x00555555,
  2098. 0xff600000,
  2099. 0xfff55555,
  2100. 0x00155555,
  2101. 0x00055555,
  2102. 0xffeaaaab,
  2103. 0x00200000
  2104. };
  2105. static u32 coef_96to8[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  2106. 0x000c9102,//header
  2107. 0x0000007d,//input gain
  2108. 0x007d1f20, 0xff1a540e, 0x00678bf9,
  2109. 0xff916625, 0xff16b0ff, 0x006e433a,
  2110. 0xff5af660, 0xff0eb91f, 0x00797356,
  2111. 0x00000001,//output gain
  2112. 0x00185102,//header
  2113. 0x000013d9,//input gain
  2114. 0x00ebd477, 0xff4ce383, 0x0042049d,
  2115. 0x0089c278, 0xff54414d, 0x00531ded,
  2116. 0x004a5e07, 0xff53cf41, 0x006efbdc,
  2117. 0x00000001,//output gain
  2118. 0x00005102,//header
  2119. 0x0001d727,//input gain
  2120. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  2121. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  2122. 0x00d13397, 0xfff232f8, 0x00683337,
  2123. 0x00000001//output gain
  2124. };
  2125. static u32 coef_96to11[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  2126. 0x000c0102,//header
  2127. 0x000000af,//input gain
  2128. 0x00c65663, 0xff23d2ce, 0x005f97d6,
  2129. 0x00086ad6, 0xff20ec4f, 0x00683201,
  2130. 0xffbbbef6, 0xff184447, 0x00770963,
  2131. 0x00000001,//output gain
  2132. 0x00175204,//farrow
  2133. 0x000aaaab,
  2134. 0xffaaaaab,
  2135. 0xfffaaaab,
  2136. 0x00555555,
  2137. 0xff600000,
  2138. 0xfff55555,
  2139. 0x00155555,
  2140. 0x00055555,
  2141. 0xffeaaaab,
  2142. 0x00200000,
  2143. 0x00235102,//header
  2144. 0x000013d9,//input gain
  2145. 0x00ebd477, 0xff4ce383, 0x0042049d,
  2146. 0x0089c278, 0xff54414d, 0x00531ded,
  2147. 0x004a5e07, 0xff53cf41, 0x006efbdc,
  2148. 0x00000001,//output gain
  2149. 0x00005102,//header
  2150. 0x0001d727,//input gain
  2151. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  2152. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  2153. 0x00d13397, 0xfff232f8, 0x00683337,
  2154. 0x00000001//output gain
  2155. };
  2156. static u32 coef_96to16[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  2157. 0x000c9102,//header
  2158. 0x000005d6,//input gain
  2159. 0x00c6543e, 0xff342935, 0x0052f116,
  2160. 0x000a1d78, 0xff3330c0, 0x005f88a3,
  2161. 0xffbee7c0, 0xff2b5ba5, 0x0073eb26,
  2162. 0x00000001,//output gain
  2163. 0x00005102,//header
  2164. 0x0001d727,//input gain
  2165. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  2166. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  2167. 0x00d13397, 0xfff232f8, 0x00683337,
  2168. 0x00000001//output gain
  2169. };
  2170. static u32 coef_96to22[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  2171. 0x000c6102,//header
  2172. 0x000000af,//input gain
  2173. 0x00c65663, 0xff23d2ce, 0x005f97d6,
  2174. 0x00086ad6, 0xff20ec4f, 0x00683201,
  2175. 0xffbbbef6, 0xff184447, 0x00770963,
  2176. 0x00000002,//output gain
  2177. 0x00175204,//farrow
  2178. 0x000aaaab,
  2179. 0xffaaaaab,
  2180. 0xfffaaaab,
  2181. 0x00555555,
  2182. 0xff600000,
  2183. 0xfff55555,
  2184. 0x00155555,
  2185. 0x00055555,
  2186. 0xffeaaaab,
  2187. 0x00200000,
  2188. 0x00235102,//header
  2189. 0x000013d9,//input gain
  2190. 0x00ebd477, 0xff4ce383, 0x0042049d,
  2191. 0x0089c278, 0xff54414d, 0x00531ded,
  2192. 0x004a5e07, 0xff53cf41, 0x006efbdc,
  2193. 0x00000001,//output gain
  2194. 0x00005102,//header
  2195. 0x0001d727,//input gain
  2196. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  2197. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  2198. 0x00d13397, 0xfff232f8, 0x00683337,
  2199. 0x00000001//output gain
  2200. };
  2201. static u32 coef_96to24[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  2202. 0x000c5102,//header
  2203. 0x000013d9,//input gain
  2204. 0x00ebd477, 0xff4ce383, 0x0042049d,
  2205. 0x0089c278, 0xff54414d, 0x00531ded,
  2206. 0x004a5e07, 0xff53cf41, 0x006efbdc,
  2207. 0x00000001,//output gain
  2208. 0x00005102,//header
  2209. 0x0001d727,//input gain
  2210. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  2211. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  2212. 0x00d13397, 0xfff232f8, 0x00683337,
  2213. 0x00000001//output gain
  2214. };
  2215. static u32 coef_96to32[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  2216. 0x00009105,//header
  2217. 0x00000292,//input gain
  2218. 0x00e4320a, 0xff41d2d9, 0x004911ac,
  2219. 0x005dd9e3, 0xff4c7d80, 0x0052103e,
  2220. 0xfff8ebef, 0xff5b6fab, 0x005f0a0d,
  2221. 0xffc4b414, 0xff68582c, 0x006b38e5,
  2222. 0xffabb861, 0xff704bec, 0x0074de52,
  2223. 0xffa19f4c, 0xff729059, 0x007c7e90,
  2224. 0x00000001//output gain
  2225. };
  2226. static u32 coef_96to44[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  2227. 0x000f6103,//header
  2228. 0x000001e0,//input gain
  2229. 0x00de44c0, 0xff380b7f, 0x004ffc73,
  2230. 0x00494b44, 0xff3d493a, 0x005908bf,
  2231. 0xffe9a3c8, 0xff425647, 0x006745f7,
  2232. 0xffc42d61, 0xff40a6c7, 0x00776709,
  2233. 0x00000002,//output gain
  2234. 0x001a5204,//farrow
  2235. 0x000aaaab,
  2236. 0xffaaaaab,
  2237. 0xfffaaaab,
  2238. 0x00555555,
  2239. 0xff600000,
  2240. 0xfff55555,
  2241. 0x00155555,
  2242. 0x00055555,
  2243. 0xffeaaaab,
  2244. 0x00200000,
  2245. 0x00005102,//header
  2246. 0x0001d727,//input gain
  2247. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  2248. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  2249. 0x00d13397, 0xfff232f8, 0x00683337,
  2250. 0x00000001//output gain
  2251. };
  2252. static u32 coef_96to48[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  2253. 0x00005102,//header
  2254. 0x0001d727,//input gain
  2255. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  2256. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  2257. 0x00d13397, 0xfff232f8, 0x00683337,
  2258. 0x00000001//output gain
  2259. };
  2260. static u32 coef_96to88[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  2261. 0x000f6103,//header
  2262. 0x000001e0,//input gain
  2263. 0x00de44c0, 0xff380b7f, 0x004ffc73,
  2264. 0x00494b44, 0xff3d493a, 0x005908bf,
  2265. 0xffe9a3c8, 0xff425647, 0x006745f7,
  2266. 0xffc42d61, 0xff40a6c7, 0x00776709,
  2267. 0x00000002,//output gain
  2268. 0x001a0204,//farrow
  2269. 0x000aaaab,
  2270. 0xffaaaaab,
  2271. 0xfffaaaab,
  2272. 0x00555555,
  2273. 0xff600000,
  2274. 0xfff55555,
  2275. 0x00155555,
  2276. 0x00055555,
  2277. 0xffeaaaab,
  2278. 0x00200000,
  2279. 0x00005102,//header
  2280. 0x000013d9,//input gain
  2281. 0x00ebd477, 0xff4ce383, 0x0042049d,
  2282. 0x0089c278, 0xff54414d, 0x00531ded,
  2283. 0x004a5e07, 0xff53cf41, 0x006efbdc,
  2284. 0x00000001//output gain
  2285. };
  2286. static u32 coef_96to176[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  2287. 0x000f6103,//header
  2288. 0x000001e0,//input gain
  2289. 0x00de44c0, 0xff380b7f, 0x004ffc73,
  2290. 0x00494b44, 0xff3d493a, 0x005908bf,
  2291. 0xffe9a3c8, 0xff425647, 0x006745f7,
  2292. 0xffc42d61, 0xff40a6c7, 0x00776709,
  2293. 0x00000002,//output gain
  2294. 0x001b6102,//header
  2295. 0x000000af,//input gain
  2296. 0x00c65663, 0xff23d2ce, 0x005f97d6,
  2297. 0x00086ad6, 0xff20ec4f, 0x00683201,
  2298. 0xffbbbef6, 0xff184447, 0x00770963,
  2299. 0x00000002,//output gain
  2300. 0x00260204,//farrow
  2301. 0x000aaaab,
  2302. 0xffaaaaab,
  2303. 0xfffaaaab,
  2304. 0x00555555,
  2305. 0xff600000,
  2306. 0xfff55555,
  2307. 0x00155555,
  2308. 0x00055555,
  2309. 0xffeaaaab,
  2310. 0x00200000,
  2311. 0x00005102,//header
  2312. 0x0000010a,//input gain
  2313. 0x00c93dc4, 0xff26f5f6, 0x005d1041,
  2314. 0x001002c4, 0xff245b76, 0x00666002,
  2315. 0xffc30a45, 0xff1baecd, 0x00765921,
  2316. 0x00000001//output gain
  2317. };
  2318. static u32 coef_96to192[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  2319. 0x00006103,//header
  2320. 0x000001e0,//input gain
  2321. 0x00de44c0, 0xff380b7f, 0x004ffc73,
  2322. 0x00494b44, 0xff3d493a, 0x005908bf,
  2323. 0xffe9a3c8, 0xff425647, 0x006745f7,
  2324. 0xffc42d61, 0xff40a6c7, 0x00776709,
  2325. 0x00000002//output gain
  2326. };
  2327. static u32 coef_176to16[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  2328. 0x000c0102,//header
  2329. 0x00000057,//input gain
  2330. 0x00a8e717, 0xff1c748d, 0x0065b976,
  2331. 0xffcbccab, 0xff190aff, 0x006cc1cf,
  2332. 0xff871ce1, 0xff10d878, 0x0078cfc5,
  2333. 0x00000001,//output gain
  2334. 0x00179204,//farrow
  2335. 0x000aaaab,
  2336. 0xffaaaaab,
  2337. 0xfffaaaab,
  2338. 0x00555555,
  2339. 0xff600000,
  2340. 0xfff55555,
  2341. 0x00155555,
  2342. 0x00055555,
  2343. 0xffeaaaab,
  2344. 0x00200000,
  2345. 0x00235102,//header
  2346. 0x000013d9,//input gain
  2347. 0x00ebd477, 0xff4ce383, 0x0042049d,
  2348. 0x0089c278, 0xff54414d, 0x00531ded,
  2349. 0x004a5e07, 0xff53cf41, 0x006efbdc,
  2350. 0x00000001,//output gain
  2351. 0x00005102,//header
  2352. 0x0001d727,//input gain
  2353. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  2354. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  2355. 0x00d13397, 0xfff232f8, 0x00683337,
  2356. 0x00000001//output gain
  2357. };
  2358. static u32 coef_176to22[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  2359. 0x000c5102,//header
  2360. 0x0000010a,//input gain
  2361. 0x00c93dc4, 0xff26f5f6, 0x005d1041,
  2362. 0x001002c4, 0xff245b76, 0x00666002,
  2363. 0xffc30a45, 0xff1baecd, 0x00765921,
  2364. 0x00000001,//output gain
  2365. 0x00185102,//header
  2366. 0x000013d9,//input gain
  2367. 0x00ebd477, 0xff4ce383, 0x0042049d,
  2368. 0x0089c278, 0xff54414d, 0x00531ded,
  2369. 0x004a5e07, 0xff53cf41, 0x006efbdc,
  2370. 0x00000001,//output gain
  2371. 0x00005102,//header
  2372. 0x0001d727,//input gain
  2373. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  2374. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  2375. 0x00d13397, 0xfff232f8, 0x00683337,
  2376. 0x00000001//output gain
  2377. };
  2378. static u32 coef_176to24[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  2379. 0x000c0102,//header
  2380. 0x00000138,//input gain
  2381. 0x00d5d232, 0xff2a3bf8, 0x005a785c,
  2382. 0x0034001b, 0xff283109, 0x006462a6,
  2383. 0xffe6746a, 0xff1fb09c, 0x00758a91,
  2384. 0x00000001,//output gain
  2385. 0x00175204,//farrow
  2386. 0x000aaaab,
  2387. 0xffaaaaab,
  2388. 0xfffaaaab,
  2389. 0x00555555,
  2390. 0xff600000,
  2391. 0xfff55555,
  2392. 0x00155555,
  2393. 0x00055555,
  2394. 0xffeaaaab,
  2395. 0x00200000,
  2396. 0x00235102,//header
  2397. 0x000013d9,//input gain
  2398. 0x00ebd477, 0xff4ce383, 0x0042049d,
  2399. 0x0089c278, 0xff54414d, 0x00531ded,
  2400. 0x004a5e07, 0xff53cf41, 0x006efbdc,
  2401. 0x00000001,//output gain
  2402. 0x00005102,//header
  2403. 0x0001d727,//input gain
  2404. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  2405. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  2406. 0x00d13397, 0xfff232f8, 0x00683337,
  2407. 0x00000001//output gain
  2408. };
  2409. static u32 coef_176to32[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  2410. 0x000c0102,//header
  2411. 0x000005f3,//input gain
  2412. 0x00d816d6, 0xff385383, 0x004fe566,
  2413. 0x003c548d, 0xff38c23d, 0x005d0b1c,
  2414. 0xfff02f7d, 0xff31e983, 0x0072d65d,
  2415. 0x00000001,//output gain
  2416. 0x00179204,//farrow
  2417. 0x000aaaab,
  2418. 0xffaaaaab,
  2419. 0xfffaaaab,
  2420. 0x00555555,
  2421. 0xff600000,
  2422. 0xfff55555,
  2423. 0x00155555,
  2424. 0x00055555,
  2425. 0xffeaaaab,
  2426. 0x00200000,
  2427. 0x00005102,//header
  2428. 0x0001d727,//input gain
  2429. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  2430. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  2431. 0x00d13397, 0xfff232f8, 0x00683337,
  2432. 0x00000001//output gain
  2433. };
  2434. static u32 coef_176to44[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  2435. 0x000c5102,//header
  2436. 0x000013d9,//input gain
  2437. 0x00ebd477, 0xff4ce383, 0x0042049d,
  2438. 0x0089c278, 0xff54414d, 0x00531ded,
  2439. 0x004a5e07, 0xff53cf41, 0x006efbdc,
  2440. 0x00000001,//output gain
  2441. 0x00005102,//header
  2442. 0x0001d727,//input gain
  2443. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  2444. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  2445. 0x00d13397, 0xfff232f8, 0x00683337,
  2446. 0x00000001//output gain
  2447. };
  2448. static u32 coef_176to48[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  2449. 0x000c0102,//header
  2450. 0x00001685,//input gain
  2451. 0x00f53ae9, 0xff52f196, 0x003e3e08,
  2452. 0x00b9f857, 0xff5d8985, 0x0050070a,
  2453. 0x008c3e86, 0xff6053f0, 0x006d98ef,
  2454. 0x00000001,//output gain
  2455. 0x00175204,//farrow
  2456. 0x000aaaab,
  2457. 0xffaaaaab,
  2458. 0xfffaaaab,
  2459. 0x00555555,
  2460. 0xff600000,
  2461. 0xfff55555,
  2462. 0x00155555,
  2463. 0x00055555,
  2464. 0xffeaaaab,
  2465. 0x00200000,
  2466. 0x00005102,//header
  2467. 0x0001d727,//input gain
  2468. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  2469. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  2470. 0x00d13397, 0xfff232f8, 0x00683337,
  2471. 0x00000001//output gain
  2472. };
  2473. static u32 coef_176to88[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  2474. 0x00005102,//header
  2475. 0x000013d9,//input gain
  2476. 0x00ebd477, 0xff4ce383, 0x0042049d,
  2477. 0x0089c278, 0xff54414d, 0x00531ded,
  2478. 0x004a5e07, 0xff53cf41, 0x006efbdc,
  2479. 0x00000001//output gain
  2480. };
  2481. static u32 coef_176to96[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  2482. 0x000c6102,//header
  2483. 0x0000010a,//input gain
  2484. 0x00c93dc4, 0xff26f5f6, 0x005d1041,
  2485. 0x001002c4, 0xff245b76, 0x00666002,
  2486. 0xffc30a45, 0xff1baecd, 0x00765921,
  2487. 0x00000002,//output gain
  2488. 0x00175204,//farrow
  2489. 0x000aaaab,
  2490. 0xffaaaaab,
  2491. 0xfffaaaab,
  2492. 0x00555555,
  2493. 0xff600000,
  2494. 0xfff55555,
  2495. 0x00155555,
  2496. 0x00055555,
  2497. 0xffeaaaab,
  2498. 0x00200000,
  2499. 0x00005103,//header
  2500. 0x000001e0,//input gain
  2501. 0x00de44c0, 0xff380b7f, 0x004ffc73,
  2502. 0x00494b44, 0xff3d493a, 0x005908bf,
  2503. 0xffe9a3c8, 0xff425647, 0x006745f7,
  2504. 0xffc42d61, 0xff40a6c7, 0x00776709,
  2505. 0x00000001//output gain
  2506. };
  2507. static u32 coef_176to192[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  2508. 0x000c6102,//header
  2509. 0x0000010a,//input gain
  2510. 0x00c93dc4, 0xff26f5f6, 0x005d1041,
  2511. 0x001002c4, 0xff245b76, 0x00666002,
  2512. 0xffc30a45, 0xff1baecd, 0x00765921,
  2513. 0x00000002,//output gain
  2514. 0x00005204,//farrow
  2515. 0x000aaaab,
  2516. 0xffaaaaab,
  2517. 0xfffaaaab,
  2518. 0x00555555,
  2519. 0xff600000,
  2520. 0xfff55555,
  2521. 0x00155555,
  2522. 0x00055555,
  2523. 0xffeaaaab,
  2524. 0x00200000
  2525. };
  2526. static u32 coef_192to16[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  2527. 0x000c9102,//header
  2528. 0x0000007d,//input gain
  2529. 0x007d1f20, 0xff1a540e, 0x00678bf9,
  2530. 0xff916625, 0xff16b0ff, 0x006e433a,
  2531. 0xff5af660, 0xff0eb91f, 0x00797356,
  2532. 0x00000001,//output gain
  2533. 0x00185102,//header
  2534. 0x000013d9,//input gain
  2535. 0x00ebd477, 0xff4ce383, 0x0042049d,
  2536. 0x0089c278, 0xff54414d, 0x00531ded,
  2537. 0x004a5e07, 0xff53cf41, 0x006efbdc,
  2538. 0x00000001,//output gain
  2539. 0x00005102,//header
  2540. 0x0001d727,//input gain
  2541. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  2542. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  2543. 0x00d13397, 0xfff232f8, 0x00683337,
  2544. 0x00000001//output gain
  2545. };
  2546. static u32 coef_192to22[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  2547. 0x000c0102,//header
  2548. 0x000000af,//input gain
  2549. 0x00c65663, 0xff23d2ce, 0x005f97d6,
  2550. 0x00086ad6, 0xff20ec4f, 0x00683201,
  2551. 0xffbbbef6, 0xff184447, 0x00770963,
  2552. 0x00000001,//output gain
  2553. 0x00175204,//farrow
  2554. 0x000aaaab,
  2555. 0xffaaaaab,
  2556. 0xfffaaaab,
  2557. 0x00555555,
  2558. 0xff600000,
  2559. 0xfff55555,
  2560. 0x00155555,
  2561. 0x00055555,
  2562. 0xffeaaaab,
  2563. 0x00200000,
  2564. 0x00235102,//header
  2565. 0x000013d9,//input gain
  2566. 0x00ebd477, 0xff4ce383, 0x0042049d,
  2567. 0x0089c278, 0xff54414d, 0x00531ded,
  2568. 0x004a5e07, 0xff53cf41, 0x006efbdc,
  2569. 0x00000001,//output gain
  2570. 0x00005102,//header
  2571. 0x0001d727,//input gain
  2572. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  2573. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  2574. 0x00d13397, 0xfff232f8, 0x00683337,
  2575. 0x00000001//output gain
  2576. };
  2577. static u32 coef_192to24[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  2578. 0x000c5102,//header
  2579. 0x0000010a,//input gain
  2580. 0x00c93dc4, 0xff26f5f6, 0x005d1041,
  2581. 0x001002c4, 0xff245b76, 0x00666002,
  2582. 0xffc30a45, 0xff1baecd, 0x00765921,
  2583. 0x00000001,//output gain
  2584. 0x00185102,//header
  2585. 0x000013d9,//input gain
  2586. 0x00ebd477, 0xff4ce383, 0x0042049d,
  2587. 0x0089c278, 0xff54414d, 0x00531ded,
  2588. 0x004a5e07, 0xff53cf41, 0x006efbdc,
  2589. 0x00000001,//output gain
  2590. 0x00005102,//header
  2591. 0x0001d727,//input gain
  2592. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  2593. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  2594. 0x00d13397, 0xfff232f8, 0x00683337,
  2595. 0x00000001//output gain
  2596. };
  2597. static u32 coef_192to32[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  2598. 0x000c9102,//header
  2599. 0x000005d6,//input gain
  2600. 0x00c6543e, 0xff342935, 0x0052f116,
  2601. 0x000a1d78, 0xff3330c0, 0x005f88a3,
  2602. 0xffbee7c0, 0xff2b5ba5, 0x0073eb26,
  2603. 0x00000001,//output gain
  2604. 0x00005102,//header
  2605. 0x0001d727,//input gain
  2606. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  2607. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  2608. 0x00d13397, 0xfff232f8, 0x00683337,
  2609. 0x00000001//output gain
  2610. };
  2611. static u32 coef_192to44[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  2612. 0x000c6102,//header
  2613. 0x000000af,//input gain
  2614. 0x00c65663, 0xff23d2ce, 0x005f97d6,
  2615. 0x00086ad6, 0xff20ec4f, 0x00683201,
  2616. 0xffbbbef6, 0xff184447, 0x00770963,
  2617. 0x00000002,//output gain
  2618. 0x00175204,//farrow
  2619. 0x000aaaab,
  2620. 0xffaaaaab,
  2621. 0xfffaaaab,
  2622. 0x00555555,
  2623. 0xff600000,
  2624. 0xfff55555,
  2625. 0x00155555,
  2626. 0x00055555,
  2627. 0xffeaaaab,
  2628. 0x00200000,
  2629. 0x00235102,//header
  2630. 0x000013d9,//input gain
  2631. 0x00ebd477, 0xff4ce383, 0x0042049d,
  2632. 0x0089c278, 0xff54414d, 0x00531ded,
  2633. 0x004a5e07, 0xff53cf41, 0x006efbdc,
  2634. 0x00000001,//output gain
  2635. 0x00005102,//header
  2636. 0x0001d727,//input gain
  2637. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  2638. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  2639. 0x00d13397, 0xfff232f8, 0x00683337,
  2640. 0x00000001//output gain
  2641. };
  2642. static u32 coef_192to48[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  2643. 0x000c5102,//header
  2644. 0x000013d9,//input gain
  2645. 0x00ebd477, 0xff4ce383, 0x0042049d,
  2646. 0x0089c278, 0xff54414d, 0x00531ded,
  2647. 0x004a5e07, 0xff53cf41, 0x006efbdc,
  2648. 0x00000001,//output gain
  2649. 0x00005102,//header
  2650. 0x0001d727,//input gain
  2651. 0x00fc2fc7, 0xff9bb27b, 0x001c564c,
  2652. 0x00e55557, 0xffcadd5b, 0x003d80ba,
  2653. 0x00d13397, 0xfff232f8, 0x00683337,
  2654. 0x00000001//output gain
  2655. };
  2656. static u32 coef_192to88[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  2657. 0x000c6102,//header
  2658. 0x000000af,//input gain
  2659. 0x00c65663, 0xff23d2ce, 0x005f97d6,
  2660. 0x00086ad6, 0xff20ec4f, 0x00683201,
  2661. 0xffbbbef6, 0xff184447, 0x00770963,
  2662. 0x00000002,//output gain
  2663. 0x00175204,//farrow
  2664. 0x000aaaab,
  2665. 0xffaaaaab,
  2666. 0xfffaaaab,
  2667. 0x00555555,
  2668. 0xff600000,
  2669. 0xfff55555,
  2670. 0x00155555,
  2671. 0x00055555,
  2672. 0xffeaaaab,
  2673. 0x00200000,
  2674. 0x00005102,//header
  2675. 0x000013d9,//input gain
  2676. 0x00ebd477, 0xff4ce383, 0x0042049d,
  2677. 0x0089c278, 0xff54414d, 0x00531ded,
  2678. 0x004a5e07, 0xff53cf41, 0x006efbdc,
  2679. 0x00000001//output gain
  2680. };
  2681. static u32 coef_192to96[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  2682. 0x00005103,//header
  2683. 0x000001e0,//input gain
  2684. 0x00de44c0, 0xff380b7f, 0x004ffc73,
  2685. 0x00494b44, 0xff3d493a, 0x005908bf,
  2686. 0xffe9a3c8, 0xff425647, 0x006745f7,
  2687. 0xffc42d61, 0xff40a6c7, 0x00776709,
  2688. 0x00000001//output gain
  2689. };
  2690. static u32 coef_192to176[TEGRA210_SFC_COEF_RAM_DEPTH] = {
  2691. 0x000c6102,//header
  2692. 0x000000af,//input gain
  2693. 0x00c65663, 0xff23d2ce, 0x005f97d6,
  2694. 0x00086ad6, 0xff20ec4f, 0x00683201,
  2695. 0xffbbbef6, 0xff184447, 0x00770963,
  2696. 0x00000002,//output gain
  2697. 0x00170204,//farrow
  2698. 0x000aaaab,
  2699. 0xffaaaaab,
  2700. 0xfffaaaab,
  2701. 0x00555555,
  2702. 0xff600000,
  2703. 0xfff55555,
  2704. 0x00155555,
  2705. 0x00055555,
  2706. 0xffeaaaab,
  2707. 0x00200000,
  2708. 0x00005102,//header
  2709. 0x0000010a,//input gain
  2710. 0x00c93dc4, 0xff26f5f6, 0x005d1041,
  2711. 0x001002c4, 0xff245b76, 0x00666002,
  2712. 0xffc30a45, 0xff1baecd, 0x00765921,
  2713. 0x00000001//output gain
  2714. };
  2715. /*
  2716. * Coefficient table for various sample rate conversions. The sample
  2717. * rates available are as per tegra210_sfc_rates[].
  2718. */
  2719. static s32 *coef_addr_table[TEGRA210_SFC_NUM_RATES][TEGRA210_SFC_NUM_RATES] = {
  2720. /* Convertions from 8 kHz */
  2721. {
  2722. BYPASS_CONV,
  2723. coef_8to11,
  2724. coef_8to16,
  2725. coef_8to22,
  2726. coef_8to24,
  2727. coef_8to32,
  2728. coef_8to44,
  2729. coef_8to48,
  2730. UNSUPP_CONV,
  2731. coef_8to88,
  2732. coef_8to96,
  2733. UNSUPP_CONV,
  2734. UNSUPP_CONV,
  2735. },
  2736. /* Convertions from 11.025 kHz */
  2737. {
  2738. coef_11to8,
  2739. BYPASS_CONV,
  2740. coef_11to16,
  2741. coef_11to22,
  2742. coef_11to24,
  2743. coef_11to32,
  2744. coef_11to44,
  2745. coef_11to48,
  2746. UNSUPP_CONV,
  2747. coef_11to88,
  2748. coef_11to96,
  2749. UNSUPP_CONV,
  2750. UNSUPP_CONV,
  2751. },
  2752. /* Convertions from 16 kHz */
  2753. {
  2754. coef_16to8,
  2755. coef_16to11,
  2756. BYPASS_CONV,
  2757. coef_16to22,
  2758. coef_16to24,
  2759. coef_16to32,
  2760. coef_16to44,
  2761. coef_16to48,
  2762. UNSUPP_CONV,
  2763. coef_16to88,
  2764. coef_16to96,
  2765. coef_16to176,
  2766. coef_16to192,
  2767. },
  2768. /* Convertions from 22.05 kHz */
  2769. {
  2770. coef_22to8,
  2771. coef_22to11,
  2772. coef_22to16,
  2773. BYPASS_CONV,
  2774. coef_22to24,
  2775. coef_22to32,
  2776. coef_22to44,
  2777. coef_22to48,
  2778. UNSUPP_CONV,
  2779. coef_22to88,
  2780. coef_22to96,
  2781. coef_22to176,
  2782. coef_22to192,
  2783. },
  2784. /* Convertions from 24 kHz */
  2785. {
  2786. coef_24to8,
  2787. coef_24to11,
  2788. coef_24to16,
  2789. coef_24to22,
  2790. BYPASS_CONV,
  2791. coef_24to32,
  2792. coef_24to44,
  2793. coef_24to48,
  2794. UNSUPP_CONV,
  2795. coef_24to88,
  2796. coef_24to96,
  2797. coef_24to176,
  2798. coef_24to192,
  2799. },
  2800. /* Convertions from 32 kHz */
  2801. {
  2802. coef_32to8,
  2803. coef_32to11,
  2804. coef_32to16,
  2805. coef_32to22,
  2806. coef_32to24,
  2807. BYPASS_CONV,
  2808. coef_32to44,
  2809. coef_32to48,
  2810. UNSUPP_CONV,
  2811. coef_32to88,
  2812. coef_32to96,
  2813. coef_32to176,
  2814. coef_32to192,
  2815. },
  2816. /* Convertions from 44.1 kHz */
  2817. {
  2818. coef_44to8,
  2819. coef_44to11,
  2820. coef_44to16,
  2821. coef_44to22,
  2822. coef_44to24,
  2823. coef_44to32,
  2824. BYPASS_CONV,
  2825. coef_44to48,
  2826. UNSUPP_CONV,
  2827. coef_44to88,
  2828. coef_44to96,
  2829. coef_44to176,
  2830. coef_44to192,
  2831. },
  2832. /* Convertions from 48 kHz */
  2833. {
  2834. coef_48to8,
  2835. coef_48to11,
  2836. coef_48to16,
  2837. coef_48to22,
  2838. coef_48to24,
  2839. coef_48to32,
  2840. coef_48to44,
  2841. BYPASS_CONV,
  2842. UNSUPP_CONV,
  2843. coef_48to88,
  2844. coef_48to96,
  2845. coef_48to176,
  2846. coef_48to192,
  2847. },
  2848. /* Convertions from 64 kHz */
  2849. {
  2850. UNSUPP_CONV,
  2851. UNSUPP_CONV,
  2852. UNSUPP_CONV,
  2853. UNSUPP_CONV,
  2854. UNSUPP_CONV,
  2855. UNSUPP_CONV,
  2856. UNSUPP_CONV,
  2857. UNSUPP_CONV,
  2858. UNSUPP_CONV,
  2859. UNSUPP_CONV,
  2860. UNSUPP_CONV,
  2861. UNSUPP_CONV,
  2862. UNSUPP_CONV,
  2863. },
  2864. /* Convertions from 88.2 kHz */
  2865. {
  2866. coef_88to8,
  2867. coef_88to11,
  2868. coef_88to16,
  2869. coef_88to22,
  2870. coef_88to24,
  2871. coef_88to32,
  2872. coef_88to44,
  2873. coef_88to48,
  2874. UNSUPP_CONV,
  2875. BYPASS_CONV,
  2876. coef_88to96,
  2877. coef_88to176,
  2878. coef_88to192,
  2879. },
  2880. /* Convertions from 96 kHz */
  2881. { coef_96to8,
  2882. coef_96to11,
  2883. coef_96to16,
  2884. coef_96to22,
  2885. coef_96to24,
  2886. coef_96to32,
  2887. coef_96to44,
  2888. coef_96to48,
  2889. UNSUPP_CONV,
  2890. coef_96to88,
  2891. BYPASS_CONV,
  2892. coef_96to176,
  2893. coef_96to192,
  2894. },
  2895. /* Convertions from 176.4 kHz */
  2896. {
  2897. UNSUPP_CONV,
  2898. UNSUPP_CONV,
  2899. coef_176to16,
  2900. coef_176to22,
  2901. coef_176to24,
  2902. coef_176to32,
  2903. coef_176to44,
  2904. coef_176to48,
  2905. UNSUPP_CONV,
  2906. coef_176to88,
  2907. coef_176to96,
  2908. BYPASS_CONV,
  2909. coef_176to192,
  2910. },
  2911. /* Convertions from 192 kHz */
  2912. {
  2913. UNSUPP_CONV,
  2914. UNSUPP_CONV,
  2915. coef_192to16,
  2916. coef_192to22,
  2917. coef_192to24,
  2918. coef_192to32,
  2919. coef_192to44,
  2920. coef_192to48,
  2921. UNSUPP_CONV,
  2922. coef_192to88,
  2923. coef_192to96,
  2924. coef_192to176,
  2925. BYPASS_CONV,
  2926. },
  2927. };
  2928. static int __maybe_unused tegra210_sfc_runtime_suspend(struct device *dev)
  2929. {
  2930. struct tegra210_sfc *sfc = dev_get_drvdata(dev);
  2931. regcache_cache_only(sfc->regmap, true);
  2932. regcache_mark_dirty(sfc->regmap);
  2933. return 0;
  2934. }
  2935. static int __maybe_unused tegra210_sfc_runtime_resume(struct device *dev)
  2936. {
  2937. struct tegra210_sfc *sfc = dev_get_drvdata(dev);
  2938. regcache_cache_only(sfc->regmap, false);
  2939. regcache_sync(sfc->regmap);
  2940. return 0;
  2941. }
  2942. static inline void tegra210_sfc_write_ram(struct regmap *regmap,
  2943. s32 *data)
  2944. {
  2945. int i;
  2946. regmap_write(regmap, TEGRA210_SFC_CFG_RAM_CTRL,
  2947. TEGRA210_SFC_RAM_CTRL_SEQ_ACCESS_EN |
  2948. TEGRA210_SFC_RAM_CTRL_ADDR_INIT_EN |
  2949. TEGRA210_SFC_RAM_CTRL_RW_WRITE);
  2950. for (i = 0; i < TEGRA210_SFC_COEF_RAM_DEPTH; i++)
  2951. regmap_write(regmap, TEGRA210_SFC_CFG_RAM_DATA, data[i]);
  2952. }
  2953. static int tegra210_sfc_write_coeff_ram(struct snd_soc_component *cmpnt)
  2954. {
  2955. struct tegra210_sfc *sfc = dev_get_drvdata(cmpnt->dev);
  2956. s32 *coeff_ram;
  2957. /* Bypass */
  2958. if (sfc->srate_in == sfc->srate_out)
  2959. return 0;
  2960. coeff_ram = coef_addr_table[sfc->srate_in][sfc->srate_out];
  2961. if (IS_ERR_OR_NULL(coeff_ram)) {
  2962. dev_err(cmpnt->dev,
  2963. "Conversion from %d to %d Hz is not supported\n",
  2964. sfc->srate_in, sfc->srate_out);
  2965. return PTR_ERR_OR_ZERO(coeff_ram);
  2966. }
  2967. tegra210_sfc_write_ram(sfc->regmap, coeff_ram);
  2968. regmap_update_bits(sfc->regmap,
  2969. TEGRA210_SFC_COEF_RAM,
  2970. TEGRA210_SFC_COEF_RAM_EN,
  2971. TEGRA210_SFC_COEF_RAM_EN);
  2972. return 0;
  2973. }
  2974. static int tegra210_sfc_set_audio_cif(struct tegra210_sfc *sfc,
  2975. struct snd_pcm_hw_params *params,
  2976. unsigned int reg)
  2977. {
  2978. unsigned int channels, audio_bits, path;
  2979. struct tegra_cif_conf cif_conf;
  2980. memset(&cif_conf, 0, sizeof(struct tegra_cif_conf));
  2981. channels = params_channels(params);
  2982. switch (params_format(params)) {
  2983. case SNDRV_PCM_FORMAT_S16_LE:
  2984. audio_bits = TEGRA_ACIF_BITS_16;
  2985. break;
  2986. case SNDRV_PCM_FORMAT_S32_LE:
  2987. audio_bits = TEGRA_ACIF_BITS_32;
  2988. break;
  2989. default:
  2990. return -EOPNOTSUPP;
  2991. }
  2992. cif_conf.audio_ch = channels;
  2993. cif_conf.client_ch = channels;
  2994. cif_conf.audio_bits = audio_bits;
  2995. cif_conf.client_bits = TEGRA_ACIF_BITS_32;
  2996. if (reg == TEGRA210_SFC_RX_CIF_CTRL)
  2997. path = SFC_RX_PATH;
  2998. else
  2999. path = SFC_TX_PATH;
  3000. cif_conf.stereo_conv = sfc->stereo_to_mono[path];
  3001. cif_conf.mono_conv = sfc->mono_to_stereo[path];
  3002. tegra_set_cif(sfc->regmap, reg, &cif_conf);
  3003. return 0;
  3004. }
  3005. static int tegra210_sfc_soft_reset(struct tegra210_sfc *sfc)
  3006. {
  3007. u32 val;
  3008. /*
  3009. * Soft Reset: Below performs module soft reset which clears
  3010. * all FSM logic, flushes flow control of FIFO and resets the
  3011. * state register. It also brings module back to disabled
  3012. * state (without flushing the data in the pipe).
  3013. */
  3014. regmap_update_bits(sfc->regmap, TEGRA210_SFC_SOFT_RESET,
  3015. TEGRA210_SFC_SOFT_RESET_EN, 1);
  3016. return regmap_read_poll_timeout(sfc->regmap,
  3017. TEGRA210_SFC_SOFT_RESET,
  3018. val,
  3019. !(val & TEGRA210_SFC_SOFT_RESET_EN),
  3020. 10, 10000);
  3021. }
  3022. static int tegra210_sfc_rate_to_idx(struct device *dev, int rate,
  3023. int *rate_idx)
  3024. {
  3025. int i;
  3026. for (i = 0; i < ARRAY_SIZE(tegra210_sfc_rates); i++) {
  3027. if (rate == tegra210_sfc_rates[i]) {
  3028. *rate_idx = i;
  3029. return 0;
  3030. }
  3031. }
  3032. dev_err(dev, "Sample rate %d Hz is not supported\n", rate);
  3033. return -EOPNOTSUPP;
  3034. }
  3035. static int tegra210_sfc_startup(struct snd_pcm_substream *substream,
  3036. struct snd_soc_dai *dai)
  3037. {
  3038. struct tegra210_sfc *sfc = snd_soc_dai_get_drvdata(dai);
  3039. int err;
  3040. regmap_update_bits(sfc->regmap, TEGRA210_SFC_COEF_RAM,
  3041. TEGRA210_SFC_COEF_RAM_EN, 0);
  3042. err = tegra210_sfc_soft_reset(sfc);
  3043. if (err < 0) {
  3044. dev_err(dai->dev, "Failed to reset SFC in %s, err = %d\n",
  3045. __func__, err);
  3046. return err;
  3047. }
  3048. return 0;
  3049. }
  3050. static int tegra210_sfc_in_hw_params(struct snd_pcm_substream *substream,
  3051. struct snd_pcm_hw_params *params,
  3052. struct snd_soc_dai *dai)
  3053. {
  3054. struct tegra210_sfc *sfc = snd_soc_dai_get_drvdata(dai);
  3055. struct device *dev = dai->dev;
  3056. int err;
  3057. err = tegra210_sfc_rate_to_idx(dev, params_rate(params),
  3058. &sfc->srate_in);
  3059. if (err < 0)
  3060. return err;
  3061. err = tegra210_sfc_set_audio_cif(sfc, params, TEGRA210_SFC_RX_CIF_CTRL);
  3062. if (err < 0) {
  3063. dev_err(dev, "Can't set SFC RX CIF: %d\n", err);
  3064. return err;
  3065. }
  3066. regmap_write(sfc->regmap, TEGRA210_SFC_RX_FREQ, sfc->srate_in);
  3067. return err;
  3068. }
  3069. static int tegra210_sfc_out_hw_params(struct snd_pcm_substream *substream,
  3070. struct snd_pcm_hw_params *params,
  3071. struct snd_soc_dai *dai)
  3072. {
  3073. struct tegra210_sfc *sfc = snd_soc_dai_get_drvdata(dai);
  3074. struct device *dev = dai->dev;
  3075. int err;
  3076. err = tegra210_sfc_rate_to_idx(dev, params_rate(params),
  3077. &sfc->srate_out);
  3078. if (err < 0)
  3079. return err;
  3080. err = tegra210_sfc_set_audio_cif(sfc, params, TEGRA210_SFC_TX_CIF_CTRL);
  3081. if (err < 0) {
  3082. dev_err(dev, "Can't set SFC TX CIF: %d\n", err);
  3083. return err;
  3084. }
  3085. regmap_write(sfc->regmap, TEGRA210_SFC_TX_FREQ, sfc->srate_out);
  3086. return 0;
  3087. }
  3088. static int tegra210_sfc_init(struct snd_soc_dapm_widget *w,
  3089. struct snd_kcontrol *kcontrol, int event)
  3090. {
  3091. struct snd_soc_component *cmpnt = snd_soc_dapm_to_component(w->dapm);
  3092. return tegra210_sfc_write_coeff_ram(cmpnt);
  3093. }
  3094. static int tegra210_sfc_iget_stereo_to_mono(struct snd_kcontrol *kcontrol,
  3095. struct snd_ctl_elem_value *ucontrol)
  3096. {
  3097. struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol);
  3098. struct tegra210_sfc *sfc = snd_soc_component_get_drvdata(cmpnt);
  3099. ucontrol->value.enumerated.item[0] = sfc->stereo_to_mono[SFC_RX_PATH];
  3100. return 0;
  3101. }
  3102. static int tegra210_sfc_iput_stereo_to_mono(struct snd_kcontrol *kcontrol,
  3103. struct snd_ctl_elem_value *ucontrol)
  3104. {
  3105. struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol);
  3106. struct tegra210_sfc *sfc = snd_soc_component_get_drvdata(cmpnt);
  3107. unsigned int value = ucontrol->value.enumerated.item[0];
  3108. if (value == sfc->stereo_to_mono[SFC_RX_PATH])
  3109. return 0;
  3110. sfc->stereo_to_mono[SFC_RX_PATH] = value;
  3111. return 1;
  3112. }
  3113. static int tegra210_sfc_iget_mono_to_stereo(struct snd_kcontrol *kcontrol,
  3114. struct snd_ctl_elem_value *ucontrol)
  3115. {
  3116. struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol);
  3117. struct tegra210_sfc *sfc = snd_soc_component_get_drvdata(cmpnt);
  3118. ucontrol->value.enumerated.item[0] = sfc->mono_to_stereo[SFC_RX_PATH];
  3119. return 0;
  3120. }
  3121. static int tegra210_sfc_iput_mono_to_stereo(struct snd_kcontrol *kcontrol,
  3122. struct snd_ctl_elem_value *ucontrol)
  3123. {
  3124. struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol);
  3125. struct tegra210_sfc *sfc = snd_soc_component_get_drvdata(cmpnt);
  3126. unsigned int value = ucontrol->value.enumerated.item[0];
  3127. if (value == sfc->mono_to_stereo[SFC_RX_PATH])
  3128. return 0;
  3129. sfc->mono_to_stereo[SFC_RX_PATH] = value;
  3130. return 1;
  3131. }
  3132. static int tegra210_sfc_oget_stereo_to_mono(struct snd_kcontrol *kcontrol,
  3133. struct snd_ctl_elem_value *ucontrol)
  3134. {
  3135. struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol);
  3136. struct tegra210_sfc *sfc = snd_soc_component_get_drvdata(cmpnt);
  3137. ucontrol->value.enumerated.item[0] = sfc->stereo_to_mono[SFC_TX_PATH];
  3138. return 0;
  3139. }
  3140. static int tegra210_sfc_oput_stereo_to_mono(struct snd_kcontrol *kcontrol,
  3141. struct snd_ctl_elem_value *ucontrol)
  3142. {
  3143. struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol);
  3144. struct tegra210_sfc *sfc = snd_soc_component_get_drvdata(cmpnt);
  3145. unsigned int value = ucontrol->value.enumerated.item[0];
  3146. if (value == sfc->stereo_to_mono[SFC_TX_PATH])
  3147. return 0;
  3148. sfc->stereo_to_mono[SFC_TX_PATH] = value;
  3149. return 1;
  3150. }
  3151. static int tegra210_sfc_oget_mono_to_stereo(struct snd_kcontrol *kcontrol,
  3152. struct snd_ctl_elem_value *ucontrol)
  3153. {
  3154. struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol);
  3155. struct tegra210_sfc *sfc = snd_soc_component_get_drvdata(cmpnt);
  3156. ucontrol->value.enumerated.item[0] = sfc->mono_to_stereo[SFC_TX_PATH];
  3157. return 0;
  3158. }
  3159. static int tegra210_sfc_oput_mono_to_stereo(struct snd_kcontrol *kcontrol,
  3160. struct snd_ctl_elem_value *ucontrol)
  3161. {
  3162. struct snd_soc_component *cmpnt = snd_soc_kcontrol_component(kcontrol);
  3163. struct tegra210_sfc *sfc = snd_soc_component_get_drvdata(cmpnt);
  3164. unsigned int value = ucontrol->value.enumerated.item[0];
  3165. if (value == sfc->mono_to_stereo[SFC_TX_PATH])
  3166. return 0;
  3167. sfc->mono_to_stereo[SFC_TX_PATH] = value;
  3168. return 1;
  3169. }
  3170. static const struct snd_soc_dai_ops tegra210_sfc_in_dai_ops = {
  3171. .hw_params = tegra210_sfc_in_hw_params,
  3172. .startup = tegra210_sfc_startup,
  3173. };
  3174. static const struct snd_soc_dai_ops tegra210_sfc_out_dai_ops = {
  3175. .hw_params = tegra210_sfc_out_hw_params,
  3176. };
  3177. static struct snd_soc_dai_driver tegra210_sfc_dais[] = {
  3178. {
  3179. .name = "SFC-RX-CIF",
  3180. .playback = {
  3181. .stream_name = "RX-CIF-Playback",
  3182. .channels_min = 1,
  3183. .channels_max = 2,
  3184. .rates = SNDRV_PCM_RATE_8000_192000,
  3185. .formats = SNDRV_PCM_FMTBIT_S8 |
  3186. SNDRV_PCM_FMTBIT_S16_LE |
  3187. SNDRV_PCM_FMTBIT_S32_LE,
  3188. },
  3189. .capture = {
  3190. .stream_name = "RX-CIF-Capture",
  3191. .channels_min = 1,
  3192. .channels_max = 2,
  3193. .rates = SNDRV_PCM_RATE_8000_192000,
  3194. .formats = SNDRV_PCM_FMTBIT_S8 |
  3195. SNDRV_PCM_FMTBIT_S16_LE |
  3196. SNDRV_PCM_FMTBIT_S32_LE,
  3197. },
  3198. .ops = &tegra210_sfc_in_dai_ops,
  3199. },
  3200. {
  3201. .name = "SFC-TX-CIF",
  3202. .playback = {
  3203. .stream_name = "TX-CIF-Playback",
  3204. .channels_min = 1,
  3205. .channels_max = 2,
  3206. .rates = SNDRV_PCM_RATE_8000_192000,
  3207. .formats = SNDRV_PCM_FMTBIT_S8 |
  3208. SNDRV_PCM_FMTBIT_S16_LE |
  3209. SNDRV_PCM_FMTBIT_S32_LE,
  3210. },
  3211. .capture = {
  3212. .stream_name = "TX-CIF-Capture",
  3213. .channels_min = 1,
  3214. .channels_max = 2,
  3215. .rates = SNDRV_PCM_RATE_8000_192000,
  3216. .formats = SNDRV_PCM_FMTBIT_S8 |
  3217. SNDRV_PCM_FMTBIT_S16_LE |
  3218. SNDRV_PCM_FMTBIT_S32_LE,
  3219. },
  3220. .ops = &tegra210_sfc_out_dai_ops,
  3221. },
  3222. };
  3223. static const struct snd_soc_dapm_widget tegra210_sfc_widgets[] = {
  3224. SND_SOC_DAPM_AIF_IN("RX", NULL, 0, SND_SOC_NOPM, 0, 0),
  3225. SND_SOC_DAPM_AIF_OUT_E("TX", NULL, 0, TEGRA210_SFC_ENABLE,
  3226. TEGRA210_SFC_EN_SHIFT, 0,
  3227. tegra210_sfc_init, SND_SOC_DAPM_PRE_PMU),
  3228. };
  3229. #define RESAMPLE_ROUTE(sname) \
  3230. { "RX XBAR-" sname, NULL, "XBAR-TX" }, \
  3231. { "RX-CIF-" sname, NULL, "RX XBAR-" sname }, \
  3232. { "RX", NULL, "RX-CIF-" sname }, \
  3233. { "TX-CIF-" sname, NULL, "TX" }, \
  3234. { "TX XBAR-" sname, NULL, "TX-CIF-" sname }, \
  3235. { "XBAR-RX", NULL, "TX XBAR-" sname }
  3236. static const struct snd_soc_dapm_route tegra210_sfc_routes[] = {
  3237. { "TX", NULL, "RX" },
  3238. RESAMPLE_ROUTE("Playback"),
  3239. RESAMPLE_ROUTE("Capture"),
  3240. };
  3241. static const char * const tegra210_sfc_stereo_conv_text[] = {
  3242. "CH0", "CH1", "AVG",
  3243. };
  3244. static const char * const tegra210_sfc_mono_conv_text[] = {
  3245. "Zero", "Copy",
  3246. };
  3247. static const struct soc_enum tegra210_sfc_stereo_conv_enum =
  3248. SOC_ENUM_SINGLE(SND_SOC_NOPM, 0,
  3249. ARRAY_SIZE(tegra210_sfc_stereo_conv_text),
  3250. tegra210_sfc_stereo_conv_text);
  3251. static const struct soc_enum tegra210_sfc_mono_conv_enum =
  3252. SOC_ENUM_SINGLE(SND_SOC_NOPM, 0,
  3253. ARRAY_SIZE(tegra210_sfc_mono_conv_text),
  3254. tegra210_sfc_mono_conv_text);
  3255. static const struct snd_kcontrol_new tegra210_sfc_controls[] = {
  3256. SOC_ENUM_EXT("Input Stereo To Mono", tegra210_sfc_stereo_conv_enum,
  3257. tegra210_sfc_iget_stereo_to_mono,
  3258. tegra210_sfc_iput_stereo_to_mono),
  3259. SOC_ENUM_EXT("Input Mono To Stereo", tegra210_sfc_mono_conv_enum,
  3260. tegra210_sfc_iget_mono_to_stereo,
  3261. tegra210_sfc_iput_mono_to_stereo),
  3262. SOC_ENUM_EXT("Output Stereo To Mono", tegra210_sfc_stereo_conv_enum,
  3263. tegra210_sfc_oget_stereo_to_mono,
  3264. tegra210_sfc_oput_stereo_to_mono),
  3265. SOC_ENUM_EXT("Output Mono To Stereo", tegra210_sfc_mono_conv_enum,
  3266. tegra210_sfc_oget_mono_to_stereo,
  3267. tegra210_sfc_oput_mono_to_stereo),
  3268. };
  3269. static const struct snd_soc_component_driver tegra210_sfc_cmpnt = {
  3270. .dapm_widgets = tegra210_sfc_widgets,
  3271. .num_dapm_widgets = ARRAY_SIZE(tegra210_sfc_widgets),
  3272. .dapm_routes = tegra210_sfc_routes,
  3273. .num_dapm_routes = ARRAY_SIZE(tegra210_sfc_routes),
  3274. .controls = tegra210_sfc_controls,
  3275. .num_controls = ARRAY_SIZE(tegra210_sfc_controls),
  3276. };
  3277. static bool tegra210_sfc_wr_reg(struct device *dev, unsigned int reg)
  3278. {
  3279. switch (reg) {
  3280. case TEGRA210_SFC_RX_INT_MASK ... TEGRA210_SFC_RX_FREQ:
  3281. case TEGRA210_SFC_TX_INT_MASK ... TEGRA210_SFC_TX_FREQ:
  3282. case TEGRA210_SFC_ENABLE ... TEGRA210_SFC_CG:
  3283. case TEGRA210_SFC_COEF_RAM ... TEGRA210_SFC_CFG_RAM_DATA:
  3284. return true;
  3285. default:
  3286. return false;
  3287. }
  3288. }
  3289. static bool tegra210_sfc_rd_reg(struct device *dev, unsigned int reg)
  3290. {
  3291. switch (reg) {
  3292. case TEGRA210_SFC_RX_STATUS ... TEGRA210_SFC_RX_FREQ:
  3293. case TEGRA210_SFC_TX_STATUS ... TEGRA210_SFC_TX_FREQ:
  3294. case TEGRA210_SFC_ENABLE ... TEGRA210_SFC_INT_STATUS:
  3295. case TEGRA210_SFC_COEF_RAM ... TEGRA210_SFC_CFG_RAM_DATA:
  3296. return true;
  3297. default:
  3298. return false;
  3299. }
  3300. }
  3301. static bool tegra210_sfc_volatile_reg(struct device *dev, unsigned int reg)
  3302. {
  3303. switch (reg) {
  3304. case TEGRA210_SFC_RX_STATUS:
  3305. case TEGRA210_SFC_RX_INT_STATUS:
  3306. case TEGRA210_SFC_RX_INT_SET:
  3307. case TEGRA210_SFC_TX_STATUS:
  3308. case TEGRA210_SFC_TX_INT_STATUS:
  3309. case TEGRA210_SFC_TX_INT_SET:
  3310. case TEGRA210_SFC_SOFT_RESET:
  3311. case TEGRA210_SFC_STATUS:
  3312. case TEGRA210_SFC_INT_STATUS:
  3313. case TEGRA210_SFC_CFG_RAM_CTRL:
  3314. case TEGRA210_SFC_CFG_RAM_DATA:
  3315. return true;
  3316. default:
  3317. return false;
  3318. }
  3319. }
  3320. static bool tegra210_sfc_precious_reg(struct device *dev, unsigned int reg)
  3321. {
  3322. switch (reg) {
  3323. case TEGRA210_SFC_CFG_RAM_DATA:
  3324. return true;
  3325. default:
  3326. return false;
  3327. }
  3328. }
  3329. static const struct regmap_config tegra210_sfc_regmap_config = {
  3330. .reg_bits = 32,
  3331. .reg_stride = 4,
  3332. .val_bits = 32,
  3333. .max_register = TEGRA210_SFC_CFG_RAM_DATA,
  3334. .writeable_reg = tegra210_sfc_wr_reg,
  3335. .readable_reg = tegra210_sfc_rd_reg,
  3336. .volatile_reg = tegra210_sfc_volatile_reg,
  3337. .precious_reg = tegra210_sfc_precious_reg,
  3338. .reg_defaults = tegra210_sfc_reg_defaults,
  3339. .num_reg_defaults = ARRAY_SIZE(tegra210_sfc_reg_defaults),
  3340. .cache_type = REGCACHE_FLAT,
  3341. };
  3342. static const struct of_device_id tegra210_sfc_of_match[] = {
  3343. { .compatible = "nvidia,tegra210-sfc" },
  3344. {},
  3345. };
  3346. MODULE_DEVICE_TABLE(of, tegra210_sfc_of_match);
  3347. static int tegra210_sfc_platform_probe(struct platform_device *pdev)
  3348. {
  3349. struct device *dev = &pdev->dev;
  3350. struct tegra210_sfc *sfc;
  3351. void __iomem *regs;
  3352. int err;
  3353. sfc = devm_kzalloc(dev, sizeof(*sfc), GFP_KERNEL);
  3354. if (!sfc)
  3355. return -ENOMEM;
  3356. dev_set_drvdata(dev, sfc);
  3357. regs = devm_platform_ioremap_resource(pdev, 0);
  3358. if (IS_ERR(regs))
  3359. return PTR_ERR(regs);
  3360. sfc->regmap = devm_regmap_init_mmio(dev, regs,
  3361. &tegra210_sfc_regmap_config);
  3362. if (IS_ERR(sfc->regmap)) {
  3363. dev_err(dev, "regmap init failed\n");
  3364. return PTR_ERR(sfc->regmap);
  3365. }
  3366. regcache_cache_only(sfc->regmap, true);
  3367. err = devm_snd_soc_register_component(dev, &tegra210_sfc_cmpnt,
  3368. tegra210_sfc_dais,
  3369. ARRAY_SIZE(tegra210_sfc_dais));
  3370. if (err) {
  3371. dev_err(dev, "can't register SFC component, err: %d\n", err);
  3372. return err;
  3373. }
  3374. pm_runtime_enable(&pdev->dev);
  3375. return 0;
  3376. }
  3377. static void tegra210_sfc_platform_remove(struct platform_device *pdev)
  3378. {
  3379. pm_runtime_disable(&pdev->dev);
  3380. }
  3381. static const struct dev_pm_ops tegra210_sfc_pm_ops = {
  3382. SET_RUNTIME_PM_OPS(tegra210_sfc_runtime_suspend,
  3383. tegra210_sfc_runtime_resume, NULL)
  3384. SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
  3385. pm_runtime_force_resume)
  3386. };
  3387. static struct platform_driver tegra210_sfc_driver = {
  3388. .driver = {
  3389. .name = "tegra210-sfc",
  3390. .of_match_table = tegra210_sfc_of_match,
  3391. .pm = &tegra210_sfc_pm_ops,
  3392. },
  3393. .probe = tegra210_sfc_platform_probe,
  3394. .remove = tegra210_sfc_platform_remove,
  3395. };
  3396. module_platform_driver(tegra210_sfc_driver)
  3397. MODULE_AUTHOR("Arun Shamanna Lakshmi <aruns@nvidia.com>");
  3398. MODULE_DESCRIPTION("Tegra210 SFC ASoC driver");
  3399. MODULE_LICENSE("GPL v2");