Lines Matching full:callback

188 -  create ``probe`` callback.
190 - create ``remove`` callback.
353 The real constructor of PCI drivers is the ``probe`` callback. The
354 ``probe`` callback and other component-constructors which are called
355 from the ``probe`` callback cannot be used with the ``__init`` prefix
358 In the ``probe`` callback, the following scheme is often used.
377 Each time the ``probe`` callback is called, check the availability of
472 remove callback and power-management callbacks, too.
477 The destructor, the remove callback, simply releases the card instance.
566 data pointer, and the callback pointers (``&ops``). The device-level
579 for each component is defined in the callback pointers. Hence, you don't
583 function to the dev_free callback in the ``ops``, so that it can be
667 The merit is, however, that you can trigger your own callback at
934 See the later section `sync_stop callback`_ for details.
1172 /* open callback */
1184 /* close callback */
1194 /* open callback */
1206 /* close callback */
1215 /* hw_params callback */
1224 /* hw_free callback */
1232 /* prepare callback */
1250 /* trigger callback */
1268 /* pointer callback */
1371 callback as follows::
1563 in the `PCM open callback`_. Note that the runtime instance holds a copy of
1565 in the open callback, you can modify the copied descriptor
1615 ``PAUSE`` flag is set, the ``trigger`` callback below must handle
1624 callback. This will be described in a later section.
1706 need to manage it in the hw_params callback. At least, ``dma_bytes`` is
1729 callback`_. Don't mix this with ``pcm->private_data``. The
1734 callback::
1746 The allocated object must be released in the `close callback`_.
1751 OK, now let me give details about each PCM callback (``ops``). In
1752 general, every callback must return 0 if successful, or a negative
1757 Each callback function takes at least one argument containing a
1774 PCM open callback
1798 You can allocate private data in this callback, as described in the
1804 close callback
1815 callback will be released here::
1824 ioctl callback
1828 leave it NULL, then the PCM core calls the generic ioctl callback
1831 callback function here.
1833 hw_params callback
1845 Many hardware setups should be done in this callback, including the
1852 a buffer is already allocated before this callback gets
1862 Note that this one and the ``prepare`` callback may be called multiple
1871 Another note is that this callback is non-atomic (schedulable) by
1873 because the ``trigger`` callback is atomic (non-schedulable). That is,
1875 ``trigger`` callback. Please see the subsection Atomicity_ for
1878 hw_free callback
1888 This function is always called before the close callback is called.
1889 Also, the callback may be called multiple times, too. Keep track
1894 after this callback gets called. Otherwise you'll have to release the
1901 prepare callback
1908 This callback is called when the PCM is “prepared”. You can set the
1910 is that the ``prepare`` callback will be called each time
1914 Note that this callback is non-atomic. You can use
1915 schedule-related functions safely in this callback.
1925 Be careful that this callback will be called many times at each setup,
1928 trigger callback
1939 and ``STOP`` commands must be defined in this callback::
1965 As mentioned, this callback is atomic by default unless the ``nonatomic``
1967 ``trigger`` callback should be as minimal as possible, just really
1971 sync_stop callback
1978 This callback is optional, and NULL can be passed. It's called after
1989 While keeping the ``sync_stop`` PCM callback NULL, the driver can set
2002 pointer callback
2009 This callback is called when the PCM middle layer inquires the current
2019 This callback is also atomic by default.
2036 ack callback
2039 This callback is also not mandatory. This callback is called when the
2042 internal buffer, and this callback is useful only for such a purpose.
2044 The callback function may return 0 or a negative error. When the
2048 This callback is atomic by default.
2050 page callback
2053 This callback is optional too. The mmap calls this callback to get the
2056 You need no special callback for the standard SG-buffer or vmalloc-
2057 buffer. Hence this callback should be rarely used.
2059 mmap callback
2062 This is another optional callback for controlling mmap behavior.
2063 When defined, the PCM core calls this callback when a page is
2092 pointer value at ``open`` callback (and reset at ``close`` callback).
2125 callback.
2201 example, the ``hw_params`` callback is non-atomic, while the ``trigger``
2202 callback is atomic. This means, the latter is called already in a
2210 callbacks (e.g. ``trigger`` callback). To implement some delay in such a
2211 callback, please use :c:func:`udelay()` or :c:func:`mdelay()`.
2230 period gets elapsed during ``ack`` or other callback). There is a
2243 call this function in the open callback::
2318 ... and in the open callback::
2481 instead. In this case, you don't have to define the ``put`` callback.
2484 callback.
2500 info callback
2503 The ``info`` callback is used to get detailed information on this
2547 The above callback can be simplified with a helper function,
2567 is an info callback for a mono channel boolean item, just like
2571 get callback
2574 This callback is used to read the current value of the control, so it
2590 info callback. For example, the sb driver uses this field to store the
2607 In the ``get`` callback, you have to fill all the elements if the
2612 put callback
2615 This callback is used to write a value coming from user-space.
2639 As in the ``get`` callback, when the control has more than one
2640 element, all elements must be evaluated in this callback, too.
2780 with an ``ac97_bus_ops_t`` record with callback functions::
2804 so that the read/write callback functions can refer to this chip
2817 The ``read`` callback returns the register value specified in the
2830 Meanwhile, the ``write`` callback is used to set the register
2841 The ``reset`` callback is used to reset the codec. If the chip
2842 requires a special kind of reset, you can define this callback.
2844 The ``wait`` callback is used to add some waiting time in the standard
2846 time, define this callback.
2848 The ``init`` callback is used for additional initialization of the
2916 callbacks for each codec or check ``ac97->num`` in the callback
3098 callback::
3103 RawMIDI open callback
3114 RawMIDI close callback
3126 Rawmidi trigger callback for output substreams
3167 The ``trigger`` callback must not sleep. If the hardware FIFO is full
3172 The ``trigger`` callback is called with a zero ``up`` parameter when
3175 RawMIDI trigger callback for input substreams
3186 The ``trigger`` callback must not sleep; the actual reading of data
3202 drain callback
3215 This callback is optional. If you do not set ``drain`` in the struct
3324 And implement the callback functions as you like.
3337 callback, you don't specify the value field for this type (the count
3413 ``hw_params`` callback::
3430 the PCM ``hw_params`` callback, and call :c:func:`snd_pcm_lib_free_pages()`
3431 after the PCM ``hw_free`` callback automatically. So the driver
3432 doesn't have to call these functions explicitly in its callback any
3447 efficient. You need to define the ``copy`` callback
3449 callback for playback. However, there is a drawback: it cannot be
3467 interleaved or non-interleaved samples. The ``copy`` callback is
3487 What you have to do in this callback is again different between playback
3512 more complicated. The callback is called for each channel, passed in
3516 interleaved case. The callback is supposed to copy the data from/to
3521 Usually for the playback, another callback ``fill_silence`` is
3528 The meanings of arguments are the same as in the ``copy`` callback,
3531 no meaning, as for the ``copy`` callback.
3533 The role of the ``fill_silence`` callback is to set the given amount
3625 as-is, set the read callback with private data via
3631 the callback. The third parameter specifies the read buffer size and
3632 the fourth (``my_proc_read``) is the callback function, which is
3638 In the read callback, use :c:func:`snd_iprintf()` for output
3657 and set the write buffer size and the callback::
3661 In the write callback, you can use :c:func:`snd_info_get_line()`
3715 to RAM. If this is set, the trigger callback is called with
3716 ``SNDRV_PCM_TRIGGER_RESUME`` after the resume callback completes.
3730 callback when no ``SNDRV_PCM_INFO_RESUME`` flag is set. But, it's better
3816 Note that, at the time this callback gets called, the PCM stream has
3940 Also, the ``private_free`` callback is always called at the card free,
3942 ``private_free`` callback. It might be called even before you
3944 invalid initialization, you can set ``private_free`` callback after