Logo Search packages:      
Sourcecode: alsa-lib version File versions  Download package

int snd_ctl_close ( snd_ctl_t ctl )

close CTL handle

Parameters:
ctlCTL handle
Returns:
0 on success otherwise a negative error code

Closes the specified CTL handle and frees all associated resources.

Definition at line 89 of file control.c.

References snd_async_del_handler(), and snd_dlclose().

Referenced by snd_card_get_index(), snd_card_get_longname(), snd_card_get_name(), snd_ctl_ext_delete(), snd_func_card_id(), snd_func_pcm_args_by_class(), snd_func_pcm_id(), snd_hctl_close(), snd_hctl_open(), snd_pcm_hw_open(), and snd_sctl_build().

{
      int err;
      while (!list_empty(&ctl->async_handlers)) {
            snd_async_handler_t *h = list_entry(&ctl->async_handlers.next, snd_async_handler_t, hlist);
            snd_async_del_handler(h);
      }
      err = ctl->ops->close(ctl);
      if (ctl->name)
            free(ctl->name);
      if (ctl->dl_handle)
            snd_dlclose(ctl->dl_handle);
      free(ctl);
      return err;
}

Here is the call graph for this function:

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index