tegra210_sfc.c 88 KB

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