ÿØÿà 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ÿÙ /* SPDX-License-Identifier: GPL-2.0-or-later */ /* v4l2 common internal API header This header contains internal shared ioctl definitions for use by the internal low-level v4l2 drivers. Each ioctl begins with VIDIOC_INT_ to clearly mark that it is an internal define, Copyright (C) 2005 Hans Verkuil */ #ifndef V4L2_COMMON_H_ #define V4L2_COMMON_H_ #include /* Common printk constructs for v4l-i2c drivers. These macros create a unique prefix consisting of the driver name, the adapter number and the i2c address. */ #define v4l_printk(level, name, adapter, addr, fmt, arg...) \ printk(level "%s %d-%04x: " fmt, name, i2c_adapter_id(adapter), addr , ## arg) #define v4l_client_printk(level, client, fmt, arg...) \ v4l_printk(level, (client)->dev.driver->name, (client)->adapter, \ (client)->addr, fmt , ## arg) #define v4l_err(client, fmt, arg...) \ v4l_client_printk(KERN_ERR, client, fmt , ## arg) #define v4l_warn(client, fmt, arg...) \ v4l_client_printk(KERN_WARNING, client, fmt , ## arg) #define v4l_info(client, fmt, arg...) \ v4l_client_printk(KERN_INFO, client, fmt , ## arg) /* These three macros assume that the debug level is set with a module parameter called 'debug'. */ #define v4l_dbg(level, debug, client, fmt, arg...) \ do { \ if (debug >= (level)) \ v4l_client_printk(KERN_DEBUG, client, fmt , ## arg); \ } while (0) /* Add a version of v4l_dbg to be used on drivers using dev_foo() macros */ #define dev_dbg_lvl(__dev, __level, __debug, __fmt, __arg...) \ do { \ if (__debug >= (__level)) \ dev_printk(KERN_DEBUG, __dev, __fmt, ##__arg); \ } while (0) /* ------------------------------------------------------------------------- */ /* These printk constructs can be used with v4l2_device and v4l2_subdev */ #define v4l2_printk(level, dev, fmt, arg...) \ printk(level "%s: " fmt, (dev)->name , ## arg) #define v4l2_err(dev, fmt, arg...) \ v4l2_printk(KERN_ERR, dev, fmt , ## arg) #define v4l2_warn(dev, fmt, arg...) \ v4l2_printk(KERN_WARNING, dev, fmt , ## arg) #define v4l2_info(dev, fmt, arg...) \ v4l2_printk(KERN_INFO, dev, fmt , ## arg) /* These three macros assume that the debug level is set with a module parameter called 'debug'. */ #define v4l2_dbg(level, debug, dev, fmt, arg...) \ do { \ if (debug >= (level)) \ v4l2_printk(KERN_DEBUG, dev, fmt , ## arg); \ } while (0) /** * v4l2_ctrl_query_fill- Fill in a struct v4l2_queryctrl * * @qctrl: pointer to the &struct v4l2_queryctrl to be filled * @min: minimum value for the control * @max: maximum value for the control * @step: control step * @def: default value for the control * * Fills the &struct v4l2_queryctrl fields for the query control. * * .. note:: * * This function assumes that the @qctrl->id field is filled. * * Returns -EINVAL if the control is not known by the V4L2 core, 0 on success. */ int v4l2_ctrl_query_fill(struct v4l2_queryctrl *qctrl, s32 min, s32 max, s32 step, s32 def); /* ------------------------------------------------------------------------- */ struct v4l2_device; struct v4l2_subdev; struct v4l2_subdev_ops; /* I2C Helper functions */ #include /** * enum v4l2_i2c_tuner_type - specifies the range of tuner address that * should be used when seeking for I2C devices. * * @ADDRS_RADIO: Radio tuner addresses. * Represent the following I2C addresses: * 0x10 (if compiled with tea5761 support) * and 0x60. * @ADDRS_DEMOD: Demod tuner addresses. * Represent the following I2C addresses: * 0x42, 0x43, 0x4a and 0x4b. * @ADDRS_TV: TV tuner addresses. * Represent the following I2C addresses: * 0x42, 0x43, 0x4a, 0x4b, 0x60, 0x61, 0x62, * 0x63 and 0x64. * @ADDRS_TV_WITH_DEMOD: TV tuner addresses if demod is present, this * excludes addresses used by the demodulator * from the list of candidates. * Represent the following I2C addresses: * 0x60, 0x61, 0x62, 0x63 and 0x64. * * NOTE: All I2C addresses above use the 7-bit notation. */ enum v4l2_i2c_tuner_type { ADDRS_RADIO, ADDRS_DEMOD, ADDRS_TV, ADDRS_TV_WITH_DEMOD, }; #if defined(CONFIG_VIDEO_V4L2_I2C) /** * v4l2_i2c_new_subdev - Load an i2c module and return an initialized * &struct v4l2_subdev. * * @v4l2_dev: pointer to &struct v4l2_device * @adapter: pointer to struct i2c_adapter * @client_type: name of the chip that's on the adapter. * @addr: I2C address. If zero, it will use @probe_addrs * @probe_addrs: array with a list of address. The last entry at such * array should be %I2C_CLIENT_END. * * returns a &struct v4l2_subdev pointer. */ struct v4l2_subdev *v4l2_i2c_new_subdev(struct v4l2_device *v4l2_dev, struct i2c_adapter *adapter, const char *client_type, u8 addr, const unsigned short *probe_addrs); /** * v4l2_i2c_new_subdev_board - Load an i2c module and return an initialized * &struct v4l2_subdev. * * @v4l2_dev: pointer to &struct v4l2_device * @adapter: pointer to struct i2c_adapter * @info: pointer to struct i2c_board_info used to replace the irq, * platform_data and addr arguments. * @probe_addrs: array with a list of address. The last entry at such * array should be %I2C_CLIENT_END. * * returns a &struct v4l2_subdev pointer. */ struct v4l2_subdev *v4l2_i2c_new_subdev_board(struct v4l2_device *v4l2_dev, struct i2c_adapter *adapter, struct i2c_board_info *info, const unsigned short *probe_addrs); /** * v4l2_i2c_subdev_set_name - Set name for an I²C sub-device * * @sd: pointer to &struct v4l2_subdev * @client: pointer to struct i2c_client * @devname: the name of the device; if NULL, the I²C device's name will be used * @postfix: sub-device specific string to put right after the I²C device name; * may be NULL */ void v4l2_i2c_subdev_set_name(struct v4l2_subdev *sd, struct i2c_client *client, const char *devname, const char *postfix); /** * v4l2_i2c_subdev_init - Initializes a &struct v4l2_subdev with data from * an i2c_client struct. * * @sd: pointer to &struct v4l2_subdev * @client: pointer to struct i2c_client * @ops: pointer to &struct v4l2_subdev_ops */ void v4l2_i2c_subdev_init(struct v4l2_subdev *sd, struct i2c_client *client, const struct v4l2_subdev_ops *ops); /** * v4l2_i2c_subdev_addr - returns i2c client address of &struct v4l2_subdev. * * @sd: pointer to &struct v4l2_subdev * * Returns the address of an I2C sub-device */ unsigned short v4l2_i2c_subdev_addr(struct v4l2_subdev *sd); /** * v4l2_i2c_tuner_addrs - Return a list of I2C tuner addresses to probe. * * @type: type of the tuner to seek, as defined by * &enum v4l2_i2c_tuner_type. * * NOTE: Use only if the tuner addresses are unknown. */ const unsigned short *v4l2_i2c_tuner_addrs(enum v4l2_i2c_tuner_type type); /** * v4l2_i2c_subdev_unregister - Unregister a v4l2_subdev * * @sd: pointer to &struct v4l2_subdev */ void v4l2_i2c_subdev_unregister(struct v4l2_subdev *sd); #else static inline struct v4l2_subdev * v4l2_i2c_new_subdev(struct v4l2_device *v4l2_dev, struct i2c_adapter *adapter, const char *client_type, u8 addr, const unsigned short *probe_addrs) { return NULL; } static inline struct v4l2_subdev * v4l2_i2c_new_subdev_board(struct v4l2_device *v4l2_dev, struct i2c_adapter *adapter, struct i2c_board_info *info, const unsigned short *probe_addrs) { return NULL; } static inline void v4l2_i2c_subdev_set_name(struct v4l2_subdev *sd, struct i2c_client *client, const char *devname, const char *postfix) {} static inline void v4l2_i2c_subdev_init(struct v4l2_subdev *sd, struct i2c_client *client, const struct v4l2_subdev_ops *ops) {} static inline unsigned short v4l2_i2c_subdev_addr(struct v4l2_subdev *sd) { return I2C_CLIENT_END; } static inline const unsigned short * v4l2_i2c_tuner_addrs(enum v4l2_i2c_tuner_type type) { return NULL; } static inline void v4l2_i2c_subdev_unregister(struct v4l2_subdev *sd) {} #endif /* ------------------------------------------------------------------------- */ /* SPI Helper functions */ #include #if defined(CONFIG_SPI) /** * v4l2_spi_new_subdev - Load an spi module and return an initialized * &struct v4l2_subdev. * * * @v4l2_dev: pointer to &struct v4l2_device. * @master: pointer to struct spi_master. * @info: pointer to struct spi_board_info. * * returns a &struct v4l2_subdev pointer. */ struct v4l2_subdev *v4l2_spi_new_subdev(struct v4l2_device *v4l2_dev, struct spi_master *master, struct spi_board_info *info); /** * v4l2_spi_subdev_init - Initialize a v4l2_subdev with data from an * spi_device struct. * * @sd: pointer to &struct v4l2_subdev * @spi: pointer to struct spi_device. * @ops: pointer to &struct v4l2_subdev_ops */ void v4l2_spi_subdev_init(struct v4l2_subdev *sd, struct spi_device *spi, const struct v4l2_subdev_ops *ops); /** * v4l2_spi_subdev_unregister - Unregister a v4l2_subdev * * @sd: pointer to &struct v4l2_subdev */ void v4l2_spi_subdev_unregister(struct v4l2_subdev *sd); #else static inline struct v4l2_subdev * v4l2_spi_new_subdev(struct v4l2_device *v4l2_dev, struct spi_master *master, struct spi_board_info *info) { return NULL; } static inline void v4l2_spi_subdev_init(struct v4l2_subdev *sd, struct spi_device *spi, const struct v4l2_subdev_ops *ops) {} static inline void v4l2_spi_subdev_unregister(struct v4l2_subdev *sd) {} #endif /* ------------------------------------------------------------------------- */ /* * FIXME: these remaining ioctls/structs should be removed as well, but they * are still used in tuner-simple.c (TUNER_SET_CONFIG) and cx18/ivtv (RESET). * To remove these ioctls some more cleanup is needed in those modules. * * It doesn't make much sense on documenting them, as what we really want is * to get rid of them. */ /* s_config */ struct v4l2_priv_tun_config { int tuner; void *priv; }; #define TUNER_SET_CONFIG _IOW('d', 92, struct v4l2_priv_tun_config) #define VIDIOC_INT_RESET _IOW ('d', 102, u32) /* ------------------------------------------------------------------------- */ /* Miscellaneous helper functions */ /** * v4l_bound_align_image - adjust video dimensions according to * a given constraints. * * @width: pointer to width that will be adjusted if needed. * @wmin: minimum width. * @wmax: maximum width. * @walign: least significant bit on width. * @height: pointer to height that will be adjusted if needed. * @hmin: minimum height. * @hmax: maximum height. * @halign: least significant bit on height. * @salign: least significant bit for the image size (e. g. * :math:`width * height`). * * Clip an image to have @width between @wmin and @wmax, and @height between * @hmin and @hmax, inclusive. * * Additionally, the @width will be a multiple of :math:`2^{walign}`, * the @height will be a multiple of :math:`2^{halign}`, and the overall * size :math:`width * height` will be a multiple of :math:`2^{salign}`. * * .. note:: * * #. The clipping rectangle may be shrunk or enlarged to fit the alignment * constraints. * #. @wmax must not be smaller than @wmin. * #. @hmax must not be smaller than @hmin. * #. The alignments must not be so high there are no possible image * sizes within the allowed bounds. * #. @wmin and @hmin must be at least 1 (don't use 0). * #. For @walign, @halign and @salign, if you don't care about a certain * alignment, specify ``0``, as :math:`2^0 = 1` and one byte alignment * is equivalent to no alignment. * #. If you only want to adjust downward, specify a maximum that's the * same as the initial value. */ void v4l_bound_align_image(unsigned int *width, unsigned int wmin, unsigned int wmax, unsigned int walign, unsigned int *height, unsigned int hmin, unsigned int hmax, unsigned int halign, unsigned int salign); /** * v4l2_find_nearest_size - Find the nearest size among a discrete * set of resolutions contained in an array of a driver specific struct. * * @array: a driver specific array of image sizes * @array_size: the length of the driver specific array of image sizes * @width_field: the name of the width field in the driver specific struct * @height_field: the name of the height field in the driver specific struct * @width: desired width. * @height: desired height. * * Finds the closest resolution to minimize the width and height differences * between what requested and the supported resolutions. The size of the width * and height fields in the driver specific must equal to that of u32, i.e. four * bytes. * * Returns the best match or NULL if the length of the array is zero. */ #define v4l2_find_nearest_size(array, array_size, width_field, height_field, \ width, height) \ ({ \ BUILD_BUG_ON(sizeof((array)->width_field) != sizeof(u32) || \ sizeof((array)->height_field) != sizeof(u32)); \ (typeof(&(array)[0]))__v4l2_find_nearest_size( \ (array), array_size, sizeof(*(array)), \ offsetof(typeof(*(array)), width_field), \ offsetof(typeof(*(array)), height_field), \ width, height); \ }) const void * __v4l2_find_nearest_size(const void *array, size_t array_size, size_t entry_size, size_t width_offset, size_t height_offset, s32 width, s32 height); /** * v4l2_g_parm_cap - helper routine for vidioc_g_parm to fill this in by * calling the g_frame_interval op of the given subdev. It only works * for V4L2_BUF_TYPE_VIDEO_CAPTURE(_MPLANE), hence the _cap in the * function name. * * @vdev: the struct video_device pointer. Used to determine the device caps. * @sd: the sub-device pointer. * @a: the VIDIOC_G_PARM argument. */ int v4l2_g_parm_cap(struct video_device *vdev, struct v4l2_subdev *sd, struct v4l2_streamparm *a); /** * v4l2_s_parm_cap - helper routine for vidioc_s_parm to fill this in by * calling the s_frame_interval op of the given subdev. It only works * for V4L2_BUF_TYPE_VIDEO_CAPTURE(_MPLANE), hence the _cap in the * function name. * * @vdev: the struct video_device pointer. Used to determine the device caps. * @sd: the sub-device pointer. * @a: the VIDIOC_S_PARM argument. */ int v4l2_s_parm_cap(struct video_device *vdev, struct v4l2_subdev *sd, struct v4l2_streamparm *a); /* Compare two v4l2_fract structs */ #define V4L2_FRACT_COMPARE(a, OP, b) \ ((u64)(a).numerator * (b).denominator OP \ (u64)(b).numerator * (a).denominator) /* ------------------------------------------------------------------------- */ /* Pixel format and FourCC helpers */ /** * struct v4l2_format_info - information about a V4L2 format * @format: 4CC format identifier (V4L2_PIX_FMT_*) * @mem_planes: Number of memory planes, which includes the alpha plane (1 to 4). * @comp_planes: Number of component planes, which includes the alpha plane (1 to 4). * @bpp: Array of per-plane bytes per pixel * @hdiv: Horizontal chroma subsampling factor * @vdiv: Vertical chroma subsampling factor * @block_w: Per-plane macroblock pixel width (optional) * @block_h: Per-plane macroblock pixel height (optional) */ struct v4l2_format_info { u32 format; u8 mem_planes; u8 comp_planes; u8 bpp[4]; u8 hdiv; u8 vdiv; u8 block_w[4]; u8 block_h[4]; }; const struct v4l2_format_info *v4l2_format_info(u32 format); void v4l2_apply_frmsize_constraints(u32 *width, u32 *height, const struct v4l2_frmsize_stepwise *frmsize); int v4l2_fill_pixfmt(struct v4l2_pix_format *pixfmt, u32 pixelformat, u32 width, u32 height); int v4l2_fill_pixfmt_mp(struct v4l2_pix_format_mplane *pixfmt, u32 pixelformat, u32 width, u32 height); #endif /* V4L2_COMMON_H_ */