• Home
  • Raw
  • Download

Lines Matching full:hook

4  * \brief PCM Hook Interface
10 * PCM - Hook functions
87 snd_pcm_hook_t *hook = list_entry(pos, snd_pcm_hook_t, list); in snd_pcm_hooks_close() local
88 err = hook->func(hook); in snd_pcm_hooks_close()
95 snd_pcm_hook_t *hook; in snd_pcm_hooks_close() local
97 hook = list_entry(pos, snd_pcm_hook_t, list); in snd_pcm_hooks_close()
98 snd_pcm_hook_remove(hook); in snd_pcm_hooks_close()
119 snd_pcm_hook_t *hook = list_entry(pos, snd_pcm_hook_t, list); in snd_pcm_hooks_hw_params() local
120 err = hook->func(hook); in snd_pcm_hooks_hw_params()
135 snd_pcm_hook_t *hook = list_entry(pos, snd_pcm_hook_t, list); in snd_pcm_hooks_hw_free() local
136 err = hook->func(hook); in snd_pcm_hooks_hw_free()
255 This plugin is used to call some 'hook' function when this plugin is opened,
261 # Hook arguments definition
266 # PCM hook type
272 # PCM hook definition
274 type STR # PCM Hook type (see pcm_hook_type)
280 # PCM hook plugin
291 ID STR # Hook name (see pcm_hook)
293 ID { } # Hook definition (see pcm_hook)
353 SNDERR("Invalid hook definition"); in snd_pcm_hook_add_conf()
556 * \brief Get PCM handle for a PCM hook
557 * \param hook PCM hook handle
560 snd_pcm_t *snd_pcm_hook_get_pcm(snd_pcm_hook_t *hook) in snd_pcm_hook_get_pcm() argument
562 assert(hook); in snd_pcm_hook_get_pcm()
563 return hook->pcm; in snd_pcm_hook_get_pcm()
567 * \brief Get callback function private data for a PCM hook
568 * \param hook PCM hook handle
571 void *snd_pcm_hook_get_private(snd_pcm_hook_t *hook) in snd_pcm_hook_get_private() argument
573 assert(hook); in snd_pcm_hook_get_private()
574 return hook->private_data; in snd_pcm_hook_get_private()
578 * \brief Set callback function private data for a PCM hook
579 * \param hook PCM hook handle
582 void snd_pcm_hook_set_private(snd_pcm_hook_t *hook, void *private_data) in snd_pcm_hook_set_private() argument
584 assert(hook); in snd_pcm_hook_set_private()
585 hook->private_data = private_data; in snd_pcm_hook_set_private()
589 * \brief Add a PCM hook at end of hooks chain
590 * \param hookp Returned PCM hook handle
592 * \param type PCM hook type
593 * \param func PCM hook callback function
594 * \param private_data PCM hook private data
597 * Warning: an hook callback function cannot remove an hook of the same type
621 * \brief Remove a PCM hook
622 * \param hook PCM hook handle
625 * Warning: an hook callback cannot remove an hook of the same type
628 int snd_pcm_hook_remove(snd_pcm_hook_t *hook) in snd_pcm_hook_remove() argument
630 assert(hook); in snd_pcm_hook_remove()
631 list_del(&hook->list); in snd_pcm_hook_remove()
632 free(hook); in snd_pcm_hook_remove()
640 static int snd_pcm_hook_ctl_elems_hw_params(snd_pcm_hook_t *hook) in snd_pcm_hook_ctl_elems_hw_params() argument
642 snd_sctl_t *h = snd_pcm_hook_get_private(hook); in snd_pcm_hook_ctl_elems_hw_params()
646 static int snd_pcm_hook_ctl_elems_hw_free(snd_pcm_hook_t *hook) in snd_pcm_hook_ctl_elems_hw_free() argument
648 snd_sctl_t *h = snd_pcm_hook_get_private(hook); in snd_pcm_hook_ctl_elems_hw_free()
652 static int snd_pcm_hook_ctl_elems_close(snd_pcm_hook_t *hook) in snd_pcm_hook_ctl_elems_close() argument
654 snd_sctl_t *h = snd_pcm_hook_get_private(hook); in snd_pcm_hook_ctl_elems_close()
656 snd_pcm_hook_set_private(hook, NULL); in snd_pcm_hook_ctl_elems_close()