tegra210_sfc.c 88 KB

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