123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884 |
- /* Copyright (c) 2012-2017, The Linux Foundation. All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 and
- * only version 2 as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- */
- #include <linux/init.h>
- #include <linux/err.h>
- #include <linux/module.h>
- #include <linux/moduleparam.h>
- #include <linux/platform_device.h>
- #include <linux/bitops.h>
- #include <linux/mutex.h>
- #include <linux/of_device.h>
- #include <sound/core.h>
- #include <sound/soc.h>
- #include <sound/soc-dapm.h>
- #include <sound/pcm.h>
- #include <sound/initval.h>
- #include <sound/control.h>
- #include <sound/q6adm-v2.h>
- #include <sound/q6asm-v2.h>
- #include <sound/q6afe-v2.h>
- #include <sound/tlv.h>
- #include <sound/asound.h>
- #include <sound/pcm_params.h>
- #include <sound/q6core.h>
- #include <linux/slab.h>
- #include "msm-pcm-routing-v2.h"
- #include "msm-dolby-dap-config.h"
- #include "q6voice.h"
- extern u32 score;
- struct msm_pcm_routing_bdai_data {
- u16 port_id; /* AFE port ID */
- u8 active; /* track if this backend is enabled */
- unsigned long fe_sessions; /* Front-end sessions */
- u64 port_sessions; /* track Tx BE ports -> Rx BE
- * number of BE should not exceed
- * the size of this field
- */
- unsigned int sample_rate;
- unsigned int channel;
- unsigned int format;
- };
- struct msm_pcm_routing_fdai_data {
- u16 be_srate; /* track prior backend sample rate for flushing purpose */
- int strm_id; /* ASM stream ID */
- struct msm_pcm_routing_evt event_info;
- };
- #define INVALID_SESSION -1
- #define SESSION_TYPE_RX 0
- #define SESSION_TYPE_TX 1
- #define MAX_LSM_SESSIONS 8
- #define EC_PORT_ID_PRIMARY_MI2S_TX 1
- #define EC_PORT_ID_SECONDARY_MI2S_TX 2
- #define EC_PORT_ID_TERTIARY_MI2S_TX 3
- #define EC_PORT_ID_QUATERNARY_MI2S_TX 4
- static struct mutex routing_lock;
- static int fm_switch_enable;
- static int fm_pcmrx_switch_enable;
- static int srs_alsa_ctrl_ever_called;
- static int lsm_mux_slim_port;
- static int slim0_rx_aanc_fb_port;
- static int msm_route_ec_ref_rx = 7; /* NONE */
- static uint32_t voc_session_id = ALL_SESSION_VSID;
- static int msm_route_ext_ec_ref = AFE_PORT_INVALID;
- enum {
- MADNONE,
- MADAUDIO,
- MADBEACON,
- MADULTRASOUND,
- MADSWAUDIO,
- };
- #define SLIMBUS_0_TX_TEXT "SLIMBUS_0_TX"
- #define SLIMBUS_1_TX_TEXT "SLIMBUS_1_TX"
- #define SLIMBUS_2_TX_TEXT "SLIMBUS_2_TX"
- #define SLIMBUS_3_TX_TEXT "SLIMBUS_3_TX"
- #define SLIMBUS_4_TX_TEXT "SLIMBUS_4_TX"
- #define SLIMBUS_5_TX_TEXT "SLIMBUS_5_TX"
- #define LSM_FUNCTION_TEXT "LSM Function"
- static const char * const mad_audio_mux_text[] = {
- "None",
- SLIMBUS_0_TX_TEXT, SLIMBUS_1_TX_TEXT, SLIMBUS_2_TX_TEXT,
- SLIMBUS_3_TX_TEXT, SLIMBUS_4_TX_TEXT, SLIMBUS_5_TX_TEXT
- };
- #define INT_RX_VOL_MAX_STEPS 0x2000
- #define INT_RX_VOL_GAIN 0x2000
- static int msm_route_fm_vol_control;
- static const DECLARE_TLV_DB_LINEAR(fm_rx_vol_gain, 0,
- INT_RX_VOL_MAX_STEPS);
- static int msm_route_hfp_vol_control;
- static const DECLARE_TLV_DB_LINEAR(hfp_rx_vol_gain, 0,
- INT_RX_VOL_MAX_STEPS);
- static int msm_route_multimedia2_vol_control;
- static const DECLARE_TLV_DB_LINEAR(multimedia2_rx_vol_gain, 0,
- INT_RX_VOL_MAX_STEPS);
- static int msm_route_multimedia5_vol_control;
- static const DECLARE_TLV_DB_LINEAR(multimedia5_rx_vol_gain, 0,
- INT_RX_VOL_MAX_STEPS);
- /* Equal to Frontend after last of the MULTIMEDIA SESSIONS */
- #define MAX_EQ_SESSIONS MSM_FRONTEND_DAI_CS_VOICE
- enum {
- EQ_BAND1 = 0,
- EQ_BAND2,
- EQ_BAND3,
- EQ_BAND4,
- EQ_BAND5,
- EQ_BAND6,
- EQ_BAND7,
- EQ_BAND8,
- EQ_BAND9,
- EQ_BAND10,
- EQ_BAND11,
- EQ_BAND12,
- EQ_BAND_MAX,
- };
- struct msm_audio_eq_band {
- uint16_t band_idx; /* The band index, 0 .. 11 */
- uint32_t filter_type; /* Filter band type */
- uint32_t center_freq_hz; /* Filter band center frequency */
- uint32_t filter_gain; /* Filter band initial gain (dB) */
- /* Range is +12 dB to -12 dB with 1dB increments. */
- uint32_t q_factor;
- } __packed;
- struct msm_audio_eq_stream_config {
- uint32_t enable; /* Number of consequtive bands specified */
- uint32_t num_bands;
- struct msm_audio_eq_band eq_bands[EQ_BAND_MAX];
- } __packed;
- struct msm_audio_eq_stream_config eq_data[MAX_EQ_SESSIONS];
- static void msm_send_eq_values(int eq_idx);
- /* This array is indexed by back-end DAI ID defined in msm-pcm-routing.h
- * If new back-end is defined, add new back-end DAI ID at the end of enum
- */
- #define SRS_TRUMEDIA_INDEX 2
- union srs_trumedia_params_u {
- struct srs_trumedia_params srs_params;
- unsigned short int raw_params[1];
- };
- static union srs_trumedia_params_u msm_srs_trumedia_params[SRS_TRUMEDIA_INDEX];
- static int srs_port_id = -1;
- static void srs_send_params(int port_id, unsigned int techs,
- int param_block_idx)
- {
- /* only send commands to dsp if srs alsa ctrl was used
- at least one time */
- if (!srs_alsa_ctrl_ever_called)
- return;
- pr_debug("SRS %s: called, port_id = %d, techs flags = %u, paramblockidx %d",
- __func__, port_id, techs, param_block_idx);
- /* force all if techs is set to 1 */
- if (techs == 1)
- techs = 0xFFFFFFFF;
- if (techs & (1 << SRS_ID_WOWHD))
- srs_trumedia_open(port_id, SRS_ID_WOWHD,
- (void *)&msm_srs_trumedia_params[param_block_idx].srs_params.wowhd);
- if (techs & (1 << SRS_ID_CSHP))
- srs_trumedia_open(port_id, SRS_ID_CSHP,
- (void *)&msm_srs_trumedia_params[param_block_idx].srs_params.cshp);
- if (techs & (1 << SRS_ID_HPF))
- srs_trumedia_open(port_id, SRS_ID_HPF,
- (void *)&msm_srs_trumedia_params[param_block_idx].srs_params.hpf);
- if (techs & (1 << SRS_ID_PEQ))
- srs_trumedia_open(port_id, SRS_ID_PEQ,
- (void *)&msm_srs_trumedia_params[param_block_idx].srs_params.peq);
- if (techs & (1 << SRS_ID_HL))
- srs_trumedia_open(port_id, SRS_ID_HL,
- (void *)&msm_srs_trumedia_params[param_block_idx].srs_params.hl);
- if (techs & (1 << SRS_ID_GLOBAL))
- srs_trumedia_open(port_id, SRS_ID_GLOBAL,
- (void *)&msm_srs_trumedia_params[param_block_idx].srs_params.global);
- }
- int get_topology(int path_type)
- {
- int topology_id = 0;
- if (path_type == ADM_PATH_PLAYBACK)
- topology_id = get_adm_rx_topology();
- else
- topology_id = get_adm_tx_topology();
- #ifdef CONFIG_SND_SOC_MAXIM_DSM_COPP
- if((path_type!=ADM_PATH_PLAYBACK) && (topology_id ==0 || 0x00010315/*AUDIO_TX_MONO_COPP*/)) {
- topology_id = ADM_CUSTOM_PP_TX_TOPO_ID_DYNAMIC;
- }
- #endif
- if (topology_id == 0)
- topology_id = NULL_COPP_TOPOLOGY;
- return topology_id;
- }
- #define SLIMBUS_EXTPROC_RX AFE_PORT_INVALID
- static struct msm_pcm_routing_bdai_data msm_bedais[MSM_BACKEND_DAI_MAX] = {
- { PRIMARY_I2S_RX, 0, 0, 0, 0, 0},
- { PRIMARY_I2S_TX, 0, 0, 0, 0, 0},
- { SLIMBUS_0_RX, 0, 0, 0, 0, 0},
- { SLIMBUS_0_TX, 0, 0, 0, 0, 0},
- { HDMI_RX, 0, 0, 0, 0, 0},
- { INT_BT_SCO_RX, 0, 0, 0, 0, 0},
- { INT_BT_SCO_TX, 0, 0, 0, 0, 0},
- { INT_FM_RX, 0, 0, 0, 0, 0},
- { INT_FM_TX, 0, 0, 0, 0, 0},
- { RT_PROXY_PORT_001_RX, 0, 0, 0, 0, 0},
- { RT_PROXY_PORT_001_TX, 0, 0, 0, 0, 0},
- { AFE_PORT_ID_PRIMARY_PCM_RX, 0, 0, 0, 0, 0},
- { AFE_PORT_ID_PRIMARY_PCM_TX, 0, 0, 0, 0, 0},
- { VOICE_PLAYBACK_TX, 0, 0, 0, 0, 0},
- { VOICE2_PLAYBACK_TX, 0, 0, 0, 0, 0},
- { VOICE_RECORD_RX, 0, 0, 0, 0, 0},
- { VOICE_RECORD_TX, 0, 0, 0, 0, 0},
- { MI2S_RX, 0, 0, 0, 0, 0},
- { MI2S_TX, 0, 0, 0, 0},
- { SECONDARY_I2S_RX, 0, 0, 0, 0, 0},
- { SLIMBUS_1_RX, 0, 0, 0, 0, 0},
- { SLIMBUS_1_TX, 0, 0, 0, 0, 0},
- { SLIMBUS_4_RX, 0, 0, 0, 0, 0},
- { SLIMBUS_4_TX, 0, 0, 0, 0, 0},
- { SLIMBUS_3_RX, 0, 0, 0, 0, 0},
- { SLIMBUS_3_TX, 0, 0, 0, 0, 0},
- { SLIMBUS_5_TX, 0, 0, 0, 0, 0 },
- { SLIMBUS_EXTPROC_RX, 0, 0, 0, 0, 0},
- { SLIMBUS_EXTPROC_RX, 0, 0, 0, 0, 0},
- { SLIMBUS_EXTPROC_RX, 0, 0, 0, 0, 0},
- { AFE_PORT_ID_QUATERNARY_MI2S_RX, 0, 0, 0, 0, 0},
- { AFE_PORT_ID_QUATERNARY_MI2S_TX, 0, 0, 0, 0, 0},
- { AFE_PORT_ID_TERTIARY_MI2S_RX, 0, 0, 0, 0, 0},
- { AFE_PORT_ID_TERTIARY_MI2S_TX, 0, 0, 0, 0, 0},
- { AFE_PORT_ID_SECONDARY_MI2S_RX, 0, 0, 0, 0, 0},
- { AFE_PORT_ID_SECONDARY_MI2S_TX, 0, 0, 0, 0, 0},
- { AFE_PORT_ID_PRIMARY_MI2S_RX, 0, 0, 0, 0, 0},
- { AFE_PORT_ID_PRIMARY_MI2S_TX, 0, 0, 0, 0, 0},
- { AUDIO_PORT_ID_I2S_RX, 0, 0, 0, 0, 0},
- { AFE_PORT_ID_SECONDARY_PCM_RX, 0, 0, 0, 0, 0},
- { AFE_PORT_ID_SECONDARY_PCM_TX, 0, 0, 0, 0, 0},
- };
- /* Track ASM playback & capture sessions of DAI */
- static struct msm_pcm_routing_fdai_data
- fe_dai_map[MSM_FRONTEND_DAI_MM_SIZE][2] = {
- /* MULTIMEDIA1 */
- {{0, INVALID_SESSION, {NULL, NULL} },
- {0, INVALID_SESSION, {NULL, NULL} } },
- /* MULTIMEDIA2 */
- {{0, INVALID_SESSION, {NULL, NULL} },
- {0, INVALID_SESSION, {NULL, NULL} } },
- /* MULTIMEDIA3 */
- {{0, INVALID_SESSION, {NULL, NULL} },
- {0, INVALID_SESSION, {NULL, NULL} } },
- /* MULTIMEDIA4 */
- {{0, INVALID_SESSION, {NULL, NULL} },
- {0, INVALID_SESSION, {NULL, NULL} } },
- /* MULTIMEDIA5 */
- {{0, INVALID_SESSION, {NULL, NULL} },
- {0, INVALID_SESSION, {NULL, NULL} } },
- /* MULTIMEDIA6 */
- {{0, INVALID_SESSION, {NULL, NULL} },
- {0, INVALID_SESSION, {NULL, NULL} } },
- /* MULTIMEDIA7*/
- {{0, INVALID_SESSION, {NULL, NULL} },
- {0, INVALID_SESSION, {NULL, NULL} } },
- /* MULTIMEDIA8 */
- {{0, INVALID_SESSION, {NULL, NULL} },
- {0, INVALID_SESSION, {NULL, NULL} } },
- /* MULTIMEDIA9 */
- {{0, INVALID_SESSION, {NULL, NULL} },
- {0, INVALID_SESSION, {NULL, NULL} } },
- #ifdef CONFIG_JACK_AUDIO
- /* MULTIMEDIA10 */
- {{0, INVALID_SESSION, {NULL, NULL} },
- {0, INVALID_SESSION, {NULL, NULL} } },
- #endif
- };
- /* Track performance mode of all front-end multimedia sessions.
- * Performance mode is only valid when session is valid.
- */
- static int fe_dai_perf_mode[MSM_FRONTEND_DAI_MM_SIZE][2];
- static uint8_t is_be_dai_extproc(int be_dai)
- {
- if (be_dai == MSM_BACKEND_DAI_EXTPROC_RX ||
- be_dai == MSM_BACKEND_DAI_EXTPROC_TX ||
- be_dai == MSM_BACKEND_DAI_EXTPROC_EC_TX)
- return 1;
- else
- return 0;
- }
- static void msm_pcm_routing_build_matrix(int fedai_id, int dspst_id,
- int path_type, int perf_mode)
- {
- int i, port_type;
- struct route_payload payload;
- payload.num_copps = 0;
- port_type = (path_type == ADM_PATH_PLAYBACK ?
- MSM_AFE_PORT_TYPE_RX : MSM_AFE_PORT_TYPE_TX);
- for (i = 0; i < MSM_BACKEND_DAI_MAX; i++) {
- if (!is_be_dai_extproc(i) &&
- (afe_get_port_type(msm_bedais[i].port_id) == port_type) &&
- (msm_bedais[i].active) &&
- (test_bit(fedai_id, &msm_bedais[i].fe_sessions)))
- payload.copp_ids[payload.num_copps++] =
- msm_bedais[i].port_id;
- }
- if (payload.num_copps)
- adm_matrix_map(dspst_id, path_type,
- payload.num_copps, payload.copp_ids, 0, perf_mode);
- }
- void msm_pcm_routing_reg_psthr_stream(int fedai_id, int dspst_id,
- int stream_type)
- {
- int i, session_type, path_type, port_type;
- u32 mode = 0;
- if (fedai_id > MSM_FRONTEND_DAI_MM_MAX_ID) {
- /* bad ID assigned in machine driver */
- pr_err("%s: bad MM ID\n", __func__);
- return;
- }
- if (stream_type == SNDRV_PCM_STREAM_PLAYBACK) {
- session_type = SESSION_TYPE_RX;
- path_type = ADM_PATH_PLAYBACK;
- port_type = MSM_AFE_PORT_TYPE_RX;
- } else {
- session_type = SESSION_TYPE_TX;
- path_type = ADM_PATH_LIVE_REC;
- port_type = MSM_AFE_PORT_TYPE_TX;
- }
- mutex_lock(&routing_lock);
- fe_dai_map[fedai_id][session_type].strm_id = dspst_id;
- for (i = 0; i < MSM_BACKEND_DAI_MAX; i++) {
- if (!is_be_dai_extproc(i) &&
- (afe_get_port_type(msm_bedais[i].port_id) == port_type) &&
- (msm_bedais[i].active) &&
- (test_bit(fedai_id, &msm_bedais[i].fe_sessions))) {
- mode = afe_get_port_type(msm_bedais[i].port_id);
- adm_connect_afe_port(mode, dspst_id,
- msm_bedais[i].port_id);
- break;
- }
- }
- mutex_unlock(&routing_lock);
- }
- void msm_pcm_routing_reg_phy_stream(int fedai_id, int perf_mode,
- int dspst_id, int stream_type)
- {
- int i, session_type, path_type, port_type, port_id, topology;
- struct route_payload payload;
- u32 channels;
- uint16_t bits_per_sample = 16;
- if (fedai_id > MSM_FRONTEND_DAI_MM_MAX_ID) {
- /* bad ID assigned in machine driver */
- pr_err("%s: bad MM ID %d\n", __func__, fedai_id);
- return;
- }
- if (stream_type == SNDRV_PCM_STREAM_PLAYBACK) {
- session_type = SESSION_TYPE_RX;
- path_type = ADM_PATH_PLAYBACK;
- port_type = MSM_AFE_PORT_TYPE_RX;
- } else {
- session_type = SESSION_TYPE_TX;
- path_type = ADM_PATH_LIVE_REC;
- port_type = MSM_AFE_PORT_TYPE_TX;
- }
- mutex_lock(&routing_lock);
- payload.num_copps = 0; /* only RX needs to use payload */
- fe_dai_map[fedai_id][session_type].strm_id = dspst_id;
- fe_dai_perf_mode[fedai_id][session_type] = perf_mode;
- /* re-enable EQ if active */
- if (eq_data[fedai_id].enable)
- msm_send_eq_values(fedai_id);
- topology = get_topology(path_type);
- for (i = 0; i < MSM_BACKEND_DAI_MAX; i++) {
- if (!is_be_dai_extproc(i) &&
- (afe_get_port_type(msm_bedais[i].port_id) == port_type) &&
- (msm_bedais[i].active) &&
- (test_bit(fedai_id, &msm_bedais[i].fe_sessions))) {
- channels = msm_bedais[i].channel;
- if (msm_bedais[i].format == SNDRV_PCM_FORMAT_S16_LE)
- bits_per_sample = 16;
- else if (msm_bedais[i].format ==
- SNDRV_PCM_FORMAT_S24_LE)
- bits_per_sample = 24;
- if (msm_bedais[i].port_id == VOICE_RECORD_RX ||
- msm_bedais[i].port_id == VOICE_RECORD_TX)
- topology = DEFAULT_COPP_TOPOLOGY;
- if ((stream_type == SNDRV_PCM_STREAM_PLAYBACK) &&
- (channels > 0))
- adm_multi_ch_copp_open(msm_bedais[i].port_id,
- path_type,
- msm_bedais[i].sample_rate,
- msm_bedais[i].channel,
- topology, perf_mode,
- bits_per_sample);
- else
- adm_open(msm_bedais[i].port_id,
- path_type,
- msm_bedais[i].sample_rate,
- msm_bedais[i].channel,
- topology, perf_mode,
- bits_per_sample);
- payload.copp_ids[payload.num_copps++] =
- msm_bedais[i].port_id;
- port_id = srs_port_id = msm_bedais[i].port_id;
- srs_send_params(srs_port_id, 1, 0);
- if ((DOLBY_ADM_COPP_TOPOLOGY_ID == topology) &&
- (perf_mode == LEGACY_PCM_MODE))
- if (dolby_dap_init(port_id,
- msm_bedais[i].channel) < 0)
- pr_err("%s: Err init dolby dap\n",
- __func__);
- }
- }
- if (payload.num_copps)
- adm_matrix_map(dspst_id, path_type,
- payload.num_copps, payload.copp_ids, 0, perf_mode);
- mutex_unlock(&routing_lock);
- }
- void msm_pcm_routing_reg_phy_stream_v2(int fedai_id, bool perf_mode,
- int dspst_id, int stream_type,
- struct msm_pcm_routing_evt event_info)
- {
- msm_pcm_routing_reg_phy_stream(fedai_id, perf_mode, dspst_id,
- stream_type);
- if (stream_type == SNDRV_PCM_STREAM_PLAYBACK)
- fe_dai_map[fedai_id][SESSION_TYPE_RX].event_info = event_info;
- else
- fe_dai_map[fedai_id][SESSION_TYPE_TX].event_info = event_info;
- }
- void msm_pcm_routing_dereg_phy_stream(int fedai_id, int stream_type)
- {
- int i, port_type, session_type, path_type, topology;
- if (fedai_id > MSM_FRONTEND_DAI_MM_MAX_ID) {
- /* bad ID assigned in machine driver */
- pr_err("%s: bad MM ID\n", __func__);
- return;
- }
- if (stream_type == SNDRV_PCM_STREAM_PLAYBACK) {
- port_type = MSM_AFE_PORT_TYPE_RX;
- session_type = SESSION_TYPE_RX;
- path_type = ADM_PATH_PLAYBACK;
- } else {
- port_type = MSM_AFE_PORT_TYPE_TX;
- session_type = SESSION_TYPE_TX;
- path_type = ADM_PATH_LIVE_REC;
- }
- mutex_lock(&routing_lock);
- topology = get_topology(path_type);
- for (i = 0; i < MSM_BACKEND_DAI_MAX; i++) {
- if (!is_be_dai_extproc(i) &&
- (afe_get_port_type(msm_bedais[i].port_id) == port_type) &&
- (msm_bedais[i].active) &&
- (test_bit(fedai_id, &msm_bedais[i].fe_sessions))) {
- adm_close(msm_bedais[i].port_id,
- fe_dai_perf_mode[fedai_id][session_type]);
- if ((DOLBY_ADM_COPP_TOPOLOGY_ID == topology) &&
- (fe_dai_perf_mode[fedai_id][session_type] ==
- LEGACY_PCM_MODE))
- dolby_dap_deinit(msm_bedais[i].port_id);
- }
- }
- fe_dai_map[fedai_id][session_type].strm_id = INVALID_SESSION;
- fe_dai_map[fedai_id][session_type].be_srate = 0;
- mutex_unlock(&routing_lock);
- }
- /* Check if FE/BE route is set */
- static bool msm_pcm_routing_route_is_set(u16 be_id, u16 fe_id)
- {
- bool rc = false;
- if (fe_id > MSM_FRONTEND_DAI_MM_MAX_ID) {
- /* recheck FE ID in the mixer control defined in this file */
- pr_err("%s: bad MM ID\n", __func__);
- return rc;
- }
- if (test_bit(fe_id, &msm_bedais[be_id].fe_sessions))
- rc = true;
- return rc;
- }
- static void msm_pcm_routing_process_audio(u16 reg, u16 val, int set)
- {
- int session_type, path_type, port_id, topology;
- u32 channels;
- uint16_t bits_per_sample = 16;
- struct msm_pcm_routing_fdai_data *fdai;
- pr_debug("%s: reg %x val %x set %x\n", __func__, reg, val, set);
- if (val > MSM_FRONTEND_DAI_MM_MAX_ID) {
- /* recheck FE ID in the mixer control defined in this file */
- pr_err("%s: bad MM ID\n", __func__);
- return;
- }
- if (afe_get_port_type(msm_bedais[reg].port_id) ==
- MSM_AFE_PORT_TYPE_RX) {
- session_type = SESSION_TYPE_RX;
- path_type = ADM_PATH_PLAYBACK;
- } else {
- session_type = SESSION_TYPE_TX;
- path_type = ADM_PATH_LIVE_REC;
- }
- mutex_lock(&routing_lock);
- topology = get_topology(path_type);
- if (set) {
- if (!test_bit(val, &msm_bedais[reg].fe_sessions) &&
- ((msm_bedais[reg].port_id == VOICE_PLAYBACK_TX) ||
- (msm_bedais[reg].port_id == VOICE2_PLAYBACK_TX)))
- voc_start_playback(set, msm_bedais[reg].port_id);
- set_bit(val, &msm_bedais[reg].fe_sessions);
- fdai = &fe_dai_map[val][session_type];
- if (msm_bedais[reg].active && fdai->strm_id !=
- INVALID_SESSION) {
- channels = msm_bedais[reg].channel;
- if (session_type == SESSION_TYPE_TX &&
- fdai->be_srate &&
- (fdai->be_srate != msm_bedais[reg].sample_rate)) {
- pr_debug("%s: flush strm %d diff BE rates\n",
- __func__, fdai->strm_id);
- if (fdai->event_info.event_func)
- fdai->event_info.event_func(
- MSM_PCM_RT_EVT_BUF_RECFG,
- fdai->event_info.priv_data);
- fdai->be_srate = 0; /* might not need it */
- }
- if (msm_bedais[reg].format == SNDRV_PCM_FORMAT_S24_LE)
- bits_per_sample = 24;
- if (msm_bedais[reg].port_id == VOICE_RECORD_RX ||
- msm_bedais[reg].port_id == VOICE_RECORD_TX)
- topology = DEFAULT_COPP_TOPOLOGY;
- if ((session_type == SESSION_TYPE_RX) &&
- (channels > 0)) {
- adm_multi_ch_copp_open(msm_bedais[reg].port_id,
- path_type,
- msm_bedais[reg].sample_rate,
- channels,
- topology,
- fe_dai_perf_mode[val][session_type],
- bits_per_sample);
- } else
- adm_open(msm_bedais[reg].port_id,
- path_type,
- msm_bedais[reg].sample_rate, channels,
- topology, false, bits_per_sample);
- if (session_type == SESSION_TYPE_RX &&
- fdai->event_info.event_func)
- fdai->event_info.event_func(
- MSM_PCM_RT_EVT_DEVSWITCH,
- fdai->event_info.priv_data);
- msm_pcm_routing_build_matrix(val,
- fdai->strm_id, path_type,
- fe_dai_perf_mode[val][session_type]);
- port_id = srs_port_id = msm_bedais[reg].port_id;
- srs_send_params(srs_port_id, 1, 0);
- if ((DOLBY_ADM_COPP_TOPOLOGY_ID == topology) &&
- (fe_dai_perf_mode[val][session_type] ==
- LEGACY_PCM_MODE))
- if (dolby_dap_init(port_id, channels) < 0)
- pr_err("%s: Err init dolby dap\n",
- __func__);
- }
- } else {
- if (test_bit(val, &msm_bedais[reg].fe_sessions) &&
- ((msm_bedais[reg].port_id == VOICE_PLAYBACK_TX) ||
- (msm_bedais[reg].port_id == VOICE2_PLAYBACK_TX)))
- voc_start_playback(set, msm_bedais[reg].port_id);
- clear_bit(val, &msm_bedais[reg].fe_sessions);
- fdai = &fe_dai_map[val][session_type];
- if (msm_bedais[reg].active && fdai->strm_id !=
- INVALID_SESSION) {
- adm_close(msm_bedais[reg].port_id,
- fe_dai_perf_mode[val][session_type]);
- if ((DOLBY_ADM_COPP_TOPOLOGY_ID == topology) &&
- (fe_dai_perf_mode[val][session_type] ==
- LEGACY_PCM_MODE))
- dolby_dap_deinit(msm_bedais[reg].port_id);
- msm_pcm_routing_build_matrix(val,
- fdai->strm_id, path_type,
- fe_dai_perf_mode[val][session_type]);
- }
- }
- if ((msm_bedais[reg].port_id == VOICE_RECORD_RX)
- || (msm_bedais[reg].port_id == VOICE_RECORD_TX))
- voc_start_record(msm_bedais[reg].port_id, set, voc_session_id);
- mutex_unlock(&routing_lock);
- }
- static int msm_routing_get_audio_mixer(struct snd_kcontrol *kcontrol,
- struct snd_ctl_elem_value *ucontrol)
- {
- struct soc_mixer_control *mc =
- (struct soc_mixer_control *)kcontrol->private_value;
- if (test_bit(mc->shift, &msm_bedais[mc->reg].fe_sessions))
- ucontrol->value.integer.value[0] = 1;
- else
- ucontrol->value.integer.value[0] = 0;
- pr_debug("%s: reg %x shift %x val %ld\n", __func__, mc->reg, mc->shift,
- ucontrol->value.integer.value[0]);
- return 0;
- }
- static int msm_routing_put_audio_mixer(struct snd_kcontrol *kcontrol,
- struct snd_ctl_elem_value *ucontrol)
- {
- struct snd_soc_dapm_widget_list *wlist = snd_kcontrol_chip(kcontrol);
- struct snd_soc_dapm_widget *widget = wlist->widgets[0];
- struct soc_mixer_control *mc =
- (struct soc_mixer_control *)kcontrol->private_value;
- if (ucontrol->value.integer.value[0] &&
- msm_pcm_routing_route_is_set(mc->reg, mc->shift) == false) {
- msm_pcm_routing_process_audio(mc->reg, mc->shift, 1);
- snd_soc_dapm_mixer_update_power(widget, kcontrol, 1);
- } else if (!ucontrol->value.integer.value[0] &&
- msm_pcm_routing_route_is_set(mc->reg, mc->shift) == true) {
- msm_pcm_routing_process_audio(mc->reg, mc->shift, 0);
- snd_soc_dapm_mixer_update_power(widget, kcontrol, 0);
- }
- return 1;
- }
- static void msm_pcm_routing_process_voice(u16 reg, u16 val, int set)
- {
- u32 session_id = 0;
- pr_debug("%s: reg %x val %x set %x\n", __func__, reg, val, set);
- if (val == MSM_FRONTEND_DAI_CS_VOICE)
- session_id = voc_get_session_id(VOICE_SESSION_NAME);
- else if (val == MSM_FRONTEND_DAI_VOLTE)
- session_id = voc_get_session_id(VOLTE_SESSION_NAME);
- else if (val == MSM_FRONTEND_DAI_VOWLAN)
- session_id = voc_get_session_id(VOWLAN_SESSION_NAME);
- else if (val == MSM_FRONTEND_DAI_VOICE2)
- session_id = voc_get_session_id(VOICE2_SESSION_NAME);
- else if (val == MSM_FRONTEND_DAI_QCHAT)
- session_id = voc_get_session_id(QCHAT_SESSION_NAME);
- else
- session_id = voc_get_session_id(VOIP_SESSION_NAME);
- pr_debug("%s: FE DAI 0x%x session_id 0x%x\n",
- __func__, val, session_id);
- mutex_lock(&routing_lock);
- if (set)
- set_bit(val, &msm_bedais[reg].fe_sessions);
- else
- clear_bit(val, &msm_bedais[reg].fe_sessions);
- if (val == MSM_FRONTEND_DAI_DTMF_RX &&
- afe_get_port_type(msm_bedais[reg].port_id) ==
- MSM_AFE_PORT_TYPE_RX) {
- pr_debug("%s(): set=%d port id=0x%x for dtmf generation\n",
- __func__, set, msm_bedais[reg].port_id);
- afe_set_dtmf_gen_rx_portid(msm_bedais[reg].port_id, set);
- }
- mutex_unlock(&routing_lock);
- if (afe_get_port_type(msm_bedais[reg].port_id) ==
- MSM_AFE_PORT_TYPE_RX) {
- voc_set_route_flag(session_id, RX_PATH, set);
- if (set) {
- voc_set_rxtx_port(session_id,
- msm_bedais[reg].port_id, DEV_RX);
- if (voc_get_route_flag(session_id, RX_PATH) &&
- voc_get_route_flag(session_id, TX_PATH))
- voc_enable_device(session_id);
- } else {
- voc_disable_device(session_id);
- }
- } else {
- voc_set_route_flag(session_id, TX_PATH, set);
- if (set) {
- voc_set_rxtx_port(session_id,
- msm_bedais[reg].port_id, DEV_TX);
- if (voc_get_route_flag(session_id, RX_PATH) &&
- voc_get_route_flag(session_id, TX_PATH))
- voc_enable_device(session_id);
-
- } else {
- voc_disable_device(session_id);
- }
- }
- }
- static int msm_routing_get_voice_mixer(struct snd_kcontrol *kcontrol,
- struct snd_ctl_elem_value *ucontrol)
- {
- struct soc_mixer_control *mc =
- (struct soc_mixer_control *)kcontrol->private_value;
- mutex_lock(&routing_lock);
- if (test_bit(mc->shift, &msm_bedais[mc->reg].fe_sessions))
- ucontrol->value.integer.value[0] = 1;
- else
- ucontrol->value.integer.value[0] = 0;
- mutex_unlock(&routing_lock);
- pr_debug("%s: reg %x shift %x val %ld\n", __func__, mc->reg, mc->shift,
- ucontrol->value.integer.value[0]);
- return 0;
- }
- static int msm_routing_put_voice_mixer(struct snd_kcontrol *kcontrol,
- struct snd_ctl_elem_value *ucontrol)
- {
- struct snd_soc_dapm_widget_list *wlist = snd_kcontrol_chip(kcontrol);
- struct snd_soc_dapm_widget *widget = wlist->widgets[0];
- struct soc_mixer_control *mc =
- (struct soc_mixer_control *)kcontrol->private_value;
- if (ucontrol->value.integer.value[0]) {
- msm_pcm_routing_process_voice(mc->reg, mc->shift, 1);
- snd_soc_dapm_mixer_update_power(widget, kcontrol, 1);
- } else {
- msm_pcm_routing_process_voice(mc->reg, mc->shift, 0);
- snd_soc_dapm_mixer_update_power(widget, kcontrol, 0);
- }
- return 1;
- }
- static int msm_routing_get_voice_stub_mixer(struct snd_kcontrol *kcontrol,
- struct snd_ctl_elem_value *ucontrol)
- {
- struct soc_mixer_control *mc =
- (struct soc_mixer_control *)kcontrol->private_value;
- mutex_lock(&routing_lock);
- if (test_bit(mc->shift, &msm_bedais[mc->reg].fe_sessions))
- ucontrol->value.integer.value[0] = 1;
- else
- ucontrol->value.integer.value[0] = 0;
- mutex_unlock(&routing_lock);
- pr_debug("%s: reg %x shift %x val %ld\n", __func__, mc->reg, mc->shift,
- ucontrol->value.integer.value[0]);
- return 0;
- }
- static int msm_routing_put_voice_stub_mixer(struct snd_kcontrol *kcontrol,
- struct snd_ctl_elem_value *ucontrol)
- {
- struct snd_soc_dapm_widget_list *wlist = snd_kcontrol_chip(kcontrol);
- struct snd_soc_dapm_widget *widget = wlist->widgets[0];
- struct soc_mixer_control *mc =
- (struct soc_mixer_control *)kcontrol->private_value;
- if (ucontrol->value.integer.value[0]) {
- mutex_lock(&routing_lock);
- set_bit(mc->shift, &msm_bedais[mc->reg].fe_sessions);
- mutex_unlock(&routing_lock);
- snd_soc_dapm_mixer_update_power(widget, kcontrol, 1);
- } else {
- mutex_lock(&routing_lock);
- clear_bit(mc->shift, &msm_bedais[mc->reg].fe_sessions);
- mutex_unlock(&routing_lock);
- snd_soc_dapm_mixer_update_power(widget, kcontrol, 0);
- }
- pr_debug("%s: reg %x shift %x val %ld\n", __func__, mc->reg, mc->shift,
- ucontrol->value.integer.value[0]);
- return 1;
- }
- static int msm_routing_get_switch_mixer(struct snd_kcontrol *kcontrol,
- struct snd_ctl_elem_value *ucontrol)
- {
- ucontrol->value.integer.value[0] = fm_switch_enable;
- pr_debug("%s: FM Switch enable %ld\n", __func__,
- ucontrol->value.integer.value[0]);
- return 0;
- }
- static int msm_routing_put_switch_mixer(struct snd_kcontrol *kcontrol,
- struct snd_ctl_elem_value *ucontrol)
- {
- struct snd_soc_dapm_widget_list *wlist = snd_kcontrol_chip(kcontrol);
- struct snd_soc_dapm_widget *widget = wlist->widgets[0];
- pr_debug("%s: FM Switch enable %ld\n", __func__,
- ucontrol->value.integer.value[0]);
- if (ucontrol->value.integer.value[0])
- snd_soc_dapm_mixer_update_power(widget, kcontrol, 1);
- else
- snd_soc_dapm_mixer_update_power(widget, kcontrol, 0);
- fm_switch_enable = ucontrol->value.integer.value[0];
- return 1;
- }
- static int msm_routing_get_fm_pcmrx_switch_mixer(struct snd_kcontrol *kcontrol,
- struct snd_ctl_elem_value *ucontrol)
- {
- ucontrol->value.integer.value[0] = fm_pcmrx_switch_enable;
- pr_debug("%s: FM Switch enable %ld\n", __func__,
- ucontrol->value.integer.value[0]);
- return 0;
- }
- static int msm_routing_put_fm_pcmrx_switch_mixer(struct snd_kcontrol *kcontrol,
- struct snd_ctl_elem_value *ucontrol)
- {
- struct snd_soc_dapm_widget_list *wlist = snd_kcontrol_chip(kcontrol);
- struct snd_soc_dapm_widget *widget = wlist->widgets[0];
- pr_debug("%s: FM Switch enable %ld\n", __func__,
- ucontrol->value.integer.value[0]);
- if (ucontrol->value.integer.value[0])
- snd_soc_dapm_mixer_update_power(widget, kcontrol, 1);
- else
- snd_soc_dapm_mixer_update_power(widget, kcontrol, 0);
- fm_pcmrx_switch_enable = ucontrol->value.integer.value[0];
- return 1;
- }
- static int msm_routing_lsm_mux_get(struct snd_kcontrol *kcontrol,
- struct snd_ctl_elem_value *ucontrol)
- {
- ucontrol->value.integer.value[0] = lsm_mux_slim_port;
- return 0;
- }
- static int msm_routing_lsm_mux_put(struct snd_kcontrol *kcontrol,
- struct snd_ctl_elem_value *ucontrol)
- {
- struct snd_soc_dapm_widget_list *wlist = snd_kcontrol_chip(kcontrol);
- struct snd_soc_dapm_widget *widget = wlist->widgets[0];
- struct soc_enum *e = (struct soc_enum *)kcontrol->private_value;
- int mux = ucontrol->value.enumerated.item[0];
- pr_debug("%s: LSM enable %ld\n", __func__,
- ucontrol->value.integer.value[0]);
- if (ucontrol->value.integer.value[0]) {
- lsm_mux_slim_port = ucontrol->value.integer.value[0];
- snd_soc_dapm_mux_update_power(widget, kcontrol, 1, mux, e);
- } else {
- snd_soc_dapm_mux_update_power(widget, kcontrol, 1, mux, e);
- lsm_mux_slim_port = ucontrol->value.integer.value[0];
- }
- return 0;
- }
- static int msm_routing_lsm_func_get(struct snd_kcontrol *kcontrol,
- struct snd_ctl_elem_value *ucontrol)
- {
- int i;
- u16 port_id;
- enum afe_mad_type mad_type;
- pr_debug("%s: enter\n", __func__);
- for (i = 0; i < ARRAY_SIZE(mad_audio_mux_text); i++)
- if (!strncmp(kcontrol->id.name, mad_audio_mux_text[i],
- strlen(mad_audio_mux_text[i])))
- break;
- if (i-- == ARRAY_SIZE(mad_audio_mux_text)) {
- WARN(1, "Invalid id name %s\n", kcontrol->id.name);
- return -EINVAL;
- }
- port_id = i * 2 + 1 + SLIMBUS_0_RX;
- mad_type = afe_port_get_mad_type(port_id);
- pr_debug("%s: port_id 0x%x, mad_type %d\n", __func__, port_id,
- mad_type);
- switch (mad_type) {
- case MAD_HW_NONE:
- ucontrol->value.integer.value[0] = MADNONE;
- break;
- case MAD_HW_AUDIO:
- ucontrol->value.integer.value[0] = MADAUDIO;
- break;
- case MAD_HW_BEACON:
- ucontrol->value.integer.value[0] = MADBEACON;
- break;
- case MAD_HW_ULTRASOUND:
- ucontrol->value.integer.value[0] = MADULTRASOUND;
- break;
- case MAD_SW_AUDIO:
- ucontrol->value.integer.value[0] = MADSWAUDIO;
- break;
- default:
- WARN(1, "Unknown\n");
- return -EINVAL;
- }
- return 0;
- }
- static int msm_routing_lsm_func_put(struct snd_kcontrol *kcontrol,
- struct snd_ctl_elem_value *ucontrol)
- {
- int i;
- u16 port_id;
- enum afe_mad_type mad_type;
- pr_debug("%s: enter\n", __func__);
- for (i = 0; i < ARRAY_SIZE(mad_audio_mux_text); i++)
- if (!strncmp(kcontrol->id.name, mad_audio_mux_text[i],
- strlen(mad_audio_mux_text[i])))
- break;
- if (i-- == ARRAY_SIZE(mad_audio_mux_text)) {
- WARN(1, "Invalid id name %s\n", kcontrol->id.name);
- return -EINVAL;
- }
- port_id = i * 2 + 1 + SLIMBUS_0_RX;
- switch (ucontrol->value.integer.value[0]) {
- case MADNONE:
- mad_type = MAD_HW_NONE;
- break;
- case MADAUDIO:
- mad_type = MAD_HW_AUDIO;
- break;
- case MADBEACON:
- mad_type = MAD_HW_BEACON;
- break;
- case MADULTRASOUND:
- mad_type = MAD_HW_ULTRASOUND;
- break;
- case MADSWAUDIO:
- mad_type = MAD_SW_AUDIO;
- break;
- default:
- WARN(1, "Unknown\n");
- return -EINVAL;
- }
- pr_debug("%s: port_id 0x%x, mad_type %d\n", __func__, port_id,
- mad_type);
- return afe_port_set_mad_type(port_id, mad_type);
- }
- static int msm_routing_slim_0_rx_aanc_mux_get(struct snd_kcontrol *kcontrol,
- struct snd_ctl_elem_value *ucontrol)
- {
- mutex_lock(&routing_lock);
- ucontrol->value.integer.value[0] = slim0_rx_aanc_fb_port;
- mutex_unlock(&routing_lock);
- pr_debug("%s: AANC Mux Port %ld\n", __func__,
- ucontrol->value.integer.value[0]);
- return 0;
- };
- static int msm_routing_slim_0_rx_aanc_mux_put(struct snd_kcontrol *kcontrol,
- struct snd_ctl_elem_value *ucontrol)
- {
- struct aanc_data aanc_info;
- mutex_lock(&routing_lock);
- memset(&aanc_info, 0x00, sizeof(aanc_info));
- pr_debug("%s: AANC Mux Port %ld\n", __func__,
- ucontrol->value.integer.value[0]);
- slim0_rx_aanc_fb_port = ucontrol->value.integer.value[0];
- if (ucontrol->value.integer.value[0] == 0) {
- aanc_info.aanc_active = false;
- aanc_info.aanc_tx_port = 0;
- aanc_info.aanc_rx_port = 0;
- } else {
- aanc_info.aanc_active = true;
- aanc_info.aanc_rx_port = SLIMBUS_0_RX;
- aanc_info.aanc_tx_port =
- (SLIMBUS_0_RX - 1 + (slim0_rx_aanc_fb_port * 2));
- }
- afe_set_aanc_info(&aanc_info);
- mutex_unlock(&routing_lock);
- return 0;
- };
- static int msm_routing_get_port_mixer(struct snd_kcontrol *kcontrol,
- struct snd_ctl_elem_value *ucontrol)
- {
- struct soc_mixer_control *mc =
- (struct soc_mixer_control *)kcontrol->private_value;
- if (test_bit(mc->shift,
- (unsigned long *)&msm_bedais[mc->reg].port_sessions))
- ucontrol->value.integer.value[0] = 1;
- else
- ucontrol->value.integer.value[0] = 0;
- pr_debug("%s: reg %x shift %x val %ld\n", __func__, mc->reg, mc->shift,
- ucontrol->value.integer.value[0]);
- return 0;
- }
- static int msm_routing_put_port_mixer(struct snd_kcontrol *kcontrol,
- struct snd_ctl_elem_value *ucontrol)
- {
- struct soc_mixer_control *mc =
- (struct soc_mixer_control *)kcontrol->private_value;
- pr_debug("%s: reg 0x%x shift 0x%x val %ld\n", __func__, mc->reg,
- mc->shift, ucontrol->value.integer.value[0]);
- if (ucontrol->value.integer.value[0]) {
- afe_loopback(1, msm_bedais[mc->reg].port_id,
- msm_bedais[mc->shift].port_id);
- set_bit(mc->shift,
- (unsigned long *)&msm_bedais[mc->reg].port_sessions);
- } else {
- afe_loopback(0, msm_bedais[mc->reg].port_id,
- msm_bedais[mc->shift].port_id);
- clear_bit(mc->shift,
- (unsigned long *)&msm_bedais[mc->reg].port_sessions);
- }
- return 1;
- }
- static int msm_routing_get_fm_vol_mixer(struct snd_kcontrol *kcontrol,
- struct snd_ctl_elem_value *ucontrol)
- {
- ucontrol->value.integer.value[0] = msm_route_fm_vol_control;
- return 0;
- }
- static int msm_routing_set_fm_vol_mixer(struct snd_kcontrol *kcontrol,
- struct snd_ctl_elem_value *ucontrol)
- {
- afe_loopback_gain(INT_FM_TX , ucontrol->value.integer.value[0]);
- msm_route_fm_vol_control = ucontrol->value.integer.value[0];
- return 0;
- }
- static int msm_routing_get_hfp_vol_mixer(struct snd_kcontrol *kcontrol,
- struct snd_ctl_elem_value *ucontrol)
- {
- ucontrol->value.integer.value[0] = msm_route_hfp_vol_control;
- return 0;
- }
- static int msm_routing_set_hfp_vol_mixer(struct snd_kcontrol *kcontrol,
- struct snd_ctl_elem_value *ucontrol)
- {
- afe_loopback_gain(INT_BT_SCO_TX , ucontrol->value.integer.value[0]);
- msm_route_hfp_vol_control = ucontrol->value.integer.value[0];
- return 0;
- }
- static int msm_routing_get_multimedia2_vol_mixer(struct snd_kcontrol *kcontrol,
- struct snd_ctl_elem_value *ucontrol)
- {
- ucontrol->value.integer.value[0] = msm_route_multimedia2_vol_control;
- return 0;
- }
- static int msm_routing_get_multimedia5_vol_mixer(struct snd_kcontrol *kcontrol,
- struct snd_ctl_elem_value *ucontrol)
- {
- ucontrol->value.integer.value[0] = msm_route_multimedia5_vol_control;
- return 0;
- }
- static int msm_routing_set_multimedia5_vol_mixer(struct snd_kcontrol *kcontrol,
- struct snd_ctl_elem_value *ucontrol)
- {
- if (!multi_ch_pcm_set_volume(ucontrol->value.integer.value[0]))
- msm_route_multimedia5_vol_control =
- ucontrol->value.integer.value[0];
- return 0;
- }
- static int msm_routing_set_multimedia2_vol_mixer(struct snd_kcontrol *kcontrol,
- struct snd_ctl_elem_value *ucontrol)
- {
- if (!multi_ch_pcm_set_volume(ucontrol->value.integer.value[0]))
- msm_route_multimedia2_vol_control =
- ucontrol->value.integer.value[0];
- return 0;
- }
- static int msm_routing_get_channel_map_mixer(struct snd_kcontrol *kcontrol,
- struct snd_ctl_elem_value *ucontrol)
- {
- char channel_map[PCM_FORMAT_MAX_NUM_CHANNEL] = {0};
- int i;
- adm_get_multi_ch_map(channel_map);
- for (i = 0; i < PCM_FORMAT_MAX_NUM_CHANNEL; i++)
- ucontrol->value.integer.value[i] = (unsigned) channel_map[i];
- return 0;
- }
- static int msm_routing_put_channel_map_mixer(struct snd_kcontrol *kcontrol,
- struct snd_ctl_elem_value *ucontrol)
- {
- char channel_map[PCM_FORMAT_MAX_NUM_CHANNEL];
- int i;
- for (i = 0; i < PCM_FORMAT_MAX_NUM_CHANNEL; i++)
- channel_map[i] = (char)(ucontrol->value.integer.value[i]);
- adm_set_multi_ch_map(channel_map);
- return 0;
- }
- static int msm_routing_get_srs_trumedia_control(struct snd_kcontrol *kcontrol,
- struct snd_ctl_elem_value *ucontrol)
- {
- ucontrol->value.integer.value[0] = 0;
- return 0;
- }
- static int msm_routing_set_srs_trumedia_control_(struct snd_kcontrol *kcontrol,
- struct snd_ctl_elem_value *ucontrol)
- {
- unsigned int techs = 0;
- unsigned short offset, value, max, index;
- srs_alsa_ctrl_ever_called = 1;
- max = sizeof(msm_srs_trumedia_params) >> 1;
- index = (unsigned short)((ucontrol->value.integer.value[0] &
- SRS_PARAM_INDEX_MASK) >> 31);
- if (SRS_CMD_UPLOAD ==
- (ucontrol->value.integer.value[0] & SRS_CMD_UPLOAD)) {
- techs = ucontrol->value.integer.value[0] & 0xFF;
- pr_debug("SRS %s: send params request, flags = %u",
- __func__, techs);
- if (srs_port_id >= 0 && techs)
- srs_send_params(srs_port_id, techs, index);
- return 0;
- }
- offset = (unsigned short)((ucontrol->value.integer.value[0] &
- SRS_PARAM_OFFSET_MASK) >> 16);
- value = (unsigned short)(ucontrol->value.integer.value[0] &
- SRS_PARAM_VALUE_MASK);
- if ((offset < max) && (index < SRS_TRUMEDIA_INDEX)) {
- msm_srs_trumedia_params[index].raw_params[offset] = value;
- pr_debug("SRS %s: index set... (max %d, requested %d, val %d, paramblockidx %d)",
- __func__, max, offset, value, index);
- } else {
- pr_err("SRS %s: index out of bounds! (max %d, requested %d)",
- __func__, max, offset);
- }
- if (offset == 4) {
- int i;
- for (i = 0; i < max; i++) {
- if (i == 0) {
- pr_debug("SRS %s: global block start",
- __func__);
- }
- if (i ==
- (sizeof(struct srs_trumedia_params_GLOBAL) >> 1)) {
- pr_debug("SRS %s: wowhd block start at offset %d word offset %d",
- __func__, i, i>>1);
- break;
- }
- pr_debug("SRS %s: param_index %d index %d val %d",
- __func__, index, i,
- msm_srs_trumedia_params[index].raw_params[i]);
- }
- }
- return 0;
- }
- static int msm_routing_set_srs_trumedia_control(struct snd_kcontrol *kcontrol,
- struct snd_ctl_elem_value *ucontrol) {
- int ret;
- pr_debug("SRS control normal called");
- mutex_lock(&routing_lock);
- srs_port_id = SLIMBUS_0_RX;
- ret = msm_routing_set_srs_trumedia_control_(kcontrol, ucontrol);
- mutex_unlock(&routing_lock);
- return ret;
- }
- static int msm_routing_set_srs_trumedia_control_I2S(
- struct snd_kcontrol *kcontrol,
- struct snd_ctl_elem_value *ucontrol) {
- int ret;
- pr_debug("SRS control I2S called");
- mutex_lock(&routing_lock);
- srs_port_id = PRIMARY_I2S_RX;
- ret = msm_routing_set_srs_trumedia_control_(kcontrol, ucontrol);
- mutex_unlock(&routing_lock);
- return ret;
- }
- static int msm_routing_set_srs_trumedia_control_HDMI(
- struct snd_kcontrol *kcontrol,
- struct snd_ctl_elem_value *ucontrol) {
- int ret;
- pr_debug("SRS control HDMI called");
- mutex_lock(&routing_lock);
- srs_port_id = HDMI_RX;
- ret = msm_routing_set_srs_trumedia_control_(kcontrol, ucontrol);
- mutex_unlock(&routing_lock);
- return ret;
- }
- static void msm_send_eq_values(int eq_idx)
- {
- int result;
- struct audio_client *ac = q6asm_get_audio_client(
- fe_dai_map[eq_idx][SESSION_TYPE_RX].strm_id);
- if (ac == NULL) {
- pr_err("%s: Could not get audio client for session: %d\n",
- __func__, fe_dai_map[eq_idx][SESSION_TYPE_RX].strm_id);
- goto done;
- }
- result = q6asm_equalizer(ac, &eq_data[eq_idx]);
- if (result < 0)
- pr_err("%s: Call to ASM equalizer failed, returned = %d\n",
- __func__, result);
- done:
- return;
- }
- static int msm_routing_get_eq_enable_mixer(struct snd_kcontrol *kcontrol,
- struct snd_ctl_elem_value *ucontrol)
- {
- int eq_idx = ((struct soc_multi_mixer_control *)
- kcontrol->private_value)->reg;
- ucontrol->value.integer.value[0] = eq_data[eq_idx].enable;
- pr_debug("%s: EQ #%d enable %d\n", __func__,
- eq_idx, eq_data[eq_idx].enable);
- return 0;
- }
- static int msm_routing_put_eq_enable_mixer(struct snd_kcontrol *kcontrol,
- struct snd_ctl_elem_value *ucontrol)
- {
- int eq_idx = ((struct soc_multi_mixer_control *)
- kcontrol->private_value)->reg;
- int value = ucontrol->value.integer.value[0];
- pr_debug("%s: EQ #%d enable %d\n", __func__,
- eq_idx, value);
- eq_data[eq_idx].enable = value;
- msm_send_eq_values(eq_idx);
- return 0;
- }
- static int msm_routing_get_eq_band_count_audio_mixer(
- struct snd_kcontrol *kcontrol,
- struct snd_ctl_elem_value *ucontrol)
- {
- int eq_idx = ((struct soc_multi_mixer_control *)
- kcontrol->private_value)->reg;
- ucontrol->value.integer.value[0] = eq_data[eq_idx].num_bands;
- pr_debug("%s: EQ #%d bands %d\n", __func__,
- eq_idx, eq_data[eq_idx].num_bands);
- return eq_data[eq_idx].num_bands;
- }
- static int msm_routing_put_eq_band_count_audio_mixer(
- struct snd_kcontrol *kcontrol,
- struct snd_ctl_elem_value *ucontrol)
- {
- int eq_idx = ((struct soc_multi_mixer_control *)
- kcontrol->private_value)->reg;
- int value = ucontrol->value.integer.value[0];
- pr_debug("%s: EQ #%d bands %d\n", __func__,
- eq_idx, value);
- eq_data[eq_idx].num_bands = value;
- return 0;
- }
- static int msm_routing_get_eq_band_audio_mixer(struct snd_kcontrol *kcontrol,
- struct snd_ctl_elem_value *ucontrol)
- {
- int eq_idx = ((struct soc_multi_mixer_control *)
- kcontrol->private_value)->reg;
- int band_idx = ((struct soc_multi_mixer_control *)
- kcontrol->private_value)->shift;
- ucontrol->value.integer.value[0] =
- eq_data[eq_idx].eq_bands[band_idx].band_idx;
- ucontrol->value.integer.value[1] =
- eq_data[eq_idx].eq_bands[band_idx].filter_type;
- ucontrol->value.integer.value[2] =
- eq_data[eq_idx].eq_bands[band_idx].center_freq_hz;
- ucontrol->value.integer.value[3] =
- eq_data[eq_idx].eq_bands[band_idx].filter_gain;
- ucontrol->value.integer.value[4] =
- eq_data[eq_idx].eq_bands[band_idx].q_factor;
- pr_debug("%s: band_idx = %d\n", __func__,
- eq_data[eq_idx].eq_bands[band_idx].band_idx);
- pr_debug("%s: filter_type = %d\n", __func__,
- eq_data[eq_idx].eq_bands[band_idx].filter_type);
- pr_debug("%s: center_freq_hz = %d\n", __func__,
- eq_data[eq_idx].eq_bands[band_idx].center_freq_hz);
- pr_debug("%s: filter_gain = %d\n", __func__,
- eq_data[eq_idx].eq_bands[band_idx].filter_gain);
- pr_debug("%s: q_factor = %d\n", __func__,
- eq_data[eq_idx].eq_bands[band_idx].q_factor);
- return 0;
- }
- static int msm_routing_put_eq_band_audio_mixer(struct snd_kcontrol *kcontrol,
- struct snd_ctl_elem_value *ucontrol)
- {
- int eq_idx = ((struct soc_multi_mixer_control *)
- kcontrol->private_value)->reg;
- int band_idx = ((struct soc_multi_mixer_control *)
- kcontrol->private_value)->shift;
- eq_data[eq_idx].eq_bands[band_idx].band_idx =
- ucontrol->value.integer.value[0];
- eq_data[eq_idx].eq_bands[band_idx].filter_type =
- ucontrol->value.integer.value[1];
- eq_data[eq_idx].eq_bands[band_idx].center_freq_hz =
- ucontrol->value.integer.value[2];
- eq_data[eq_idx].eq_bands[band_idx].filter_gain =
- ucontrol->value.integer.value[3];
- eq_data[eq_idx].eq_bands[band_idx].q_factor =
- ucontrol->value.integer.value[4];
- return 0;
- }
- static int msm_sec_sa_get(struct snd_kcontrol *kcontrol,
- struct snd_ctl_elem_value *ucontrol)
- {
- return 0;
- }
- static int msm_sec_vsp_get(struct snd_kcontrol *kcontrol,
- struct snd_ctl_elem_value *ucontrol)
- {
- return 0;
- }
- static int msm_sec_dha_get(struct snd_kcontrol *kcontrol,
- struct snd_ctl_elem_value *ucontrol)
- {
- return 0;
- }
- static int msm_sec_sa_ep_get(struct snd_kcontrol *kcontrol,
- struct snd_ctl_elem_value *ucontrol)
- {
- struct audio_client *ac;
- mutex_lock(&routing_lock);
- ac = q6asm_get_audio_client(fe_dai_map[3][SESSION_TYPE_RX].strm_id);
- pr_info("%s: sa_ep ret=%d score=%d", __func__, q6asm_get_sa_ep(ac), score);
- ucontrol->value.integer.value[0] = score;
- mutex_unlock(&routing_lock);
- return 0;
- }
- static int msm_sec_lrsm_get(struct snd_kcontrol *kcontrol,
- struct snd_ctl_elem_value *ucontrol)
- {
- return 0;
- }
- static int msm_sec_msp_get(struct snd_kcontrol *kcontrol,
- struct snd_ctl_elem_value *ucontrol)
- {
- return 0;
- }
- static int msm_sec_sa_put(struct snd_kcontrol *kcontrol,
- struct snd_ctl_elem_value *ucontrol)
- {
- int ret = 0;
- struct audio_client *ac;
- mutex_lock(&routing_lock);
- ac = q6asm_get_audio_client(fe_dai_map[3][SESSION_TYPE_RX].strm_id);
- ret = q6asm_set_sa(ac,(int*)ucontrol->value.integer.value);
- mutex_unlock(&routing_lock);
- return ret;
- }
- static int msm_sec_vsp_put(struct snd_kcontrol *kcontrol,
- struct snd_ctl_elem_value *ucontrol)
- {
- int ret = 0;
- struct audio_client *ac;
- mutex_lock(&routing_lock);
- ac = q6asm_get_audio_client(fe_dai_map[3][SESSION_TYPE_RX].strm_id);
- ret = q6asm_set_vsp(ac,(int*)ucontrol->value.integer.value);
- mutex_unlock(&routing_lock);
- return ret;
- }
- static int msm_sec_dha_put(struct snd_kcontrol *kcontrol,
- struct snd_ctl_elem_value *ucontrol)
- {
- int ret = 0;
- struct audio_client *ac;
- mutex_lock(&routing_lock);
- ac = q6asm_get_audio_client(fe_dai_map[3][SESSION_TYPE_RX].strm_id);
- ret = q6asm_set_dha(ac,(int*)ucontrol->value.integer.value);
- mutex_unlock(&routing_lock);
- return ret;
- }
- static int msm_sec_lrsm_put(struct snd_kcontrol *kcontrol,
- struct snd_ctl_elem_value *ucontrol)
- {
- int ret = 0;
- struct audio_client *ac;
- mutex_lock(&routing_lock);
- ac = q6asm_get_audio_client(fe_dai_map[3][SESSION_TYPE_RX].strm_id);
- ret = q6asm_set_lrsm(ac,(int*)ucontrol->value.integer.value);
- mutex_unlock(&routing_lock);
- return ret;
- }
- static int msm_sec_sa_ep_put(struct snd_kcontrol *kcontrol,
- struct snd_ctl_elem_value *ucontrol)
- {
- int ret = 0;
- struct audio_client *ac;
- mutex_lock(&routing_lock);
- ac = q6asm_get_audio_client(fe_dai_map[3][SESSION_TYPE_RX].strm_id);
- ret = q6asm_set_sa_ep(ac,(int*)ucontrol->value.integer.value);
- mutex_unlock(&routing_lock);
- return ret;
- }
- static int msm_sec_msp_put(struct snd_kcontrol *kcontrol,
- struct snd_ctl_elem_value *ucontrol)
- {
- int ret = 0;
- struct audio_client *ac;
- mutex_lock(&routing_lock);
- ac = q6asm_get_audio_client(fe_dai_map[3][SESSION_TYPE_RX].strm_id);
- ret = q6asm_set_msp(ac, (long*)ucontrol->value.integer.value);
- mutex_unlock(&routing_lock);
- return ret;
- }
- static int msm_routing_ec_ref_rx_get(struct snd_kcontrol *kcontrol,
- struct snd_ctl_elem_value *ucontrol)
- {
- pr_debug("%s: ec_ref_rx = %d", __func__, msm_route_ec_ref_rx);
- ucontrol->value.integer.value[0] = msm_route_ec_ref_rx;
- return 0;
- }
- static int msm_routing_ec_ref_rx_put(struct snd_kcontrol *kcontrol,
- struct snd_ctl_elem_value *ucontrol)
- {
- int ec_ref_port_id;
- struct snd_soc_dapm_widget_list *wlist = snd_kcontrol_chip(kcontrol);
- struct snd_soc_dapm_widget *widget = wlist->widgets[0];
- int mux = ucontrol->value.enumerated.item[0];
- struct soc_enum *e = (struct soc_enum *)kcontrol->private_value;
- if (mux >= e->max) {
- pr_err("%s: Invalid mux value %d\n", __func__, mux);
- return -EINVAL;
- }
- mutex_lock(&routing_lock);
- switch (ucontrol->value.integer.value[0]) {
- case 0:
- msm_route_ec_ref_rx = 0;
- ec_ref_port_id = AFE_PORT_INVALID;
- break;
- case 1:
- msm_route_ec_ref_rx = 1;
- ec_ref_port_id = SLIMBUS_0_RX;
- break;
- case 2:
- msm_route_ec_ref_rx = 2;
- ec_ref_port_id = AFE_PORT_ID_PRIMARY_MI2S_RX;
- break;
- case 3:
- msm_route_ec_ref_rx = 3;
- ec_ref_port_id = AFE_PORT_ID_PRIMARY_MI2S_TX;
- break;
- case 4:
- msm_route_ec_ref_rx = 4;
- ec_ref_port_id = AFE_PORT_ID_SECONDARY_MI2S_TX;
- break;
- case 5:
- msm_route_ec_ref_rx = 5;
- ec_ref_port_id = AFE_PORT_ID_TERTIARY_MI2S_TX;
- break;
- case 6:
- msm_route_ec_ref_rx = 6;
- ec_ref_port_id = AFE_PORT_ID_QUATERNARY_MI2S_TX;
- break;
- default:
- msm_route_ec_ref_rx = 0; /* NONE */
- pr_err("%s EC ref rx %ld not valid\n",
- __func__, ucontrol->value.integer.value[0]);
- ec_ref_port_id = AFE_PORT_INVALID;
- break;
- }
- adm_ec_ref_rx_id(ec_ref_port_id);
- pr_debug("%s: msm_route_ec_ref_rx = %d\n",
- __func__, msm_route_ec_ref_rx);
- mutex_unlock(&routing_lock);
- snd_soc_dapm_mux_update_power(widget, kcontrol, 1, mux, e);
- return 0;
- }
- static const char *const ec_ref_rx[] = { "None", "SLIM_RX", "I2S_RX",
- "PRI_MI2S_TX",
- "SEC_MI2S_TX", "TERT_MI2S_TX", "QUAT_MI2S_TX", "PROXY_RX"};
- static const struct soc_enum msm_route_ec_ref_rx_enum[] = {
- SOC_ENUM_SINGLE_EXT(8, ec_ref_rx),
- };
- static const struct snd_kcontrol_new ext_ec_ref_mux_ul1 =
- SOC_DAPM_ENUM_EXT("AUDIO_REF_EC_UL1 MUX Mux",
- msm_route_ec_ref_rx_enum[0],
- msm_routing_ec_ref_rx_get, msm_routing_ec_ref_rx_put);
- static const struct snd_kcontrol_new ext_ec_ref_mux_ul2 =
- SOC_DAPM_ENUM_EXT("AUDIO_REF_EC_UL2 MUX Mux",
- msm_route_ec_ref_rx_enum[0],
- msm_routing_ec_ref_rx_get, msm_routing_ec_ref_rx_put);
- static const struct snd_kcontrol_new ext_ec_ref_mux_ul4 =
- SOC_DAPM_ENUM_EXT("AUDIO_REF_EC_UL4 MUX Mux",
- msm_route_ec_ref_rx_enum[0],
- msm_routing_ec_ref_rx_get, msm_routing_ec_ref_rx_put);
- static const struct snd_kcontrol_new ext_ec_ref_mux_ul5 =
- SOC_DAPM_ENUM_EXT("AUDIO_REF_EC_UL5 MUX Mux",
- msm_route_ec_ref_rx_enum[0],
- msm_routing_ec_ref_rx_get, msm_routing_ec_ref_rx_put);
- static const struct snd_kcontrol_new ext_ec_ref_mux_ul6 =
- SOC_DAPM_ENUM_EXT("AUDIO_REF_EC_UL6 MUX Mux",
- msm_route_ec_ref_rx_enum[0],
- msm_routing_ec_ref_rx_get, msm_routing_ec_ref_rx_put);
- static const struct snd_kcontrol_new ext_ec_ref_mux_ul8 =
- SOC_DAPM_ENUM_EXT("AUDIO_REF_EC_UL8 MUX Mux",
- msm_route_ec_ref_rx_enum[0],
- msm_routing_ec_ref_rx_get, msm_routing_ec_ref_rx_put);
- static const struct snd_kcontrol_new ext_ec_ref_mux_ul9 =
- SOC_DAPM_ENUM_EXT("AUDIO_REF_EC_UL9 MUX Mux",
- msm_route_ec_ref_rx_enum[0],
- msm_routing_ec_ref_rx_get, msm_routing_ec_ref_rx_put);
- static int msm_routing_ext_ec_get(struct snd_kcontrol *kcontrol,
- struct snd_ctl_elem_value *ucontrol)
- {
- pr_debug("%s: ext_ec_ref_rx = %x\n", __func__, msm_route_ext_ec_ref);
- mutex_lock(&routing_lock);
- ucontrol->value.integer.value[0] = msm_route_ext_ec_ref;
- mutex_unlock(&routing_lock);
- return 0;
- }
- static int msm_routing_ext_ec_put(struct snd_kcontrol *kcontrol,
- struct snd_ctl_elem_value *ucontrol)
- {
- struct snd_soc_dapm_widget_list *wlist = snd_kcontrol_chip(kcontrol);
- struct snd_soc_dapm_widget *widget = wlist->widgets[0];
- int mux = ucontrol->value.enumerated.item[0];
- struct soc_enum *e = (struct soc_enum *)kcontrol->private_value;
- int ret = 0;
- bool state = false;
- pr_debug("%s: msm_route_ec_ref_rx = %d value = %ld\n",
- __func__, msm_route_ext_ec_ref,
- ucontrol->value.integer.value[0]);
- if (mux >= e->max) {
- pr_err("%s: Invalid mux value %d\n", __func__, mux);
- return -EINVAL;
- }
- mutex_lock(&routing_lock);
- switch (ucontrol->value.integer.value[0]) {
- case EC_PORT_ID_PRIMARY_MI2S_TX:
- msm_route_ext_ec_ref = AFE_PORT_ID_PRIMARY_MI2S_TX;
- state = true;
- break;
- case EC_PORT_ID_SECONDARY_MI2S_TX:
- msm_route_ext_ec_ref = AFE_PORT_ID_SECONDARY_MI2S_TX;
- state = true;
- break;
- case EC_PORT_ID_TERTIARY_MI2S_TX:
- msm_route_ext_ec_ref = AFE_PORT_ID_TERTIARY_MI2S_TX;
- state = true;
- break;
- case EC_PORT_ID_QUATERNARY_MI2S_TX:
- msm_route_ext_ec_ref = AFE_PORT_ID_QUATERNARY_MI2S_TX;
- state = true;
- break;
- default:
- msm_route_ext_ec_ref = AFE_PORT_INVALID;
- break;
- }
- if (!voc_set_ext_ec_ref(msm_route_ext_ec_ref, state)) {
- mutex_unlock(&routing_lock);
- snd_soc_dapm_mux_update_power(widget, kcontrol, 1, mux, e);
- } else {
- ret = -EINVAL;
- mutex_unlock(&routing_lock);
- }
- return ret;
- }
- static const char * const ext_ec_ref_rx[] = {"NONE", "PRI_MI2S_TX",
- "SEC_MI2S_TX", "TERT_MI2S_TX",
- "QUAT_MI2S_TX"};
- static const struct soc_enum msm_route_ext_ec_ref_rx_enum[] = {
- SOC_ENUM_SINGLE_EXT(5, ext_ec_ref_rx),
- };
- static const struct snd_kcontrol_new voc_ext_ec_mux =
- SOC_DAPM_ENUM_EXT("VOC_EXT_EC MUX Mux", msm_route_ext_ec_ref_rx_enum[0],
- msm_routing_ext_ec_get, msm_routing_ext_ec_put);
- static const struct snd_kcontrol_new pri_i2s_rx_mixer_controls[] = {
- SOC_SINGLE_EXT("MultiMedia1", MSM_BACKEND_DAI_PRI_I2S_RX ,
- MSM_FRONTEND_DAI_MULTIMEDIA1, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia2", MSM_BACKEND_DAI_PRI_I2S_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA2, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia3", MSM_BACKEND_DAI_PRI_I2S_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA3, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia4", MSM_BACKEND_DAI_PRI_I2S_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA4, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia5", MSM_BACKEND_DAI_PRI_I2S_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA5, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia6", MSM_BACKEND_DAI_PRI_I2S_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA6, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia7", MSM_BACKEND_DAI_PRI_I2S_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA7, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia8", MSM_BACKEND_DAI_PRI_I2S_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA8, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia9", MSM_BACKEND_DAI_PRI_I2S_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA9, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- };
- static const struct snd_kcontrol_new sec_i2s_rx_mixer_controls[] = {
- SOC_SINGLE_EXT("MultiMedia1", MSM_BACKEND_DAI_SEC_I2S_RX ,
- MSM_FRONTEND_DAI_MULTIMEDIA1, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia2", MSM_BACKEND_DAI_SEC_I2S_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA2, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia3", MSM_BACKEND_DAI_SEC_I2S_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA3, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia4", MSM_BACKEND_DAI_SEC_I2S_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA4, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia5", MSM_BACKEND_DAI_SEC_I2S_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA5, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia6", MSM_BACKEND_DAI_SEC_I2S_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA6, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia7", MSM_BACKEND_DAI_SEC_I2S_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA7, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia8", MSM_BACKEND_DAI_SEC_I2S_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA8, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia9", MSM_BACKEND_DAI_SEC_I2S_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA9, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- };
- static const struct snd_kcontrol_new slimbus_rx_mixer_controls[] = {
- SOC_SINGLE_EXT("MultiMedia1", MSM_BACKEND_DAI_SLIMBUS_0_RX ,
- MSM_FRONTEND_DAI_MULTIMEDIA1, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia2", MSM_BACKEND_DAI_SLIMBUS_0_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA2, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia3", MSM_BACKEND_DAI_SLIMBUS_0_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA3, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia4", MSM_BACKEND_DAI_SLIMBUS_0_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA4, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia5", MSM_BACKEND_DAI_SLIMBUS_0_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA5, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia6", MSM_BACKEND_DAI_SLIMBUS_0_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA6, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia7", MSM_BACKEND_DAI_SLIMBUS_0_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA7, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia8", MSM_BACKEND_DAI_SLIMBUS_0_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA8, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia9", MSM_BACKEND_DAI_SLIMBUS_0_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA9, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- #ifdef CONFIG_JACK_AUDIO
- SOC_SINGLE_EXT("MultiMedia10", MSM_BACKEND_DAI_SLIMBUS_0_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA10, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- #endif
- };
- static const struct snd_kcontrol_new mi2s_rx_mixer_controls[] = {
- SOC_SINGLE_EXT("MultiMedia1", MSM_BACKEND_DAI_MI2S_RX ,
- MSM_FRONTEND_DAI_MULTIMEDIA1, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia2", MSM_BACKEND_DAI_MI2S_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA2, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia3", MSM_BACKEND_DAI_MI2S_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA3, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia4", MSM_BACKEND_DAI_MI2S_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA4, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia5", MSM_BACKEND_DAI_MI2S_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA5, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia6", MSM_BACKEND_DAI_MI2S_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA6, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia7", MSM_BACKEND_DAI_MI2S_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA7, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia8", MSM_BACKEND_DAI_MI2S_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA8, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia9", MSM_BACKEND_DAI_MI2S_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA9, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- };
- static const struct snd_kcontrol_new quaternary_mi2s_rx_mixer_controls[] = {
- SOC_SINGLE_EXT("MultiMedia1", MSM_BACKEND_DAI_QUATERNARY_MI2S_RX ,
- MSM_FRONTEND_DAI_MULTIMEDIA1, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia2", MSM_BACKEND_DAI_QUATERNARY_MI2S_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA2, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia3", MSM_BACKEND_DAI_QUATERNARY_MI2S_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA3, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia4", MSM_BACKEND_DAI_QUATERNARY_MI2S_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA4, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia5", MSM_BACKEND_DAI_QUATERNARY_MI2S_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA5, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia6", MSM_BACKEND_DAI_QUATERNARY_MI2S_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA6, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia7", MSM_BACKEND_DAI_QUATERNARY_MI2S_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA7, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia8", MSM_BACKEND_DAI_QUATERNARY_MI2S_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA8, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia9", MSM_BACKEND_DAI_QUATERNARY_MI2S_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA9, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- };
- static const struct snd_kcontrol_new tertiary_mi2s_rx_mixer_controls[] = {
- SOC_SINGLE_EXT("MultiMedia1", MSM_BACKEND_DAI_TERTIARY_MI2S_RX ,
- MSM_FRONTEND_DAI_MULTIMEDIA1, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia2", MSM_BACKEND_DAI_TERTIARY_MI2S_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA2, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia3", MSM_BACKEND_DAI_TERTIARY_MI2S_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA3, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia4", MSM_BACKEND_DAI_TERTIARY_MI2S_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA4, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia5", MSM_BACKEND_DAI_TERTIARY_MI2S_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA5, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia10", MSM_BACKEND_DAI_TERTIARY_MI2S_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA10, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- };
- static const struct snd_kcontrol_new secondary_mi2s_rx_mixer_controls[] = {
- SOC_SINGLE_EXT("MultiMedia1", MSM_BACKEND_DAI_SECONDARY_MI2S_RX ,
- MSM_FRONTEND_DAI_MULTIMEDIA1, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia2", MSM_BACKEND_DAI_SECONDARY_MI2S_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA2, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia3", MSM_BACKEND_DAI_SECONDARY_MI2S_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA3, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia4", MSM_BACKEND_DAI_SECONDARY_MI2S_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA4, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia5", MSM_BACKEND_DAI_SECONDARY_MI2S_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA5, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia6", MSM_BACKEND_DAI_SECONDARY_MI2S_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA6, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia7", MSM_BACKEND_DAI_SECONDARY_MI2S_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA7, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia8", MSM_BACKEND_DAI_SECONDARY_MI2S_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA8, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia9", MSM_BACKEND_DAI_SECONDARY_MI2S_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA9, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- };
- static const struct snd_kcontrol_new mi2s_hl_mixer_controls[] = {
- SOC_SINGLE_EXT("PRI_MI2S_TX", MSM_BACKEND_DAI_SECONDARY_MI2S_RX,
- MSM_BACKEND_DAI_PRI_MI2S_TX, 1, 0, msm_routing_get_port_mixer,
- msm_routing_put_port_mixer),
- SOC_SINGLE_EXT("INTERNAL_FM_TX", MSM_BACKEND_DAI_SECONDARY_MI2S_RX,
- MSM_BACKEND_DAI_INT_FM_TX, 1, 0, msm_routing_get_port_mixer,
- msm_routing_put_port_mixer),
- };
- static const struct snd_kcontrol_new primary_mi2s_rx_mixer_controls[] = {
- SOC_SINGLE_EXT("MultiMedia1", MSM_BACKEND_DAI_PRI_MI2S_RX ,
- MSM_FRONTEND_DAI_MULTIMEDIA1, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia2", MSM_BACKEND_DAI_PRI_MI2S_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA2, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia3", MSM_BACKEND_DAI_PRI_MI2S_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA3, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia4", MSM_BACKEND_DAI_PRI_MI2S_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA4, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia5", MSM_BACKEND_DAI_PRI_MI2S_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA5, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia6", MSM_BACKEND_DAI_PRI_MI2S_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA6, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia7", MSM_BACKEND_DAI_PRI_MI2S_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA7, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia8", MSM_BACKEND_DAI_PRI_MI2S_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA8, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia9", MSM_BACKEND_DAI_PRI_MI2S_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA9, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- };
- static const struct snd_kcontrol_new hdmi_mixer_controls[] = {
- SOC_SINGLE_EXT("MultiMedia1", MSM_BACKEND_DAI_HDMI_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA1, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia2", MSM_BACKEND_DAI_HDMI_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA2, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia3", MSM_BACKEND_DAI_HDMI_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA3, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia4", MSM_BACKEND_DAI_HDMI_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA4, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia5", MSM_BACKEND_DAI_HDMI_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA5, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia6", MSM_BACKEND_DAI_HDMI_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA6, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia7", MSM_BACKEND_DAI_HDMI_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA7, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia8", MSM_BACKEND_DAI_HDMI_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA8, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia9", MSM_BACKEND_DAI_HDMI_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA9, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- };
- /* incall music delivery mixer */
- static const struct snd_kcontrol_new incall_music_delivery_mixer_controls[] = {
- SOC_SINGLE_EXT("MultiMedia1", MSM_BACKEND_DAI_VOICE_PLAYBACK_TX,
- MSM_FRONTEND_DAI_MULTIMEDIA1, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia2", MSM_BACKEND_DAI_VOICE_PLAYBACK_TX,
- MSM_FRONTEND_DAI_MULTIMEDIA2, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia5", MSM_BACKEND_DAI_VOICE_PLAYBACK_TX,
- MSM_FRONTEND_DAI_MULTIMEDIA5, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia9", MSM_BACKEND_DAI_VOICE_PLAYBACK_TX,
- MSM_FRONTEND_DAI_MULTIMEDIA9, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- };
- static const struct snd_kcontrol_new incall_music2_delivery_mixer_controls[] = {
- SOC_SINGLE_EXT("MultiMedia1", MSM_BACKEND_DAI_VOICE2_PLAYBACK_TX,
- MSM_FRONTEND_DAI_MULTIMEDIA1, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia2", MSM_BACKEND_DAI_VOICE2_PLAYBACK_TX,
- MSM_FRONTEND_DAI_MULTIMEDIA2, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia5", MSM_BACKEND_DAI_VOICE2_PLAYBACK_TX,
- MSM_FRONTEND_DAI_MULTIMEDIA5, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia9", MSM_BACKEND_DAI_VOICE2_PLAYBACK_TX,
- MSM_FRONTEND_DAI_MULTIMEDIA9, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- };
- static const struct snd_kcontrol_new slimbus_4_rx_mixer_controls[] = {
- SOC_SINGLE_EXT("MultiMedia1", MSM_BACKEND_DAI_SLIMBUS_4_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA1, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia2", MSM_BACKEND_DAI_SLIMBUS_4_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA2, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- };
- static const struct snd_kcontrol_new int_bt_sco_rx_mixer_controls[] = {
- SOC_SINGLE_EXT("MultiMedia1", MSM_BACKEND_DAI_INT_BT_SCO_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA1, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia2", MSM_BACKEND_DAI_INT_BT_SCO_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA2, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia3", MSM_BACKEND_DAI_INT_BT_SCO_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA3, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia4", MSM_BACKEND_DAI_INT_BT_SCO_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA4, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia5", MSM_BACKEND_DAI_INT_BT_SCO_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA5, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia6", MSM_BACKEND_DAI_INT_BT_SCO_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA6, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia7", MSM_BACKEND_DAI_INT_BT_SCO_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA7, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia8", MSM_BACKEND_DAI_INT_BT_SCO_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA8, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia9", MSM_BACKEND_DAI_INT_BT_SCO_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA9, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- };
- static const struct snd_kcontrol_new int_fm_rx_mixer_controls[] = {
- SOC_SINGLE_EXT("MultiMedia1", MSM_BACKEND_DAI_INT_FM_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA1, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia2", MSM_BACKEND_DAI_INT_FM_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA2, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia3", MSM_BACKEND_DAI_INT_FM_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA3, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia4", MSM_BACKEND_DAI_INT_FM_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA4, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia5", MSM_BACKEND_DAI_INT_FM_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA5, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia6", MSM_BACKEND_DAI_INT_FM_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA6, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia7", MSM_BACKEND_DAI_INT_FM_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA7, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia8", MSM_BACKEND_DAI_INT_FM_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA8, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia9", MSM_BACKEND_DAI_INT_FM_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA9, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- };
- static const struct snd_kcontrol_new afe_pcm_rx_mixer_controls[] = {
- SOC_SINGLE_EXT("MultiMedia1", MSM_BACKEND_DAI_AFE_PCM_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA1, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia2", MSM_BACKEND_DAI_AFE_PCM_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA2, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia3", MSM_BACKEND_DAI_AFE_PCM_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA3, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia4", MSM_BACKEND_DAI_AFE_PCM_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA4, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia5", MSM_BACKEND_DAI_AFE_PCM_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA5, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia6", MSM_BACKEND_DAI_AFE_PCM_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA6, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia7", MSM_BACKEND_DAI_AFE_PCM_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA7, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia8", MSM_BACKEND_DAI_AFE_PCM_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA8, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia9", MSM_BACKEND_DAI_AFE_PCM_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA9, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- };
- static const struct snd_kcontrol_new auxpcm_rx_mixer_controls[] = {
- SOC_SINGLE_EXT("MultiMedia1", MSM_BACKEND_DAI_AUXPCM_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA1, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia2", MSM_BACKEND_DAI_AUXPCM_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA2, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia3", MSM_BACKEND_DAI_AUXPCM_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA3, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia4", MSM_BACKEND_DAI_AUXPCM_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA4, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia5", MSM_BACKEND_DAI_AUXPCM_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA5, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia6", MSM_BACKEND_DAI_AUXPCM_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA6, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia7", MSM_BACKEND_DAI_AUXPCM_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA7, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia8", MSM_BACKEND_DAI_AUXPCM_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA8, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia9", MSM_BACKEND_DAI_AUXPCM_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA9, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- #ifdef CONFIG_JACK_AUDIO
- SOC_SINGLE_EXT("MultiMedia10", MSM_BACKEND_DAI_AUXPCM_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA10, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- #endif
- };
- static const struct snd_kcontrol_new sec_auxpcm_rx_mixer_controls[] = {
- SOC_SINGLE_EXT("MultiMedia1", MSM_BACKEND_DAI_SEC_AUXPCM_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA1, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia2", MSM_BACKEND_DAI_SEC_AUXPCM_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA2, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia3", MSM_BACKEND_DAI_SEC_AUXPCM_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA3, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia4", MSM_BACKEND_DAI_SEC_AUXPCM_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA4, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia5", MSM_BACKEND_DAI_SEC_AUXPCM_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA5, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia6", MSM_BACKEND_DAI_SEC_AUXPCM_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA6, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia7", MSM_BACKEND_DAI_SEC_AUXPCM_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA7, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia8", MSM_BACKEND_DAI_SEC_AUXPCM_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA8, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia9", MSM_BACKEND_DAI_SEC_AUXPCM_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA9, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- };
- static const struct snd_kcontrol_new mmul1_mixer_controls[] = {
- SOC_SINGLE_EXT("PRI_TX", MSM_BACKEND_DAI_PRI_I2S_TX,
- MSM_FRONTEND_DAI_MULTIMEDIA1, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MI2S_TX", MSM_BACKEND_DAI_MI2S_TX,
- MSM_FRONTEND_DAI_MULTIMEDIA1, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("PRI_MI2S_TX", MSM_BACKEND_DAI_PRI_MI2S_TX,
- MSM_FRONTEND_DAI_MULTIMEDIA1, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("QUAT_MI2S_TX", MSM_BACKEND_DAI_QUATERNARY_MI2S_TX,
- MSM_FRONTEND_DAI_MULTIMEDIA1, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("TERT_MI2S_TX", MSM_BACKEND_DAI_TERTIARY_MI2S_TX,
- MSM_FRONTEND_DAI_MULTIMEDIA1, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("SEC_MI2S_TX", MSM_BACKEND_DAI_SECONDARY_MI2S_TX,
- MSM_FRONTEND_DAI_MULTIMEDIA1, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("SLIM_0_TX", MSM_BACKEND_DAI_SLIMBUS_0_TX,
- MSM_FRONTEND_DAI_MULTIMEDIA1, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("AUX_PCM_UL_TX", MSM_BACKEND_DAI_AUXPCM_TX,
- MSM_FRONTEND_DAI_MULTIMEDIA1, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("SEC_AUX_PCM_UL_TX", MSM_BACKEND_DAI_SEC_AUXPCM_TX,
- MSM_FRONTEND_DAI_MULTIMEDIA1, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("INTERNAL_BT_SCO_TX", MSM_BACKEND_DAI_INT_BT_SCO_TX,
- MSM_FRONTEND_DAI_MULTIMEDIA1, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("INTERNAL_FM_TX", MSM_BACKEND_DAI_INT_FM_TX,
- MSM_FRONTEND_DAI_MULTIMEDIA1, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("AFE_PCM_TX", MSM_BACKEND_DAI_AFE_PCM_TX,
- MSM_FRONTEND_DAI_MULTIMEDIA1, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("VOC_REC_DL", MSM_BACKEND_DAI_INCALL_RECORD_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA1, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("VOC_REC_UL", MSM_BACKEND_DAI_INCALL_RECORD_TX,
- MSM_FRONTEND_DAI_MULTIMEDIA1, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("SLIM_4_TX", MSM_BACKEND_DAI_SLIMBUS_4_TX,
- MSM_FRONTEND_DAI_MULTIMEDIA1, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- };
- static const struct snd_kcontrol_new mmul2_mixer_controls[] = {
- SOC_SINGLE_EXT("INTERNAL_FM_TX", MSM_BACKEND_DAI_INT_FM_TX,
- MSM_FRONTEND_DAI_MULTIMEDIA2, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MI2S_TX", MSM_BACKEND_DAI_MI2S_TX,
- MSM_FRONTEND_DAI_MULTIMEDIA2, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- #ifdef CONFIG_TERT_MI2S_ENABLE
- SOC_SINGLE_EXT("TERT_MI2S_TX", MSM_BACKEND_DAI_TERTIARY_MI2S_TX,
- MSM_FRONTEND_DAI_MULTIMEDIA2, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- #elif defined(CONFIG_SND_SOC_MAX98504) || defined(CONFIG_SND_SOC_MAX98506)
- SOC_SINGLE_EXT("SEC_MI2S_TX", MSM_BACKEND_DAI_SECONDARY_MI2S_TX,
- MSM_FRONTEND_DAI_MULTIMEDIA2, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- #endif
- SOC_SINGLE_EXT("SLIM_0_TX", MSM_BACKEND_DAI_SLIMBUS_0_TX,
- MSM_FRONTEND_DAI_MULTIMEDIA2, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- };
- static const struct snd_kcontrol_new mmul4_mixer_controls[] = {
- SOC_SINGLE_EXT("SLIM_0_TX", MSM_BACKEND_DAI_SLIMBUS_0_TX,
- MSM_FRONTEND_DAI_MULTIMEDIA4, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("PRI_MI2S_TX", MSM_BACKEND_DAI_PRI_MI2S_TX,
- MSM_FRONTEND_DAI_MULTIMEDIA4, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("INTERNAL_FM_TX", MSM_BACKEND_DAI_INT_FM_TX,
- MSM_FRONTEND_DAI_MULTIMEDIA4, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("INTERNAL_BT_SCO_TX", MSM_BACKEND_DAI_INT_BT_SCO_TX,
- MSM_FRONTEND_DAI_MULTIMEDIA4, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("AFE_PCM_TX", MSM_BACKEND_DAI_AFE_PCM_TX,
- MSM_FRONTEND_DAI_MULTIMEDIA4, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("VOC_REC_DL", MSM_BACKEND_DAI_INCALL_RECORD_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA4, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("VOC_REC_UL", MSM_BACKEND_DAI_INCALL_RECORD_TX,
- MSM_FRONTEND_DAI_MULTIMEDIA4, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- };
- static const struct snd_kcontrol_new mmul5_mixer_controls[] = {
- SOC_SINGLE_EXT("SLIM_0_TX", MSM_BACKEND_DAI_SLIMBUS_0_TX,
- MSM_FRONTEND_DAI_MULTIMEDIA5, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("INTERNAL_FM_TX", MSM_BACKEND_DAI_INT_FM_TX,
- MSM_FRONTEND_DAI_MULTIMEDIA5, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("MI2S_TX", MSM_BACKEND_DAI_MI2S_TX,
- MSM_FRONTEND_DAI_MULTIMEDIA5, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("AFE_PCM_TX", MSM_BACKEND_DAI_AFE_PCM_TX,
- MSM_FRONTEND_DAI_MULTIMEDIA5, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("INTERNAL_BT_SCO_TX", MSM_BACKEND_DAI_INT_BT_SCO_TX,
- MSM_FRONTEND_DAI_MULTIMEDIA5, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("AUX_PCM_TX", MSM_BACKEND_DAI_AUXPCM_TX,
- MSM_FRONTEND_DAI_MULTIMEDIA5, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("SEC_AUX_PCM_TX", MSM_BACKEND_DAI_SEC_AUXPCM_TX,
- MSM_FRONTEND_DAI_MULTIMEDIA5, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("PRI_MI2S_TX", MSM_BACKEND_DAI_PRI_MI2S_TX,
- MSM_FRONTEND_DAI_MULTIMEDIA5, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- };
- #ifdef CONFIG_JACK_AUDIO
- static const struct snd_kcontrol_new mmul10_mixer_controls[] = {
- SOC_SINGLE_EXT("SLIM_0_TX", MSM_BACKEND_DAI_SLIMBUS_0_TX,
- MSM_FRONTEND_DAI_MULTIMEDIA10, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("AUX_PCM_TX", MSM_BACKEND_DAI_AUXPCM_TX,
- MSM_FRONTEND_DAI_MULTIMEDIA10, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- };
- #endif
- static const struct snd_kcontrol_new mmul8_mixer_controls[] = {
- SOC_SINGLE_EXT("SLIM_0_TX", MSM_BACKEND_DAI_SLIMBUS_0_TX,
- MSM_FRONTEND_DAI_MULTIMEDIA8, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("PRI_MI2S_TX", MSM_BACKEND_DAI_PRI_MI2S_TX,
- MSM_FRONTEND_DAI_MULTIMEDIA8, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("INTERNAL_FM_TX", MSM_BACKEND_DAI_INT_FM_TX,
- MSM_FRONTEND_DAI_MULTIMEDIA8, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("INTERNAL_BT_SCO_TX", MSM_BACKEND_DAI_INT_BT_SCO_TX,
- MSM_FRONTEND_DAI_MULTIMEDIA8, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("AFE_PCM_TX", MSM_BACKEND_DAI_AFE_PCM_TX,
- MSM_FRONTEND_DAI_MULTIMEDIA8, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("VOC_REC_DL", MSM_BACKEND_DAI_INCALL_RECORD_RX,
- MSM_FRONTEND_DAI_MULTIMEDIA8, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("VOC_REC_UL", MSM_BACKEND_DAI_INCALL_RECORD_TX,
- MSM_FRONTEND_DAI_MULTIMEDIA8, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- };
- static const struct snd_kcontrol_new mmul6_mixer_controls[] = {
- SOC_SINGLE_EXT("INTERNAL_FM_TX", MSM_BACKEND_DAI_INT_FM_TX,
- MSM_FRONTEND_DAI_MULTIMEDIA6, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- SOC_SINGLE_EXT("SLIM_0_TX", MSM_BACKEND_DAI_SLIMBUS_0_TX,
- MSM_FRONTEND_DAI_MULTIMEDIA6, 1, 0, msm_routing_get_audio_mixer,
- msm_routing_put_audio_mixer),
- };
- static const struct snd_kcontrol_new pri_rx_voice_mixer_controls[] = {
- SOC_SINGLE_EXT("CSVoice", MSM_BACKEND_DAI_PRI_I2S_RX,
- MSM_FRONTEND_DAI_CS_VOICE, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("Voice2", MSM_BACKEND_DAI_PRI_I2S_RX,
- MSM_FRONTEND_DAI_VOICE2, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("Voip", MSM_BACKEND_DAI_PRI_I2S_RX,
- MSM_FRONTEND_DAI_VOIP, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("VoLTE", MSM_BACKEND_DAI_PRI_I2S_RX,
- MSM_FRONTEND_DAI_VOLTE, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("VoWLAN", MSM_BACKEND_DAI_PRI_I2S_RX,
- MSM_FRONTEND_DAI_VOWLAN, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("DTMF", MSM_BACKEND_DAI_PRI_I2S_RX,
- MSM_FRONTEND_DAI_DTMF_RX, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("QCHAT", MSM_BACKEND_DAI_PRI_I2S_RX,
- MSM_FRONTEND_DAI_QCHAT, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- };
- static const struct snd_kcontrol_new sec_i2s_rx_voice_mixer_controls[] = {
- SOC_SINGLE_EXT("CSVoice", MSM_BACKEND_DAI_SEC_I2S_RX,
- MSM_FRONTEND_DAI_CS_VOICE, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("Voice2", MSM_BACKEND_DAI_SEC_I2S_RX,
- MSM_FRONTEND_DAI_VOICE2, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("Voip", MSM_BACKEND_DAI_SEC_I2S_RX,
- MSM_FRONTEND_DAI_VOIP, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("VoLTE", MSM_BACKEND_DAI_SEC_I2S_RX,
- MSM_FRONTEND_DAI_VOLTE, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("VoWLAN", MSM_BACKEND_DAI_SEC_I2S_RX,
- MSM_FRONTEND_DAI_VOWLAN, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("DTMF", MSM_BACKEND_DAI_SEC_I2S_RX,
- MSM_FRONTEND_DAI_DTMF_RX, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("QCHAT", MSM_BACKEND_DAI_SEC_I2S_RX,
- MSM_FRONTEND_DAI_QCHAT, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- };
- static const struct snd_kcontrol_new sec_mi2s_rx_voice_mixer_controls[] = {
- SOC_SINGLE_EXT("CSVoice", MSM_BACKEND_DAI_SECONDARY_MI2S_RX,
- MSM_FRONTEND_DAI_CS_VOICE, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("Voice2", MSM_BACKEND_DAI_SECONDARY_MI2S_RX,
- MSM_FRONTEND_DAI_VOICE2, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("Voip", MSM_BACKEND_DAI_SECONDARY_MI2S_RX,
- MSM_FRONTEND_DAI_VOIP, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("VoLTE", MSM_BACKEND_DAI_SECONDARY_MI2S_RX,
- MSM_FRONTEND_DAI_VOLTE, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("VoWLAN", MSM_BACKEND_DAI_SECONDARY_MI2S_RX,
- MSM_FRONTEND_DAI_VOWLAN, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("DTMF", MSM_BACKEND_DAI_SECONDARY_MI2S_RX,
- MSM_FRONTEND_DAI_DTMF_RX, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("QCHAT", MSM_BACKEND_DAI_SECONDARY_MI2S_RX,
- MSM_FRONTEND_DAI_QCHAT, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- };
- static const struct snd_kcontrol_new slimbus_rx_voice_mixer_controls[] = {
- SOC_SINGLE_EXT("CSVoice", MSM_BACKEND_DAI_SLIMBUS_0_RX,
- MSM_FRONTEND_DAI_CS_VOICE, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("Voice2", MSM_BACKEND_DAI_SLIMBUS_0_RX,
- MSM_FRONTEND_DAI_VOICE2, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("Voip", MSM_BACKEND_DAI_SLIMBUS_0_RX ,
- MSM_FRONTEND_DAI_VOIP, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- #if defined( CONFIG_PCM_ROUTE_VOICE_STUB ) || defined(CONFIG_BT_CALL_FORWARDING)
- SOC_SINGLE_EXT("Voice Stub", MSM_BACKEND_DAI_SLIMBUS_0_RX,
- MSM_FRONTEND_DAI_VOICE_STUB, 1, 0, msm_routing_get_voice_stub_mixer,
- msm_routing_put_voice_stub_mixer),
- #endif /* CONFIG_PCM_ROUTE_VOICE_STUB || CONFIG_BT_CALL_FORWARDING */
- SOC_SINGLE_EXT("VoLTE", MSM_BACKEND_DAI_SLIMBUS_0_RX ,
- MSM_FRONTEND_DAI_VOLTE, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("VoWLAN", MSM_BACKEND_DAI_SLIMBUS_0_RX ,
- MSM_FRONTEND_DAI_VOWLAN, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("DTMF", MSM_BACKEND_DAI_SLIMBUS_0_RX ,
- MSM_FRONTEND_DAI_DTMF_RX, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("QCHAT", MSM_BACKEND_DAI_SLIMBUS_0_RX ,
- MSM_FRONTEND_DAI_QCHAT, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- };
- static const struct snd_kcontrol_new bt_sco_rx_voice_mixer_controls[] = {
- SOC_SINGLE_EXT("CSVoice", MSM_BACKEND_DAI_INT_BT_SCO_RX,
- MSM_FRONTEND_DAI_CS_VOICE, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("Voice2", MSM_BACKEND_DAI_INT_BT_SCO_RX,
- MSM_FRONTEND_DAI_VOICE2, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("Voip", MSM_BACKEND_DAI_INT_BT_SCO_RX ,
- MSM_FRONTEND_DAI_VOIP, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("Voice Stub", MSM_BACKEND_DAI_INT_BT_SCO_RX,
- MSM_FRONTEND_DAI_VOICE_STUB, 1, 0, msm_routing_get_voice_stub_mixer,
- msm_routing_put_voice_stub_mixer),
- SOC_SINGLE_EXT("VoLTE", MSM_BACKEND_DAI_INT_BT_SCO_RX ,
- MSM_FRONTEND_DAI_VOLTE, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("VoWLAN", MSM_BACKEND_DAI_INT_BT_SCO_RX ,
- MSM_FRONTEND_DAI_VOWLAN, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("DTMF", MSM_BACKEND_DAI_INT_BT_SCO_RX ,
- MSM_FRONTEND_DAI_DTMF_RX, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("QCHAT", MSM_BACKEND_DAI_INT_BT_SCO_RX ,
- MSM_FRONTEND_DAI_QCHAT, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- };
- static const struct snd_kcontrol_new mi2s_rx_voice_mixer_controls[] = {
- SOC_SINGLE_EXT("CSVoice", MSM_BACKEND_DAI_MI2S_RX,
- MSM_FRONTEND_DAI_CS_VOICE, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("Voice2", MSM_BACKEND_DAI_MI2S_RX,
- MSM_FRONTEND_DAI_VOICE2, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("Voip", MSM_BACKEND_DAI_MI2S_RX,
- MSM_FRONTEND_DAI_VOIP, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("Voice Stub", MSM_BACKEND_DAI_MI2S_RX,
- MSM_FRONTEND_DAI_VOICE_STUB, 1, 0, msm_routing_get_voice_stub_mixer,
- msm_routing_put_voice_stub_mixer),
- SOC_SINGLE_EXT("VoLTE", MSM_BACKEND_DAI_MI2S_RX,
- MSM_FRONTEND_DAI_VOLTE, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("VoWLAN", MSM_BACKEND_DAI_MI2S_RX,
- MSM_FRONTEND_DAI_VOWLAN, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("DTMF", MSM_BACKEND_DAI_MI2S_RX,
- MSM_FRONTEND_DAI_DTMF_RX, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("QCHAT", MSM_BACKEND_DAI_MI2S_RX,
- MSM_FRONTEND_DAI_QCHAT, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- };
- static const struct snd_kcontrol_new afe_pcm_rx_voice_mixer_controls[] = {
- SOC_SINGLE_EXT("CSVoice", MSM_BACKEND_DAI_AFE_PCM_RX,
- MSM_FRONTEND_DAI_CS_VOICE, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("Voice2", MSM_BACKEND_DAI_AFE_PCM_RX,
- MSM_FRONTEND_DAI_VOICE2, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("Voip", MSM_BACKEND_DAI_AFE_PCM_RX,
- MSM_FRONTEND_DAI_VOIP, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("Voice Stub", MSM_BACKEND_DAI_AFE_PCM_RX,
- MSM_FRONTEND_DAI_VOICE_STUB, 1, 0, msm_routing_get_voice_stub_mixer,
- msm_routing_put_voice_stub_mixer),
- SOC_SINGLE_EXT("VoLTE", MSM_BACKEND_DAI_AFE_PCM_RX,
- MSM_FRONTEND_DAI_VOLTE, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("VoWLAN", MSM_BACKEND_DAI_AFE_PCM_RX,
- MSM_FRONTEND_DAI_VOWLAN, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("DTMF", MSM_BACKEND_DAI_AFE_PCM_RX,
- MSM_FRONTEND_DAI_DTMF_RX, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("QCHAT", MSM_BACKEND_DAI_AFE_PCM_RX,
- MSM_FRONTEND_DAI_QCHAT, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- };
- static const struct snd_kcontrol_new aux_pcm_rx_voice_mixer_controls[] = {
- SOC_SINGLE_EXT("CSVoice", MSM_BACKEND_DAI_AUXPCM_RX,
- MSM_FRONTEND_DAI_CS_VOICE, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("Voice2", MSM_BACKEND_DAI_AUXPCM_RX,
- MSM_FRONTEND_DAI_VOICE2, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("Voip", MSM_BACKEND_DAI_AUXPCM_RX,
- MSM_FRONTEND_DAI_VOIP, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("Voice Stub", MSM_BACKEND_DAI_AUXPCM_RX,
- MSM_FRONTEND_DAI_VOICE_STUB, 1, 0, msm_routing_get_voice_stub_mixer,
- msm_routing_put_voice_stub_mixer),
- SOC_SINGLE_EXT("VoLTE", MSM_BACKEND_DAI_AUXPCM_RX,
- MSM_FRONTEND_DAI_VOLTE, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("VoWLAN", MSM_BACKEND_DAI_AUXPCM_RX,
- MSM_FRONTEND_DAI_VOWLAN, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("DTMF", MSM_BACKEND_DAI_AUXPCM_RX,
- MSM_FRONTEND_DAI_DTMF_RX, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("QCHAT", MSM_BACKEND_DAI_AUXPCM_RX,
- MSM_FRONTEND_DAI_QCHAT, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- };
- static const struct snd_kcontrol_new sec_aux_pcm_rx_voice_mixer_controls[] = {
- SOC_SINGLE_EXT("CSVoice", MSM_BACKEND_DAI_SEC_AUXPCM_RX,
- MSM_FRONTEND_DAI_CS_VOICE, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("Voice2", MSM_BACKEND_DAI_SEC_AUXPCM_RX,
- MSM_FRONTEND_DAI_VOICE2, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("Voip", MSM_BACKEND_DAI_SEC_AUXPCM_RX,
- MSM_FRONTEND_DAI_VOIP, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("Voice Stub", MSM_BACKEND_DAI_SEC_AUXPCM_RX,
- MSM_FRONTEND_DAI_VOICE_STUB, 1, 0, msm_routing_get_voice_stub_mixer,
- msm_routing_put_voice_stub_mixer),
- SOC_SINGLE_EXT("VoLTE", MSM_BACKEND_DAI_SEC_AUXPCM_RX,
- MSM_FRONTEND_DAI_VOLTE, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("VoWLAN", MSM_BACKEND_DAI_SEC_AUXPCM_RX,
- MSM_FRONTEND_DAI_VOWLAN, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("DTMF", MSM_BACKEND_DAI_SEC_AUXPCM_RX,
- MSM_FRONTEND_DAI_DTMF_RX, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("QCHAT", MSM_BACKEND_DAI_SEC_AUXPCM_RX,
- MSM_FRONTEND_DAI_QCHAT, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- };
- static const struct snd_kcontrol_new hdmi_rx_voice_mixer_controls[] = {
- SOC_SINGLE_EXT("CSVoice", MSM_BACKEND_DAI_HDMI_RX,
- MSM_FRONTEND_DAI_CS_VOICE, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("Voice2", MSM_BACKEND_DAI_HDMI_RX,
- MSM_FRONTEND_DAI_VOICE2, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("Voip", MSM_BACKEND_DAI_HDMI_RX,
- MSM_FRONTEND_DAI_VOIP, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("VoLTE", MSM_BACKEND_DAI_HDMI_RX,
- MSM_FRONTEND_DAI_VOLTE, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("VoWLAN", MSM_BACKEND_DAI_HDMI_RX,
- MSM_FRONTEND_DAI_VOWLAN, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("Voice Stub", MSM_BACKEND_DAI_HDMI_RX,
- MSM_FRONTEND_DAI_VOICE_STUB, 1, 0, msm_routing_get_voice_stub_mixer,
- msm_routing_put_voice_stub_mixer),
- SOC_SINGLE_EXT("DTMF", MSM_BACKEND_DAI_HDMI_RX,
- MSM_FRONTEND_DAI_DTMF_RX, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("QCHAT", MSM_BACKEND_DAI_HDMI_RX,
- MSM_FRONTEND_DAI_QCHAT, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- };
- static const struct snd_kcontrol_new stub_rx_mixer_controls[] = {
- SOC_SINGLE_EXT("Voice Stub", MSM_BACKEND_DAI_EXTPROC_RX,
- MSM_FRONTEND_DAI_VOICE_STUB, 1, 0, msm_routing_get_voice_stub_mixer,
- msm_routing_put_voice_stub_mixer),
- };
- static const struct snd_kcontrol_new slimbus_1_rx_mixer_controls[] = {
- SOC_SINGLE_EXT("Voice Stub", MSM_BACKEND_DAI_SLIMBUS_1_RX,
- MSM_FRONTEND_DAI_VOICE_STUB, 1, 0, msm_routing_get_voice_stub_mixer,
- msm_routing_put_voice_stub_mixer),
- };
- static const struct snd_kcontrol_new slimbus_3_rx_mixer_controls[] = {
- SOC_SINGLE_EXT("Voice Stub", MSM_BACKEND_DAI_SLIMBUS_3_RX,
- MSM_FRONTEND_DAI_VOICE_STUB, 1, 0, msm_routing_get_voice_stub_mixer,
- msm_routing_put_voice_stub_mixer),
- };
- static const struct snd_kcontrol_new tx_voice_mixer_controls[] = {
- SOC_SINGLE_EXT("PRI_TX_Voice", MSM_BACKEND_DAI_PRI_I2S_TX,
- MSM_FRONTEND_DAI_CS_VOICE, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("MI2S_TX_Voice", MSM_BACKEND_DAI_MI2S_TX,
- MSM_FRONTEND_DAI_CS_VOICE, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("SLIM_0_TX_Voice", MSM_BACKEND_DAI_SLIMBUS_0_TX,
- MSM_FRONTEND_DAI_CS_VOICE, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("INTERNAL_BT_SCO_TX_Voice",
- MSM_BACKEND_DAI_INT_BT_SCO_TX, MSM_FRONTEND_DAI_CS_VOICE, 1, 0,
- msm_routing_get_voice_mixer, msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("AFE_PCM_TX_Voice", MSM_BACKEND_DAI_AFE_PCM_TX,
- MSM_FRONTEND_DAI_CS_VOICE, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("AUX_PCM_TX_Voice", MSM_BACKEND_DAI_AUXPCM_TX,
- MSM_FRONTEND_DAI_CS_VOICE, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("SEC_AUX_PCM_TX_Voice", MSM_BACKEND_DAI_SEC_AUXPCM_TX,
- MSM_FRONTEND_DAI_CS_VOICE, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("PRI_MI2S_TX_Voice", MSM_BACKEND_DAI_PRI_MI2S_TX,
- MSM_FRONTEND_DAI_CS_VOICE, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- };
- static const struct snd_kcontrol_new tx_voice2_mixer_controls[] = {
- SOC_SINGLE_EXT("PRI_TX_Voice2", MSM_BACKEND_DAI_PRI_I2S_TX,
- MSM_FRONTEND_DAI_VOICE2, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("MI2S_TX_Voice2", MSM_BACKEND_DAI_MI2S_TX,
- MSM_FRONTEND_DAI_VOICE2, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("SLIM_0_TX_Voice2", MSM_BACKEND_DAI_SLIMBUS_0_TX,
- MSM_FRONTEND_DAI_VOICE2, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("INTERNAL_BT_SCO_TX_Voice2",
- MSM_BACKEND_DAI_INT_BT_SCO_TX, MSM_FRONTEND_DAI_VOICE2, 1, 0,
- msm_routing_get_voice_mixer, msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("AFE_PCM_TX_Voice2", MSM_BACKEND_DAI_AFE_PCM_TX,
- MSM_FRONTEND_DAI_VOICE2, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("AUX_PCM_TX_Voice2", MSM_BACKEND_DAI_AUXPCM_TX,
- MSM_FRONTEND_DAI_VOICE2, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("SEC_AUX_PCM_TX_Voice2", MSM_BACKEND_DAI_SEC_AUXPCM_TX,
- MSM_FRONTEND_DAI_VOICE2, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("PRI_MI2S_TX_Voice2", MSM_BACKEND_DAI_PRI_MI2S_TX,
- MSM_FRONTEND_DAI_VOICE2, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- };
- static const struct snd_kcontrol_new tx_volte_mixer_controls[] = {
- SOC_SINGLE_EXT("PRI_TX_VoLTE", MSM_BACKEND_DAI_PRI_I2S_TX,
- MSM_FRONTEND_DAI_VOLTE, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("SLIM_0_TX_VoLTE", MSM_BACKEND_DAI_SLIMBUS_0_TX,
- MSM_FRONTEND_DAI_VOLTE, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("INTERNAL_BT_SCO_TX_VoLTE",
- MSM_BACKEND_DAI_INT_BT_SCO_TX, MSM_FRONTEND_DAI_VOLTE, 1, 0,
- msm_routing_get_voice_mixer, msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("AFE_PCM_TX_VoLTE", MSM_BACKEND_DAI_AFE_PCM_TX,
- MSM_FRONTEND_DAI_VOLTE, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("AUX_PCM_TX_VoLTE", MSM_BACKEND_DAI_AUXPCM_TX,
- MSM_FRONTEND_DAI_VOLTE, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("SEC_AUX_PCM_TX_VoLTE", MSM_BACKEND_DAI_SEC_AUXPCM_TX,
- MSM_FRONTEND_DAI_VOLTE, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("MI2S_TX_VoLTE", MSM_BACKEND_DAI_MI2S_TX,
- MSM_FRONTEND_DAI_VOLTE, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- };
- static const struct snd_kcontrol_new tx_vowlan_mixer_controls[] = {
- SOC_SINGLE_EXT("PRI_TX_VoWLAN", MSM_BACKEND_DAI_PRI_I2S_TX,
- MSM_FRONTEND_DAI_VOWLAN, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("SLIM_0_TX_VoWLAN", MSM_BACKEND_DAI_SLIMBUS_0_TX,
- MSM_FRONTEND_DAI_VOWLAN, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("INTERNAL_BT_SCO_TX_VoWLAN",
- MSM_BACKEND_DAI_INT_BT_SCO_TX, MSM_FRONTEND_DAI_VOWLAN, 1, 0,
- msm_routing_get_voice_mixer, msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("AFE_PCM_TX_VoWLAN", MSM_BACKEND_DAI_AFE_PCM_TX,
- MSM_FRONTEND_DAI_VOWLAN, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("AUX_PCM_TX_VoWLAN", MSM_BACKEND_DAI_AUXPCM_TX,
- MSM_FRONTEND_DAI_VOWLAN, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("SEC_AUX_PCM_TX_VoWLAN", MSM_BACKEND_DAI_SEC_AUXPCM_TX,
- MSM_FRONTEND_DAI_VOWLAN, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("MI2S_TX_VoWLAN", MSM_BACKEND_DAI_MI2S_TX,
- MSM_FRONTEND_DAI_VOWLAN, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("PRI_MI2S_TX_VoWLAN", MSM_BACKEND_DAI_PRI_MI2S_TX,
- MSM_FRONTEND_DAI_VOWLAN, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- };
- static const struct snd_kcontrol_new tx_voip_mixer_controls[] = {
- SOC_SINGLE_EXT("PRI_TX_Voip", MSM_BACKEND_DAI_PRI_I2S_TX,
- MSM_FRONTEND_DAI_VOIP, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("MI2S_TX_Voip", MSM_BACKEND_DAI_MI2S_TX,
- MSM_FRONTEND_DAI_VOIP, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("SLIM_0_TX_Voip", MSM_BACKEND_DAI_SLIMBUS_0_TX,
- MSM_FRONTEND_DAI_VOIP, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("INTERNAL_BT_SCO_TX_Voip", MSM_BACKEND_DAI_INT_BT_SCO_TX,
- MSM_FRONTEND_DAI_VOIP, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("AFE_PCM_TX_Voip", MSM_BACKEND_DAI_AFE_PCM_TX,
- MSM_FRONTEND_DAI_VOIP, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("AUX_PCM_TX_Voip", MSM_BACKEND_DAI_AUXPCM_TX,
- MSM_FRONTEND_DAI_VOIP, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("SEC_AUX_PCM_TX_Voip", MSM_BACKEND_DAI_SEC_AUXPCM_TX,
- MSM_FRONTEND_DAI_VOIP, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("PRI_MI2S_TX_Voip", MSM_BACKEND_DAI_PRI_MI2S_TX,
- MSM_FRONTEND_DAI_VOIP, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- };
- static const struct snd_kcontrol_new tx_voice_stub_mixer_controls[] = {
- SOC_SINGLE_EXT("STUB_TX_HL", MSM_BACKEND_DAI_EXTPROC_TX,
- MSM_FRONTEND_DAI_VOICE_STUB, 1, 0, msm_routing_get_voice_stub_mixer,
- msm_routing_put_voice_stub_mixer),
- SOC_SINGLE_EXT("INTERNAL_BT_SCO_TX", MSM_BACKEND_DAI_INT_BT_SCO_TX,
- MSM_FRONTEND_DAI_VOICE_STUB, 1, 0, msm_routing_get_voice_stub_mixer,
- msm_routing_put_voice_stub_mixer),
- SOC_SINGLE_EXT("SLIM_1_TX", MSM_BACKEND_DAI_SLIMBUS_1_TX,
- MSM_FRONTEND_DAI_VOICE_STUB, 1, 0, msm_routing_get_voice_stub_mixer,
- msm_routing_put_voice_stub_mixer),
- SOC_SINGLE_EXT("STUB_1_TX_HL", MSM_BACKEND_DAI_EXTPROC_EC_TX,
- MSM_FRONTEND_DAI_VOICE_STUB, 1, 0, msm_routing_get_voice_stub_mixer,
- msm_routing_put_voice_stub_mixer),
- SOC_SINGLE_EXT("MI2S_TX", MSM_BACKEND_DAI_MI2S_TX,
- MSM_FRONTEND_DAI_VOICE_STUB, 1, 0, msm_routing_get_voice_stub_mixer,
- msm_routing_put_voice_stub_mixer),
- #if defined( CONFIG_PCM_ROUTE_VOICE_STUB ) || defined(CONFIG_BT_CALL_FORWARDING)
- SOC_SINGLE_EXT("AUX_PCM_UL_TX", MSM_BACKEND_DAI_AUXPCM_TX,
- MSM_FRONTEND_DAI_VOICE_STUB, 1, 0, msm_routing_get_voice_stub_mixer,
- msm_routing_put_voice_stub_mixer),
- SOC_SINGLE_EXT("SEC_AUX_PCM_UL_TX", MSM_BACKEND_DAI_SEC_AUXPCM_TX,
- MSM_FRONTEND_DAI_VOICE_STUB, 1, 0, msm_routing_get_voice_stub_mixer,
- msm_routing_put_voice_stub_mixer),
- SOC_SINGLE_EXT("SLIM_0_TX", MSM_BACKEND_DAI_SLIMBUS_0_TX,
- MSM_FRONTEND_DAI_VOICE_STUB, 1, 0, msm_routing_get_voice_stub_mixer,
- msm_routing_put_voice_stub_mixer),
- #endif /* CONFIG_PCM_ROUTE_VOICE_STUB || CONFIG_BT_CALL_FORWARDING */
- };
- static const struct snd_kcontrol_new tx_qchat_mixer_controls[] = {
- SOC_SINGLE_EXT("PRI_TX_QCHAT", MSM_BACKEND_DAI_PRI_I2S_TX,
- MSM_FRONTEND_DAI_QCHAT, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("SLIM_0_TX_QCHAT", MSM_BACKEND_DAI_SLIMBUS_0_TX,
- MSM_FRONTEND_DAI_QCHAT, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("INTERNAL_BT_SCO_TX_QCHAT",
- MSM_BACKEND_DAI_INT_BT_SCO_TX, MSM_FRONTEND_DAI_QCHAT, 1, 0,
- msm_routing_get_voice_mixer, msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("AFE_PCM_TX_QCHAT", MSM_BACKEND_DAI_AFE_PCM_TX,
- MSM_FRONTEND_DAI_QCHAT, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("AUX_PCM_TX_QCHAT", MSM_BACKEND_DAI_AUXPCM_TX,
- MSM_FRONTEND_DAI_QCHAT, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("SEC_AUX_PCM_TX_QCHAT", MSM_BACKEND_DAI_SEC_AUXPCM_TX,
- MSM_FRONTEND_DAI_QCHAT, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("MI2S_TX_QCHAT", MSM_BACKEND_DAI_MI2S_TX,
- MSM_FRONTEND_DAI_QCHAT, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- SOC_SINGLE_EXT("PRI_MI2S_TX_QCHAT", MSM_BACKEND_DAI_PRI_MI2S_TX,
- MSM_FRONTEND_DAI_QCHAT, 1, 0, msm_routing_get_voice_mixer,
- msm_routing_put_voice_mixer),
- };
- static const struct snd_kcontrol_new sbus_0_rx_port_mixer_controls[] = {
- SOC_SINGLE_EXT("INTERNAL_FM_TX", MSM_BACKEND_DAI_SLIMBUS_0_RX,
- MSM_BACKEND_DAI_INT_FM_TX, 1, 0, msm_routing_get_port_mixer,
- msm_routing_put_port_mixer),
- SOC_SINGLE_EXT("SLIM_0_TX", MSM_BACKEND_DAI_SLIMBUS_0_RX,
- MSM_BACKEND_DAI_SLIMBUS_0_TX, 1, 0, msm_routing_get_port_mixer,
- msm_routing_put_port_mixer),
- SOC_SINGLE_EXT("AUX_PCM_UL_TX", MSM_BACKEND_DAI_SLIMBUS_0_RX,
- MSM_BACKEND_DAI_AUXPCM_TX, 1, 0, msm_routing_get_port_mixer,
- msm_routing_put_port_mixer),
- SOC_SINGLE_EXT("SEC_AUX_PCM_UL_TX", MSM_BACKEND_DAI_SLIMBUS_0_RX,
- MSM_BACKEND_DAI_SEC_AUXPCM_TX, 1, 0, msm_routing_get_port_mixer,
- msm_routing_put_port_mixer),
- SOC_SINGLE_EXT("MI2S_TX", MSM_BACKEND_DAI_SLIMBUS_0_RX,
- MSM_BACKEND_DAI_MI2S_TX, 1, 0, msm_routing_get_port_mixer,
- msm_routing_put_port_mixer),
- #if defined( CONFIG_PCM_ROUTE_VOICE_STUB ) || defined(CONFIG_BT_CALL_FORWARDING)
- SOC_SINGLE_EXT("INTERNAL_BT_SCO_TX", MSM_BACKEND_DAI_SLIMBUS_0_RX,
- MSM_BACKEND_DAI_INT_BT_SCO_TX, 1, 0, msm_routing_get_port_mixer,
- msm_routing_put_port_mixer),
- #endif /* CONFIG_PCM_ROUTE_VOICE_STUB || CONFIG_BT_CALL_FORWARDING */
- };
- static const struct snd_kcontrol_new auxpcm_rx_port_mixer_controls[] = {
- SOC_SINGLE_EXT("AUX_PCM_UL_TX", MSM_BACKEND_DAI_AUXPCM_RX,
- MSM_BACKEND_DAI_AUXPCM_TX, 1, 0, msm_routing_get_port_mixer,
- msm_routing_put_port_mixer),
- SOC_SINGLE_EXT("SLIM_0_TX", MSM_BACKEND_DAI_AUXPCM_RX,
- MSM_BACKEND_DAI_SLIMBUS_0_TX, 1, 0, msm_routing_get_port_mixer,
- msm_routing_put_port_mixer),
- #if defined( CONFIG_PCM_ROUTE_VOICE_STUB ) || defined(CONFIG_BT_CALL_FORWARDING)
- SOC_SINGLE_EXT("SEC_AUX_PCM_UL_TX", MSM_BACKEND_DAI_AUXPCM_RX,
- MSM_BACKEND_DAI_SEC_AUXPCM_TX, 1, 0, msm_routing_get_port_mixer,
- msm_routing_put_port_mixer),
- #endif /* CONFIG_PCM_ROUTE_VOICE_STUB || CONFIG_BT_CALL_FORWARDING */
- };
- static const struct snd_kcontrol_new sec_auxpcm_rx_port_mixer_controls[] = {
- SOC_SINGLE_EXT("SEC_AUX_PCM_UL_TX", MSM_BACKEND_DAI_SEC_AUXPCM_RX,
- MSM_BACKEND_DAI_SEC_AUXPCM_TX, 1, 0, msm_routing_get_port_mixer,
- msm_routing_put_port_mixer),
- SOC_SINGLE_EXT("SLIM_0_TX", MSM_BACKEND_DAI_SEC_AUXPCM_RX,
- MSM_BACKEND_DAI_SLIMBUS_0_TX, 1, 0, msm_routing_get_port_mixer,
- msm_routing_put_port_mixer),
- #if defined( CONFIG_PCM_ROUTE_VOICE_STUB ) || defined(CONFIG_BT_CALL_FORWARDING)
- SOC_SINGLE_EXT("AUX_PCM_UL_TX", MSM_BACKEND_DAI_SEC_AUXPCM_RX,
- MSM_BACKEND_DAI_AUXPCM_TX, 1, 0, msm_routing_get_port_mixer,
- msm_routing_put_port_mixer),
- #endif /* CONFIG_PCM_ROUTE_VOICE_STUB || CONFIG_BT_CALL_FORWARDING */
- };
- static const struct snd_kcontrol_new sbus_1_rx_port_mixer_controls[] = {
- SOC_SINGLE_EXT("INTERNAL_BT_SCO_TX", MSM_BACKEND_DAI_SLIMBUS_1_RX,
- MSM_BACKEND_DAI_INT_BT_SCO_TX, 1, 0, msm_routing_get_port_mixer,
- msm_routing_put_port_mixer),
- };
- static const struct snd_kcontrol_new sbus_3_rx_port_mixer_controls[] = {
- SOC_SINGLE_EXT("INTERNAL_BT_SCO_RX", MSM_BACKEND_DAI_SLIMBUS_3_RX,
- MSM_BACKEND_DAI_INT_BT_SCO_RX, 1, 0, msm_routing_get_port_mixer,
- msm_routing_put_port_mixer),
- SOC_SINGLE_EXT("MI2S_TX", MSM_BACKEND_DAI_SLIMBUS_3_RX,
- MSM_BACKEND_DAI_MI2S_TX, 1, 0, msm_routing_get_port_mixer,
- msm_routing_put_port_mixer),
- };
- static const struct snd_kcontrol_new bt_sco_rx_port_mixer_controls[] = {
- SOC_SINGLE_EXT("SLIM_1_TX", MSM_BACKEND_DAI_INT_BT_SCO_RX,
- MSM_BACKEND_DAI_SLIMBUS_1_TX, 1, 0, msm_routing_get_port_mixer,
- msm_routing_put_port_mixer),
- #if defined( CONFIG_PCM_ROUTE_VOICE_STUB ) || defined(CONFIG_BT_CALL_FORWARDING)
- SOC_SINGLE_EXT("SLIM_0_TX", MSM_BACKEND_DAI_INT_BT_SCO_RX,
- MSM_BACKEND_DAI_SLIMBUS_0_TX, 1, 0, msm_routing_get_port_mixer,
- msm_routing_put_port_mixer),
- #endif /* CONFIG_PCM_ROUTE_VOICE_STUB || CONFIG_BT_CALL_FORWARDING */
- };
- static const struct snd_kcontrol_new afe_pcm_rx_port_mixer_controls[] = {
- SOC_SINGLE_EXT("INTERNAL_FM_TX", MSM_BACKEND_DAI_AFE_PCM_RX,
- MSM_BACKEND_DAI_INT_FM_TX, 1, 0, msm_routing_get_port_mixer,
- msm_routing_put_port_mixer),
- };
- static const struct snd_kcontrol_new hdmi_rx_port_mixer_controls[] = {
- SOC_SINGLE_EXT("MI2S_TX", MSM_BACKEND_DAI_HDMI_RX,
- MSM_BACKEND_DAI_MI2S_TX, 1, 0, msm_routing_get_port_mixer,
- msm_routing_put_port_mixer),
- };
- static const struct snd_kcontrol_new sec_i2s_rx_port_mixer_controls[] = {
- SOC_SINGLE_EXT("MI2S_TX", MSM_BACKEND_DAI_SEC_I2S_RX,
- MSM_BACKEND_DAI_MI2S_TX, 1, 0, msm_routing_get_port_mixer,
- msm_routing_put_port_mixer),
- };
- static const struct snd_kcontrol_new mi2s_rx_port_mixer_controls[] = {
- SOC_SINGLE_EXT("SLIM_1_TX", MSM_BACKEND_DAI_MI2S_RX,
- MSM_BACKEND_DAI_SLIMBUS_1_TX, 1, 0, msm_routing_get_port_mixer,
- msm_routing_put_port_mixer),
- SOC_SINGLE_EXT("MI2S_TX", MSM_BACKEND_DAI_MI2S_RX,
- MSM_BACKEND_DAI_MI2S_TX, 1, 0, msm_routing_get_port_mixer,
- msm_routing_put_port_mixer),
- };
- static const struct snd_kcontrol_new primary_mi2s_rx_port_mixer_controls[] = {
- SOC_SINGLE_EXT("SEC_MI2S_TX", MSM_BACKEND_DAI_PRI_MI2S_RX,
- MSM_BACKEND_DAI_SECONDARY_MI2S_TX, 1, 0, msm_routing_get_port_mixer,
- msm_routing_put_port_mixer),
- };
- static const struct snd_kcontrol_new fm_switch_mixer_controls =
- SOC_SINGLE_EXT("Switch", SND_SOC_NOPM,
- 0, 1, 0, msm_routing_get_switch_mixer,
- msm_routing_put_switch_mixer);
- static const struct snd_kcontrol_new pcm_rx_switch_mixer_controls =
- SOC_SINGLE_EXT("Switch", SND_SOC_NOPM,
- 0, 1, 0, msm_routing_get_fm_pcmrx_switch_mixer,
- msm_routing_put_fm_pcmrx_switch_mixer);
- static const struct snd_kcontrol_new pri_mi2s_rx_switch_mixer_controls =
- SOC_SINGLE_EXT("Switch", SND_SOC_NOPM,
- 0, 1, 0, msm_routing_get_switch_mixer,
- msm_routing_put_switch_mixer);
- static const struct soc_enum lsm_mux_enum =
- SOC_ENUM_SINGLE_EXT(ARRAY_SIZE(mad_audio_mux_text), mad_audio_mux_text);
- static const struct snd_kcontrol_new lsm1_mux =
- SOC_DAPM_ENUM_EXT("LSM1 MUX", lsm_mux_enum,
- msm_routing_lsm_mux_get,
- msm_routing_lsm_mux_put);
- static const struct snd_kcontrol_new lsm2_mux =
- SOC_DAPM_ENUM_EXT("LSM2 MUX", lsm_mux_enum,
- msm_routing_lsm_mux_get,
- msm_routing_lsm_mux_put);
- static const struct snd_kcontrol_new lsm3_mux =
- SOC_DAPM_ENUM_EXT("LSM3 MUX", lsm_mux_enum,
- msm_routing_lsm_mux_get,
- msm_routing_lsm_mux_put);
- static const struct snd_kcontrol_new lsm4_mux =
- SOC_DAPM_ENUM_EXT("LSM4 MUX", lsm_mux_enum,
- msm_routing_lsm_mux_get,
- msm_routing_lsm_mux_put);
- static const struct snd_kcontrol_new lsm5_mux =
- SOC_DAPM_ENUM_EXT("LSM5 MUX", lsm_mux_enum,
- msm_routing_lsm_mux_get,
- msm_routing_lsm_mux_put);
- static const struct snd_kcontrol_new lsm6_mux =
- SOC_DAPM_ENUM_EXT("LSM6 MUX", lsm_mux_enum,
- msm_routing_lsm_mux_get,
- msm_routing_lsm_mux_put);
- static const struct snd_kcontrol_new lsm7_mux =
- SOC_DAPM_ENUM_EXT("LSM7 MUX", lsm_mux_enum,
- msm_routing_lsm_mux_get,
- msm_routing_lsm_mux_put);
- static const struct snd_kcontrol_new lsm8_mux =
- SOC_DAPM_ENUM_EXT("LSM8 MUX", lsm_mux_enum,
- msm_routing_lsm_mux_get,
- msm_routing_lsm_mux_put);
- static const char * const lsm_func_text[] = {
- "None", "AUDIO", "BEACON", "ULTRASOUND", "SWAUDIO",
- };
- static const struct soc_enum lsm_func_enum =
- SOC_ENUM_SINGLE_EXT(ARRAY_SIZE(lsm_func_text), lsm_func_text);
- static const struct snd_kcontrol_new lsm_function[] = {
- SOC_ENUM_EXT(SLIMBUS_0_TX_TEXT" "LSM_FUNCTION_TEXT, lsm_func_enum,
- msm_routing_lsm_func_get, msm_routing_lsm_func_put),
- SOC_ENUM_EXT(SLIMBUS_1_TX_TEXT" "LSM_FUNCTION_TEXT, lsm_func_enum,
- msm_routing_lsm_func_get, msm_routing_lsm_func_put),
- SOC_ENUM_EXT(SLIMBUS_2_TX_TEXT" "LSM_FUNCTION_TEXT, lsm_func_enum,
- msm_routing_lsm_func_get, msm_routing_lsm_func_put),
- SOC_ENUM_EXT(SLIMBUS_3_TX_TEXT" "LSM_FUNCTION_TEXT, lsm_func_enum,
- msm_routing_lsm_func_get, msm_routing_lsm_func_put),
- SOC_ENUM_EXT(SLIMBUS_4_TX_TEXT" "LSM_FUNCTION_TEXT, lsm_func_enum,
- msm_routing_lsm_func_get, msm_routing_lsm_func_put),
- SOC_ENUM_EXT(SLIMBUS_5_TX_TEXT" "LSM_FUNCTION_TEXT, lsm_func_enum,
- msm_routing_lsm_func_get, msm_routing_lsm_func_put),
- };
- static const char * const aanc_slim_0_rx_text[] = {
- "ZERO", "SLIMBUS_0_TX", "SLIMBUS_1_TX", "SLIMBUS_2_TX", "SLIMBUS_3_TX",
- "SLIMBUS_4_TX", "SLIMBUS_5_TX", "SLIMBUS_6_TX"
- };
- static const struct soc_enum aanc_slim_0_rx_enum =
- SOC_ENUM_SINGLE_EXT(ARRAY_SIZE(aanc_slim_0_rx_text),
- aanc_slim_0_rx_text);
- static const struct snd_kcontrol_new aanc_slim_0_rx_mux[] = {
- SOC_DAPM_ENUM_EXT("AANC_SLIM_0_RX MUX", aanc_slim_0_rx_enum,
- msm_routing_slim_0_rx_aanc_mux_get,
- msm_routing_slim_0_rx_aanc_mux_put)
- };
- static const struct snd_kcontrol_new int_fm_vol_mixer_controls[] = {
- SOC_SINGLE_EXT_TLV("Internal FM RX Volume", SND_SOC_NOPM, 0,
- INT_RX_VOL_GAIN, 0, msm_routing_get_fm_vol_mixer,
- msm_routing_set_fm_vol_mixer, fm_rx_vol_gain),
- };
- static const struct snd_kcontrol_new int_hfp_vol_mixer_controls[] = {
- SOC_SINGLE_EXT_TLV("Internal HFP RX Volume", SND_SOC_NOPM, 0,
- INT_RX_VOL_GAIN, 0, msm_routing_get_hfp_vol_mixer,
- msm_routing_set_hfp_vol_mixer, hfp_rx_vol_gain),
- };
- static const struct snd_kcontrol_new multimedia2_vol_mixer_controls[] = {
- SOC_SINGLE_EXT_TLV("HIFI2 RX Volume", SND_SOC_NOPM, 0,
- INT_RX_VOL_GAIN, 0, msm_routing_get_multimedia2_vol_mixer,
- msm_routing_set_multimedia2_vol_mixer, multimedia2_rx_vol_gain),
- };
- static const struct snd_kcontrol_new multimedia5_vol_mixer_controls[] = {
- SOC_SINGLE_EXT_TLV("HIFI3 RX Volume", SND_SOC_NOPM, 0,
- INT_RX_VOL_GAIN, 0, msm_routing_get_multimedia5_vol_mixer,
- msm_routing_set_multimedia5_vol_mixer, multimedia5_rx_vol_gain),
- };
- static const struct snd_kcontrol_new multi_ch_channel_map_mixer_controls[] = {
- SOC_SINGLE_MULTI_EXT("Playback Channel Map", SND_SOC_NOPM, 0, 16,
- 0, 8, msm_routing_get_channel_map_mixer,
- msm_routing_put_channel_map_mixer),
- };
- static const struct snd_kcontrol_new lpa_SRS_trumedia_controls[] = {
- {.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
- .name = "SRS TruMedia",
- .access = SNDRV_CTL_ELEM_ACCESS_TLV_READ |
- SNDRV_CTL_ELEM_ACCESS_READWRITE,
- .info = snd_soc_info_volsw, \
- .get = msm_routing_get_srs_trumedia_control,
- .put = msm_routing_set_srs_trumedia_control,
- .private_value = ((unsigned long)&(struct soc_mixer_control)
- {.reg = SND_SOC_NOPM,
- .rreg = SND_SOC_NOPM,
- .shift = 0,
- .rshift = 0,
- .max = 0xFFFFFFFF,
- .platform_max = 0xFFFFFFFF,
- .invert = 0
- })
- }
- };
- static const struct snd_kcontrol_new lpa_SRS_trumedia_controls_HDMI[] = {
- {.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
- .name = "SRS TruMedia HDMI",
- .access = SNDRV_CTL_ELEM_ACCESS_TLV_READ |
- SNDRV_CTL_ELEM_ACCESS_READWRITE,
- .info = snd_soc_info_volsw, \
- .get = msm_routing_get_srs_trumedia_control,
- .put = msm_routing_set_srs_trumedia_control_HDMI,
- .private_value = ((unsigned long)&(struct soc_mixer_control)
- {.reg = SND_SOC_NOPM,
- .rreg = SND_SOC_NOPM,
- .shift = 0,
- .rshift = 0,
- .max = 0xFFFFFFFF,
- .platform_max = 0xFFFFFFFF,
- .invert = 0
- })
- }
- };
- static const struct snd_kcontrol_new lpa_SRS_trumedia_controls_I2S[] = {
- {.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
- .name = "SRS TruMedia I2S",
- .access = SNDRV_CTL_ELEM_ACCESS_TLV_READ |
- SNDRV_CTL_ELEM_ACCESS_READWRITE,
- .info = snd_soc_info_volsw, \
- .get = msm_routing_get_srs_trumedia_control,
- .put = msm_routing_set_srs_trumedia_control_I2S,
- .private_value = ((unsigned long)&(struct soc_mixer_control)
- {.reg = SND_SOC_NOPM,
- .rreg = SND_SOC_NOPM,
- .shift = 0,
- .rshift = 0,
- .max = 0xFFFFFFFF,
- .platform_max = 0xFFFFFFFF,
- .invert = 0
- })
- }
- };
- int msm_routing_get_dolby_security_control(
- struct snd_kcontrol *kcontrol,
- struct snd_ctl_elem_value *ucontrol) {
- /* not used while setting the manfr id*/
- return 0;
- }
- int msm_routing_put_dolby_security_control(
- struct snd_kcontrol *kcontrol,
- struct snd_ctl_elem_value *ucontrol) {
- int manufacturer_id = ucontrol->value.integer.value[0];
- core_set_dolby_manufacturer_id(manufacturer_id);
- return 0;
- }
- static const struct snd_kcontrol_new dolby_security_controls[] = {
- SOC_SINGLE_MULTI_EXT("DS1 Security", SND_SOC_NOPM, 0,
- 0xFFFFFFFF, 0, 1, msm_routing_get_dolby_security_control,
- msm_routing_put_dolby_security_control),
- };
- static const struct snd_kcontrol_new dolby_dap_param_to_set_controls[] = {
- SOC_SINGLE_MULTI_EXT("DS1 DAP Set Param", SND_SOC_NOPM, 0, 0xFFFFFFFF,
- 0, 128, msm_routing_get_dolby_dap_param_to_set_control,
- msm_routing_put_dolby_dap_param_to_set_control),
- };
- static const struct snd_kcontrol_new dolby_dap_param_to_get_controls[] = {
- SOC_SINGLE_MULTI_EXT("DS1 DAP Get Param", SND_SOC_NOPM, 0, 0xFFFFFFFF,
- 0, 128, msm_routing_get_dolby_dap_param_to_get_control,
- msm_routing_put_dolby_dap_param_to_get_control),
- };
- static const struct snd_kcontrol_new dolby_dap_param_visualizer_controls[] = {
- SOC_SINGLE_MULTI_EXT("DS1 DAP Get Visualizer", SND_SOC_NOPM, 0,
- 0xFFFFFFFF, 0, 41, msm_routing_get_dolby_dap_param_visualizer_control,
- msm_routing_put_dolby_dap_param_visualizer_control),
- };
- static const struct snd_kcontrol_new dolby_dap_param_end_point_controls[] = {
- SOC_SINGLE_MULTI_EXT("DS1 DAP Endpoint", SND_SOC_NOPM, 0,
- 0xFFFFFFFF, 0, 1, msm_routing_get_dolby_dap_endpoint_control,
- msm_routing_put_dolby_dap_endpoint_control),
- };
- int msm_routing_get_rms_value_control(struct snd_kcontrol *kcontrol,
- struct snd_ctl_elem_value *ucontrol) {
- int rc = 0;
- int be_idx = 0;
- char *param_value;
- int *update_param_value;
- uint32_t param_length = sizeof(uint32_t);
- uint32_t param_payload_len = RMS_PAYLOAD_LEN * sizeof(uint32_t);
- param_value = kzalloc(param_length, GFP_KERNEL);
- if (!param_value) {
- pr_err("%s, param memory alloc failed\n", __func__);
- return -ENOMEM;
- }
- for (be_idx = 0; be_idx < MSM_BACKEND_DAI_MAX; be_idx++)
- if (msm_bedais[be_idx].port_id == SLIMBUS_0_TX)
- break;
- if ((be_idx < MSM_BACKEND_DAI_MAX) && msm_bedais[be_idx].active) {
- rc = adm_get_params(SLIMBUS_0_TX,
- RMS_MODULEID_APPI_PASSTHRU,
- RMS_PARAM_FIRST_SAMPLE,
- param_length + param_payload_len,
- param_value);
- if (rc) {
- pr_err("%s: get parameters failed\n", __func__);
- kfree(param_value);
- return -EINVAL;
- }
- update_param_value = (int *)param_value;
- ucontrol->value.integer.value[0] = update_param_value[0];
- pr_debug("%s: FROM DSP value[0] 0x%x\n",
- __func__, update_param_value[0]);
- }
- kfree(param_value);
- return 0;
- }
- int msm_routing_put_rms_value_control(struct snd_kcontrol *kcontrol,
- struct snd_ctl_elem_value *ucontrol) {
- /* not used */
- return 0;
- }
- static const struct snd_kcontrol_new get_rms_controls[] = {
- SOC_SINGLE_EXT("Get RMS", SND_SOC_NOPM, 0, 0xFFFFFFFF,
- 0, msm_routing_get_rms_value_control,
- msm_routing_put_rms_value_control),
- };
- static int msm_voc_session_id_put(struct snd_kcontrol *kcontrol,
- struct snd_ctl_elem_value *ucontrol)
- {
- voc_session_id = ucontrol->value.integer.value[0];
- pr_debug("%s: voc_session_id=%u\n", __func__, voc_session_id);
- return 0;
- }
- static int msm_voc_session_id_get(struct snd_kcontrol *kcontrol,
- struct snd_ctl_elem_value *ucontrol)
- {
- ucontrol->value.integer.value[0] = voc_session_id;
- return 0;
- }
- static struct snd_kcontrol_new msm_voc_session_controls[] = {
- SOC_SINGLE_MULTI_EXT("Voc VSID", SND_SOC_NOPM, 0,
- 0xFFFFFFFF, 0, 1, msm_voc_session_id_get,
- msm_voc_session_id_put),
- };
- static const struct snd_kcontrol_new eq_enable_mixer_controls[] = {
- SOC_SINGLE_EXT("MultiMedia1 EQ Enable", SND_SOC_NOPM,
- MSM_FRONTEND_DAI_MULTIMEDIA1, 1, 0, msm_routing_get_eq_enable_mixer,
- msm_routing_put_eq_enable_mixer),
- SOC_SINGLE_EXT("MultiMedia2 EQ Enable", SND_SOC_NOPM,
- MSM_FRONTEND_DAI_MULTIMEDIA2, 1, 0, msm_routing_get_eq_enable_mixer,
- msm_routing_put_eq_enable_mixer),
- SOC_SINGLE_EXT("MultiMedia3 EQ Enable", SND_SOC_NOPM,
- MSM_FRONTEND_DAI_MULTIMEDIA3, 1, 0, msm_routing_get_eq_enable_mixer,
- msm_routing_put_eq_enable_mixer),
- };
- static const struct snd_kcontrol_new eq_band_mixer_controls[] = {
- SOC_SINGLE_EXT("MultiMedia1 EQ Band Count", SND_SOC_NOPM,
- MSM_FRONTEND_DAI_MULTIMEDIA1, 11, 0,
- msm_routing_get_eq_band_count_audio_mixer,
- msm_routing_put_eq_band_count_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia2 EQ Band Count", SND_SOC_NOPM,
- MSM_FRONTEND_DAI_MULTIMEDIA2, 11, 0,
- msm_routing_get_eq_band_count_audio_mixer,
- msm_routing_put_eq_band_count_audio_mixer),
- SOC_SINGLE_EXT("MultiMedia3 EQ Band Count", SND_SOC_NOPM,
- MSM_FRONTEND_DAI_MULTIMEDIA3, 11, 0,
- msm_routing_get_eq_band_count_audio_mixer,
- msm_routing_put_eq_band_count_audio_mixer),
- };
- static const struct snd_kcontrol_new eq_coeff_mixer_controls[] = {
- SOC_SINGLE_MULTI_EXT("MultiMedia1 EQ Band1", EQ_BAND1,
- MSM_FRONTEND_DAI_MULTIMEDIA1, 255, 0, 5,
- msm_routing_get_eq_band_audio_mixer,
- msm_routing_put_eq_band_audio_mixer),
- SOC_SINGLE_MULTI_EXT("MultiMedia1 EQ Band2", EQ_BAND2,
- MSM_FRONTEND_DAI_MULTIMEDIA1, 255, 0, 5,
- msm_routing_get_eq_band_audio_mixer,
- msm_routing_put_eq_band_audio_mixer),
- SOC_SINGLE_MULTI_EXT("MultiMedia1 EQ Band3", EQ_BAND3,
- MSM_FRONTEND_DAI_MULTIMEDIA1, 255, 0, 5,
- msm_routing_get_eq_band_audio_mixer,
- msm_routing_put_eq_band_audio_mixer),
- SOC_SINGLE_MULTI_EXT("MultiMedia1 EQ Band4", EQ_BAND4,
- MSM_FRONTEND_DAI_MULTIMEDIA1, 255, 0, 5,
- msm_routing_get_eq_band_audio_mixer,
- msm_routing_put_eq_band_audio_mixer),
- SOC_SINGLE_MULTI_EXT("MultiMedia1 EQ Band5", EQ_BAND5,
- MSM_FRONTEND_DAI_MULTIMEDIA1, 255, 0, 5,
- msm_routing_get_eq_band_audio_mixer,
- msm_routing_put_eq_band_audio_mixer),
- SOC_SINGLE_MULTI_EXT("MultiMedia1 EQ Band6", EQ_BAND6,
- MSM_FRONTEND_DAI_MULTIMEDIA1, 255, 0, 5,
- msm_routing_get_eq_band_audio_mixer,
- msm_routing_put_eq_band_audio_mixer),
- SOC_SINGLE_MULTI_EXT("MultiMedia1 EQ Band7", EQ_BAND7,
- MSM_FRONTEND_DAI_MULTIMEDIA1, 255, 0, 5,
- msm_routing_get_eq_band_audio_mixer,
- msm_routing_put_eq_band_audio_mixer),
- SOC_SINGLE_MULTI_EXT("MultiMedia1 EQ Band8", EQ_BAND8,
- MSM_FRONTEND_DAI_MULTIMEDIA1, 255, 0, 5,
- msm_routing_get_eq_band_audio_mixer,
- msm_routing_put_eq_band_audio_mixer),
- SOC_SINGLE_MULTI_EXT("MultiMedia1 EQ Band9", EQ_BAND9,
- MSM_FRONTEND_DAI_MULTIMEDIA1, 255, 0, 5,
- msm_routing_get_eq_band_audio_mixer,
- msm_routing_put_eq_band_audio_mixer),
- SOC_SINGLE_MULTI_EXT("MultiMedia1 EQ Band10", EQ_BAND10,
- MSM_FRONTEND_DAI_MULTIMEDIA1, 255, 0, 5,
- msm_routing_get_eq_band_audio_mixer,
- msm_routing_put_eq_band_audio_mixer),
- SOC_SINGLE_MULTI_EXT("MultiMedia1 EQ Band11", EQ_BAND11,
- MSM_FRONTEND_DAI_MULTIMEDIA1, 255, 0, 5,
- msm_routing_get_eq_band_audio_mixer,
- msm_routing_put_eq_band_audio_mixer),
- SOC_SINGLE_MULTI_EXT("MultiMedia1 EQ Band12", EQ_BAND12,
- MSM_FRONTEND_DAI_MULTIMEDIA1, 255, 0, 5,
- msm_routing_get_eq_band_audio_mixer,
- msm_routing_put_eq_band_audio_mixer),
- SOC_SINGLE_MULTI_EXT("MultiMedia2 EQ Band1", EQ_BAND1,
- MSM_FRONTEND_DAI_MULTIMEDIA2, 255, 0, 5,
- msm_routing_get_eq_band_audio_mixer,
- msm_routing_put_eq_band_audio_mixer),
- SOC_SINGLE_MULTI_EXT("MultiMedia2 EQ Band2", EQ_BAND2,
- MSM_FRONTEND_DAI_MULTIMEDIA2, 255, 0, 5,
- msm_routing_get_eq_band_audio_mixer,
- msm_routing_put_eq_band_audio_mixer),
- SOC_SINGLE_MULTI_EXT("MultiMedia2 EQ Band3", EQ_BAND3,
- MSM_FRONTEND_DAI_MULTIMEDIA2, 255, 0, 5,
- msm_routing_get_eq_band_audio_mixer,
- msm_routing_put_eq_band_audio_mixer),
- SOC_SINGLE_MULTI_EXT("MultiMedia2 EQ Band4", EQ_BAND4,
- MSM_FRONTEND_DAI_MULTIMEDIA2, 255, 0, 5,
- msm_routing_get_eq_band_audio_mixer,
- msm_routing_put_eq_band_audio_mixer),
- SOC_SINGLE_MULTI_EXT("MultiMedia2 EQ Band5", EQ_BAND5,
- MSM_FRONTEND_DAI_MULTIMEDIA2, 255, 0, 5,
- msm_routing_get_eq_band_audio_mixer,
- msm_routing_put_eq_band_audio_mixer),
- SOC_SINGLE_MULTI_EXT("MultiMedia2 EQ Band6", EQ_BAND6,
- MSM_FRONTEND_DAI_MULTIMEDIA2, 255, 0, 5,
- msm_routing_get_eq_band_audio_mixer,
- msm_routing_put_eq_band_audio_mixer),
- SOC_SINGLE_MULTI_EXT("MultiMedia2 EQ Band7", EQ_BAND7,
- MSM_FRONTEND_DAI_MULTIMEDIA2, 255, 0, 5,
- msm_routing_get_eq_band_audio_mixer,
- msm_routing_put_eq_band_audio_mixer),
- SOC_SINGLE_MULTI_EXT("MultiMedia2 EQ Band8", EQ_BAND8,
- MSM_FRONTEND_DAI_MULTIMEDIA2, 255, 0, 5,
- msm_routing_get_eq_band_audio_mixer,
- msm_routing_put_eq_band_audio_mixer),
- SOC_SINGLE_MULTI_EXT("MultiMedia2 EQ Band9", EQ_BAND9,
- MSM_FRONTEND_DAI_MULTIMEDIA2, 255, 0, 5,
- msm_routing_get_eq_band_audio_mixer,
- msm_routing_put_eq_band_audio_mixer),
- SOC_SINGLE_MULTI_EXT("MultiMedia2 EQ Band10", EQ_BAND10,
- MSM_FRONTEND_DAI_MULTIMEDIA2, 255, 0, 5,
- msm_routing_get_eq_band_audio_mixer,
- msm_routing_put_eq_band_audio_mixer),
- SOC_SINGLE_MULTI_EXT("MultiMedia2 EQ Band11", EQ_BAND11,
- MSM_FRONTEND_DAI_MULTIMEDIA2, 255, 0, 5,
- msm_routing_get_eq_band_audio_mixer,
- msm_routing_put_eq_band_audio_mixer),
- SOC_SINGLE_MULTI_EXT("MultiMedia2 EQ Band12", EQ_BAND12,
- MSM_FRONTEND_DAI_MULTIMEDIA2, 255, 0, 5,
- msm_routing_get_eq_band_audio_mixer,
- msm_routing_put_eq_band_audio_mixer),
- SOC_SINGLE_MULTI_EXT("MultiMedia3 EQ Band1", EQ_BAND1,
- MSM_FRONTEND_DAI_MULTIMEDIA3, 255, 0, 5,
- msm_routing_get_eq_band_audio_mixer,
- msm_routing_put_eq_band_audio_mixer),
- SOC_SINGLE_MULTI_EXT("MultiMedia3 EQ Band2", EQ_BAND2,
- MSM_FRONTEND_DAI_MULTIMEDIA3, 255, 0, 5,
- msm_routing_get_eq_band_audio_mixer,
- msm_routing_put_eq_band_audio_mixer),
- SOC_SINGLE_MULTI_EXT("MultiMedia3 EQ Band3", EQ_BAND3,
- MSM_FRONTEND_DAI_MULTIMEDIA3, 255, 0, 5,
- msm_routing_get_eq_band_audio_mixer,
- msm_routing_put_eq_band_audio_mixer),
- SOC_SINGLE_MULTI_EXT("MultiMedia3 EQ Band4", EQ_BAND4,
- MSM_FRONTEND_DAI_MULTIMEDIA3, 255, 0, 5,
- msm_routing_get_eq_band_audio_mixer,
- msm_routing_put_eq_band_audio_mixer),
- SOC_SINGLE_MULTI_EXT("MultiMedia3 EQ Band5", EQ_BAND5,
- MSM_FRONTEND_DAI_MULTIMEDIA3, 255, 0, 5,
- msm_routing_get_eq_band_audio_mixer,
- msm_routing_put_eq_band_audio_mixer),
- SOC_SINGLE_MULTI_EXT("MultiMedia3 EQ Band6", EQ_BAND6,
- MSM_FRONTEND_DAI_MULTIMEDIA3, 255, 0, 5,
- msm_routing_get_eq_band_audio_mixer,
- msm_routing_put_eq_band_audio_mixer),
- SOC_SINGLE_MULTI_EXT("MultiMedia3 EQ Band7", EQ_BAND7,
- MSM_FRONTEND_DAI_MULTIMEDIA3, 255, 0, 5,
- msm_routing_get_eq_band_audio_mixer,
- msm_routing_put_eq_band_audio_mixer),
- SOC_SINGLE_MULTI_EXT("MultiMedia3 EQ Band8", EQ_BAND8,
- MSM_FRONTEND_DAI_MULTIMEDIA3, 255, 0, 5,
- msm_routing_get_eq_band_audio_mixer,
- msm_routing_put_eq_band_audio_mixer),
- SOC_SINGLE_MULTI_EXT("MultiMedia3 EQ Band9", EQ_BAND9,
- MSM_FRONTEND_DAI_MULTIMEDIA3, 255, 0, 5,
- msm_routing_get_eq_band_audio_mixer,
- msm_routing_put_eq_band_audio_mixer),
- SOC_SINGLE_MULTI_EXT("MultiMedia3 EQ Band10", EQ_BAND10,
- MSM_FRONTEND_DAI_MULTIMEDIA3, 255, 0, 5,
- msm_routing_get_eq_band_audio_mixer,
- msm_routing_put_eq_band_audio_mixer),
- SOC_SINGLE_MULTI_EXT("MultiMedia3 EQ Band11", EQ_BAND11,
- MSM_FRONTEND_DAI_MULTIMEDIA3, 255, 0, 5,
- msm_routing_get_eq_band_audio_mixer,
- msm_routing_put_eq_band_audio_mixer),
- SOC_SINGLE_MULTI_EXT("MultiMedia3 EQ Band12", EQ_BAND12,
- MSM_FRONTEND_DAI_MULTIMEDIA3, 255, 0, 5,
- msm_routing_get_eq_band_audio_mixer,
- msm_routing_put_eq_band_audio_mixer),
- };
- static int spkr_prot_put_vi_lch_port(struct snd_kcontrol *kcontrol,
- struct snd_ctl_elem_value *ucontrol)
- {
- int ret = 0;
- int item;
- struct soc_enum *e = (struct soc_enum *)kcontrol->private_value;
- pr_debug("%s item is %d\n", __func__,
- ucontrol->value.enumerated.item[0]);
- mutex_lock(&routing_lock);
- item = ucontrol->value.enumerated.item[0];
- if (item < e->max) {
- pr_debug("%s RX DAI ID %d TX DAI id %d\n",
- __func__, e->shift_l , e->values[item]);
- if (e->shift_l < MSM_BACKEND_DAI_MAX &&
- e->values[item] < MSM_BACKEND_DAI_MAX)
- /* Enable feedback TX path */
- ret = afe_spk_prot_feed_back_cfg(
- msm_bedais[e->values[item]].port_id,
- msm_bedais[e->shift_l].port_id, 1, 0, 1);
- else {
- pr_debug("%s values are out of range item %d\n",
- __func__, e->values[item]);
- /* Disable feedback TX path */
- if (e->values[item] == MSM_BACKEND_DAI_MAX)
- ret = afe_spk_prot_feed_back_cfg(0, 0, 0, 0, 0);
- else
- ret = -EINVAL;
- }
- } else {
- pr_err("%s item value is out of range item\n", __func__);
- ret = -EINVAL;
- }
- mutex_unlock(&routing_lock);
- return ret;
- }
- static int spkr_prot_get_vi_lch_port(struct snd_kcontrol *kcontrol,
- struct snd_ctl_elem_value *ucontrol)
- {
- pr_debug("%s\n", __func__);
- return 0;
- }
- static const char * const slim0_rx_vi_fb_tx_lch_mux_text[] = {
- "ZERO", "SLIM4_TX"
- };
- static const int slim0_rx_vi_fb_tx_lch_value[] = {
- MSM_BACKEND_DAI_MAX, MSM_BACKEND_DAI_SLIMBUS_4_TX
- };
- static const struct soc_enum slim0_rx_vi_fb_lch_mux_enum =
- SOC_VALUE_ENUM_DOUBLE(0, MSM_BACKEND_DAI_SLIMBUS_0_RX, 0, 0,
- ARRAY_SIZE(slim0_rx_vi_fb_tx_lch_mux_text),
- slim0_rx_vi_fb_tx_lch_mux_text, slim0_rx_vi_fb_tx_lch_value);
- static const struct snd_kcontrol_new slim0_rx_vi_fb_lch_mux =
- SOC_DAPM_ENUM_EXT("SLIM0_RX_VI_FB_LCH_MUX",
- slim0_rx_vi_fb_lch_mux_enum, spkr_prot_get_vi_lch_port,
- spkr_prot_put_vi_lch_port);
- static const struct snd_kcontrol_new ss_solution_mixer_controls[] = {
- SOC_SINGLE_MULTI_EXT("SA data", SND_SOC_NOPM, 0, 65535, 0, 19,
- msm_sec_sa_get, msm_sec_sa_put),
- SOC_SINGLE_MULTI_EXT("VSP data", SND_SOC_NOPM, 0, 65535, 0, 1,
- msm_sec_vsp_get, msm_sec_vsp_put),
- SOC_SINGLE_MULTI_EXT("Audio DHA data", SND_SOC_NOPM, 0, 65535, 0, 13,
- msm_sec_dha_get, msm_sec_dha_put),
- SOC_SINGLE_MULTI_EXT("LRSM data", SND_SOC_NOPM, 0, 65535, 0, 2,
- msm_sec_lrsm_get, msm_sec_lrsm_put),
- SOC_SINGLE_MULTI_EXT("SA_EP data", SND_SOC_NOPM, 0, 65535, 0, 2,
- msm_sec_sa_ep_get, msm_sec_sa_ep_put),
- SOC_SINGLE_MULTI_EXT("MSP data", SND_SOC_NOPM, 0, 65535, 0, 1,
- msm_sec_msp_get, msm_sec_msp_put),
- };
- static const struct snd_soc_dapm_widget msm_qdsp6_widgets[] = {
- /* Frontend AIF */
- /* Widget name equals to Front-End DAI name<Need confirmation>,
- * Stream name must contains substring of front-end dai name
- */
- SND_SOC_DAPM_AIF_IN("MM_DL1", "MultiMedia1 Playback", 0, 0, 0, 0),
- SND_SOC_DAPM_AIF_IN("MM_DL2", "MultiMedia2 Playback", 0, 0, 0, 0),
- SND_SOC_DAPM_AIF_IN("MM_DL3", "MultiMedia3 Playback", 0, 0, 0, 0),
- SND_SOC_DAPM_AIF_IN("MM_DL4", "MultiMedia4 Playback", 0, 0, 0, 0),
- SND_SOC_DAPM_AIF_IN("MM_DL5", "MultiMedia5 Playback", 0, 0, 0, 0),
- SND_SOC_DAPM_AIF_IN("MM_DL6", "MultiMedia6 Playback", 0, 0, 0, 0),
- SND_SOC_DAPM_AIF_IN("MM_DL7", "MultiMedia7 Playback", 0, 0, 0, 0),
- SND_SOC_DAPM_AIF_IN("MM_DL8", "MultiMedia8 Playback", 0, 0, 0, 0),
- SND_SOC_DAPM_AIF_IN("MM_DL9", "MultiMedia9 Playback", 0, 0, 0, 0),
- #ifdef CONFIG_JACK_AUDIO
- SND_SOC_DAPM_AIF_IN("MM_DL10", "MultiMedia10 Playback", 0, 0, 0, 0),
- #endif
- SND_SOC_DAPM_AIF_IN("VOIP_DL", "VoIP Playback", 0, 0, 0, 0),
- SND_SOC_DAPM_AIF_OUT("MM_UL1", "MultiMedia1 Capture", 0, 0, 0, 0),
- SND_SOC_DAPM_AIF_OUT("MM_UL2", "MultiMedia2 Capture", 0, 0, 0, 0),
- SND_SOC_DAPM_AIF_OUT("MM_UL4", "MultiMedia4 Capture", 0, 0, 0, 0),
- SND_SOC_DAPM_AIF_OUT("MM_UL5", "MultiMedia5 Capture", 0, 0, 0, 0),
- SND_SOC_DAPM_AIF_OUT("MM_UL8", "MultiMedia8 Capture", 0, 0, 0, 0),
- SND_SOC_DAPM_AIF_OUT("MM_UL6", "MultiMedia6 Capture", 0, 0, 0, 0),
- SND_SOC_DAPM_AIF_OUT("MM_UL9", "MultiMedia9 Capture", 0, 0, 0, 0),
- #ifdef CONFIG_JACK_AUDIO
- SND_SOC_DAPM_AIF_OUT("MM_UL10", "MultiMedia10 Capture", 0, 0, 0, 0),
- #endif
- SND_SOC_DAPM_AIF_IN("CS-VOICE_DL1", "CS-VOICE Playback", 0, 0, 0, 0),
- SND_SOC_DAPM_AIF_OUT("CS-VOICE_UL1", "CS-VOICE Capture", 0, 0, 0, 0),
- SND_SOC_DAPM_AIF_IN("VOICE2_DL", "Voice2 Playback", 0, 0, 0, 0),
- SND_SOC_DAPM_AIF_OUT("VOICE2_UL", "Voice2 Capture", 0, 0, 0, 0),
- SND_SOC_DAPM_AIF_IN("VoLTE_DL", "VoLTE Playback", 0, 0, 0, 0),
- SND_SOC_DAPM_AIF_OUT("VoLTE_UL", "VoLTE Capture", 0, 0, 0, 0),
- SND_SOC_DAPM_AIF_IN("VoWLAN_DL", "VoWLAN Playback", 0, 0, 0, 0),
- SND_SOC_DAPM_AIF_OUT("VoWLAN_UL", "VoWLAN Capture", 0, 0, 0, 0),
- SND_SOC_DAPM_AIF_OUT("VOIP_UL", "VoIP Capture", 0, 0, 0, 0),
- SND_SOC_DAPM_AIF_IN("SLIM0_DL_HL", "SLIMBUS0_HOSTLESS Playback",
- 0, 0, 0, 0),
- SND_SOC_DAPM_AIF_OUT("SLIM0_UL_HL", "SLIMBUS0_HOSTLESS Capture",
- 0, 0, 0, 0),
- SND_SOC_DAPM_AIF_IN("SLIM1_DL_HL", "SLIMBUS1_HOSTLESS Playback",
- 0, 0, 0, 0),
- SND_SOC_DAPM_AIF_OUT("SLIM1_UL_HL", "SLIMBUS1_HOSTLESS Capture",
- 0, 0, 0, 0),
- SND_SOC_DAPM_AIF_IN("SLIM3_DL_HL", "SLIMBUS3_HOSTLESS Playback",
- 0, 0, 0, 0),
- SND_SOC_DAPM_AIF_OUT("SLIM3_UL_HL", "SLIMBUS3_HOSTLESS Capture",
- 0, 0, 0, 0),
- SND_SOC_DAPM_AIF_IN("SLIM4_DL_HL", "SLIMBUS4_HOSTLESS Playback",
- 0, 0, 0, 0),
- SND_SOC_DAPM_AIF_OUT("SLIM4_UL_HL", "SLIMBUS4_HOSTLESS Capture",
- 0, 0, 0, 0),
- SND_SOC_DAPM_AIF_IN("INTFM_DL_HL", "INT_FM_HOSTLESS Playback",
- 0, 0, 0, 0),
- SND_SOC_DAPM_AIF_OUT("INTFM_UL_HL", "INT_FM_HOSTLESS Capture",
- 0, 0, 0, 0),
- SND_SOC_DAPM_AIF_IN("INTHFP_DL_HL", "INT_HFP_BT_HOSTLESS Playback",
- 0, 0, 0, 0),
- SND_SOC_DAPM_AIF_OUT("INTHFP_UL_HL", "INT_HFP_BT_HOSTLESS Capture",
- 0, 0, 0, 0),
- SND_SOC_DAPM_AIF_IN("HDMI_DL_HL", "HDMI_HOSTLESS Playback", 0, 0, 0, 0),
- SND_SOC_DAPM_AIF_IN("SEC_I2S_DL_HL", "SEC_I2S_RX_HOSTLESS Playback",
- 0, 0, 0, 0),
- SND_SOC_DAPM_AIF_IN("SEC_MI2S_DL_HL",
- "Secondary MI2S_RX Hostless Playback",
- 0, 0, 0, 0),
- SND_SOC_DAPM_AIF_IN("AUXPCM_DL_HL", "AUXPCM_HOSTLESS Playback",
- 0, 0, 0, 0),
- SND_SOC_DAPM_AIF_OUT("AUXPCM_UL_HL", "AUXPCM_HOSTLESS Capture",
- 0, 0, 0, 0),
- SND_SOC_DAPM_AIF_OUT("MI2S_UL_HL", "MI2S_TX_HOSTLESS Capture",
- 0, 0, 0, 0),
- SND_SOC_DAPM_AIF_OUT("PRI_MI2S_UL_HL",
- "Primary MI2S_TX Hostless Capture",
- 0, 0, 0, 0),
- SND_SOC_DAPM_AIF_IN("PRI_MI2S_DL_HL",
- "Primary MI2S_RX Hostless Playback",
- 0, 0, 0, 0),
- SND_SOC_DAPM_AIF_OUT("MI2S_DL_HL", "MI2S_RX_HOSTLESS Playback",
- 0, 0, 0, 0),
- SND_SOC_DAPM_AIF_IN("DTMF_DL_HL", "DTMF_RX_HOSTLESS Playback",
- 0, 0, 0, 0),
- /* LSM */
- SND_SOC_DAPM_AIF_OUT("LSM1_UL_HL", "Listen 1 Audio Service Capture",
- 0, 0, 0, 0),
- SND_SOC_DAPM_AIF_OUT("LSM2_UL_HL", "Listen 2 Audio Service Capture",
- 0, 0, 0, 0),
- SND_SOC_DAPM_AIF_OUT("LSM3_UL_HL", "Listen 3 Audio Service Capture",
- 0, 0, 0, 0),
- SND_SOC_DAPM_AIF_OUT("LSM4_UL_HL", "Listen 4 Audio Service Capture",
- 0, 0, 0, 0),
- SND_SOC_DAPM_AIF_OUT("LSM5_UL_HL", "Listen 5 Audio Service Capture",
- 0, 0, 0, 0),
- SND_SOC_DAPM_AIF_OUT("LSM6_UL_HL", "Listen 6 Audio Service Capture",
- 0, 0, 0, 0),
- SND_SOC_DAPM_AIF_OUT("LSM7_UL_HL", "Listen 7 Audio Service Capture",
- 0, 0, 0, 0),
- SND_SOC_DAPM_AIF_OUT("LSM8_UL_HL", "Listen 8 Audio Service Capture",
- 0, 0, 0, 0),
- SND_SOC_DAPM_AIF_IN("QCHAT_DL", "QCHAT Playback", 0, 0, 0, 0),
- SND_SOC_DAPM_AIF_OUT("QCHAT_UL", "QCHAT Capture", 0, 0, 0, 0),
- /* Backend AIF */
- /* Stream name equals to backend dai link stream name
- */
- SND_SOC_DAPM_AIF_OUT("PRI_I2S_RX", "Primary I2S Playback", 0, 0, 0, 0),
- SND_SOC_DAPM_AIF_OUT("SEC_I2S_RX", "Secondary I2S Playback",
- 0, 0, 0 , 0),
- SND_SOC_DAPM_AIF_OUT("SLIMBUS_0_RX", "Slimbus Playback", 0, 0, 0, 0),
- SND_SOC_DAPM_AIF_OUT("HDMI", "HDMI Playback", 0, 0, 0 , 0),
- SND_SOC_DAPM_AIF_OUT("MI2S_RX", "MI2S Playback", 0, 0, 0, 0),
- SND_SOC_DAPM_AIF_OUT("QUAT_MI2S_RX", "Quaternary MI2S Playback",
- 0, 0, 0, 0),
- SND_SOC_DAPM_AIF_OUT("TERT_MI2S_RX", "Tertiary MI2S Playback",
- 0, 0, 0, 0),
- SND_SOC_DAPM_AIF_OUT("SEC_MI2S_RX", "Secondary MI2S Playback",
- 0, 0, 0, 0),
- SND_SOC_DAPM_AIF_OUT("PRI_MI2S_RX", "Primary MI2S Playback",
- 0, 0, 0, 0),
- SND_SOC_DAPM_AIF_IN("PRI_I2S_TX", "Primary I2S Capture", 0, 0, 0, 0),
- SND_SOC_DAPM_AIF_IN("MI2S_TX", "MI2S Capture", 0, 0, 0, 0),
- SND_SOC_DAPM_AIF_IN("QUAT_MI2S_TX", "Quaternary MI2S Capture",
- 0, 0, 0, 0),
- SND_SOC_DAPM_AIF_IN("PRI_MI2S_TX", "Primary MI2S Capture",
- 0, 0, 0, 0),
- SND_SOC_DAPM_AIF_IN("TERT_MI2S_TX", "Tertiary MI2S Capture",
- 0, 0, 0, 0),
- SND_SOC_DAPM_AIF_IN("SEC_MI2S_TX", "Secondary MI2S Capture",
- 0, 0, 0, 0),
- SND_SOC_DAPM_AIF_IN("SLIMBUS_0_TX", "Slimbus Capture", 0, 0, 0, 0),
- SND_SOC_DAPM_AIF_OUT("INT_BT_SCO_RX", "Internal BT-SCO Playback",
- 0, 0, 0 , 0),
- SND_SOC_DAPM_AIF_IN("INT_BT_SCO_TX", "Internal BT-SCO Capture",
- 0, 0, 0, 0),
- SND_SOC_DAPM_AIF_OUT("INT_FM_RX", "Internal FM Playback",
- 0, 0, 0 , 0),
- SND_SOC_DAPM_AIF_IN("INT_FM_TX", "Internal FM Capture",
- 0, 0, 0, 0),
- SND_SOC_DAPM_AIF_OUT("PCM_RX", "AFE Playback",
- 0, 0, 0 , 0),
- SND_SOC_DAPM_AIF_IN("PCM_TX", "AFE Capture",
- 0, 0, 0 , 0),
- /* incall */
- SND_SOC_DAPM_AIF_OUT("VOICE_PLAYBACK_TX", "Voice Farend Playback",
- 0, 0, 0 , 0),
- SND_SOC_DAPM_AIF_OUT("VOICE2_PLAYBACK_TX", "Voice2 Farend Playback",
- 0, 0, 0 , 0),
- SND_SOC_DAPM_AIF_OUT("SLIMBUS_4_RX", "Slimbus4 Playback",
- 0, 0, 0 , 0),
- SND_SOC_DAPM_AIF_IN("INCALL_RECORD_TX", "Voice Uplink Capture",
- 0, 0, 0, 0),
- SND_SOC_DAPM_AIF_IN("INCALL_RECORD_RX", "Voice Downlink Capture",
- 0, 0, 0, 0),
- SND_SOC_DAPM_AIF_IN("SLIMBUS_4_TX", "Slimbus4 Capture",
- 0, 0, 0, 0),
- SND_SOC_DAPM_AIF_IN("SLIMBUS_5_TX", "Slimbus5 Capture", 0, 0, 0, 0),
- SND_SOC_DAPM_AIF_OUT("AUX_PCM_RX", "AUX PCM Playback", 0, 0, 0, 0),
- SND_SOC_DAPM_AIF_IN("AUX_PCM_TX", "AUX PCM Capture", 0, 0, 0, 0),
- SND_SOC_DAPM_AIF_OUT("SEC_AUX_PCM_RX", "Sec AUX PCM Playback",
- 0, 0, 0, 0),
- SND_SOC_DAPM_AIF_IN("SEC_AUX_PCM_TX", "Sec AUX PCM Capture",
- 0, 0, 0, 0),
- SND_SOC_DAPM_AIF_IN("VOICE_STUB_DL", "VOICE_STUB Playback", 0, 0, 0, 0),
- SND_SOC_DAPM_AIF_OUT("VOICE_STUB_UL", "VOICE_STUB Capture", 0, 0, 0, 0),
- SND_SOC_DAPM_AIF_OUT("STUB_RX", "Stub Playback", 0, 0, 0, 0),
- SND_SOC_DAPM_AIF_IN("STUB_TX", "Stub Capture", 0, 0, 0, 0),
- SND_SOC_DAPM_AIF_OUT("SLIMBUS_1_RX", "Slimbus1 Playback", 0, 0, 0, 0),
- SND_SOC_DAPM_AIF_IN("SLIMBUS_1_TX", "Slimbus1 Capture", 0, 0, 0, 0),
- SND_SOC_DAPM_AIF_IN("STUB_1_TX", "Stub1 Capture", 0, 0, 0, 0),
- SND_SOC_DAPM_AIF_OUT("SLIMBUS_3_RX", "Slimbus3 Playback", 0, 0, 0, 0),
- SND_SOC_DAPM_AIF_IN("SLIMBUS_3_TX", "Slimbus3 Capture", 0, 0, 0, 0),
- /* Switch Definitions */
- SND_SOC_DAPM_SWITCH("SLIMBUS_DL_HL", SND_SOC_NOPM, 0, 0,
- &fm_switch_mixer_controls),
- SND_SOC_DAPM_SWITCH("SLIMBUS1_DL_HL", SND_SOC_NOPM, 0, 0,
- &fm_switch_mixer_controls),
- SND_SOC_DAPM_SWITCH("SLIMBUS3_DL_HL", SND_SOC_NOPM, 0, 0,
- &fm_switch_mixer_controls),
- SND_SOC_DAPM_SWITCH("SLIMBUS4_DL_HL", SND_SOC_NOPM, 0, 0,
- &fm_switch_mixer_controls),
- SND_SOC_DAPM_SWITCH("PCM_RX_DL_HL", SND_SOC_NOPM, 0, 0,
- &pcm_rx_switch_mixer_controls),
- SND_SOC_DAPM_SWITCH("PRI_MI2S_RX_DL_HL", SND_SOC_NOPM, 0, 0,
- &pri_mi2s_rx_switch_mixer_controls),
- /* Mux Definitions */
- SND_SOC_DAPM_MUX("LSM1 MUX", SND_SOC_NOPM, 0, 0, &lsm1_mux),
- SND_SOC_DAPM_MUX("LSM2 MUX", SND_SOC_NOPM, 0, 0, &lsm2_mux),
- SND_SOC_DAPM_MUX("LSM3 MUX", SND_SOC_NOPM, 0, 0, &lsm3_mux),
- SND_SOC_DAPM_MUX("LSM4 MUX", SND_SOC_NOPM, 0, 0, &lsm4_mux),
- SND_SOC_DAPM_MUX("LSM5 MUX", SND_SOC_NOPM, 0, 0, &lsm5_mux),
- SND_SOC_DAPM_MUX("LSM6 MUX", SND_SOC_NOPM, 0, 0, &lsm6_mux),
- SND_SOC_DAPM_MUX("LSM7 MUX", SND_SOC_NOPM, 0, 0, &lsm7_mux),
- SND_SOC_DAPM_MUX("LSM8 MUX", SND_SOC_NOPM, 0, 0, &lsm8_mux),
- SND_SOC_DAPM_MUX("SLIM_0_RX AANC MUX", SND_SOC_NOPM, 0, 0,
- aanc_slim_0_rx_mux),
- /* Mixer definitions */
- SND_SOC_DAPM_MIXER("PRI_RX Audio Mixer", SND_SOC_NOPM, 0, 0,
- pri_i2s_rx_mixer_controls, ARRAY_SIZE(pri_i2s_rx_mixer_controls)),
- SND_SOC_DAPM_MIXER("SEC_RX Audio Mixer", SND_SOC_NOPM, 0, 0,
- sec_i2s_rx_mixer_controls, ARRAY_SIZE(sec_i2s_rx_mixer_controls)),
- SND_SOC_DAPM_MIXER("SLIMBUS_0_RX Audio Mixer", SND_SOC_NOPM, 0, 0,
- slimbus_rx_mixer_controls, ARRAY_SIZE(slimbus_rx_mixer_controls)),
- SND_SOC_DAPM_MIXER("HDMI Mixer", SND_SOC_NOPM, 0, 0,
- hdmi_mixer_controls, ARRAY_SIZE(hdmi_mixer_controls)),
- SND_SOC_DAPM_MIXER("MI2S_RX Audio Mixer", SND_SOC_NOPM, 0, 0,
- mi2s_rx_mixer_controls, ARRAY_SIZE(mi2s_rx_mixer_controls)),
- SND_SOC_DAPM_MIXER("QUAT_MI2S_RX Audio Mixer", SND_SOC_NOPM, 0, 0,
- quaternary_mi2s_rx_mixer_controls,
- ARRAY_SIZE(quaternary_mi2s_rx_mixer_controls)),
- SND_SOC_DAPM_MIXER("TERT_MI2S_RX Audio Mixer", SND_SOC_NOPM, 0, 0,
- tertiary_mi2s_rx_mixer_controls,
- ARRAY_SIZE(tertiary_mi2s_rx_mixer_controls)),
- SND_SOC_DAPM_MIXER("SEC_MI2S_RX Audio Mixer", SND_SOC_NOPM, 0, 0,
- secondary_mi2s_rx_mixer_controls,
- ARRAY_SIZE(secondary_mi2s_rx_mixer_controls)),
- SND_SOC_DAPM_MIXER("SEC_MI2S_RX Port Mixer", SND_SOC_NOPM, 0, 0,
- mi2s_hl_mixer_controls,
- ARRAY_SIZE(mi2s_hl_mixer_controls)),
- SND_SOC_DAPM_MIXER("PRI_MI2S_RX Audio Mixer", SND_SOC_NOPM, 0, 0,
- primary_mi2s_rx_mixer_controls,
- ARRAY_SIZE(primary_mi2s_rx_mixer_controls)),
- SND_SOC_DAPM_MIXER("MultiMedia1 Mixer", SND_SOC_NOPM, 0, 0,
- mmul1_mixer_controls, ARRAY_SIZE(mmul1_mixer_controls)),
- SND_SOC_DAPM_MIXER("MultiMedia2 Mixer", SND_SOC_NOPM, 0, 0,
- mmul2_mixer_controls, ARRAY_SIZE(mmul2_mixer_controls)),
- SND_SOC_DAPM_MIXER("MultiMedia4 Mixer", SND_SOC_NOPM, 0, 0,
- mmul4_mixer_controls, ARRAY_SIZE(mmul4_mixer_controls)),
- SND_SOC_DAPM_MIXER("MultiMedia5 Mixer", SND_SOC_NOPM, 0, 0,
- mmul5_mixer_controls, ARRAY_SIZE(mmul5_mixer_controls)),
- SND_SOC_DAPM_MIXER("MultiMedia8 Mixer", SND_SOC_NOPM, 0, 0,
- mmul8_mixer_controls, ARRAY_SIZE(mmul8_mixer_controls)),
- SND_SOC_DAPM_MIXER("MultiMedia6 Mixer", SND_SOC_NOPM, 0, 0,
- mmul6_mixer_controls, ARRAY_SIZE(mmul6_mixer_controls)),
- #ifdef CONFIG_JACK_AUDIO
- SND_SOC_DAPM_MIXER("MultiMedia10 Mixer", SND_SOC_NOPM, 0, 0,
- mmul10_mixer_controls, ARRAY_SIZE(mmul10_mixer_controls)),
- #endif
- SND_SOC_DAPM_MIXER("AUX_PCM_RX Audio Mixer", SND_SOC_NOPM, 0, 0,
- auxpcm_rx_mixer_controls, ARRAY_SIZE(auxpcm_rx_mixer_controls)),
- SND_SOC_DAPM_MIXER("SEC_AUX_PCM_RX Audio Mixer", SND_SOC_NOPM, 0, 0,
- sec_auxpcm_rx_mixer_controls, ARRAY_SIZE(sec_auxpcm_rx_mixer_controls)),
- /* incall */
- SND_SOC_DAPM_MIXER("Incall_Music Audio Mixer", SND_SOC_NOPM, 0, 0,
- incall_music_delivery_mixer_controls,
- ARRAY_SIZE(incall_music_delivery_mixer_controls)),
- SND_SOC_DAPM_MIXER("Incall_Music_2 Audio Mixer", SND_SOC_NOPM, 0, 0,
- incall_music2_delivery_mixer_controls,
- ARRAY_SIZE(incall_music2_delivery_mixer_controls)),
- SND_SOC_DAPM_MIXER("SLIMBUS_4_RX Audio Mixer", SND_SOC_NOPM, 0, 0,
- slimbus_4_rx_mixer_controls,
- ARRAY_SIZE(slimbus_4_rx_mixer_controls)),
- /* Voice Mixer */
- SND_SOC_DAPM_MIXER("PRI_RX_Voice Mixer",
- SND_SOC_NOPM, 0, 0, pri_rx_voice_mixer_controls,
- ARRAY_SIZE(pri_rx_voice_mixer_controls)),
- SND_SOC_DAPM_MIXER("SEC_RX_Voice Mixer",
- SND_SOC_NOPM, 0, 0,
- sec_i2s_rx_voice_mixer_controls,
- ARRAY_SIZE(sec_i2s_rx_voice_mixer_controls)),
- SND_SOC_DAPM_MIXER("SEC_MI2S_RX_Voice Mixer",
- SND_SOC_NOPM, 0, 0,
- sec_mi2s_rx_voice_mixer_controls,
- ARRAY_SIZE(sec_mi2s_rx_voice_mixer_controls)),
- SND_SOC_DAPM_MIXER("SLIM_0_RX_Voice Mixer",
- SND_SOC_NOPM, 0, 0,
- slimbus_rx_voice_mixer_controls,
- ARRAY_SIZE(slimbus_rx_voice_mixer_controls)),
- SND_SOC_DAPM_MIXER("INTERNAL_BT_SCO_RX_Voice Mixer",
- SND_SOC_NOPM, 0, 0,
- bt_sco_rx_voice_mixer_controls,
- ARRAY_SIZE(bt_sco_rx_voice_mixer_controls)),
- SND_SOC_DAPM_MIXER("AFE_PCM_RX_Voice Mixer",
- SND_SOC_NOPM, 0, 0,
- afe_pcm_rx_voice_mixer_controls,
- ARRAY_SIZE(afe_pcm_rx_voice_mixer_controls)),
- SND_SOC_DAPM_MIXER("AUX_PCM_RX_Voice Mixer",
- SND_SOC_NOPM, 0, 0,
- aux_pcm_rx_voice_mixer_controls,
- ARRAY_SIZE(aux_pcm_rx_voice_mixer_controls)),
- SND_SOC_DAPM_MIXER("SEC_AUX_PCM_RX_Voice Mixer",
- SND_SOC_NOPM, 0, 0,
- sec_aux_pcm_rx_voice_mixer_controls,
- ARRAY_SIZE(sec_aux_pcm_rx_voice_mixer_controls)),
- SND_SOC_DAPM_MIXER("HDMI_RX_Voice Mixer",
- SND_SOC_NOPM, 0, 0,
- hdmi_rx_voice_mixer_controls,
- ARRAY_SIZE(hdmi_rx_voice_mixer_controls)),
- SND_SOC_DAPM_MIXER("MI2S_RX_Voice Mixer",
- SND_SOC_NOPM, 0, 0,
- mi2s_rx_voice_mixer_controls,
- ARRAY_SIZE(mi2s_rx_voice_mixer_controls)),
- SND_SOC_DAPM_MIXER("Voice_Tx Mixer",
- SND_SOC_NOPM, 0, 0, tx_voice_mixer_controls,
- ARRAY_SIZE(tx_voice_mixer_controls)),
- SND_SOC_DAPM_MIXER("Voice2_Tx Mixer",
- SND_SOC_NOPM, 0, 0, tx_voice2_mixer_controls,
- ARRAY_SIZE(tx_voice2_mixer_controls)),
- SND_SOC_DAPM_MIXER("Voip_Tx Mixer",
- SND_SOC_NOPM, 0, 0, tx_voip_mixer_controls,
- ARRAY_SIZE(tx_voip_mixer_controls)),
- SND_SOC_DAPM_MIXER("VoLTE_Tx Mixer",
- SND_SOC_NOPM, 0, 0, tx_volte_mixer_controls,
- ARRAY_SIZE(tx_volte_mixer_controls)),
- SND_SOC_DAPM_MIXER("VoWLAN_Tx Mixer",
- SND_SOC_NOPM, 0, 0, tx_vowlan_mixer_controls,
- ARRAY_SIZE(tx_vowlan_mixer_controls)),
- SND_SOC_DAPM_MIXER("INTERNAL_BT_SCO_RX Audio Mixer", SND_SOC_NOPM, 0, 0,
- int_bt_sco_rx_mixer_controls, ARRAY_SIZE(int_bt_sco_rx_mixer_controls)),
- SND_SOC_DAPM_MIXER("INTERNAL_FM_RX Audio Mixer", SND_SOC_NOPM, 0, 0,
- int_fm_rx_mixer_controls, ARRAY_SIZE(int_fm_rx_mixer_controls)),
- SND_SOC_DAPM_MIXER("AFE_PCM_RX Audio Mixer", SND_SOC_NOPM, 0, 0,
- afe_pcm_rx_mixer_controls, ARRAY_SIZE(afe_pcm_rx_mixer_controls)),
- SND_SOC_DAPM_MIXER("Voice Stub Tx Mixer", SND_SOC_NOPM, 0, 0,
- tx_voice_stub_mixer_controls, ARRAY_SIZE(tx_voice_stub_mixer_controls)),
- SND_SOC_DAPM_MIXER("STUB_RX Mixer", SND_SOC_NOPM, 0, 0,
- stub_rx_mixer_controls, ARRAY_SIZE(stub_rx_mixer_controls)),
- SND_SOC_DAPM_MIXER("SLIMBUS_1_RX Mixer", SND_SOC_NOPM, 0, 0,
- slimbus_1_rx_mixer_controls, ARRAY_SIZE(slimbus_1_rx_mixer_controls)),
- SND_SOC_DAPM_MIXER("SLIMBUS_3_RX_Voice Mixer", SND_SOC_NOPM, 0, 0,
- slimbus_3_rx_mixer_controls, ARRAY_SIZE(slimbus_3_rx_mixer_controls)),
- SND_SOC_DAPM_MIXER("SLIMBUS_0_RX Port Mixer",
- SND_SOC_NOPM, 0, 0, sbus_0_rx_port_mixer_controls,
- ARRAY_SIZE(sbus_0_rx_port_mixer_controls)),
- SND_SOC_DAPM_MIXER("AUXPCM_RX Port Mixer",
- SND_SOC_NOPM, 0, 0, auxpcm_rx_port_mixer_controls,
- ARRAY_SIZE(auxpcm_rx_port_mixer_controls)),
- SND_SOC_DAPM_MIXER("SEC_AUXPCM_RX Port Mixer",
- SND_SOC_NOPM, 0, 0, sec_auxpcm_rx_port_mixer_controls,
- ARRAY_SIZE(sec_auxpcm_rx_port_mixer_controls)),
- SND_SOC_DAPM_MIXER("SLIMBUS_1_RX Port Mixer", SND_SOC_NOPM, 0, 0,
- sbus_1_rx_port_mixer_controls,
- ARRAY_SIZE(sbus_1_rx_port_mixer_controls)),
- SND_SOC_DAPM_MIXER("INTERNAL_BT_SCO_RX Port Mixer", SND_SOC_NOPM, 0, 0,
- bt_sco_rx_port_mixer_controls,
- ARRAY_SIZE(bt_sco_rx_port_mixer_controls)),
- SND_SOC_DAPM_MIXER("AFE_PCM_RX Port Mixer",
- SND_SOC_NOPM, 0, 0, afe_pcm_rx_port_mixer_controls,
- ARRAY_SIZE(afe_pcm_rx_port_mixer_controls)),
- SND_SOC_DAPM_MIXER("HDMI_RX Port Mixer",
- SND_SOC_NOPM, 0, 0, hdmi_rx_port_mixer_controls,
- ARRAY_SIZE(hdmi_rx_port_mixer_controls)),
- SND_SOC_DAPM_MIXER("SEC_I2S_RX Port Mixer",
- SND_SOC_NOPM, 0, 0, sec_i2s_rx_port_mixer_controls,
- ARRAY_SIZE(sec_i2s_rx_port_mixer_controls)),
- SND_SOC_DAPM_MIXER("SLIMBUS_3_RX Port Mixer",
- SND_SOC_NOPM, 0, 0, sbus_3_rx_port_mixer_controls,
- ARRAY_SIZE(sbus_3_rx_port_mixer_controls)),
- SND_SOC_DAPM_MIXER("MI2S_RX Port Mixer", SND_SOC_NOPM, 0, 0,
- mi2s_rx_port_mixer_controls, ARRAY_SIZE(mi2s_rx_port_mixer_controls)),
- SND_SOC_DAPM_MIXER("PRI_MI2S_RX Port Mixer", SND_SOC_NOPM, 0, 0,
- primary_mi2s_rx_port_mixer_controls,
- ARRAY_SIZE(primary_mi2s_rx_port_mixer_controls)),
- SND_SOC_DAPM_MIXER("QCHAT_Tx Mixer",
- SND_SOC_NOPM, 0, 0, tx_qchat_mixer_controls,
- ARRAY_SIZE(tx_qchat_mixer_controls)),
- /* Virtual Pins to force backends ON atm */
- SND_SOC_DAPM_OUTPUT("BE_OUT"),
- SND_SOC_DAPM_INPUT("BE_IN"),
- SND_SOC_DAPM_MUX("SLIM0_RX_VI_FB_LCH_MUX", SND_SOC_NOPM, 0, 0,
- &slim0_rx_vi_fb_lch_mux),
- SND_SOC_DAPM_MUX("VOC_EXT_EC MUX", SND_SOC_NOPM, 0, 0,
- &voc_ext_ec_mux),
- SND_SOC_DAPM_MUX("AUDIO_REF_EC_UL1 MUX", SND_SOC_NOPM, 0, 0,
- &ext_ec_ref_mux_ul1),
- SND_SOC_DAPM_MUX("AUDIO_REF_EC_UL2 MUX", SND_SOC_NOPM, 0, 0,
- &ext_ec_ref_mux_ul2),
- SND_SOC_DAPM_MUX("AUDIO_REF_EC_UL4 MUX", SND_SOC_NOPM, 0, 0,
- &ext_ec_ref_mux_ul4),
- SND_SOC_DAPM_MUX("AUDIO_REF_EC_UL5 MUX", SND_SOC_NOPM, 0, 0,
- &ext_ec_ref_mux_ul5),
- SND_SOC_DAPM_MUX("AUDIO_REF_EC_UL6 MUX", SND_SOC_NOPM, 0, 0,
- &ext_ec_ref_mux_ul6),
- SND_SOC_DAPM_MUX("AUDIO_REF_EC_UL8 MUX", SND_SOC_NOPM, 0, 0,
- &ext_ec_ref_mux_ul8),
- SND_SOC_DAPM_MUX("AUDIO_REF_EC_UL9 MUX", SND_SOC_NOPM, 0, 0,
- &ext_ec_ref_mux_ul9),
- };
- static const struct snd_soc_dapm_route intercon[] = {
- {"PRI_RX Audio Mixer", "MultiMedia1", "MM_DL1"},
- {"PRI_RX Audio Mixer", "MultiMedia2", "MM_DL2"},
- {"PRI_RX Audio Mixer", "MultiMedia3", "MM_DL3"},
- {"PRI_RX Audio Mixer", "MultiMedia4", "MM_DL4"},
- {"PRI_RX Audio Mixer", "MultiMedia5", "MM_DL5"},
- {"PRI_RX Audio Mixer", "MultiMedia6", "MM_DL6"},
- {"PRI_RX Audio Mixer", "MultiMedia7", "MM_DL7"},
- {"PRI_RX Audio Mixer", "MultiMedia8", "MM_DL8"},
- {"PRI_RX Audio Mixer", "MultiMedia9", "MM_DL9"},
- {"PRI_I2S_RX", NULL, "PRI_RX Audio Mixer"},
- {"SEC_RX Audio Mixer", "MultiMedia1", "MM_DL1"},
- {"SEC_RX Audio Mixer", "MultiMedia2", "MM_DL2"},
- {"SEC_RX Audio Mixer", "MultiMedia3", "MM_DL3"},
- {"SEC_RX Audio Mixer", "MultiMedia4", "MM_DL4"},
- {"SEC_RX Audio Mixer", "MultiMedia5", "MM_DL5"},
- {"SEC_RX Audio Mixer", "MultiMedia6", "MM_DL6"},
- {"SEC_RX Audio Mixer", "MultiMedia7", "MM_DL7"},
- {"SEC_RX Audio Mixer", "MultiMedia8", "MM_DL8"},
- {"SEC_RX Audio Mixer", "MultiMedia9", "MM_DL9"},
- {"SEC_I2S_RX", NULL, "SEC_RX Audio Mixer"},
- {"SLIMBUS_0_RX Audio Mixer", "MultiMedia1", "MM_DL1"},
- {"SLIMBUS_0_RX Audio Mixer", "MultiMedia2", "MM_DL2"},
- {"SLIMBUS_0_RX Audio Mixer", "MultiMedia3", "MM_DL3"},
- {"SLIMBUS_0_RX Audio Mixer", "MultiMedia4", "MM_DL4"},
- {"SLIMBUS_0_RX Audio Mixer", "MultiMedia5", "MM_DL5"},
- {"SLIMBUS_0_RX Audio Mixer", "MultiMedia6", "MM_DL6"},
- {"SLIMBUS_0_RX Audio Mixer", "MultiMedia7", "MM_DL7"},
- {"SLIMBUS_0_RX Audio Mixer", "MultiMedia8", "MM_DL8"},
- {"SLIMBUS_0_RX Audio Mixer", "MultiMedia9", "MM_DL9"},
- #ifdef CONFIG_JACK_AUDIO
- {"SLIMBUS_0_RX Audio Mixer", "MultiMedia10", "MM_DL10"},
- #endif
- {"SLIMBUS_0_RX", NULL, "SLIMBUS_0_RX Audio Mixer"},
- {"HDMI Mixer", "MultiMedia1", "MM_DL1"},
- {"HDMI Mixer", "MultiMedia2", "MM_DL2"},
- {"HDMI Mixer", "MultiMedia3", "MM_DL3"},
- {"HDMI Mixer", "MultiMedia4", "MM_DL4"},
- {"HDMI Mixer", "MultiMedia5", "MM_DL5"},
- {"HDMI Mixer", "MultiMedia6", "MM_DL6"},
- {"HDMI Mixer", "MultiMedia7", "MM_DL7"},
- {"HDMI Mixer", "MultiMedia8", "MM_DL8"},
- {"HDMI Mixer", "MultiMedia9", "MM_DL9"},
- {"HDMI", NULL, "HDMI Mixer"},
- /* incall */
- {"Incall_Music Audio Mixer", "MultiMedia1", "MM_DL1"},
- {"Incall_Music Audio Mixer", "MultiMedia2", "MM_DL2"},
- {"Incall_Music Audio Mixer", "MultiMedia5", "MM_DL5"},
- {"Incall_Music Audio Mixer", "MultiMedia9", "MM_DL9"},
- {"VOICE_PLAYBACK_TX", NULL, "Incall_Music Audio Mixer"},
- {"Incall_Music_2 Audio Mixer", "MultiMedia1", "MM_DL1"},
- {"Incall_Music_2 Audio Mixer", "MultiMedia2", "MM_DL2"},
- {"Incall_Music_2 Audio Mixer", "MultiMedia5", "MM_DL5"},
- {"Incall_Music_2 Audio Mixer", "MultiMedia9", "MM_DL9"},
- {"VOICE2_PLAYBACK_TX", NULL, "Incall_Music_2 Audio Mixer"},
- {"SLIMBUS_4_RX Audio Mixer", "MultiMedia1", "MM_DL1"},
- {"SLIMBUS_4_RX Audio Mixer", "MultiMedia2", "MM_DL2"},
- {"SLIMBUS_4_RX", NULL, "SLIMBUS_4_RX Audio Mixer"},
- {"MultiMedia1 Mixer", "VOC_REC_UL", "INCALL_RECORD_TX"},
- {"MultiMedia4 Mixer", "VOC_REC_UL", "INCALL_RECORD_TX"},
- {"MultiMedia8 Mixer", "VOC_REC_UL", "INCALL_RECORD_TX"},
- {"MultiMedia1 Mixer", "VOC_REC_DL", "INCALL_RECORD_RX"},
- {"MultiMedia4 Mixer", "VOC_REC_DL", "INCALL_RECORD_RX"},
- {"MultiMedia8 Mixer", "VOC_REC_DL", "INCALL_RECORD_RX"},
- {"MultiMedia1 Mixer", "SLIM_4_TX", "SLIMBUS_4_TX"},
- {"MultiMedia4 Mixer", "SLIM_0_TX", "SLIMBUS_0_TX"},
- {"MultiMedia8 Mixer", "SLIM_0_TX", "SLIMBUS_0_TX"},
- {"MultiMedia4 Mixer", "PRI_MI2S_TX", "PRI_MI2S_TX"},
- {"MultiMedia8 Mixer", "PRI_MI2S_TX", "PRI_MI2S_TX"},
- {"MultiMedia5 Mixer", "SLIM_0_TX", "SLIMBUS_0_TX"},
- #ifdef CONFIG_JACK_AUDIO
- {"MultiMedia10 Mixer", "SLIM_0_TX", "SLIMBUS_0_TX"},
- #endif
- {"MI2S_RX Audio Mixer", "MultiMedia1", "MM_DL1"},
- {"MI2S_RX Audio Mixer", "MultiMedia2", "MM_DL2"},
- {"MI2S_RX Audio Mixer", "MultiMedia3", "MM_DL3"},
- {"MI2S_RX Audio Mixer", "MultiMedia4", "MM_DL4"},
- {"MI2S_RX Audio Mixer", "MultiMedia5", "MM_DL5"},
- {"MI2S_RX Audio Mixer", "MultiMedia6", "MM_DL6"},
- {"MI2S_RX Audio Mixer", "MultiMedia7", "MM_DL7"},
- {"MI2S_RX Audio Mixer", "MultiMedia8", "MM_DL8"},
- {"MI2S_RX Audio Mixer", "MultiMedia9", "MM_DL9"},
- {"MI2S_RX", NULL, "MI2S_RX Audio Mixer"},
- {"QUAT_MI2S_RX Audio Mixer", "MultiMedia1", "MM_DL1"},
- {"QUAT_MI2S_RX Audio Mixer", "MultiMedia2", "MM_DL2"},
- {"QUAT_MI2S_RX Audio Mixer", "MultiMedia3", "MM_DL3"},
- {"QUAT_MI2S_RX Audio Mixer", "MultiMedia4", "MM_DL4"},
- {"QUAT_MI2S_RX Audio Mixer", "MultiMedia5", "MM_DL5"},
- {"QUAT_MI2S_RX Audio Mixer", "MultiMedia6", "MM_DL6"},
- {"QUAT_MI2S_RX Audio Mixer", "MultiMedia7", "MM_DL7"},
- {"QUAT_MI2S_RX Audio Mixer", "MultiMedia8", "MM_DL8"},
- {"QUAT_MI2S_RX", NULL, "QUAT_MI2S_RX Audio Mixer"},
- {"TERT_MI2S_RX Audio Mixer", "MultiMedia1", "MM_DL1"},
- {"TERT_MI2S_RX Audio Mixer", "MultiMedia2", "MM_DL2"},
- {"TERT_MI2S_RX Audio Mixer", "MultiMedia3", "MM_DL3"},
- {"TERT_MI2S_RX Audio Mixer", "MultiMedia4", "MM_DL4"},
- {"TERT_MI2S_RX Audio Mixer", "MultiMedia5", "MM_DL5"},
- {"TERT_MI2S_RX", NULL, "TERT_MI2S_RX Audio Mixer"},
- {"SEC_MI2S_RX Audio Mixer", "MultiMedia1", "MM_DL1"},
- {"SEC_MI2S_RX Audio Mixer", "MultiMedia2", "MM_DL2"},
- {"SEC_MI2S_RX Audio Mixer", "MultiMedia3", "MM_DL3"},
- {"SEC_MI2S_RX Audio Mixer", "MultiMedia4", "MM_DL4"},
- {"SEC_MI2S_RX Audio Mixer", "MultiMedia5", "MM_DL5"},
- {"SEC_MI2S_RX", NULL, "SEC_MI2S_RX Audio Mixer"},
- {"SEC_MI2S_RX Port Mixer", "PRI_MI2S_TX", "PRI_MI2S_TX"},
- {"SEC_MI2S_RX Port Mixer", "INTERNAL_FM_TX", "INT_FM_TX"},
- {"PRI_MI2S_RX Audio Mixer", "MultiMedia1", "MM_DL1"},
- {"PRI_MI2S_RX Audio Mixer", "MultiMedia2", "MM_DL2"},
- {"PRI_MI2S_RX Audio Mixer", "MultiMedia3", "MM_DL3"},
- {"PRI_MI2S_RX Audio Mixer", "MultiMedia4", "MM_DL4"},
- {"PRI_MI2S_RX Audio Mixer", "MultiMedia5", "MM_DL5"},
- {"PRI_MI2S_RX", NULL, "PRI_MI2S_RX Audio Mixer"},
- {"MultiMedia1 Mixer", "PRI_TX", "PRI_I2S_TX"},
- {"MultiMedia1 Mixer", "MI2S_TX", "MI2S_TX"},
- {"MultiMedia2 Mixer", "MI2S_TX", "MI2S_TX"},
- {"MultiMedia5 Mixer", "MI2S_TX", "MI2S_TX"},
- {"MultiMedia1 Mixer", "QUAT_MI2S_TX", "QUAT_MI2S_TX"},
- {"MultiMedia1 Mixer", "TERT_MI2S_TX", "TERT_MI2S_TX"},
- {"MultiMedia1 Mixer", "SLIM_0_TX", "SLIMBUS_0_TX"},
- {"MultiMedia1 Mixer", "AUX_PCM_UL_TX", "AUX_PCM_TX"},
- {"MultiMedia5 Mixer", "AUX_PCM_TX", "AUX_PCM_TX"},
- #ifdef CONFIG_JACK_AUDIO
- {"MultiMedia10 Mixer", "AUX_PCM_TX", "AUX_PCM_TX"},
- #endif
- {"MultiMedia1 Mixer", "SEC_AUX_PCM_UL_TX", "SEC_AUX_PCM_TX"},
- {"MultiMedia5 Mixer", "SEC_AUX_PCM_TX", "SEC_AUX_PCM_TX"},
- {"MultiMedia2 Mixer", "SLIM_0_TX", "SLIMBUS_0_TX"},
- {"MultiMedia1 Mixer", "SEC_MI2S_TX", "SEC_MI2S_TX"},
- {"MultiMedia1 Mixer", "PRI_MI2S_TX", "PRI_MI2S_TX"},
- {"MultiMedia6 Mixer", "SLIM_0_TX", "SLIMBUS_0_TX"},
- #ifdef CONFIG_TERT_MI2S_ENABLE
- {"MultiMedia2 Mixer", "TERT_MI2S_TX", "TERT_MI2S_TX"},
- #elif defined(CONFIG_SND_SOC_MAX98504) || defined(CONFIG_SND_SOC_MAX98506)
- {"MultiMedia2 Mixer", "SEC_MI2S_TX", "SEC_MI2S_TX"},
- #endif
- {"INTERNAL_BT_SCO_RX Audio Mixer", "MultiMedia1", "MM_DL1"},
- {"INTERNAL_BT_SCO_RX Audio Mixer", "MultiMedia2", "MM_DL2"},
- {"INTERNAL_BT_SCO_RX Audio Mixer", "MultiMedia3", "MM_DL3"},
- {"INTERNAL_BT_SCO_RX Audio Mixer", "MultiMedia4", "MM_DL4"},
- {"INTERNAL_BT_SCO_RX Audio Mixer", "MultiMedia5", "MM_DL5"},
- {"INTERNAL_BT_SCO_RX Audio Mixer", "MultiMedia6", "MM_DL6"},
- {"INTERNAL_BT_SCO_RX Audio Mixer", "MultiMedia7", "MM_DL7"},
- {"INTERNAL_BT_SCO_RX Audio Mixer", "MultiMedia8", "MM_DL8"},
- {"INTERNAL_BT_SCO_RX Audio Mixer", "MultiMedia9", "MM_DL9"},
- {"INTERNAL_BT_SCO_RX Audio Mixer", "MultiMedia6", "MM_UL6"},
- {"INT_BT_SCO_RX", NULL, "INTERNAL_BT_SCO_RX Audio Mixer"},
- {"INTERNAL_FM_RX Audio Mixer", "MultiMedia1", "MM_DL1"},
- {"INTERNAL_FM_RX Audio Mixer", "MultiMedia2", "MM_DL2"},
- {"INTERNAL_FM_RX Audio Mixer", "MultiMedia3", "MM_DL3"},
- {"INTERNAL_FM_RX Audio Mixer", "MultiMedia4", "MM_DL4"},
- {"INTERNAL_FM_RX Audio Mixer", "MultiMedia5", "MM_DL5"},
- {"INTERNAL_FM_RX Audio Mixer", "MultiMedia6", "MM_DL6"},
- {"INTERNAL_FM_RX Audio Mixer", "MultiMedia7", "MM_DL7"},
- {"INTERNAL_FM_RX Audio Mixer", "MultiMedia8", "MM_DL8"},
- {"INTERNAL_FM_RX Audio Mixer", "MultiMedia9", "MM_DL9"},
- {"INT_FM_RX", NULL, "INTERNAL_FM_RX Audio Mixer"},
- {"AFE_PCM_RX Audio Mixer", "MultiMedia1", "MM_DL1"},
- {"AFE_PCM_RX Audio Mixer", "MultiMedia2", "MM_DL2"},
- {"AFE_PCM_RX Audio Mixer", "MultiMedia3", "MM_DL3"},
- {"AFE_PCM_RX Audio Mixer", "MultiMedia4", "MM_DL4"},
- {"AFE_PCM_RX Audio Mixer", "MultiMedia5", "MM_DL5"},
- {"AFE_PCM_RX Audio Mixer", "MultiMedia6", "MM_DL6"},
- {"AFE_PCM_RX Audio Mixer", "MultiMedia7", "MM_DL7"},
- {"AFE_PCM_RX Audio Mixer", "MultiMedia8", "MM_DL8"},
- {"AFE_PCM_RX Audio Mixer", "MultiMedia9", "MM_DL9"},
- {"PCM_RX", NULL, "AFE_PCM_RX Audio Mixer"},
- {"MultiMedia1 Mixer", "INTERNAL_BT_SCO_TX", "INT_BT_SCO_TX"},
- {"MultiMedia4 Mixer", "INTERNAL_BT_SCO_TX", "INT_BT_SCO_TX"},
- {"MultiMedia5 Mixer", "INTERNAL_BT_SCO_TX", "INT_BT_SCO_TX"},
- {"MultiMedia8 Mixer", "INTERNAL_BT_SCO_TX", "INT_BT_SCO_TX"},
- {"MultiMedia1 Mixer", "INTERNAL_FM_TX", "INT_FM_TX"},
- {"MultiMedia4 Mixer", "INTERNAL_FM_TX", "INT_FM_TX"},
- {"MultiMedia5 Mixer", "INTERNAL_FM_TX", "INT_FM_TX"},
- {"MultiMedia8 Mixer", "INTERNAL_FM_TX", "INT_FM_TX"},
- {"MultiMedia6 Mixer", "INTERNAL_FM_TX", "INT_FM_TX"},
- {"MultiMedia1 Mixer", "AFE_PCM_TX", "PCM_TX"},
- {"MultiMedia4 Mixer", "AFE_PCM_TX", "PCM_TX"},
- {"MultiMedia5 Mixer", "AFE_PCM_TX", "PCM_TX"},
- {"MultiMedia8 Mixer", "AFE_PCM_TX", "PCM_TX"},
- {"MM_UL1", NULL, "MultiMedia1 Mixer"},
- {"MultiMedia2 Mixer", "INTERNAL_FM_TX", "INT_FM_TX"},
- {"MM_UL2", NULL, "MultiMedia2 Mixer"},
- {"MM_UL4", NULL, "MultiMedia4 Mixer"},
- {"MM_UL5", NULL, "MultiMedia5 Mixer"},
- {"MM_UL8", NULL, "MultiMedia8 Mixer"},
- {"MM_UL6", NULL, "MultiMedia6 Mixer"},
- #ifdef CONFIG_JACK_AUDIO
- {"MM_UL10", NULL, "MultiMedia10 Mixer"},
- #endif
- {"AUX_PCM_RX Audio Mixer", "MultiMedia1", "MM_DL1"},
- {"AUX_PCM_RX Audio Mixer", "MultiMedia2", "MM_DL2"},
- {"AUX_PCM_RX Audio Mixer", "MultiMedia3", "MM_DL3"},
- {"AUX_PCM_RX Audio Mixer", "MultiMedia4", "MM_DL4"},
- {"AUX_PCM_RX Audio Mixer", "MultiMedia5", "MM_DL5"},
- {"AUX_PCM_RX Audio Mixer", "MultiMedia6", "MM_DL6"},
- {"AUX_PCM_RX Audio Mixer", "MultiMedia7", "MM_DL7"},
- {"AUX_PCM_RX Audio Mixer", "MultiMedia8", "MM_DL8"},
- {"AUX_PCM_RX Audio Mixer", "MultiMedia9", "MM_DL9"},
- #ifdef CONFIG_JACK_AUDIO
- {"AUX_PCM_RX Audio Mixer", "MultiMedia10", "MM_DL10"},
- #endif
- {"AUX_PCM_RX", NULL, "AUX_PCM_RX Audio Mixer"},
- {"SEC_AUX_PCM_RX Audio Mixer", "MultiMedia1", "MM_DL1"},
- {"SEC_AUX_PCM_RX Audio Mixer", "MultiMedia2", "MM_DL2"},
- {"SEC_AUX_PCM_RX Audio Mixer", "MultiMedia3", "MM_DL3"},
- {"SEC_AUX_PCM_RX Audio Mixer", "MultiMedia4", "MM_DL4"},
- {"SEC_AUX_PCM_RX Audio Mixer", "MultiMedia5", "MM_DL5"},
- {"SEC_AUX_PCM_RX Audio Mixer", "MultiMedia6", "MM_DL6"},
- {"SEC_AUX_PCM_RX Audio Mixer", "MultiMedia7", "MM_DL7"},
- {"SEC_AUX_PCM_RX Audio Mixer", "MultiMedia8", "MM_DL8"},
- {"SEC_AUX_PCM_RX Audio Mixer", "MultiMedia9", "MM_DL9"},
- {"SEC_AUX_PCM_RX", NULL, "SEC_AUX_PCM_RX Audio Mixer"},
- {"MI2S_RX_Voice Mixer", "CSVoice", "CS-VOICE_DL1"},
- {"MI2S_RX_Voice Mixer", "Voice2", "VOICE2_DL"},
- {"MI2S_RX_Voice Mixer", "Voip", "VOIP_DL"},
- {"MI2S_RX_Voice Mixer", "Voice Stub", "VOICE_STUB_DL"},
- {"MI2S_RX_Voice Mixer", "DTMF", "DTMF_DL_HL"},
- {"MI2S_RX_Voice Mixer", "QCHAT", "QCHAT_DL"},
- {"MI2S_RX", NULL, "MI2S_RX_Voice Mixer"},
- {"PRI_RX_Voice Mixer", "CSVoice", "CS-VOICE_DL1"},
- {"PRI_RX_Voice Mixer", "Voice2", "VOICE2_DL"},
- {"PRI_RX_Voice Mixer", "VoLTE", "VoLTE_DL"},
- {"PRI_RX_Voice Mixer", "VoWLAN", "VoWLAN_DL"},
- {"PRI_RX_Voice Mixer", "Voip", "VOIP_DL"},
- {"PRI_RX_Voice Mixer", "DTMF", "DTMF_DL_HL"},
- {"PRI_RX_Voice Mixer", "QCHAT", "QCHAT_DL"},
- {"PRI_I2S_RX", NULL, "PRI_RX_Voice Mixer"},
- {"SEC_RX_Voice Mixer", "CSVoice", "CS-VOICE_DL1"},
- {"SEC_RX_Voice Mixer", "Voice2", "VOICE2_DL"},
- {"SEC_RX_Voice Mixer", "VoLTE", "VoLTE_DL"},
- {"SEC_RX_Voice Mixer", "VoWLAN", "VoWLAN_DL"},
- {"SEC_RX_Voice Mixer", "Voip", "VOIP_DL"},
- {"SEC_RX_Voice Mixer", "DTMF", "DTMF_DL_HL"},
- {"SEC_RX_Voice Mixer", "QCHAT", "QCHAT_DL"},
- {"SEC_I2S_RX", NULL, "SEC_RX_Voice Mixer"},
- {"SEC_MI2S_RX_Voice Mixer", "CSVoice", "CS-VOICE_DL1"},
- {"SEC_MI2S_RX_Voice Mixer", "Voice2", "VOICE2_DL"},
- {"SEC_MI2S_RX_Voice Mixer", "VoLTE", "VoLTE_DL"},
- {"SEC_MI2S_RX_Voice Mixer", "VoWLAN", "VoWLAN_DL"},
- {"SEC_MI2S_RX_Voice Mixer", "Voip", "VOIP_DL"},
- {"SEC_MI2S_RX_Voice Mixer", "DTMF", "DTMF_DL_HL"},
- {"SEC_MI2S_RX_Voice Mixer", "QCHAT", "QCHAT_DL"},
- {"SEC_MI2S_RX", NULL, "SEC_MI2S_RX_Voice Mixer"},
- {"SLIM_0_RX_Voice Mixer", "CSVoice", "CS-VOICE_DL1"},
- {"SLIM_0_RX_Voice Mixer", "Voice2", "VOICE2_DL"},
- {"SLIM_0_RX_Voice Mixer", "VoLTE", "VoLTE_DL"},
- {"SLIM_0_RX_Voice Mixer", "VoWLAN", "VoWLAN_DL"},
- {"SLIM_0_RX_Voice Mixer", "Voip", "VOIP_DL"},
- {"SLIM_0_RX_Voice Mixer", "DTMF", "DTMF_DL_HL"},
- #if defined( CONFIG_PCM_ROUTE_VOICE_STUB ) || defined(CONFIG_BT_CALL_FORWARDING)
- {"SLIM_0_RX_Voice Mixer", "Voice Stub", "VOICE_STUB_DL"},
- #endif /* CONFIG_PCM_ROUTE_VOICE_STUB || CONFIG_BT_CALL_FORWARDING */
- {"SLIM_0_RX_Voice Mixer", "QCHAT", "QCHAT_DL"},
- {"SLIMBUS_0_RX", NULL, "SLIM_0_RX_Voice Mixer"},
- {"INTERNAL_BT_SCO_RX_Voice Mixer", "CSVoice", "CS-VOICE_DL1"},
- {"INTERNAL_BT_SCO_RX_Voice Mixer", "Voice2", "VOICE2_DL"},
- {"INTERNAL_BT_SCO_RX_Voice Mixer", "VoLTE", "VoLTE_DL"},
- {"INTERNAL_BT_SCO_RX_Voice Mixer", "VoWLAN", "VoWLAN_DL"},
- {"INTERNAL_BT_SCO_RX_Voice Mixer", "Voip", "VOIP_DL"},
- {"INTERNAL_BT_SCO_RX_Voice Mixer", "DTMF", "DTMF_DL_HL"},
- {"INTERNAL_BT_SCO_RX_Voice Mixer", "QCHAT", "QCHAT_DL"},
- {"INT_BT_SCO_RX", NULL, "INTERNAL_BT_SCO_RX_Voice Mixer"},
- {"AFE_PCM_RX_Voice Mixer", "CSVoice", "CS-VOICE_DL1"},
- {"AFE_PCM_RX_Voice Mixer", "Voice2", "VOICE2_DL"},
- {"AFE_PCM_RX_Voice Mixer", "VoLTE", "VoLTE_DL"},
- {"AFE_PCM_RX_Voice Mixer", "VoWLAN", "VoWLAN_DL"},
- {"AFE_PCM_RX_Voice Mixer", "Voip", "VOIP_DL"},
- {"AFE_PCM_RX_Voice Mixer", "DTMF", "DTMF_DL_HL"},
- {"AFE_PCM_RX_Voice Mixer", "QCHAT", "QCHAT_DL"},
- {"PCM_RX", NULL, "AFE_PCM_RX_Voice Mixer"},
- {"AUX_PCM_RX_Voice Mixer", "CSVoice", "CS-VOICE_DL1"},
- {"AUX_PCM_RX_Voice Mixer", "Voice2", "VOICE2_DL"},
- {"AUX_PCM_RX_Voice Mixer", "VoLTE", "VoLTE_DL"},
- {"AUX_PCM_RX_Voice Mixer", "VoWLAN", "VoWLAN_DL"},
- {"AUX_PCM_RX_Voice Mixer", "Voip", "VOIP_DL"},
- {"AUX_PCM_RX_Voice Mixer", "DTMF", "DTMF_DL_HL"},
- #if defined( CONFIG_PCM_ROUTE_VOICE_STUB ) || defined(CONFIG_BT_CALL_FORWARDING)
- {"AUX_PCM_RX_Voice Mixer", "Voice Stub", "VOICE_STUB_DL"},
- #endif /* CONFIG_PCM_ROUTE_VOICE_STUB || CONFIG_BT_CALL_FORWARDING*/
- {"AUX_PCM_RX_Voice Mixer", "QCHAT", "QCHAT_DL"},
- {"AUX_PCM_RX", NULL, "AUX_PCM_RX_Voice Mixer"},
- {"SEC_AUX_PCM_RX_Voice Mixer", "CSVoice", "CS-VOICE_DL1"},
- {"SEC_AUX_PCM_RX_Voice Mixer", "Voice2", "VOICE2_DL"},
- {"SEC_AUX_PCM_RX_Voice Mixer", "VoLTE", "VoLTE_DL"},
- {"SEC_AUX_PCM_RX_Voice Mixer", "VoWLAN", "VoWLAN_DL"},
- {"SEC_AUX_PCM_RX_Voice Mixer", "Voip", "VOIP_DL"},
- {"SEC_AUX_PCM_RX_Voice Mixer", "DTMF", "DTMF_DL_HL"},
- #if defined( CONFIG_PCM_ROUTE_VOICE_STUB ) || defined(CONFIG_BT_CALL_FORWARDING)
- {"SEC_AUX_PCM_RX_Voice Mixer", "Voice Stub", "VOICE_STUB_DL"},
- #endif /* CONFIG_PCM_ROUTE_VOICE_STUB || CONFIG_BT_CALL_FORWARDING*/
- {"SEC_AUX_PCM_RX_Voice Mixer", "QCHAT", "QCHAT_DL"},
- {"SEC_AUX_PCM_RX", NULL, "SEC_AUX_PCM_RX_Voice Mixer"},
- {"HDMI_RX_Voice Mixer", "CSVoice", "CS-VOICE_DL1"},
- {"HDMI_RX_Voice Mixer", "Voice2", "VOICE2_DL"},
- {"HDMI_RX_Voice Mixer", "VoLTE", "VoLTE_DL"},
- {"HDMI_RX_Voice Mixer", "VoWLAN", "VoWLAN_DL"},
- {"HDMI_RX_Voice Mixer", "Voip", "VOIP_DL"},
- {"HDMI_RX_Voice Mixer", "DTMF", "DTMF_DL_HL"},
- {"HDMI_RX_Voice Mixer", "QCHAT", "QCHAT_DL"},
- {"HDMI", NULL, "HDMI_RX_Voice Mixer"},
- {"HDMI", NULL, "HDMI_DL_HL"},
- {"MI2S_RX_Voice Mixer", "CSVoice", "CS-VOICE_DL1"},
- {"MI2S_RX_Voice Mixer", "Voice2", "VOICE2_DL"},
- {"MI2S_RX_Voice Mixer", "Voip", "VOIP_DL"},
- {"MI2S_RX_Voice Mixer", "VoLTE", "VoLTE_DL"},
- {"MI2S_RX_Voice Mixer", "VoWLAN", "VoWLAN_DL"},
- {"MI2S_RX_Voice Mixer", "Voice Stub", "VOICE_STUB_DL"},
- {"MI2S_RX_Voice Mixer", "QCHAT", "QCHAT_DL"},
- {"MI2S_RX", NULL, "MI2S_RX_Voice Mixer"},
- {"VOC_EXT_EC MUX", "PRI_MI2S_TX" , "PRI_MI2S_TX"},
- {"VOC_EXT_EC MUX", "SEC_MI2S_TX" , "SEC_MI2S_TX"},
- {"VOC_EXT_EC MUX", "TERT_MI2S_TX" , "TERT_MI2S_TX"},
- {"VOC_EXT_EC MUX", "QUAT_MI2S_TX" , "QUAT_MI2S_TX"},
- {"CS-VOICE_UL1", NULL, "VOC_EXT_EC MUX"},
- {"VOIP_UL", NULL, "VOC_EXT_EC MUX"},
- {"VoLTE_UL", NULL, "VOC_EXT_EC MUX"},
- {"VOICE2_UL", NULL, "VOC_EXT_EC MUX"},
- {"AUDIO_REF_EC_UL1 MUX", "PRI_MI2S_TX" , "PRI_MI2S_TX"},
- {"AUDIO_REF_EC_UL1 MUX", "SEC_MI2S_TX" , "SEC_MI2S_TX"},
- {"AUDIO_REF_EC_UL1 MUX", "TERT_MI2S_TX" , "TERT_MI2S_TX"},
- {"AUDIO_REF_EC_UL1 MUX", "QUAT_MI2S_TX" , "QUAT_MI2S_TX"},
- {"AUDIO_REF_EC_UL2 MUX", "PRI_MI2S_TX" , "PRI_MI2S_TX"},
- {"AUDIO_REF_EC_UL2 MUX", "SEC_MI2S_TX" , "SEC_MI2S_TX"},
- {"AUDIO_REF_EC_UL2 MUX", "TERT_MI2S_TX" , "TERT_MI2S_TX"},
- {"AUDIO_REF_EC_UL2 MUX", "QUAT_MI2S_TX" , "QUAT_MI2S_TX"},
- {"AUDIO_REF_EC_UL4 MUX", "PRI_MI2S_TX" , "PRI_MI2S_TX"},
- {"AUDIO_REF_EC_UL4 MUX", "SEC_MI2S_TX" , "SEC_MI2S_TX"},
- {"AUDIO_REF_EC_UL4 MUX", "TERT_MI2S_TX" , "TERT_MI2S_TX"},
- {"AUDIO_REF_EC_UL4 MUX", "QUAT_MI2S_TX" , "QUAT_MI2S_TX"},
- {"AUDIO_REF_EC_UL5 MUX", "PRI_MI2S_TX" , "PRI_MI2S_TX"},
- {"AUDIO_REF_EC_UL5 MUX", "SEC_MI2S_TX" , "SEC_MI2S_TX"},
- {"AUDIO_REF_EC_UL5 MUX", "TERT_MI2S_TX" , "TERT_MI2S_TX"},
- {"AUDIO_REF_EC_UL5 MUX", "QUAT_MI2S_TX" , "QUAT_MI2S_TX"},
- {"AUDIO_REF_EC_UL6 MUX", "PRI_MI2S_TX" , "PRI_MI2S_TX"},
- {"AUDIO_REF_EC_UL6 MUX", "SEC_MI2S_TX" , "SEC_MI2S_TX"},
- {"AUDIO_REF_EC_UL6 MUX", "TERT_MI2S_TX" , "TERT_MI2S_TX"},
- {"AUDIO_REF_EC_UL6 MUX", "QUAT_MI2S_TX" , "QUAT_MI2S_TX"},
- {"AUDIO_REF_EC_UL8 MUX", "PRI_MI2S_TX" , "PRI_MI2S_TX"},
- {"AUDIO_REF_EC_UL8 MUX", "SEC_MI2S_TX" , "SEC_MI2S_TX"},
- {"AUDIO_REF_EC_UL8 MUX", "TERT_MI2S_TX" , "TERT_MI2S_TX"},
- {"AUDIO_REF_EC_UL8 MUX", "QUAT_MI2S_TX" , "QUAT_MI2S_TX"},
- {"AUDIO_REF_EC_UL9 MUX", "PRI_MI2S_TX" , "PRI_MI2S_TX"},
- {"AUDIO_REF_EC_UL9 MUX", "SEC_MI2S_TX" , "SEC_MI2S_TX"},
- {"AUDIO_REF_EC_UL9 MUX", "TERT_MI2S_TX" , "TERT_MI2S_TX"},
- {"AUDIO_REF_EC_UL9 MUX", "QUAT_MI2S_TX" , "QUAT_MI2S_TX"},
- {"MM_UL1", NULL, "AUDIO_REF_EC_UL1 MUX"},
- {"MM_UL2", NULL, "AUDIO_REF_EC_UL2 MUX"},
- {"MM_UL4", NULL, "AUDIO_REF_EC_UL4 MUX"},
- {"MM_UL5", NULL, "AUDIO_REF_EC_UL5 MUX"},
- {"MM_UL6", NULL, "AUDIO_REF_EC_UL6 MUX"},
- {"MM_UL8", NULL, "AUDIO_REF_EC_UL8 MUX"},
- {"MM_UL9", NULL, "AUDIO_REF_EC_UL9 MUX"},
- {"Voice_Tx Mixer", "PRI_TX_Voice", "PRI_I2S_TX"},
- {"Voice_Tx Mixer", "PRI_MI2S_TX_Voice", "PRI_MI2S_TX"},
- {"Voice_Tx Mixer", "MI2S_TX_Voice", "MI2S_TX"},
- {"Voice_Tx Mixer", "SLIM_0_TX_Voice", "SLIMBUS_0_TX"},
- {"Voice_Tx Mixer", "INTERNAL_BT_SCO_TX_Voice", "INT_BT_SCO_TX"},
- {"Voice_Tx Mixer", "AFE_PCM_TX_Voice", "PCM_TX"},
- {"Voice_Tx Mixer", "AUX_PCM_TX_Voice", "AUX_PCM_TX"},
- {"Voice_Tx Mixer", "SEC_AUX_PCM_TX_Voice", "SEC_AUX_PCM_TX"},
- {"CS-VOICE_UL1", NULL, "Voice_Tx Mixer"},
- {"Voice2_Tx Mixer", "PRI_TX_Voice2", "PRI_I2S_TX"},
- {"Voice2_Tx Mixer", "PRI_MI2S_TX_Voice2", "PRI_MI2S_TX"},
- {"Voice2_Tx Mixer", "MI2S_TX_Voice2", "MI2S_TX"},
- {"Voice2_Tx Mixer", "SLIM_0_TX_Voice2", "SLIMBUS_0_TX"},
- {"Voice2_Tx Mixer", "INTERNAL_BT_SCO_TX_Voice2", "INT_BT_SCO_TX"},
- {"Voice2_Tx Mixer", "AFE_PCM_TX_Voice2", "PCM_TX"},
- {"Voice2_Tx Mixer", "AUX_PCM_TX_Voice2", "AUX_PCM_TX"},
- {"Voice2_Tx Mixer", "SEC_AUX_PCM_TX_Voice2", "SEC_AUX_PCM_TX"},
- {"VOICE2_UL", NULL, "Voice2_Tx Mixer"},
- {"VoLTE_Tx Mixer", "PRI_TX_VoLTE", "PRI_I2S_TX"},
- {"VoLTE_Tx Mixer", "SLIM_0_TX_VoLTE", "SLIMBUS_0_TX"},
- {"VoLTE_Tx Mixer", "INTERNAL_BT_SCO_TX_VoLTE", "INT_BT_SCO_TX"},
- {"VoLTE_Tx Mixer", "AFE_PCM_TX_VoLTE", "PCM_TX"},
- {"VoLTE_Tx Mixer", "AUX_PCM_TX_VoLTE", "AUX_PCM_TX"},
- {"VoLTE_Tx Mixer", "SEC_AUX_PCM_TX_VoLTE", "SEC_AUX_PCM_TX"},
- {"VoLTE_Tx Mixer", "MI2S_TX_VoLTE", "MI2S_TX"},
- {"VoLTE_UL", NULL, "VoLTE_Tx Mixer"},
- {"VoWLAN_Tx Mixer", "PRI_TX_VoWLAN", "PRI_I2S_TX"},
- {"VoWLAN_Tx Mixer", "SLIM_0_TX_VoWLAN", "SLIMBUS_0_TX"},
- {"VoWLAN_Tx Mixer", "INTERNAL_BT_SCO_TX_VoWLAN", "INT_BT_SCO_TX"},
- {"VoWLAN_Tx Mixer", "AFE_PCM_TX_VoWLAN", "PCM_TX"},
- {"VoWLAN_Tx Mixer", "AUX_PCM_TX_VoWLAN", "AUX_PCM_TX"},
- {"VoWLAN_Tx Mixer", "SEC_AUX_PCM_TX_VoWLAN", "SEC_AUX_PCM_TX"},
- {"VoWLAN_Tx Mixer", "MI2S_TX_VoWLAN", "MI2S_TX"},
- {"VoWLAN_UL", NULL, "VoWLAN_Tx Mixer"},
- {"Voip_Tx Mixer", "PRI_TX_Voip", "PRI_I2S_TX"},
- {"Voip_Tx Mixer", "MI2S_TX_Voip", "MI2S_TX"},
- {"Voip_Tx Mixer", "SLIM_0_TX_Voip", "SLIMBUS_0_TX"},
- {"Voip_Tx Mixer", "INTERNAL_BT_SCO_TX_Voip", "INT_BT_SCO_TX"},
- {"Voip_Tx Mixer", "AFE_PCM_TX_Voip", "PCM_TX"},
- {"Voip_Tx Mixer", "AUX_PCM_TX_Voip", "AUX_PCM_TX"},
- {"Voip_Tx Mixer", "SEC_AUX_PCM_TX_Voip", "SEC_AUX_PCM_TX"},
- {"Voip_Tx Mixer", "PRI_MI2S_TX_Voip", "PRI_MI2S_TX"},
- {"VOIP_UL", NULL, "Voip_Tx Mixer"},
- {"SLIMBUS_DL_HL", "Switch", "SLIM0_DL_HL"},
- {"SLIMBUS_0_RX", NULL, "SLIMBUS_DL_HL"},
- {"SLIMBUS1_DL_HL", "Switch", "SLIM1_DL_HL"},
- {"SLIMBUS_1_RX", NULL, "SLIMBUS1_DL_HL"},
- {"SLIMBUS3_DL_HL", "Switch", "SLIM3_DL_HL"},
- {"SLIMBUS_3_RX", NULL, "SLIMBUS3_DL_HL"},
- {"SLIMBUS4_DL_HL", "Switch", "SLIM4_DL_HL"},
- {"SLIMBUS_4_RX", NULL, "SLIMBUS4_DL_HL"},
- {"SLIM0_UL_HL", NULL, "SLIMBUS_0_TX"},
- {"SLIM1_UL_HL", NULL, "SLIMBUS_1_TX"},
- {"SLIM3_UL_HL", NULL, "SLIMBUS_3_TX"},
- {"SLIM4_UL_HL", NULL, "SLIMBUS_4_TX"},
- {"LSM1 MUX", "SLIMBUS_0_TX", "SLIMBUS_0_TX"},
- {"LSM1 MUX", "SLIMBUS_1_TX", "SLIMBUS_1_TX"},
- {"LSM1 MUX", "SLIMBUS_3_TX", "SLIMBUS_3_TX"},
- {"LSM1 MUX", "SLIMBUS_4_TX", "SLIMBUS_4_TX"},
- {"LSM1 MUX", "SLIMBUS_5_TX", "SLIMBUS_5_TX"},
- {"LSM1_UL_HL", NULL, "LSM1 MUX"},
- {"LSM2 MUX", "SLIMBUS_0_TX", "SLIMBUS_0_TX"},
- {"LSM2 MUX", "SLIMBUS_1_TX", "SLIMBUS_1_TX"},
- {"LSM2 MUX", "SLIMBUS_3_TX", "SLIMBUS_3_TX"},
- {"LSM2 MUX", "SLIMBUS_4_TX", "SLIMBUS_4_TX"},
- {"LSM2 MUX", "SLIMBUS_5_TX", "SLIMBUS_5_TX"},
- {"LSM2_UL_HL", NULL, "LSM2 MUX"},
- {"LSM3 MUX", "SLIMBUS_0_TX", "SLIMBUS_0_TX"},
- {"LSM3 MUX", "SLIMBUS_1_TX", "SLIMBUS_1_TX"},
- {"LSM3 MUX", "SLIMBUS_3_TX", "SLIMBUS_3_TX"},
- {"LSM3 MUX", "SLIMBUS_4_TX", "SLIMBUS_4_TX"},
- {"LSM3 MUX", "SLIMBUS_5_TX", "SLIMBUS_5_TX"},
- {"LSM3_UL_HL", NULL, "LSM3 MUX"},
- {"LSM4 MUX", "SLIMBUS_0_TX", "SLIMBUS_0_TX"},
- {"LSM4 MUX", "SLIMBUS_1_TX", "SLIMBUS_1_TX"},
- {"LSM4 MUX", "SLIMBUS_3_TX", "SLIMBUS_3_TX"},
- {"LSM4 MUX", "SLIMBUS_4_TX", "SLIMBUS_4_TX"},
- {"LSM4 MUX", "SLIMBUS_5_TX", "SLIMBUS_5_TX"},
- {"LSM4_UL_HL", NULL, "LSM4 MUX"},
- {"LSM5 MUX", "SLIMBUS_0_TX", "SLIMBUS_0_TX"},
- {"LSM5 MUX", "SLIMBUS_1_TX", "SLIMBUS_1_TX"},
- {"LSM5 MUX", "SLIMBUS_3_TX", "SLIMBUS_3_TX"},
- {"LSM5 MUX", "SLIMBUS_4_TX", "SLIMBUS_4_TX"},
- {"LSM5 MUX", "SLIMBUS_5_TX", "SLIMBUS_5_TX"},
- {"LSM5_UL_HL", NULL, "LSM5 MUX"},
- {"LSM6 MUX", "SLIMBUS_0_TX", "SLIMBUS_0_TX"},
- {"LSM6 MUX", "SLIMBUS_1_TX", "SLIMBUS_1_TX"},
- {"LSM6 MUX", "SLIMBUS_3_TX", "SLIMBUS_3_TX"},
- {"LSM6 MUX", "SLIMBUS_4_TX", "SLIMBUS_4_TX"},
- {"LSM6 MUX", "SLIMBUS_5_TX", "SLIMBUS_5_TX"},
- {"LSM6_UL_HL", NULL, "LSM6 MUX"},
- {"LSM7 MUX", "SLIMBUS_0_TX", "SLIMBUS_0_TX"},
- {"LSM7 MUX", "SLIMBUS_1_TX", "SLIMBUS_1_TX"},
- {"LSM7 MUX", "SLIMBUS_3_TX", "SLIMBUS_3_TX"},
- {"LSM7 MUX", "SLIMBUS_4_TX", "SLIMBUS_4_TX"},
- {"LSM7 MUX", "SLIMBUS_5_TX", "SLIMBUS_5_TX"},
- {"LSM7_UL_HL", NULL, "LSM7 MUX"},
- {"LSM8 MUX", "SLIMBUS_0_TX", "SLIMBUS_0_TX"},
- {"LSM8 MUX", "SLIMBUS_1_TX", "SLIMBUS_1_TX"},
- {"LSM8 MUX", "SLIMBUS_3_TX", "SLIMBUS_3_TX"},
- {"LSM8 MUX", "SLIMBUS_4_TX", "SLIMBUS_4_TX"},
- {"LSM8 MUX", "SLIMBUS_5_TX", "SLIMBUS_5_TX"},
- {"LSM8_UL_HL", NULL, "LSM8 MUX"},
- {"QCHAT_Tx Mixer", "PRI_TX_QCHAT", "PRI_I2S_TX"},
- {"QCHAT_Tx Mixer", "SLIM_0_TX_QCHAT", "SLIMBUS_0_TX"},
- {"QCHAT_Tx Mixer", "INTERNAL_BT_SCO_TX_QCHAT", "INT_BT_SCO_TX"},
- {"QCHAT_Tx Mixer", "AFE_PCM_TX_QCHAT", "PCM_TX"},
- {"QCHAT_Tx Mixer", "AUX_PCM_TX_QCHAT", "AUX_PCM_TX"},
- {"QCHAT_Tx Mixer", "SEC_AUX_PCM_TX_QCHAT", "SEC_AUX_PCM_TX"},
- {"QCHAT_Tx Mixer", "MI2S_TX_QCHAT", "MI2S_TX"},
- {"QCHAT_Tx Mixer", "PRI_MI2S_TX_QCHAT", "PRI_MI2S_TX"},
- {"QCHAT_UL", NULL, "QCHAT_Tx Mixer"},
- {"INT_FM_RX", NULL, "INTFM_DL_HL"},
- {"INTFM_UL_HL", NULL, "INT_FM_TX"},
- {"INTHFP_UL_HL", NULL, "INT_BT_SCO_TX"},
- {"INT_BT_SCO_RX", NULL, "MM_DL6"},
- {"AUX_PCM_RX", NULL, "AUXPCM_DL_HL"},
- {"AUXPCM_UL_HL", NULL, "AUX_PCM_TX"},
- {"MI2S_RX", NULL, "MI2S_DL_HL"},
- {"MI2S_UL_HL", NULL, "MI2S_TX"},
- {"PCM_RX_DL_HL", "Switch", "SLIM0_DL_HL"},
- {"PCM_RX", NULL, "PCM_RX_DL_HL"},
- {"PRI_MI2S_RX_DL_HL", "Switch", "PRI_MI2S_DL_HL"},
- {"PRI_MI2S_RX", NULL, "PRI_MI2S_RX_DL_HL"},
- {"MI2S_UL_HL", NULL, "TERT_MI2S_TX"},
- {"SEC_I2S_RX", NULL, "SEC_I2S_DL_HL"},
- {"PRI_MI2S_UL_HL", NULL, "PRI_MI2S_TX"},
- {"SEC_MI2S_RX", NULL, "SEC_MI2S_DL_HL"},
- {"SLIMBUS_0_RX Port Mixer", "INTERNAL_FM_TX", "INT_FM_TX"},
- {"SLIMBUS_0_RX Port Mixer", "SLIM_0_TX", "SLIMBUS_0_TX"},
- {"SLIMBUS_0_RX Port Mixer", "AUX_PCM_UL_TX", "AUX_PCM_TX"},
- {"SLIMBUS_0_RX Port Mixer", "SEC_AUX_PCM_UL_TX", "SEC_AUX_PCM_TX"},
- {"SLIMBUS_0_RX Port Mixer", "MI2S_TX", "MI2S_TX"},
- #if defined( CONFIG_PCM_ROUTE_VOICE_STUB ) || defined(CONFIG_BT_CALL_FORWARDING)
- {"SLIMBUS_0_RX Port Mixer", "INTERNAL_BT_SCO_TX", "INT_BT_SCO_TX"},
- #endif /* CONFIG_PCM_ROUTE_VOICE_STUB || CONFIG_BT_CALL_FORWARDING */
- {"SLIMBUS_0_RX", NULL, "SLIMBUS_0_RX Port Mixer"},
- {"AFE_PCM_RX Port Mixer", "INTERNAL_FM_TX", "INT_FM_TX"},
- {"PCM_RX", NULL, "AFE_PCM_RX Port Mixer"},
- {"AUXPCM_RX Port Mixer", "AUX_PCM_UL_TX", "AUX_PCM_TX"},
- {"AUXPCM_RX Port Mixer", "SLIM_0_TX", "SLIMBUS_0_TX"},
- #if defined( CONFIG_PCM_ROUTE_VOICE_STUB ) || defined(CONFIG_BT_CALL_FORWARDING)
- {"AUXPCM_RX Port Mixer", "SEC_AUX_PCM_UL_TX", "SEC_AUX_PCM_TX"},
- #endif /* CONFIG_PCM_ROUTE_VOICE_STUB || CONFIG_BT_CALL_FORWARDING */
- {"AUX_PCM_RX", NULL, "AUXPCM_RX Port Mixer"},
- #if defined( CONFIG_PCM_ROUTE_VOICE_STUB ) || defined(CONFIG_BT_CALL_FORWARDING)
- {"SEC_AUXPCM_RX Port Mixer", "AUX_PCM_UL_TX", "AUX_PCM_TX"},
- #endif /* CONFIG_PCM_ROUTE_VOICE_STUB || CONFIG_BT_CALL_FORWARDING */
- {"SEC_AUXPCM_RX Port Mixer", "SEC_AUX_PCM_UL_TX", "SEC_AUX_PCM_TX"},
- {"SEC_AUXPCM_RX Port Mixer", "SLIM_0_TX", "SLIMBUS_0_TX"},
- {"SEC_AUX_PCM_RX", NULL, "SEC_AUXPCM_RX Port Mixer"},
- {"Voice Stub Tx Mixer", "STUB_TX_HL", "STUB_TX"},
- {"Voice Stub Tx Mixer", "SLIM_1_TX", "SLIMBUS_1_TX"},
- {"Voice Stub Tx Mixer", "INTERNAL_BT_SCO_TX", "INT_BT_SCO_TX"},
- {"Voice Stub Tx Mixer", "STUB_1_TX_HL", "STUB_1_TX"},
- #if defined( CONFIG_PCM_ROUTE_VOICE_STUB ) || defined(CONFIG_BT_CALL_FORWARDING)
- {"Voice Stub Tx Mixer", "AUX_PCM_UL_TX", "AUX_PCM_TX"},
- {"Voice Stub Tx Mixer", "SEC_AUX_PCM_UL_TX", "SEC_AUX_PCM_TX"},
- #endif /* CONFIG_PCM_ROUTE_VOICE_STUB || CONFIG_BT_CALL_FORWARDING */
- {"Voice Stub Tx Mixer", "MI2S_TX", "MI2S_TX"},
- #if defined( CONFIG_PCM_ROUTE_VOICE_STUB ) || defined(CONFIG_BT_CALL_FORWARDING)
- {"Voice Stub Tx Mixer", "SLIM_0_TX", "SLIMBUS_0_TX"},
- #endif /* CONFIG_PCM_ROUTE_VOICE_STUB || CONFIG_BT_CALL_FORWARDING */
- {"VOICE_STUB_UL", NULL, "Voice Stub Tx Mixer"},
- {"STUB_RX Mixer", "Voice Stub", "VOICE_STUB_DL"},
- {"STUB_RX", NULL, "STUB_RX Mixer"},
- {"SLIMBUS_1_RX Mixer", "Voice Stub", "VOICE_STUB_DL"},
- {"SLIMBUS_1_RX", NULL, "SLIMBUS_1_RX Mixer"},
- {"INTERNAL_BT_SCO_RX_Voice Mixer", "Voice Stub", "VOICE_STUB_DL"},
- {"SLIMBUS_3_RX_Voice Mixer", "Voice Stub", "VOICE_STUB_DL"},
- {"SLIMBUS_3_RX", NULL, "SLIMBUS_3_RX_Voice Mixer"},
- {"SLIMBUS_1_RX Port Mixer", "INTERNAL_BT_SCO_TX", "INT_BT_SCO_TX"},
- {"SLIMBUS_1_RX", NULL, "SLIMBUS_1_RX Port Mixer"},
- {"INTERNAL_BT_SCO_RX Port Mixer", "SLIM_1_TX", "SLIMBUS_1_TX"},
- #if defined( CONFIG_PCM_ROUTE_VOICE_STUB ) || defined(CONFIG_BT_CALL_FORWARDING)
- {"INTERNAL_BT_SCO_RX Port Mixer", "SLIM_0_TX", "SLIMBUS_0_TX"},
- #endif /* CONFIG_PCM_ROUTE_VOICE_STUB || CONFIG_BT_CALL_FORWARDING */
- {"INT_BT_SCO_RX", NULL, "INTERNAL_BT_SCO_RX Port Mixer"},
- {"SLIMBUS_3_RX Port Mixer", "INTERNAL_BT_SCO_RX", "INT_BT_SCO_RX"},
- {"SLIMBUS_3_RX Port Mixer", "MI2S_TX", "MI2S_TX"},
- {"SLIMBUS_3_RX", NULL, "SLIMBUS_3_RX Port Mixer"},
- {"HDMI_RX Port Mixer", "MI2S_TX", "MI2S_TX"},
- {"HDMI", NULL, "HDMI_RX Port Mixer"},
- {"SEC_I2S_RX Port Mixer", "MI2S_TX", "MI2S_TX"},
- {"SEC_I2S_RX", NULL, "SEC_I2S_RX Port Mixer"},
- {"MI2S_RX Port Mixer", "SLIM_1_TX", "SLIMBUS_1_TX"},
- {"MI2S_RX Port Mixer", "MI2S_TX", "MI2S_TX"},
- {"MI2S_RX", NULL, "MI2S_RX Port Mixer"},
- {"PRI_MI2S_RX Port Mixer", "SEC_MI2S_TX", "SEC_MI2S_TX"},
- {"PRI_MI2S_RX", NULL, "PRI_MI2S_RX Port Mixer"},
- /* Backend Enablement */
- {"BE_OUT", NULL, "PRI_I2S_RX"},
- {"BE_OUT", NULL, "SEC_I2S_RX"},
- {"BE_OUT", NULL, "SLIMBUS_0_RX"},
- {"BE_OUT", NULL, "SLIMBUS_1_RX"},
- {"BE_OUT", NULL, "SLIMBUS_3_RX"},
- {"BE_OUT", NULL, "SLIMBUS_4_RX"},
- {"BE_OUT", NULL, "HDMI"},
- {"BE_OUT", NULL, "MI2S_RX"},
- {"BE_OUT", NULL, "QUAT_MI2S_RX"},
- {"BE_OUT", NULL, "TERT_MI2S_RX"},
- {"BE_OUT", NULL, "SEC_MI2S_RX"},
- {"BE_OUT", NULL, "PRI_MI2S_RX"},
- {"BE_OUT", NULL, "INT_BT_SCO_RX"},
- {"BE_OUT", NULL, "INT_FM_RX"},
- {"BE_OUT", NULL, "PCM_RX"},
- {"BE_OUT", NULL, "SLIMBUS_3_RX"},
- {"BE_OUT", NULL, "AUX_PCM_RX"},
- {"BE_OUT", NULL, "SEC_AUX_PCM_RX"},
- {"BE_OUT", NULL, "INT_BT_SCO_RX"},
- {"BE_OUT", NULL, "INT_FM_RX"},
- {"BE_OUT", NULL, "PCM_RX"},
- {"BE_OUT", NULL, "SLIMBUS_3_RX"},
- {"BE_OUT", NULL, "AUX_PCM_RX"},
- {"BE_OUT", NULL, "SEC_AUX_PCM_RX"},
- {"BE_OUT", NULL, "VOICE_PLAYBACK_TX"},
- {"BE_OUT", NULL, "VOICE2_PLAYBACK_TX"},
- {"PRI_I2S_TX", NULL, "BE_IN"},
- {"MI2S_TX", NULL, "BE_IN"},
- {"QUAT_MI2S_TX", NULL, "BE_IN"},
- {"PRI_MI2S_TX", NULL, "BE_IN"},
- {"TERT_MI2S_TX", NULL, "BE_IN"},
- {"SEC_MI2S_TX", NULL, "BE_IN"},
- {"SLIMBUS_0_TX", NULL, "BE_IN" },
- {"SLIMBUS_1_TX", NULL, "BE_IN" },
- {"SLIMBUS_3_TX", NULL, "BE_IN" },
- {"SLIMBUS_4_TX", NULL, "BE_IN" },
- {"SLIMBUS_5_TX", NULL, "BE_IN" },
- {"INT_BT_SCO_TX", NULL, "BE_IN"},
- {"INT_FM_TX", NULL, "BE_IN"},
- {"PCM_TX", NULL, "BE_IN"},
- {"AUX_PCM_TX", NULL, "BE_IN"},
- {"SEC_AUX_PCM_TX", NULL, "BE_IN"},
- {"INCALL_RECORD_TX", NULL, "BE_IN"},
- {"INCALL_RECORD_RX", NULL, "BE_IN"},
- {"SLIM0_RX_VI_FB_LCH_MUX", "SLIM4_TX", "SLIMBUS_4_TX"},
- {"SLIMBUS_0_RX", NULL, "SLIM0_RX_VI_FB_LCH_MUX"},
- };
- static int msm_pcm_routing_hw_params(struct snd_pcm_substream *substream,
- struct snd_pcm_hw_params *params)
- {
- struct snd_soc_pcm_runtime *rtd = substream->private_data;
- unsigned int be_id = rtd->dai_link->be_id;
- if (be_id >= MSM_BACKEND_DAI_MAX) {
- pr_err("%s: unexpected be_id %d\n", __func__, be_id);
- return -EINVAL;
- }
- mutex_lock(&routing_lock);
- msm_bedais[be_id].sample_rate = params_rate(params);
- msm_bedais[be_id].channel = params_channels(params);
- msm_bedais[be_id].format = params_format(params);
- mutex_unlock(&routing_lock);
- return 0;
- }
- static int msm_pcm_routing_close(struct snd_pcm_substream *substream)
- {
- struct snd_soc_pcm_runtime *rtd = substream->private_data;
- unsigned int be_id = rtd->dai_link->be_id;
- int i, session_type, path_type, topology;
- struct msm_pcm_routing_bdai_data *bedai;
- if (be_id >= MSM_BACKEND_DAI_MAX) {
- pr_err("%s: unexpected be_id %d\n", __func__, be_id);
- return -EINVAL;
- }
- bedai = &msm_bedais[be_id];
- session_type = (substream->stream == SNDRV_PCM_STREAM_PLAYBACK ?
- 0 : 1);
- if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
- path_type = ADM_PATH_PLAYBACK;
- else
- path_type = ADM_PATH_LIVE_REC;
- mutex_lock(&routing_lock);
- topology = get_topology(path_type);
- for_each_set_bit(i, &bedai->fe_sessions, MSM_FRONTEND_DAI_MM_SIZE) {
- if (fe_dai_map[i][session_type].strm_id != INVALID_SESSION) {
- fe_dai_map[i][session_type].be_srate =
- bedai->sample_rate;
- adm_close(bedai->port_id,
- fe_dai_perf_mode[i][session_type]);
- srs_port_id = -1;
- if ((DOLBY_ADM_COPP_TOPOLOGY_ID == topology) &&
- (fe_dai_perf_mode[i][session_type] ==
- LEGACY_PCM_MODE))
- dolby_dap_deinit(bedai->port_id);
- }
- }
- bedai->active = 0;
- bedai->sample_rate = 0;
- bedai->channel = 0;
- mutex_unlock(&routing_lock);
- return 0;
- }
- static int msm_pcm_routing_prepare(struct snd_pcm_substream *substream)
- {
- struct snd_soc_pcm_runtime *rtd = substream->private_data;
- unsigned int be_id = rtd->dai_link->be_id;
- int i, path_type, session_type, port_id, topology;
- struct msm_pcm_routing_bdai_data *bedai;
- u32 channels;
- bool playback, capture;
- uint16_t bits_per_sample = 16;
- struct msm_pcm_routing_fdai_data *fdai;
- if (be_id >= MSM_BACKEND_DAI_MAX) {
- pr_err("%s: unexpected be_id %d\n", __func__, be_id);
- return -EINVAL;
- }
- bedai = &msm_bedais[be_id];
- if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
- path_type = ADM_PATH_PLAYBACK;
- session_type = SESSION_TYPE_RX;
- } else {
- path_type = ADM_PATH_LIVE_REC;
- session_type = SESSION_TYPE_TX;
- }
- mutex_lock(&routing_lock);
- topology = get_topology(path_type);
- if (bedai->active == 1)
- goto done; /* Ignore prepare if back-end already active */
- /* AFE port is not active at this point. However, still
- * go ahead setting active flag under the notion that
- * QDSP6 is able to handle ADM starting before AFE port
- * is started.
- */
- bedai->active = 1;
- playback = substream->stream == SNDRV_PCM_STREAM_PLAYBACK;
- capture = substream->stream == SNDRV_PCM_STREAM_CAPTURE;
- for_each_set_bit(i, &bedai->fe_sessions, MSM_FRONTEND_DAI_MM_SIZE) {
- fdai = &fe_dai_map[i][session_type];
- if (fdai->strm_id != INVALID_SESSION) {
- if (session_type == SESSION_TYPE_TX &&
- fdai->be_srate &&
- (fdai->be_srate != bedai->sample_rate)) {
- pr_debug("%s: flush strm %d diff BE rates\n",
- __func__,
- fdai->strm_id);
- if (fdai->event_info.event_func)
- fdai->event_info.event_func(
- MSM_PCM_RT_EVT_BUF_RECFG,
- fdai->event_info.priv_data);
- fdai->be_srate = 0; /* might not need it */
- }
- channels = bedai->channel;
- if (bedai->format == SNDRV_PCM_FORMAT_S24_LE)
- bits_per_sample = 24;
- if (bedai->port_id == VOICE_RECORD_RX ||
- bedai->port_id == VOICE_RECORD_TX)
- topology = DEFAULT_COPP_TOPOLOGY;
- if ((playback) && (channels > 0)) {
- adm_multi_ch_copp_open(bedai->port_id,
- path_type,
- bedai->sample_rate,
- channels,
- topology,
- fe_dai_perf_mode[i][session_type],
- bits_per_sample);
- } else if (capture) {
- adm_open(bedai->port_id,
- path_type,
- bedai->sample_rate,
- channels,
- topology, fe_dai_perf_mode[i][session_type],
- bits_per_sample);
- }
- msm_pcm_routing_build_matrix(i,
- fdai->strm_id, path_type,
- fe_dai_perf_mode[i][session_type]);
- port_id = srs_port_id = bedai->port_id;
- srs_send_params(srs_port_id, 1, 0);
- if ((DOLBY_ADM_COPP_TOPOLOGY_ID == topology) &&
- (fe_dai_perf_mode[i][session_type] ==
- LEGACY_PCM_MODE))
- if (dolby_dap_init(port_id, channels) < 0)
- pr_err("%s: Err init dolby dap\n",
- __func__);
- }
- }
- done:
- mutex_unlock(&routing_lock);
- return 0;
- }
- static struct snd_pcm_ops msm_routing_pcm_ops = {
- .hw_params = msm_pcm_routing_hw_params,
- .close = msm_pcm_routing_close,
- .prepare = msm_pcm_routing_prepare,
- };
- static unsigned int msm_routing_read(struct snd_soc_platform *platform,
- unsigned int reg)
- {
- dev_dbg(platform->dev, "reg %x\n", reg);
- return 0;
- }
- /* Not used but frame seems to require it */
- static int msm_routing_write(struct snd_soc_platform *platform,
- unsigned int reg, unsigned int val)
- {
- dev_dbg(platform->dev, "reg %x val %x\n", reg, val);
- return 0;
- }
- /* Not used but frame seems to require it */
- static int msm_routing_probe(struct snd_soc_platform *platform)
- {
- snd_soc_dapm_new_controls(&platform->dapm, msm_qdsp6_widgets,
- ARRAY_SIZE(msm_qdsp6_widgets));
- snd_soc_dapm_add_routes(&platform->dapm, intercon,
- ARRAY_SIZE(intercon));
- snd_soc_dapm_new_widgets(&platform->dapm);
- snd_soc_add_platform_controls(platform,
- int_fm_vol_mixer_controls,
- ARRAY_SIZE(int_fm_vol_mixer_controls));
- snd_soc_add_platform_controls(platform,
- int_hfp_vol_mixer_controls,
- ARRAY_SIZE(int_hfp_vol_mixer_controls));
- snd_soc_add_platform_controls(platform,
- eq_enable_mixer_controls,
- ARRAY_SIZE(eq_enable_mixer_controls));
- snd_soc_add_platform_controls(platform,
- eq_band_mixer_controls,
- ARRAY_SIZE(eq_band_mixer_controls));
- snd_soc_add_platform_controls(platform,
- eq_coeff_mixer_controls,
- ARRAY_SIZE(eq_coeff_mixer_controls));
- snd_soc_add_platform_controls(platform,
- multimedia2_vol_mixer_controls,
- ARRAY_SIZE(multimedia2_vol_mixer_controls));
- snd_soc_add_platform_controls(platform,
- multimedia5_vol_mixer_controls,
- ARRAY_SIZE(multimedia5_vol_mixer_controls));
- snd_soc_add_platform_controls(platform,
- lpa_SRS_trumedia_controls,
- ARRAY_SIZE(lpa_SRS_trumedia_controls));
- snd_soc_add_platform_controls(platform,
- lpa_SRS_trumedia_controls_HDMI,
- ARRAY_SIZE(lpa_SRS_trumedia_controls_HDMI));
- snd_soc_add_platform_controls(platform,
- lpa_SRS_trumedia_controls_I2S,
- ARRAY_SIZE(lpa_SRS_trumedia_controls_I2S));
- snd_soc_add_platform_controls(platform,
- multi_ch_channel_map_mixer_controls,
- ARRAY_SIZE(multi_ch_channel_map_mixer_controls));
- snd_soc_add_platform_controls(platform, lsm_function,
- ARRAY_SIZE(lsm_function));
- snd_soc_add_platform_controls(platform,
- ss_solution_mixer_controls,
- ARRAY_SIZE(ss_solution_mixer_controls));
- snd_soc_add_platform_controls(platform,
- aanc_slim_0_rx_mux,
- ARRAY_SIZE(aanc_slim_0_rx_mux));
- snd_soc_add_platform_controls(platform,
- dolby_security_controls,
- ARRAY_SIZE(dolby_security_controls));
- snd_soc_add_platform_controls(platform,
- dolby_dap_param_to_set_controls,
- ARRAY_SIZE(dolby_dap_param_to_set_controls));
- snd_soc_add_platform_controls(platform,
- dolby_dap_param_to_get_controls,
- ARRAY_SIZE(dolby_dap_param_to_get_controls));
- snd_soc_add_platform_controls(platform,
- dolby_dap_param_visualizer_controls,
- ARRAY_SIZE(dolby_dap_param_visualizer_controls));
- snd_soc_add_platform_controls(platform,
- dolby_dap_param_end_point_controls,
- ARRAY_SIZE(dolby_dap_param_end_point_controls));
- snd_soc_add_platform_controls(platform,
- get_rms_controls,
- ARRAY_SIZE(get_rms_controls));
- snd_soc_add_platform_controls(platform, msm_voc_session_controls,
- ARRAY_SIZE(msm_voc_session_controls));
- return 0;
- }
- static struct snd_soc_platform_driver msm_soc_routing_platform = {
- .ops = &msm_routing_pcm_ops,
- .probe = msm_routing_probe,
- .read = msm_routing_read,
- .write = msm_routing_write,
- };
- static __devinit int msm_routing_pcm_probe(struct platform_device *pdev)
- {
- if (pdev->dev.of_node)
- dev_set_name(&pdev->dev, "%s", "msm-pcm-routing");
- dev_dbg(&pdev->dev, "dev name %s\n", dev_name(&pdev->dev));
- return snd_soc_register_platform(&pdev->dev,
- &msm_soc_routing_platform);
- }
- static int msm_routing_pcm_remove(struct platform_device *pdev)
- {
- snd_soc_unregister_platform(&pdev->dev);
- return 0;
- }
- static const struct of_device_id msm_pcm_routing_dt_match[] = {
- {.compatible = "qcom,msm-pcm-routing"},
- {}
- };
- MODULE_DEVICE_TABLE(of, msm_pcm_routing_dt_match);
- static struct platform_driver msm_routing_pcm_driver = {
- .driver = {
- .name = "msm-pcm-routing",
- .owner = THIS_MODULE,
- .of_match_table = msm_pcm_routing_dt_match,
- },
- .probe = msm_routing_pcm_probe,
- .remove = __devexit_p(msm_routing_pcm_remove),
- };
- int msm_routing_check_backend_enabled(int fedai_id)
- {
- int i;
- if (fedai_id >= MSM_FRONTEND_DAI_MM_MAX_ID) {
- /* bad ID assigned in machine driver */
- pr_err("%s: bad MM ID\n", __func__);
- return 0;
- }
- for (i = 0; i < MSM_BACKEND_DAI_MAX; i++) {
- if (test_bit(fedai_id, &msm_bedais[i].fe_sessions))
- return msm_bedais[i].active;
- }
- return 0;
- }
- static int __init msm_soc_routing_platform_init(void)
- {
- mutex_init(&routing_lock);
- return platform_driver_register(&msm_routing_pcm_driver);
- }
- module_init(msm_soc_routing_platform_init);
- static void __exit msm_soc_routing_platform_exit(void)
- {
- platform_driver_unregister(&msm_routing_pcm_driver);
- }
- module_exit(msm_soc_routing_platform_exit);
- MODULE_DESCRIPTION("MSM routing platform driver");
- MODULE_LICENSE("GPL v2");
|