diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-07-27 17:58:31 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-07-27 17:58:31 -0400 |
commit | ff9a082fda424257976f08fce942609f358015e0 (patch) | |
tree | 478e6b449b19baaf842369a13923499ce83ef895 /drivers | |
parent | 6a492b0f23d28e1f946cdf08e54617484400dafb (diff) | |
parent | 85538b1ad145c67198cb55d02de14ba269cc323d (diff) |
Merge tag 'media/v4.8-4' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media
Pull media documentation updates from Mauro Carvalho Chehab:
"This patch series does the conversion of all media documentation stuff
to Restrutured Text markup format and add them to the
Documentation/index.rst file.
The media documentation was grouped into 4 books:
- media uAPI
- media kAPI
- V4L driver-specific documentation
- DVB driver-specific documentation
It also contains several documentation improvements and one fixup
patch for a core issue with cropcap.
PS. After this patch series, the media DocBook is deprecated and
should be removed. I'll add such patch on a future pull request"
* tag 'media/v4.8-4' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (322 commits)
[media] cx23885-cardlist.rst: add a new card
[media] doc-rst: add some needed escape codes
[media] doc-rst: kapi: use :c:func: instead of :cpp:func
doc-rst: kernel-doc: fix a change introduced by mistake
[media] v4l2-ioctl.h add debug info for struct v4l2_ioctl_ops
[media] dvb_ringbuffer.h: some documentation improvements
[media] v4l2-ctrls.h: fully document the header file
[media] doc-rst: Fix some typedef ugly warnings
[media] doc-rst: reorganize the kAPI v4l2 chapters
[media] rename v4l2-framework.rst to v4l2-intro.rst
[media] move V4L2 clocks to a separate .rst file
[media] v4l2-fh.rst: add cross references and markups
[media] v4l2-fh.rst: add fh contents from v4l2-framework.rst
[media] v4l2-fh.h: add documentation for it
[media] v4l2-event.rst: add cross-references and markups
[media] v4l2-event.h: document all functions
[media] v4l2-event.rst: add text from v4l2-framework.rst
[media] v4l2-framework.rst: remove videobuf quick chapter
[media] v4l2-dev: add cross-references and improve markup
[media] doc-rst: move v4l2-dev doc to a separate file
...
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/dvb-core/demux.h | 165 | ||||
-rw-r--r-- | drivers/media/dvb-core/dvb_frontend.h | 53 | ||||
-rw-r--r-- | drivers/media/dvb-core/dvb_math.h | 7 | ||||
-rw-r--r-- | drivers/media/dvb-core/dvb_ringbuffer.h | 15 | ||||
-rw-r--r-- | drivers/media/v4l2-core/v4l2-dev.c | 34 | ||||
-rw-r--r-- | drivers/media/v4l2-core/v4l2-subdev.c | 10 |
6 files changed, 85 insertions, 199 deletions
diff --git a/drivers/media/dvb-core/demux.h b/drivers/media/dvb-core/demux.h index 7f1dffef4353..4b4c1da20f4b 100644 --- a/drivers/media/dvb-core/demux.h +++ b/drivers/media/dvb-core/demux.h | |||
@@ -1,6 +1,10 @@ | |||
1 | /* | 1 | /* |
2 | * demux.h | 2 | * demux.h |
3 | * | 3 | * |
4 | * The Kernel Digital TV Demux kABI defines a driver-internal interface for | ||
5 | * registering low-level, hardware specific driver to a hardware independent | ||
6 | * demux layer. | ||
7 | * | ||
4 | * Copyright (c) 2002 Convergence GmbH | 8 | * Copyright (c) 2002 Convergence GmbH |
5 | * | 9 | * |
6 | * based on code: | 10 | * based on code: |
@@ -32,49 +36,6 @@ | |||
32 | #include <linux/time.h> | 36 | #include <linux/time.h> |
33 | #include <linux/dvb/dmx.h> | 37 | #include <linux/dvb/dmx.h> |
34 | 38 | ||
35 | /** | ||
36 | * DOC: Digital TV Demux | ||
37 | * | ||
38 | * The Kernel Digital TV Demux kABI defines a driver-internal interface for | ||
39 | * registering low-level, hardware specific driver to a hardware independent | ||
40 | * demux layer. It is only of interest for Digital TV device driver writers. | ||
41 | * The header file for this kABI is named demux.h and located in | ||
42 | * drivers/media/dvb-core. | ||
43 | * | ||
44 | * The demux kABI should be implemented for each demux in the system. It is | ||
45 | * used to select the TS source of a demux and to manage the demux resources. | ||
46 | * When the demux client allocates a resource via the demux kABI, it receives | ||
47 | * a pointer to the kABI of that resource. | ||
48 | * | ||
49 | * Each demux receives its TS input from a DVB front-end or from memory, as | ||
50 | * set via this demux kABI. In a system with more than one front-end, the kABI | ||
51 | * can be used to select one of the DVB front-ends as a TS source for a demux, | ||
52 | * unless this is fixed in the HW platform. | ||
53 | * | ||
54 | * The demux kABI only controls front-ends regarding to their connections with | ||
55 | * demuxes; the kABI used to set the other front-end parameters, such as | ||
56 | * tuning, are devined via the Digital TV Frontend kABI. | ||
57 | * | ||
58 | * The functions that implement the abstract interface demux should be defined | ||
59 | * static or module private and registered to the Demux core for external | ||
60 | * access. It is not necessary to implement every function in the struct | ||
61 | * &dmx_demux. For example, a demux interface might support Section filtering, | ||
62 | * but not PES filtering. The kABI client is expected to check the value of any | ||
63 | * function pointer before calling the function: the value of NULL means | ||
64 | * that the function is not available. | ||
65 | * | ||
66 | * Whenever the functions of the demux API modify shared data, the | ||
67 | * possibilities of lost update and race condition problems should be | ||
68 | * addressed, e.g. by protecting parts of code with mutexes. | ||
69 | * | ||
70 | * Note that functions called from a bottom half context must not sleep. | ||
71 | * Even a simple memory allocation without using %GFP_ATOMIC can result in a | ||
72 | * kernel thread being put to sleep if swapping is needed. For example, the | ||
73 | * Linux Kernel calls the functions of a network device interface from a | ||
74 | * bottom half context. Thus, if a demux kABI function is called from network | ||
75 | * device code, the function must not sleep. | ||
76 | */ | ||
77 | |||
78 | /* | 39 | /* |
79 | * Common definitions | 40 | * Common definitions |
80 | */ | 41 | */ |
@@ -104,7 +65,7 @@ | |||
104 | */ | 65 | */ |
105 | 66 | ||
106 | /** | 67 | /** |
107 | * enum ts_filter_type - filter type bitmap for dmx_ts_feed.set() | 68 | * enum ts_filter_type - filter type bitmap for dmx_ts_feed.set\(\) |
108 | * | 69 | * |
109 | * @TS_PACKET: Send TS packets (188 bytes) to callback (default). | 70 | * @TS_PACKET: Send TS packets (188 bytes) to callback (default). |
110 | * @TS_PAYLOAD_ONLY: In case TS_PACKET is set, only send the TS payload | 71 | * @TS_PAYLOAD_ONLY: In case TS_PACKET is set, only send the TS payload |
@@ -231,30 +192,6 @@ struct dmx_section_feed { | |||
231 | }; | 192 | }; |
232 | 193 | ||
233 | /** | 194 | /** |
234 | * DOC: Demux Callback | ||
235 | * | ||
236 | * This kernel-space API comprises the callback functions that deliver filtered | ||
237 | * data to the demux client. Unlike the other DVB kABIs, these functions are | ||
238 | * provided by the client and called from the demux code. | ||
239 | * | ||
240 | * The function pointers of this abstract interface are not packed into a | ||
241 | * structure as in the other demux APIs, because the callback functions are | ||
242 | * registered and used independent of each other. As an example, it is possible | ||
243 | * for the API client to provide several callback functions for receiving TS | ||
244 | * packets and no callbacks for PES packets or sections. | ||
245 | * | ||
246 | * The functions that implement the callback API need not be re-entrant: when | ||
247 | * a demux driver calls one of these functions, the driver is not allowed to | ||
248 | * call the function again before the original call returns. If a callback is | ||
249 | * triggered by a hardware interrupt, it is recommended to use the Linux | ||
250 | * bottom half mechanism or start a tasklet instead of making the callback | ||
251 | * function call directly from a hardware interrupt. | ||
252 | * | ||
253 | * This mechanism is implemented by dmx_ts_cb() and dmx_section_cb() | ||
254 | * callbacks. | ||
255 | */ | ||
256 | |||
257 | /** | ||
258 | * typedef dmx_ts_cb - DVB demux TS filter callback function prototype | 195 | * typedef dmx_ts_cb - DVB demux TS filter callback function prototype |
259 | * | 196 | * |
260 | * @buffer1: Pointer to the start of the filtered TS packets. | 197 | * @buffer1: Pointer to the start of the filtered TS packets. |
@@ -402,7 +339,7 @@ struct dmx_frontend { | |||
402 | * @DMX_SECTION_FILTERING: set if section filtering is supported; | 339 | * @DMX_SECTION_FILTERING: set if section filtering is supported; |
403 | * @DMX_MEMORY_BASED_FILTERING: set if write() available. | 340 | * @DMX_MEMORY_BASED_FILTERING: set if write() available. |
404 | * | 341 | * |
405 | * Those flags are OR'ed in the &dmx_demux.&capabilities field | 342 | * Those flags are OR'ed in the &dmx_demux.capabilities field |
406 | */ | 343 | */ |
407 | enum dmx_demux_caps { | 344 | enum dmx_demux_caps { |
408 | DMX_TS_FILTERING = 1, | 345 | DMX_TS_FILTERING = 1, |
@@ -442,10 +379,10 @@ enum dmx_demux_caps { | |||
442 | * @open is called and decrement it when @close is called. | 379 | * @open is called and decrement it when @close is called. |
443 | * The @demux function parameter contains a pointer to the demux API and | 380 | * The @demux function parameter contains a pointer to the demux API and |
444 | * instance data. | 381 | * instance data. |
445 | * It returns | 382 | * It returns: |
446 | * 0 on success; | 383 | * 0 on success; |
447 | * -EUSERS, if maximum usage count was reached; | 384 | * -EUSERS, if maximum usage count was reached; |
448 | * -EINVAL, on bad parameter. | 385 | * -EINVAL, on bad parameter. |
449 | * | 386 | * |
450 | * @close: This function reserves the demux for use by the caller and, if | 387 | * @close: This function reserves the demux for use by the caller and, if |
451 | * necessary, initializes the demux. When the demux is no longer needed, | 388 | * necessary, initializes the demux. When the demux is no longer needed, |
@@ -455,10 +392,10 @@ enum dmx_demux_caps { | |||
455 | * @open is called and decrement it when @close is called. | 392 | * @open is called and decrement it when @close is called. |
456 | * The @demux function parameter contains a pointer to the demux API and | 393 | * The @demux function parameter contains a pointer to the demux API and |
457 | * instance data. | 394 | * instance data. |
458 | * It returns | 395 | * It returns: |
459 | * 0 on success; | 396 | * 0 on success; |
460 | * -ENODEV, if demux was not in use (e. g. no users); | 397 | * -ENODEV, if demux was not in use (e. g. no users); |
461 | * -EINVAL, on bad parameter. | 398 | * -EINVAL, on bad parameter. |
462 | * | 399 | * |
463 | * @write: This function provides the demux driver with a memory buffer | 400 | * @write: This function provides the demux driver with a memory buffer |
464 | * containing TS packets. Instead of receiving TS packets from the DVB | 401 | * containing TS packets. Instead of receiving TS packets from the DVB |
@@ -473,12 +410,12 @@ enum dmx_demux_caps { | |||
473 | * The @buf function parameter contains a pointer to the TS data in | 410 | * The @buf function parameter contains a pointer to the TS data in |
474 | * kernel-space memory. | 411 | * kernel-space memory. |
475 | * The @count function parameter contains the length of the TS data. | 412 | * The @count function parameter contains the length of the TS data. |
476 | * It returns | 413 | * It returns: |
477 | * 0 on success; | 414 | * 0 on success; |
478 | * -ERESTARTSYS, if mutex lock was interrupted; | 415 | * -ERESTARTSYS, if mutex lock was interrupted; |
479 | * -EINTR, if a signal handling is pending; | 416 | * -EINTR, if a signal handling is pending; |
480 | * -ENODEV, if demux was removed; | 417 | * -ENODEV, if demux was removed; |
481 | * -EINVAL, on bad parameter. | 418 | * -EINVAL, on bad parameter. |
482 | * | 419 | * |
483 | * @allocate_ts_feed: Allocates a new TS feed, which is used to filter the TS | 420 | * @allocate_ts_feed: Allocates a new TS feed, which is used to filter the TS |
484 | * packets carrying a certain PID. The TS feed normally corresponds to a | 421 | * packets carrying a certain PID. The TS feed normally corresponds to a |
@@ -489,11 +426,11 @@ enum dmx_demux_caps { | |||
489 | * instance data. | 426 | * instance data. |
490 | * The @callback function parameter contains a pointer to the callback | 427 | * The @callback function parameter contains a pointer to the callback |
491 | * function for passing received TS packet. | 428 | * function for passing received TS packet. |
492 | * It returns | 429 | * It returns: |
493 | * 0 on success; | 430 | * 0 on success; |
494 | * -ERESTARTSYS, if mutex lock was interrupted; | 431 | * -ERESTARTSYS, if mutex lock was interrupted; |
495 | * -EBUSY, if no more TS feeds is available; | 432 | * -EBUSY, if no more TS feeds is available; |
496 | * -EINVAL, on bad parameter. | 433 | * -EINVAL, on bad parameter. |
497 | * | 434 | * |
498 | * @release_ts_feed: Releases the resources allocated with @allocate_ts_feed. | 435 | * @release_ts_feed: Releases the resources allocated with @allocate_ts_feed. |
499 | * Any filtering in progress on the TS feed should be stopped before | 436 | * Any filtering in progress on the TS feed should be stopped before |
@@ -502,9 +439,9 @@ enum dmx_demux_caps { | |||
502 | * instance data. | 439 | * instance data. |
503 | * The @feed function parameter contains a pointer to the TS feed API and | 440 | * The @feed function parameter contains a pointer to the TS feed API and |
504 | * instance data. | 441 | * instance data. |
505 | * It returns | 442 | * It returns: |
506 | * 0 on success; | 443 | * 0 on success; |
507 | * -EINVAL on bad parameter. | 444 | * -EINVAL on bad parameter. |
508 | * | 445 | * |
509 | * @allocate_section_feed: Allocates a new section feed, i.e. a demux resource | 446 | * @allocate_section_feed: Allocates a new section feed, i.e. a demux resource |
510 | * for filtering and receiving sections. On platforms with hardware | 447 | * for filtering and receiving sections. On platforms with hardware |
@@ -520,10 +457,10 @@ enum dmx_demux_caps { | |||
520 | * instance data. | 457 | * instance data. |
521 | * The @callback function parameter contains a pointer to the callback | 458 | * The @callback function parameter contains a pointer to the callback |
522 | * function for passing received TS packet. | 459 | * function for passing received TS packet. |
523 | * It returns | 460 | * It returns: |
524 | * 0 on success; | 461 | * 0 on success; |
525 | * -EBUSY, if no more TS feeds is available; | 462 | * -EBUSY, if no more TS feeds is available; |
526 | * -EINVAL, on bad parameter. | 463 | * -EINVAL, on bad parameter. |
527 | * | 464 | * |
528 | * @release_section_feed: Releases the resources allocated with | 465 | * @release_section_feed: Releases the resources allocated with |
529 | * @allocate_section_feed, including allocated filters. Any filtering in | 466 | * @allocate_section_feed, including allocated filters. Any filtering in |
@@ -533,9 +470,9 @@ enum dmx_demux_caps { | |||
533 | * instance data. | 470 | * instance data. |
534 | * The @feed function parameter contains a pointer to the TS feed API and | 471 | * The @feed function parameter contains a pointer to the TS feed API and |
535 | * instance data. | 472 | * instance data. |
536 | * It returns | 473 | * It returns: |
537 | * 0 on success; | 474 | * 0 on success; |
538 | * -EINVAL, on bad parameter. | 475 | * -EINVAL, on bad parameter. |
539 | * | 476 | * |
540 | * @add_frontend: Registers a connectivity between a demux and a front-end, | 477 | * @add_frontend: Registers a connectivity between a demux and a front-end, |
541 | * i.e., indicates that the demux can be connected via a call to | 478 | * i.e., indicates that the demux can be connected via a call to |
@@ -549,9 +486,9 @@ enum dmx_demux_caps { | |||
549 | * instance data. | 486 | * instance data. |
550 | * The @frontend function parameter contains a pointer to the front-end | 487 | * The @frontend function parameter contains a pointer to the front-end |
551 | * instance data. | 488 | * instance data. |
552 | * It returns | 489 | * It returns: |
553 | * 0 on success; | 490 | * 0 on success; |
554 | * -EINVAL, on bad parameter. | 491 | * -EINVAL, on bad parameter. |
555 | * | 492 | * |
556 | * @remove_frontend: Indicates that the given front-end, registered by a call | 493 | * @remove_frontend: Indicates that the given front-end, registered by a call |
557 | * to @add_frontend, can no longer be connected as a TS source by this | 494 | * to @add_frontend, can no longer be connected as a TS source by this |
@@ -565,10 +502,10 @@ enum dmx_demux_caps { | |||
565 | * instance data. | 502 | * instance data. |
566 | * The @frontend function parameter contains a pointer to the front-end | 503 | * The @frontend function parameter contains a pointer to the front-end |
567 | * instance data. | 504 | * instance data. |
568 | * It returns | 505 | * It returns: |
569 | * 0 on success; | 506 | * 0 on success; |
570 | * -ENODEV, if the front-end was not found, | 507 | * -ENODEV, if the front-end was not found, |
571 | * -EINVAL, on bad parameter. | 508 | * -EINVAL, on bad parameter. |
572 | * | 509 | * |
573 | * @get_frontends: Provides the APIs of the front-ends that have been | 510 | * @get_frontends: Provides the APIs of the front-ends that have been |
574 | * registered for this demux. Any of the front-ends obtained with this | 511 | * registered for this demux. Any of the front-ends obtained with this |
@@ -592,17 +529,17 @@ enum dmx_demux_caps { | |||
592 | * instance data. | 529 | * instance data. |
593 | * The @frontend function parameter contains a pointer to the front-end | 530 | * The @frontend function parameter contains a pointer to the front-end |
594 | * instance data. | 531 | * instance data. |
595 | * It returns | 532 | * It returns: |
596 | * 0 on success; | 533 | * 0 on success; |
597 | * -EINVAL, on bad parameter. | 534 | * -EINVAL, on bad parameter. |
598 | * | 535 | * |
599 | * @disconnect_frontend: Disconnects the demux and a front-end previously | 536 | * @disconnect_frontend: Disconnects the demux and a front-end previously |
600 | * connected by a @connect_frontend call. | 537 | * connected by a @connect_frontend call. |
601 | * The @demux function parameter contains a pointer to the demux API and | 538 | * The @demux function parameter contains a pointer to the demux API and |
602 | * instance data. | 539 | * instance data. |
603 | * It returns | 540 | * It returns: |
604 | * 0 on success; | 541 | * 0 on success; |
605 | * -EINVAL on bad parameter. | 542 | * -EINVAL on bad parameter. |
606 | * | 543 | * |
607 | * @get_pes_pids: Get the PIDs for DMX_PES_AUDIO0, DMX_PES_VIDEO0, | 544 | * @get_pes_pids: Get the PIDs for DMX_PES_AUDIO0, DMX_PES_VIDEO0, |
608 | * DMX_PES_TELETEXT0, DMX_PES_SUBTITLE0 and DMX_PES_PCR0. | 545 | * DMX_PES_TELETEXT0, DMX_PES_SUBTITLE0 and DMX_PES_PCR0. |
@@ -610,9 +547,9 @@ enum dmx_demux_caps { | |||
610 | * instance data. | 547 | * instance data. |
611 | * The @pids function parameter contains an array with five u16 elements | 548 | * The @pids function parameter contains an array with five u16 elements |
612 | * where the PIDs will be stored. | 549 | * where the PIDs will be stored. |
613 | * It returns | 550 | * It returns: |
614 | * 0 on success; | 551 | * 0 on success; |
615 | * -EINVAL on bad parameter. | 552 | * -EINVAL on bad parameter. |
616 | */ | 553 | */ |
617 | 554 | ||
618 | struct dmx_demux { | 555 | struct dmx_demux { |
diff --git a/drivers/media/dvb-core/dvb_frontend.h b/drivers/media/dvb-core/dvb_frontend.h index 9592573a0b41..fb6e84811504 100644 --- a/drivers/media/dvb-core/dvb_frontend.h +++ b/drivers/media/dvb-core/dvb_frontend.h | |||
@@ -1,6 +1,10 @@ | |||
1 | /* | 1 | /* |
2 | * dvb_frontend.h | 2 | * dvb_frontend.h |
3 | * | 3 | * |
4 | * The Digital TV Frontend kABI defines a driver-internal interface for | ||
5 | * registering low-level, hardware specific driver to a hardware independent | ||
6 | * frontend layer. | ||
7 | * | ||
4 | * Copyright (C) 2001 convergence integrated media GmbH | 8 | * Copyright (C) 2001 convergence integrated media GmbH |
5 | * Copyright (C) 2004 convergence GmbH | 9 | * Copyright (C) 2004 convergence GmbH |
6 | * | 10 | * |
@@ -42,29 +46,6 @@ | |||
42 | 46 | ||
43 | #include "dvbdev.h" | 47 | #include "dvbdev.h" |
44 | 48 | ||
45 | /** | ||
46 | * DOC: Digital TV Frontend | ||
47 | * | ||
48 | * The Digital TV Frontend kABI defines a driver-internal interface for | ||
49 | * registering low-level, hardware specific driver to a hardware independent | ||
50 | * frontend layer. It is only of interest for Digital TV device driver writers. | ||
51 | * The header file for this API is named dvb_frontend.h and located in | ||
52 | * drivers/media/dvb-core. | ||
53 | * | ||
54 | * Before using the Digital TV frontend core, the bridge driver should attach | ||
55 | * the frontend demod, tuner and SEC devices and call dvb_register_frontend(), | ||
56 | * in order to register the new frontend at the subsystem. At device | ||
57 | * detach/removal, the bridge driver should call dvb_unregister_frontend() to | ||
58 | * remove the frontend from the core and then dvb_frontend_detach() to free the | ||
59 | * memory allocated by the frontend drivers. | ||
60 | * | ||
61 | * The drivers should also call dvb_frontend_suspend() as part of their | ||
62 | * handler for the &device_driver.suspend(), and dvb_frontend_resume() as | ||
63 | * part of their handler for &device_driver.resume(). | ||
64 | * | ||
65 | * A few other optional functions are provided to handle some special cases. | ||
66 | */ | ||
67 | |||
68 | /* | 49 | /* |
69 | * Maximum number of Delivery systems per frontend. It | 50 | * Maximum number of Delivery systems per frontend. It |
70 | * should be smaller or equal to 32 | 51 | * should be smaller or equal to 32 |
@@ -406,7 +387,7 @@ struct dtv_frontend_properties; | |||
406 | * FE_DISHNETWORK_SEND_LEGACY_CMD ioctl (only Satellite). | 387 | * FE_DISHNETWORK_SEND_LEGACY_CMD ioctl (only Satellite). |
407 | * Drivers should not use this, except when the DVB | 388 | * Drivers should not use this, except when the DVB |
408 | * core emulation fails to provide proper support (e.g. | 389 | * core emulation fails to provide proper support (e.g. |
409 | * if set_voltage() takes more than 8ms to work), and | 390 | * if @set_voltage takes more than 8ms to work), and |
410 | * when backward compatibility with this legacy API is | 391 | * when backward compatibility with this legacy API is |
411 | * required. | 392 | * required. |
412 | * @i2c_gate_ctrl: controls the I2C gate. Newer drivers should use I2C | 393 | * @i2c_gate_ctrl: controls the I2C gate. Newer drivers should use I2C |
@@ -741,13 +722,13 @@ void dvb_frontend_detach(struct dvb_frontend *fe); | |||
741 | * This function prepares a Digital TV frontend to suspend. | 722 | * This function prepares a Digital TV frontend to suspend. |
742 | * | 723 | * |
743 | * In order to prepare the tuner to suspend, if | 724 | * In order to prepare the tuner to suspend, if |
744 | * &dvb_frontend_ops.tuner_ops.suspend() is available, it calls it. Otherwise, | 725 | * &dvb_frontend_ops.tuner_ops.suspend\(\) is available, it calls it. Otherwise, |
745 | * it will call &dvb_frontend_ops.tuner_ops.sleep(), if available. | 726 | * it will call &dvb_frontend_ops.tuner_ops.sleep\(\), if available. |
746 | * | 727 | * |
747 | * It will also call &dvb_frontend_ops.sleep() to put the demod to suspend. | 728 | * It will also call &dvb_frontend_ops.sleep\(\) to put the demod to suspend. |
748 | * | 729 | * |
749 | * The drivers should also call dvb_frontend_suspend() as part of their | 730 | * The drivers should also call dvb_frontend_suspend\(\) as part of their |
750 | * handler for the &device_driver.suspend(). | 731 | * handler for the &device_driver.suspend\(\). |
751 | */ | 732 | */ |
752 | int dvb_frontend_suspend(struct dvb_frontend *fe); | 733 | int dvb_frontend_suspend(struct dvb_frontend *fe); |
753 | 734 | ||
@@ -758,17 +739,17 @@ int dvb_frontend_suspend(struct dvb_frontend *fe); | |||
758 | * | 739 | * |
759 | * This function resumes the usual operation of the tuner after resume. | 740 | * This function resumes the usual operation of the tuner after resume. |
760 | * | 741 | * |
761 | * In order to resume the frontend, it calls the demod &dvb_frontend_ops.init(). | 742 | * In order to resume the frontend, it calls the demod &dvb_frontend_ops.init\(\). |
762 | * | 743 | * |
763 | * If &dvb_frontend_ops.tuner_ops.resume() is available, It, it calls it. | 744 | * If &dvb_frontend_ops.tuner_ops.resume\(\) is available, It, it calls it. |
764 | * Otherwise,t will call &dvb_frontend_ops.tuner_ops.init(), if available. | 745 | * Otherwise,t will call &dvb_frontend_ops.tuner_ops.init\(\), if available. |
765 | * | 746 | * |
766 | * Once tuner and demods are resumed, it will enforce that the SEC voltage and | 747 | * Once tuner and demods are resumed, it will enforce that the SEC voltage and |
767 | * tone are restored to their previous values and wake up the frontend's | 748 | * tone are restored to their previous values and wake up the frontend's |
768 | * kthread in order to retune the frontend. | 749 | * kthread in order to retune the frontend. |
769 | * | 750 | * |
770 | * The drivers should also call dvb_frontend_resume() as part of their | 751 | * The drivers should also call dvb_frontend_resume() as part of their |
771 | * handler for the &device_driver.resume(). | 752 | * handler for the &device_driver.resume\(\). |
772 | */ | 753 | */ |
773 | int dvb_frontend_resume(struct dvb_frontend *fe); | 754 | int dvb_frontend_resume(struct dvb_frontend *fe); |
774 | 755 | ||
@@ -777,7 +758,7 @@ int dvb_frontend_resume(struct dvb_frontend *fe); | |||
777 | * | 758 | * |
778 | * @fe: pointer to the frontend struct | 759 | * @fe: pointer to the frontend struct |
779 | * | 760 | * |
780 | * Calls &dvb_frontend_ops.init() and &dvb_frontend_ops.tuner_ops.init(), | 761 | * Calls &dvb_frontend_ops.init\(\) and &dvb_frontend_ops.tuner_ops.init\(\), |
781 | * and resets SEC tone and voltage (for Satellite systems). | 762 | * and resets SEC tone and voltage (for Satellite systems). |
782 | * | 763 | * |
783 | * NOTE: Currently, this function is used only by one driver (budget-av). | 764 | * NOTE: Currently, this function is used only by one driver (budget-av). |
@@ -799,14 +780,14 @@ void dvb_frontend_reinitialise(struct dvb_frontend *fe); | |||
799 | * satellite subsystem. | 780 | * satellite subsystem. |
800 | * | 781 | * |
801 | * Its used internally by the DVB frontend core, in order to emulate | 782 | * Its used internally by the DVB frontend core, in order to emulate |
802 | * %FE_DISHNETWORK_SEND_LEGACY_CMD using the &dvb_frontend_ops.set_voltage() | 783 | * %FE_DISHNETWORK_SEND_LEGACY_CMD using the &dvb_frontend_ops.set_voltage\(\) |
803 | * callback. | 784 | * callback. |
804 | * | 785 | * |
805 | * NOTE: it should not be used at the drivers, as the emulation for the | 786 | * NOTE: it should not be used at the drivers, as the emulation for the |
806 | * legacy callback is provided by the Kernel. The only situation where this | 787 | * legacy callback is provided by the Kernel. The only situation where this |
807 | * should be at the drivers is when there are some bugs at the hardware that | 788 | * should be at the drivers is when there are some bugs at the hardware that |
808 | * would prevent the core emulation to work. On such cases, the driver would | 789 | * would prevent the core emulation to work. On such cases, the driver would |
809 | * be writing a &dvb_frontend_ops.dishnetwork_send_legacy_command() and | 790 | * be writing a &dvb_frontend_ops.dishnetwork_send_legacy_command\(\) and |
810 | * calling this function directly. | 791 | * calling this function directly. |
811 | */ | 792 | */ |
812 | void dvb_frontend_sleep_until(ktime_t *waketime, u32 add_usec); | 793 | void dvb_frontend_sleep_until(ktime_t *waketime, u32 add_usec); |
diff --git a/drivers/media/dvb-core/dvb_math.h b/drivers/media/dvb-core/dvb_math.h index 34dc1df03cab..2f0326674ca6 100644 --- a/drivers/media/dvb-core/dvb_math.h +++ b/drivers/media/dvb-core/dvb_math.h | |||
@@ -30,11 +30,15 @@ | |||
30 | * @value: The value (must be != 0) | 30 | * @value: The value (must be != 0) |
31 | * | 31 | * |
32 | * to use rational values you can use the following method: | 32 | * to use rational values you can use the following method: |
33 | * | ||
33 | * intlog2(value) = intlog2(value * 2^x) - x * 2^24 | 34 | * intlog2(value) = intlog2(value * 2^x) - x * 2^24 |
34 | * | 35 | * |
35 | * Some usecase examples: | 36 | * Some usecase examples: |
37 | * | ||
36 | * intlog2(8) will give 3 << 24 = 3 * 2^24 | 38 | * intlog2(8) will give 3 << 24 = 3 * 2^24 |
39 | * | ||
37 | * intlog2(9) will give 3 << 24 + ... = 3.16... * 2^24 | 40 | * intlog2(9) will give 3 << 24 + ... = 3.16... * 2^24 |
41 | * | ||
38 | * intlog2(1.5) = intlog2(3) - 2^24 = 0.584... * 2^24 | 42 | * intlog2(1.5) = intlog2(3) - 2^24 = 0.584... * 2^24 |
39 | * | 43 | * |
40 | * | 44 | * |
@@ -48,10 +52,13 @@ extern unsigned int intlog2(u32 value); | |||
48 | * @value: The value (must be != 0) | 52 | * @value: The value (must be != 0) |
49 | * | 53 | * |
50 | * to use rational values you can use the following method: | 54 | * to use rational values you can use the following method: |
55 | * | ||
51 | * intlog10(value) = intlog10(value * 10^x) - x * 2^24 | 56 | * intlog10(value) = intlog10(value * 10^x) - x * 2^24 |
52 | * | 57 | * |
53 | * An usecase example: | 58 | * An usecase example: |
59 | * | ||
54 | * intlog10(1000) will give 3 << 24 = 3 * 2^24 | 60 | * intlog10(1000) will give 3 << 24 = 3 * 2^24 |
61 | * | ||
55 | * due to the implementation intlog10(1000) might be not exactly 3 * 2^24 | 62 | * due to the implementation intlog10(1000) might be not exactly 3 * 2^24 |
56 | * | 63 | * |
57 | * look at intlog2 for similar examples | 64 | * look at intlog2 for similar examples |
diff --git a/drivers/media/dvb-core/dvb_ringbuffer.h b/drivers/media/dvb-core/dvb_ringbuffer.h index 3ebc2d34b4a2..8af642399f1e 100644 --- a/drivers/media/dvb-core/dvb_ringbuffer.h +++ b/drivers/media/dvb-core/dvb_ringbuffer.h | |||
@@ -150,9 +150,6 @@ extern ssize_t dvb_ringbuffer_pkt_write(struct dvb_ringbuffer *rbuf, u8* buf, | |||
150 | 150 | ||
151 | /** | 151 | /** |
152 | * dvb_ringbuffer_pkt_read_user - Read from a packet in the ringbuffer. | 152 | * dvb_ringbuffer_pkt_read_user - Read from a packet in the ringbuffer. |
153 | * Note: unlike dvb_ringbuffer_read(), this does NOT update the read pointer | ||
154 | * in the ringbuffer. You must use dvb_ringbuffer_pkt_dispose() to mark a | ||
155 | * packet as no longer required. | ||
156 | * | 153 | * |
157 | * @rbuf: Ringbuffer concerned. | 154 | * @rbuf: Ringbuffer concerned. |
158 | * @idx: Packet index as returned by dvb_ringbuffer_pkt_next(). | 155 | * @idx: Packet index as returned by dvb_ringbuffer_pkt_next(). |
@@ -161,9 +158,17 @@ extern ssize_t dvb_ringbuffer_pkt_write(struct dvb_ringbuffer *rbuf, u8* buf, | |||
161 | * @len: Size of destination buffer. | 158 | * @len: Size of destination buffer. |
162 | * | 159 | * |
163 | * returns Number of bytes read, or -EFAULT. | 160 | * returns Number of bytes read, or -EFAULT. |
161 | * | ||
162 | * .. note:: | ||
163 | * | ||
164 | * unlike dvb_ringbuffer_read(), this does **NOT** update the read pointer | ||
165 | * in the ringbuffer. You must use dvb_ringbuffer_pkt_dispose() to mark a | ||
166 | * packet as no longer required. | ||
164 | */ | 167 | */ |
165 | extern ssize_t dvb_ringbuffer_pkt_read_user(struct dvb_ringbuffer *rbuf, size_t idx, | 168 | extern ssize_t dvb_ringbuffer_pkt_read_user(struct dvb_ringbuffer *rbuf, |
166 | int offset, u8 __user *buf, size_t len); | 169 | size_t idx, |
170 | int offset, u8 __user *buf, | ||
171 | size_t len); | ||
167 | 172 | ||
168 | /** | 173 | /** |
169 | * dvb_ringbuffer_pkt_read - Read from a packet in the ringbuffer. | 174 | * dvb_ringbuffer_pkt_read - Read from a packet in the ringbuffer. |
diff --git a/drivers/media/v4l2-core/v4l2-dev.c b/drivers/media/v4l2-core/v4l2-dev.c index 70b559d7ca80..e6da353b39bc 100644 --- a/drivers/media/v4l2-core/v4l2-dev.c +++ b/drivers/media/v4l2-core/v4l2-dev.c | |||
@@ -812,40 +812,6 @@ static int video_register_media_controller(struct video_device *vdev, int type) | |||
812 | return 0; | 812 | return 0; |
813 | } | 813 | } |
814 | 814 | ||
815 | /** | ||
816 | * __video_register_device - register video4linux devices | ||
817 | * @vdev: video device structure we want to register | ||
818 | * @type: type of device to register | ||
819 | * @nr: which device node number (0 == /dev/video0, 1 == /dev/video1, ... | ||
820 | * -1 == first free) | ||
821 | * @warn_if_nr_in_use: warn if the desired device node number | ||
822 | * was already in use and another number was chosen instead. | ||
823 | * @owner: module that owns the video device node | ||
824 | * | ||
825 | * The registration code assigns minor numbers and device node numbers | ||
826 | * based on the requested type and registers the new device node with | ||
827 | * the kernel. | ||
828 | * | ||
829 | * This function assumes that struct video_device was zeroed when it | ||
830 | * was allocated and does not contain any stale date. | ||
831 | * | ||
832 | * An error is returned if no free minor or device node number could be | ||
833 | * found, or if the registration of the device node failed. | ||
834 | * | ||
835 | * Zero is returned on success. | ||
836 | * | ||
837 | * Valid types are | ||
838 | * | ||
839 | * %VFL_TYPE_GRABBER - A frame grabber | ||
840 | * | ||
841 | * %VFL_TYPE_VBI - Vertical blank data (undecoded) | ||
842 | * | ||
843 | * %VFL_TYPE_RADIO - A radio card | ||
844 | * | ||
845 | * %VFL_TYPE_SUBDEV - A subdevice | ||
846 | * | ||
847 | * %VFL_TYPE_SDR - Software Defined Radio | ||
848 | */ | ||
849 | int __video_register_device(struct video_device *vdev, int type, int nr, | 815 | int __video_register_device(struct video_device *vdev, int type, int nr, |
850 | int warn_if_nr_in_use, struct module *owner) | 816 | int warn_if_nr_in_use, struct module *owner) |
851 | { | 817 | { |
diff --git a/drivers/media/v4l2-core/v4l2-subdev.c b/drivers/media/v4l2-core/v4l2-subdev.c index 953eab08e420..34a1e7c8b306 100644 --- a/drivers/media/v4l2-core/v4l2-subdev.c +++ b/drivers/media/v4l2-core/v4l2-subdev.c | |||
@@ -621,16 +621,6 @@ void v4l2_subdev_init(struct v4l2_subdev *sd, const struct v4l2_subdev_ops *ops) | |||
621 | } | 621 | } |
622 | EXPORT_SYMBOL(v4l2_subdev_init); | 622 | EXPORT_SYMBOL(v4l2_subdev_init); |
623 | 623 | ||
624 | /** | ||
625 | * v4l2_subdev_notify_event() - Delivers event notification for subdevice | ||
626 | * @sd: The subdev for which to deliver the event | ||
627 | * @ev: The event to deliver | ||
628 | * | ||
629 | * Will deliver the specified event to all userspace event listeners which are | ||
630 | * subscribed to the v42l subdev event queue as well as to the bridge driver | ||
631 | * using the notify callback. The notification type for the notify callback | ||
632 | * will be V4L2_DEVICE_NOTIFY_EVENT. | ||
633 | */ | ||
634 | void v4l2_subdev_notify_event(struct v4l2_subdev *sd, | 624 | void v4l2_subdev_notify_event(struct v4l2_subdev *sd, |
635 | const struct v4l2_event *ev) | 625 | const struct v4l2_event *ev) |
636 | { | 626 | { |