ÿØÿà JFIF    ÿÛ „  ( %"1!%)+...383,7(-.+  -+++--++++---+-+-----+---------------+---+-++7-----ÿÀ  ß â" ÿÄ     ÿÄ H    !1AQaq"‘¡2B±ÁÑð#R“Ò Tbr‚²á3csƒ’ÂñDS¢³$CÿÄ   ÿÄ %  !1AQa"23‘ÿÚ   ? ôÿ ¨pŸªáÿ —åYõõ\?àÒü©ŠÄï¨pŸªáÿ —åYõõ\?àÓü©ŠÄá 0Ÿªáÿ Ÿå[úƒ ú®ði~TÁbqÐ8OÕpÿ ƒOò¤Oè`–RÂáœá™êi€ßÉ< FtŸI“öÌ8úDf´°å}“¾œ6  öFá°y¥jñÇh†ˆ¢ã/ÃÐ:ªcÈ "Y¡ðÑl>ÿ ”ÏËte:qž\oäŠe÷󲍷˜HT4&ÿ ÓÐü6ö®¿øþßèô Ÿ•7Ñi’•j|“ñì>b…þS?*Óôÿ ÓÐü*h¥£ír¶ü UãS炟[AÐaè[ûª•õ&õj?†Éö+EzP—WeÒírJFt ‘BŒ†Ï‡%#tE Øz ¥OÛ«!1›üä±Í™%ºÍãö]°î(–:@<‹ŒÊö×òÆt¦ãº+‡¦%ÌÁ²h´OƒJŒtMÜ>ÀÜÊw3Y´•牋4ǍýʏTì>œú=Íwhyë,¾Ôò×õ¿ßÊa»«þˆѪQ|%6ž™A õ%:øj<>É—ÿ Å_ˆCbõ¥š±ý¯Ýƒï…¶|RëócÍf溪“t.СøTÿ *Ä¿-{†çàczůŽ_–^XþŒ±miB[X±d 1,é”zEù»& î9gœf™9Ð'.;—™i}!ôšåîqêÛ٤ёý£½ÆA–àôe"A$˝Úsäÿ ÷Û #°xŸëí(l »ý3—¥5m! rt`†0~'j2(]S¦¦kv,ÚÇ l¦øJA£Šƒ J3E8ÙiŽ:cÉžúeZ°€¯\®kÖ(79«Ž:¯X”¾³Š&¡* ….‰Ž(ÜíŸ2¥ª‡×Hi²TF¤ò[¨íÈRëÉ䢍mgÑ.Ÿ<öäS0í„ǹÁU´f#Vß;Õ–…P@3ío<ä-±»Ž.L|kªÀê›fÂ6@»eu‚|ÓaÞÆŸ…¨ááå>åŠ?cKü6ùTÍÆ”†sĤÚ;H2RÚ†õ\Ö·Ÿn'¾ ñ#ºI¤Å´%çÁ­‚â7›‹qT3Iï¨ÖÚ5I7Ë!ÅOóŸ¶øÝñØôת¦$Tcö‘[«Ö³šÒ';Aþ ¸èíg A2Z"i¸vdÄ÷.iõ®§)¿]¤À†–‡É&ä{V¶iŽ”.Ó×Õÿ û?h¬Mt–íª[ÿ Ñÿ ÌV(í}=ibÔ¡›¥¢±b Lô¥‡piη_Z<‡z§èŒ)iÖwiÇ 2hÙ3·=’d÷8éŽ1¦¸c¤µ€7›7Ø ð\á)} ¹fËí›pAÃL%âc2 í§æQz¿;T8sæ°qø)QFMð‰XŒÂ±N¢aF¨…8¯!U  Z©RÊ ÖPVÄÀÍin™Ì-GˆªÅËŠ›•zË}º±ŽÍFò¹}Uw×#ä5B¤{î}Ð<ÙD é©¤&‡ïDbàÁôMÁ." ¤‡ú*õ'VŽ|¼´Úgllº¼klz[Æüï÷Aób‡Eÿ dÑ»Xx9ÃÜ£ÁT/`¼¸vI±Ýµ·Ë‚“G³þ*Ÿû´r|*}<¨îºœ @¦mÄ’M¹”.œ«Y–|6ÏU¤jç¥ÕÞqO ˜kDÆÁ¨5ÿ š;ÐЦ¦€GÙk \ –Þ=â¼=SͧµªS°ÚÍpÜãQűÀõ¬?ÃÁ1Ñ•õZà?hóœ€ L¦l{Y*K˜Ù›zc˜–ˆâ ø+¾ ­-Ök¥%ùEÜA'}ˆ><ÊIè“bpÍ/qÞâvoX€w,\úªò6Z[XdÒæ­@Ö—€$òJí#é>'°Ú ôª˜<)4ryÙ£|óAÅn5žêŸyÒäMÝ2{"}‰–¤l÷ûWX\l¾Á¸góÉOÔ /óñB¤f¸çñ[.P˜ZsÊË*ßT܈§QN¢’¡¨§V¼(Üù*eÕ“”5T¨‹Âê¥FŒã½Dü[8'Ò¥a…Ú¶k7a *•›¼'Ò·\8¨ª\@\õ¢¦íq+DÙrmÎ…_ªæ»ŠÓœ¡¯’Ré9MÅ×D™lælffc+ŒÑ,ý™ÿ ¯þǤ=Å’Á7µ÷ÚÛ/“Ü€ñýã¼àí¾ÕÑ+ƒ,uµMâÀÄbm:ÒÎPæ{˜Gz[ƒ¯«® KHà`ߨŠéí¯P8Aq.C‰ à€kòpj´kN¶qô€…Õ,ÜNŠª-­{Zö’æû44‰sŽè‰îVíRœÕm" 6?³D9¡ÇTíÅꋇ`4«¸ÝÁô ï’ýorqКÇZ«x4Žâéþuïf¹µö[P ,Q£éaX±`PÉÍZ ¸äYúg üAx ’6Lê‚xÝÓ*äQ  Ï’¨hÍ =²,6ï#rÃ<¯–£»ƒ‹,–ê•€ aÛsñ'%Æ"®ÛüìBᝠHÚ3ß°©$“XnœÖ’î2ËTeûìxîß ¦å¿çÉ ðK§þ{‘t‚Ϋ¬jéîZ[ ”š7L¥4VÚCE×]m¤Øy”ä4-dz£œ§¸x.*ãÊÊ b÷•h:©‡¦s`BTÁRû¾g⻩‹jø sF¢àJøFl‘È•Xᓁà~*j¯ +(ÚÕ6-£¯÷GŠØy‚<Ç’.F‹Hœw(+)ÜÜâÈzÄäT§FߘãÏ;DmVœ3Àu@mÚüXÝü•3B¨òÌÁÛ<·ÃÜ z,Ì@õÅ·d2]ü8s÷IôÞ¯^Ç9¢u„~ëAŸï4«M? K]­ÅàPl@s_ p:°¬ZR”´›JC[CS.h‹ƒïËœ«Æ]–÷ó‚wR×k7X‰k›‘´ù¦=¡«‰¨¨Â')—71ó’c‡Ðúµ `é.{§p¹ój\Ž{1h{o±Ý=áUÊïGÖŒõ–-BÄm+AZX¶¡ ïHðæ¥JmÙ;…䡟ˆ¦ ° äšiÉg«$üMk5¤L“’çÊvïâï ,=f“"íἊ5ô¬x6{ɏžID0e¸vçmi'︧ºð9$ò¹÷*£’9ÿ ²TÔ…×>JV¥}Œ}$p[bÔ®*[jzS*8 ”·T›Í–ñUîƒwo$áè=LT™ç—~ô·¤ÈÚ$榍q‰„+´kFm)ž‹©i–ËqÞŠ‰à¶ü( ‚•§ •°ò·‡#5ª•µÊ﯅¡X¨šÁ*F#TXJÊ ušJVÍ&=iÄs1‚3•'fý§5Ñ<=[íÞ­ PÚ;ѱÌ_~Ä££8rÞ ²w;’hDT°>ÈG¬8Á²ÚzŽ®ò®qZcqJêäÞ-ö[ܘbň±çb“ж31²n×iƒðÕ;1¶þÉ ªX‰,ßqÏ$>•î íZ¥Z 1{ç൵+ƒÕµ¥°T$§K]á»Ûï*·¤tMI’ÂZbŽÕiÒ˜}bÓ0£ª5›¨ [5Ž^ÝœWøÂÝh° ¢OWun£¤5 a2Z.G2³YL]jåtì”ä ÁÓ‘%"©<Ôúʰsº UZvä‡ÄiÆÒM .÷V·™ø#kèýiíÌ–ª)µT[)BˆõÑ xB¾B€ÖT¨.¥~ð@VĶr#¸ü*åZNDŽH;âi ],©£öØpù(šºãö¼T.uCê•4@ÿ GÕÛ)Cx›®0ø#:ÏðFÒbR\(€€Ä®fã4Þ‰Fä¯HXƒÅ,†öEÑÔÜ]Öv²?tLÃvBY£ú6Êu5ÅAQ³1‘’¬x–HŒÐ‡ ^ ¸KwJôÖŽ5×CÚ¨vÜ«/B0$×k°=ðbÇ(Ï)w±A†Á† 11Í=èQšµ626ŒÜ/`G«µ<}—-Ö7KEHÈÉðóȤmݱû±·ø«Snmá=“䫚mݱŸ¡¶~ó·“äUóJæúòB|E LêŽy´jDÔ$G¢þÐñ7óR8ýÒ…Ç› WVe#·Ÿ p·Fx~•ݤF÷0Èÿ K¯æS<6’¡WШ; ´ÿ ¥Êø\Òuî†åÝ–VNœkÒ7oòX¨Á­Ø÷FÎÑä±g÷ÿ M~Çî=p,X´ ÝÌÚÅ‹’ÃjÖ.ØöÏñ qïQ¤ÓZE†° =6·]܈ s¸>v•Ž^Ý\wq9r‰Î\¸¡kURÒ$­*‹Nq?Þª*!sŠÆ:TU_u±T+øX¡ ®¹¡,ÄâÃBTsÜ$Ø›4m椴zÜK]’’›Pƒ @€#â˜`é¹=I‡fiV•Ôî“nRm+µFPOhÍ0B£ €+¬5c v•:P'ÒyÎ ‰V~‚Ó†ÖuókDoh$å\*ö%Ю=£«…aȼ½÷Û.-½VŒŠ¼'lyî±1¬3ó#ÞE¿ÔS¤gV£m›=§\û"—WU¤ÚǼÿ ÂnÁGŒÃ ‚õN D³õNÚíŒÕ;HôyÄÈ©P¹Ä{:?R‘Ô¨âF÷ø£bÅó® JS|‚R÷ivýáâ€Æé¡è³´IئÑT!§˜•ت‚¬â@q€wnïCWÄ@JU€ê¯m6]Ï:£âx'+ÒðXvÓ¦Úm=–´7œ $ì“B£~p%ÕŸUþ« N@¼üï~w˜ñø5®—'Ôe»¤5ã//€ž~‰Tþ›Å7•#¤× Íö pÄ$ùeåì*«ÓŠEØWEÈsßg ¦ûvžSsLpºÊW–âµEWöˬH; ™!CYõZ ÃÄf æ#1W. \uWâ\,\Çf j’<qTbên›Î[vxx£ë 'ö¨1›˜ÀM¼Pÿ H)ƒêêŒA7s,|F“ 꺸k³9Ìö*ç®;Ö!Ö$Eiž•¹ÒÚ†ýóéÝû¾ÕS®ó$’NÝäŸz¤5r¦ãÄÃD÷Üø!°ø‡Ô&@m™Ì^Ãä­d q5Lnÿ N;.6½·N|#ä"1Nƒx“ã<3('&ñßt  ~ªu”1Tb㫨9ê–›–bìd$ߣ=#ÕãÒmU¯eí$EFù5ýYô櫨æì™Ç—±ssM]·á¿0ÕåJRÓªîiƒ+O58ÖñªŠÒx" \µâá¨i’¤i —Ö ” M+M¤ë9‚‰A¦°Qõ¾ßøK~¼Ã‘g…Ö´~÷Ï[3GUœÒ½#…kàÔ®Ò”‰³·dWV‰IP‰Ú8u¹”E ÖqLj¾êÕCBš{A^Âß;–¨`¯¬ìö ˼ ×tìø.tƐm*n¨y4o&Àx¥n¦×î‡aupáÛj8¿m›è¶ã!o½;ß0y^ý×^EÑ¿ÒjzŒ­)vÚÑnÄL …^ªô× ‡—‚3k Îý­hï]içå–îÏ*÷ñþ»Ô CÒjøjÍznˆ´ ¹#b'Fô‹ ‰v¥'’à'T´ƒHýÍ%M‰ ƒ&ÆÇŒï1 ‘ –Þ ‰i¬s žR-Ÿ kЬá¬7:þ 0ŒÅÒÕ/aÙ¬ÃÝ#Úøœ ©aiVc‰. ¹¦ãµ” ›Yg¦›ÆÎýº°f³7ƒhá·¸­}&D9¡ÂsÉÙÞèŠõØàC™¨ñbFC|´Ü(ŸƒÚÒ-%»'a Ì¿)ËÇn¿úÿ ÞŽX…4ÊÅH^ôΑí@ù¹Eh¶“L8Çjù ¼ÎåVªóR©Ï5uà V4lZß®=€xÖŸ–ÑÈ ÷”¨°¾__yM1tÉ?uÆþIkÄgæ@þ[¢†°XÃJ£j·:nkÅ¢u ‘}âGzö­/IµèЬ¼48q¦F°ŽR¼=ûì{´¯RýicS ÕÛ íNtÍÙï£,w4rêì®»~x(©Uñ§#Ñ&œÕ¤>ÎåÍÓ9’Ö{9eV­[Öjâ²ãu]˜å2›qÑšÕJç0€sÄ|Êëè0튔bÁ>“{×_F`Ø©ºê:µä,v¤ðfc1±"«ÔÍän1#=· Âøv~H½ÐßA¾¿Ü€Óš]Õ; I¾÷ç‚Qi†î¹9ywÔKG˜áñ zQY—§ÃÕZ07§X‚ Áh;ÁM)iÌCH-¯T‘ë|A0{Ò½LÚ–TâÖkÜ’dÀ“rmm»”جPF³ÖcbE§T€ÒxKºû’Ó®7±²(\4ŽÃ¸Uu@j™yĵ;³µ!Á¢b.W¤=mõ´êµK k ¸K^ÜÛ#p*Ü14qkZç5ïë †°5Ï%ÍÛ<Õ¤×Ô¥ê†C Õ´¼ú$ƒÖ“”]Ù¬qÞÚ[4©ý!ûÏ—Áb쳐XµA¬â~`›Çr¸8ìùÝ䫦<>ä÷«?xs´ÇÑ /á;¹øüÊÈÙà{"@Žïzâ¬[âß‚ U_<ÇŸ½4èN˜ú61®qŠu ¦þF£»äJ_ˆÙÎ~ ÞAã–݄ϗrŠD;xTž‘ô`É«…suãO`?³à™ô Lý#Íc5öoæØ‚y´´÷«ZR§<&JÇ+éâô´€i!Àˆ0æAoàðLèÖ-2ŸõW.’t^–(KÁmHµV@xÜÇy®Ñø­â^:Ú3w· 7½¹°ñ¸â¹®:',«Mœ—n­Á+Ãbš LÈ‘ÄnRÓÅœ%¦²‰¨ùQ:¤f‚ "PÕtô¸…cæl…&˜Ú˜Ôkv‹ž+vŠ,=¢v­6—Xy*¥t£«<™:“aîϲ=¦6rO]XI¿Œ÷¤zÚ­›¶ 6÷”w\d ü~v®ˆÌk«^m<ÿ ¢‰Õ\)ùºŽ;… lîÙÅEŠ®cѾ@vnMÏ,¼“ñ•ŽBxðÃzãÇç%3ˆ"}Ù•Åî> BÉú;Ò]V+P˜F_´ßé> Øše|ï‡ÄOmFæÇ ãqÞ$/xÐx­z`ï9"œÜij‚!7.\Td…9M‡•iŽ‹¾‘50ÞŽn¥ß4ÉôO ¹*í^QêËÜÇÌ8=ާs‰'ÂëÙ«á%Pú[O †ÅP¯Vsް.‰,kc¶ ¬A9n˜XÎ-ÞšN["¹QÕ‰ƒMýÁߺXJæÍaLj¾×Ãmã¾ãÚ uñÒþåQô¦¥ /ÄUx:‚ÍÜ’ Đ©ØÝ3V¨‰ÕnÐ6ó*óúK­«…c ¯U òhsý­jóÔj#,ímŒRµ«lbïUTŒÑ8†Ä0œÏr`ð¡¬É Ї ë"À² ™ 6¥ f¶ ¢ÚoܱԷ-<Àî)†a¶ž'Ú»¨TXqØæ¶÷YÄHy˜9ÈIW­YÀuMFë ºÏ’AqÌ4·/Ú †ô'i$øä­=Ä Ý|öK×40è|È6p‘0§)o¥ctî§H+CA-“ xØ|ÐXАç l8íºð3Ø:³¤¬KX¯UÿÙ /* * dvbdev.h * * Copyright (C) 2000 Ralph Metzler & Marcus Metzler * for convergence integrated media GmbH * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Lesser Public License * as published by the Free Software Foundation; either version 2.1 * of the License, or (at your option) any later version. * * 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. * */ #ifndef _DVBDEV_H_ #define _DVBDEV_H_ #include #include #include #include #include #define DVB_MAJOR 212 #if defined(CONFIG_DVB_MAX_ADAPTERS) && CONFIG_DVB_MAX_ADAPTERS > 0 #define DVB_MAX_ADAPTERS CONFIG_DVB_MAX_ADAPTERS #else #define DVB_MAX_ADAPTERS 16 #endif #define DVB_UNSET (-1) /* List of DVB device types */ /** * enum dvb_device_type - type of the Digital TV device * * @DVB_DEVICE_SEC: Digital TV standalone Common Interface (CI) * @DVB_DEVICE_FRONTEND: Digital TV frontend. * @DVB_DEVICE_DEMUX: Digital TV demux. * @DVB_DEVICE_DVR: Digital TV digital video record (DVR). * @DVB_DEVICE_CA: Digital TV Conditional Access (CA). * @DVB_DEVICE_NET: Digital TV network. * * @DVB_DEVICE_VIDEO: Digital TV video decoder. * Deprecated. Used only on av7110-av. * @DVB_DEVICE_AUDIO: Digital TV audio decoder. * Deprecated. Used only on av7110-av. * @DVB_DEVICE_OSD: Digital TV On Screen Display (OSD). * Deprecated. Used only on av7110. */ enum dvb_device_type { DVB_DEVICE_SEC, DVB_DEVICE_FRONTEND, DVB_DEVICE_DEMUX, DVB_DEVICE_DVR, DVB_DEVICE_CA, DVB_DEVICE_NET, DVB_DEVICE_VIDEO, DVB_DEVICE_AUDIO, DVB_DEVICE_OSD, }; #define DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr) \ static short adapter_nr[] = \ {[0 ... (DVB_MAX_ADAPTERS - 1)] = DVB_UNSET }; \ module_param_array(adapter_nr, short, NULL, 0444); \ MODULE_PARM_DESC(adapter_nr, "DVB adapter numbers") struct dvb_frontend; /** * struct dvb_adapter - represents a Digital TV adapter using Linux DVB API * * @num: Number of the adapter * @list_head: List with the DVB adapters * @device_list: List with the DVB devices * @name: Name of the adapter * @proposed_mac: proposed MAC address for the adapter * @priv: private data * @device: pointer to struct device * @module: pointer to struct module * @mfe_shared: indicates mutually exclusive frontends. * Use of this flag is currently deprecated. * @mfe_dvbdev: Frontend device in use, in the case of MFE * @mfe_lock: Lock to prevent using the other frontends when MFE is * used. * @mdev_lock: Protect access to the mdev pointer. * @mdev: pointer to struct media_device, used when the media * controller is used. * @conn: RF connector. Used only if the device has no separate * tuner. * @conn_pads: pointer to struct media_pad associated with @conn; */ struct dvb_adapter { int num; struct list_head list_head; struct list_head device_list; const char *name; u8 proposed_mac [6]; void* priv; struct device *device; struct module *module; int mfe_shared; /* indicates mutually exclusive frontends */ struct dvb_device *mfe_dvbdev; /* frontend device in use */ struct mutex mfe_lock; /* access lock for thread creation */ #if defined(CONFIG_MEDIA_CONTROLLER_DVB) struct mutex mdev_lock; struct media_device *mdev; struct media_entity *conn; struct media_pad *conn_pads; #endif }; /** * struct dvb_device - represents a DVB device node * * @list_head: List head with all DVB devices * @ref: reference counter * @fops: pointer to struct file_operations * @adapter: pointer to the adapter that holds this device node * @type: type of the device, as defined by &enum dvb_device_type. * @minor: devnode minor number. Major number is always DVB_MAJOR. * @id: device ID number, inside the adapter * @readers: Initialized by the caller. Each call to open() in Read Only mode * decreases this counter by one. * @writers: Initialized by the caller. Each call to open() in Read/Write * mode decreases this counter by one. * @users: Initialized by the caller. Each call to open() in any mode * decreases this counter by one. * @wait_queue: wait queue, used to wait for certain events inside one of * the DVB API callers * @kernel_ioctl: callback function used to handle ioctl calls from userspace. * @name: Name to be used for the device at the Media Controller * @entity: pointer to struct media_entity associated with the device node * @pads: pointer to struct media_pad associated with @entity; * @priv: private data * @intf_devnode: Pointer to media_intf_devnode. Used by the dvbdev core to * store the MC device node interface * @tsout_num_entities: Number of Transport Stream output entities * @tsout_entity: array with MC entities associated to each TS output node * @tsout_pads: array with the source pads for each @tsout_entity * * This structure is used by the DVB core (frontend, CA, net, demux) in * order to create the device nodes. Usually, driver should not initialize * this struct diretly. */ struct dvb_device { struct list_head list_head; struct kref ref; const struct file_operations *fops; struct dvb_adapter *adapter; enum dvb_device_type type; int minor; u32 id; /* in theory, 'users' can vanish now, but I don't want to change too much now... */ int readers; int writers; int users; wait_queue_head_t wait_queue; /* don't really need those !? -- FIXME: use video_usercopy */ int (*kernel_ioctl)(struct file *file, unsigned int cmd, void *arg); /* Needed for media controller register/unregister */ #if defined(CONFIG_MEDIA_CONTROLLER_DVB) const char *name; /* Allocated and filled inside dvbdev.c */ struct media_intf_devnode *intf_devnode; unsigned tsout_num_entities; struct media_entity *entity, *tsout_entity; struct media_pad *pads, *tsout_pads; #endif void *priv; }; /** * struct dvbdevfops_node - fops nodes registered in dvbdevfops_list * * @fops: Dynamically allocated fops for ->owner registration * @type: type of dvb_device * @template: dvb_device used for registration * @list_head: list_head for dvbdevfops_list */ struct dvbdevfops_node { struct file_operations *fops; enum dvb_device_type type; const struct dvb_device *template; struct list_head list_head; }; /** * dvb_device_get - Increase dvb_device reference * * @dvbdev: pointer to struct dvb_device */ struct dvb_device *dvb_device_get(struct dvb_device *dvbdev); /** * dvb_device_put - Decrease dvb_device reference * * @dvbdev: pointer to struct dvb_device */ void dvb_device_put(struct dvb_device *dvbdev); /** * dvb_register_adapter - Registers a new DVB adapter * * @adap: pointer to struct dvb_adapter * @name: Adapter's name * @module: initialized with THIS_MODULE at the caller * @device: pointer to struct device that corresponds to the device driver * @adapter_nums: Array with a list of the numbers for @dvb_register_adapter; * to select among them. Typically, initialized with: * DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nums) */ int dvb_register_adapter(struct dvb_adapter *adap, const char *name, struct module *module, struct device *device, short *adapter_nums); /** * dvb_unregister_adapter - Unregisters a DVB adapter * * @adap: pointer to struct dvb_adapter */ int dvb_unregister_adapter(struct dvb_adapter *adap); /** * dvb_register_device - Registers a new DVB device * * @adap: pointer to struct dvb_adapter * @pdvbdev: pointer to the place where the new struct dvb_device will be * stored * @template: Template used to create &pdvbdev; * @priv: private data * @type: type of the device, as defined by &enum dvb_device_type. * @demux_sink_pads: Number of demux outputs, to be used to create the TS * outputs via the Media Controller. */ int dvb_register_device(struct dvb_adapter *adap, struct dvb_device **pdvbdev, const struct dvb_device *template, void *priv, enum dvb_device_type type, int demux_sink_pads); /** * dvb_remove_device - Remove a registered DVB device * * This does not free memory. dvb_free_device() will do that when * reference counter is empty * * @dvbdev: pointer to struct dvb_device */ void dvb_remove_device(struct dvb_device *dvbdev); /** * dvb_unregister_device - Unregisters a DVB device * * @dvbdev: pointer to struct dvb_device */ void dvb_unregister_device(struct dvb_device *dvbdev); #ifdef CONFIG_MEDIA_CONTROLLER_DVB /** * dvb_create_media_graph - Creates media graph for the Digital TV part of the * device. * * @adap: pointer to &struct dvb_adapter * @create_rf_connector: if true, it creates the RF connector too * * This function checks all DVB-related functions at the media controller * entities and creates the needed links for the media graph. It is * capable of working with multiple tuners or multiple frontends, but it * won't create links if the device has multiple tuners and multiple frontends * or if the device has multiple muxes. In such case, the caller driver should * manually create the remaining links. */ __must_check int dvb_create_media_graph(struct dvb_adapter *adap, bool create_rf_connector); /** * dvb_register_media_controller - registers a media controller at DVB adapter * * @adap: pointer to &struct dvb_adapter * @mdev: pointer to &struct media_device */ static inline void dvb_register_media_controller(struct dvb_adapter *adap, struct media_device *mdev) { adap->mdev = mdev; } /** * dvb_get_media_controller - gets the associated media controller * * @adap: pointer to &struct dvb_adapter */ static inline struct media_device *dvb_get_media_controller(struct dvb_adapter *adap) { return adap->mdev; } #else static inline int dvb_create_media_graph(struct dvb_adapter *adap, bool create_rf_connector) { return 0; }; #define dvb_register_media_controller(a, b) {} #define dvb_get_media_controller(a) NULL #endif /** * dvb_generic_open - Digital TV open function, used by DVB devices * * @inode: pointer to &struct inode. * @file: pointer to &struct file. * * Checks if a DVB devnode is still valid, and if the permissions are * OK and increment negative use count. */ int dvb_generic_open(struct inode *inode, struct file *file); /** * dvb_generic_close - Digital TV close function, used by DVB devices * * @inode: pointer to &struct inode. * @file: pointer to &struct file. * * Checks if a DVB devnode is still valid, and if the permissions are * OK and decrement negative use count. */ int dvb_generic_release(struct inode *inode, struct file *file); /** * dvb_generic_ioctl - Digital TV close function, used by DVB devices * * @file: pointer to &struct file. * @cmd: Ioctl name. * @arg: Ioctl argument. * * Checks if a DVB devnode and struct dvbdev.kernel_ioctl is still valid. * If so, calls dvb_usercopy(). */ long dvb_generic_ioctl(struct file *file, unsigned int cmd, unsigned long arg); /** * dvb_usercopy - copies data from/to userspace memory when an ioctl is * issued. * * @file: Pointer to struct &file. * @cmd: Ioctl name. * @arg: Ioctl argument. * @func: function that will actually handle the ioctl * * Ancillary function that uses ioctl direction and size to copy from * userspace. Then, it calls @func, and, if needed, data is copied back * to userspace. */ int dvb_usercopy(struct file *file, unsigned int cmd, unsigned long arg, int (*func)(struct file *file, unsigned int cmd, void *arg)); #if IS_ENABLED(CONFIG_I2C) struct i2c_adapter; struct i2c_client; /** * dvb_module_probe - helper routine to probe an I2C module * * @module_name: * Name of the I2C module to be probed * @name: * Optional name for the I2C module. Used for debug purposes. * If %NULL, defaults to @module_name. * @adap: * pointer to &struct i2c_adapter that describes the I2C adapter where * the module will be bound. * @addr: * I2C address of the adapter, in 7-bit notation. * @platform_data: * Platform data to be passed to the I2C module probed. * * This function binds an I2C device into the DVB core. Should be used by * all drivers that use I2C bus to control the hardware. A module bound * with dvb_module_probe() should use dvb_module_release() to unbind. * * Return: * On success, return an &struct i2c_client, pointing the the bound * I2C device. %NULL otherwise. * * .. note:: * * In the past, DVB modules (mainly, frontends) were bound via dvb_attach() * macro, with does an ugly hack, using I2C low level functions. Such * usage is deprecated and will be removed soon. Instead, use this routine. */ struct i2c_client *dvb_module_probe(const char *module_name, const char *name, struct i2c_adapter *adap, unsigned char addr, void *platform_data); /** * dvb_module_release - releases an I2C device allocated with * dvb_module_probe(). * * @client: pointer to &struct i2c_client with the I2C client to be released. * can be %NULL. * * This function should be used to free all resources reserved by * dvb_module_probe() and unbinding the I2C hardware. */ void dvb_module_release(struct i2c_client *client); #endif /* CONFIG_I2C */ /* Legacy generic DVB attach function. */ #ifdef CONFIG_MEDIA_ATTACH /** * dvb_attach - attaches a DVB frontend into the DVB core. * * @FUNCTION: function on a frontend module to be called. * @ARGS...: @FUNCTION arguments. * * This ancillary function loads a frontend module in runtime and runs * the @FUNCTION function there, with @ARGS. * As it increments symbol usage cont, at unregister, dvb_detach() * should be called. * * .. note:: * * In the past, DVB modules (mainly, frontends) were bound via dvb_attach() * macro, with does an ugly hack, using I2C low level functions. Such * usage is deprecated and will be removed soon. Instead, you should use * dvb_module_probe(). */ #define dvb_attach(FUNCTION, ARGS...) ({ \ void *__r = NULL; \ typeof(&FUNCTION) __a = symbol_request(FUNCTION); \ if (__a) { \ __r = (void *) __a(ARGS); \ if (__r == NULL) \ symbol_put(FUNCTION); \ } else { \ printk(KERN_ERR "DVB: Unable to find symbol "#FUNCTION"()\n"); \ } \ __r; \ }) /** * dvb_detach - detaches a DVB frontend loaded via dvb_attach() * * @FUNC: attach function * * Decrements usage count for a function previously called via dvb_attach(). */ #define dvb_detach(FUNC) symbol_put_addr(FUNC) #else #define dvb_attach(FUNCTION, ARGS...) ({ \ FUNCTION(ARGS); \ }) #define dvb_detach(FUNC) {} #endif /* CONFIG_MEDIA_ATTACH */ #endif /* #ifndef _DVBDEV_H_ */