Linux Kernel
3.7.1
|
#include <sound/asound.h>
Go to the source code of this file.
Data Structures | |
struct | snd_kcontrol_new |
struct | snd_kcontrol_volatile |
struct | snd_kcontrol |
struct | snd_kctl_event |
struct | snd_ctl_file |
Macros | |
#define | snd_kcontrol_chip(kcontrol) ((kcontrol)->private_data) |
#define | snd_kcontrol(n) list_entry(n, struct snd_kcontrol, list) |
#define | snd_kctl_event(n) list_entry(n, struct snd_kctl_event, list) |
#define | snd_ctl_file(n) list_entry(n, struct snd_ctl_file, list) |
#define | snd_ctl_register_ioctl_compat(fcn) |
#define | snd_ctl_unregister_ioctl_compat(fcn) |
#define | SND_CTL_SLAVE_NEED_UPDATE (1 << 0) |
Typedefs | |
typedef int( | snd_kcontrol_info_t )(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) |
typedef int( | snd_kcontrol_get_t )(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
typedef int( | snd_kcontrol_put_t )(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
typedef int( | snd_kcontrol_tlv_rw_t )(struct snd_kcontrol *kcontrol, int op_flag, unsigned int size, unsigned int __user *tlv) |
typedef int(* | snd_kctl_ioctl_func_t )(struct snd_card *card, struct snd_ctl_file *control, unsigned int cmd, unsigned long arg) |
#define snd_ctl_file | ( | n | ) | list_entry(n, struct snd_ctl_file, list) |
#define snd_kcontrol | ( | n | ) | list_entry(n, struct snd_kcontrol, list) |
#define snd_kcontrol_chip | ( | kcontrol | ) | ((kcontrol)->private_data) |
#define snd_kctl_event | ( | n | ) | list_entry(n, struct snd_kctl_event, list) |
typedef int( snd_kcontrol_get_t)(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
typedef int( snd_kcontrol_info_t)(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) |
typedef int( snd_kcontrol_put_t)(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) |
int _snd_ctl_add_slave | ( | struct snd_kcontrol * | master, |
struct snd_kcontrol * | slave, | ||
unsigned int | flags | ||
) |
snd_ctl_activate_id - activate/inactivate the control of the given id : the card instance : the control id to activate/inactivate : non-zero to activate
Finds the control instance with the given id, and activate or inactivate the control together with notification, if changed.
Returns 0 if unchanged, 1 if changed, or a negative error code on failure.
int snd_ctl_add | ( | struct snd_card * | card, |
struct snd_kcontrol * | kcontrol | ||
) |
snd_ctl_add - add the control instance to the card : the card instance : the control instance to add
Adds the control instance created via snd_ctl_new() or snd_ctl_new1() to the given card. Assigns also an unique numid used for fast search.
Returns zero if successful, or a negative error code on failure.
It frees automatically the control which cannot be added.
int snd_ctl_add_vmaster_hook | ( | struct snd_kcontrol * | kcontrol, |
void(*)(void *private_data, int) | hook, | ||
void * | private_data | ||
) |
int snd_ctl_boolean_mono_info | ( | struct snd_kcontrol * | kcontrol, |
struct snd_ctl_elem_info * | uinfo | ||
) |
int snd_ctl_boolean_stereo_info | ( | struct snd_kcontrol * | kcontrol, |
struct snd_ctl_elem_info * | uinfo | ||
) |
int snd_ctl_enum_info | ( | struct snd_ctl_elem_info * | info, |
unsigned int | channels, | ||
unsigned int | items, | ||
const char *const | names[] | ||
) |
snd_ctl_enum_info - fills the info structure for an enumerated control : the structure to be filled : the number of the control's channels; often one : the number of control values; also the size of : an array containing the names of all control values
Sets all required fields in to their appropriate values. If the control's accessibility is not the default (readable and writable), the caller has to fill ->access.
|
read |
snd_ctl_find_id - find the control instance with the given id : the card instance : the id to search
Finds the control instance with the given id from the card.
Returns the pointer of the instance if found, or NULL if not.
The caller must down card->controls_rwsem before calling this function (if the race condition can happen).
|
read |
snd_ctl_find_numid - find the control instance with the given number-id : the card instance : the number-id to search
Finds the control instance with the given number-id from the card.
Returns the pointer of the instance if found, or NULL if not.
The caller must down card->controls_rwsem before calling this function (if the race condition can happen).
void snd_ctl_free_one | ( | struct snd_kcontrol * | kcontrol | ) |
|
read |
|
read |
snd_ctl_new1 - create a control instance from the template : the initialization record : the private data to set
Allocates a new struct snd_kcontrol instance and initialize from the given template. When the access field of ncontrol is 0, it's assumed as READWRITE access. When the count field is 0, it's assumes as one.
Returns the pointer of the newly generated instance, or NULL on failure.
int snd_ctl_register_ioctl | ( | snd_kctl_ioctl_func_t | fcn | ) |
int snd_ctl_remove | ( | struct snd_card * | card, |
struct snd_kcontrol * | kcontrol | ||
) |
snd_ctl_remove - remove the control from the card and release it : the card instance : the control instance to remove
Removes the control from the card and then releases the instance. You don't need to call snd_ctl_free_one(). You must be in the write lock - down_write(&card->controls_rwsem).
Returns 0 if successful, or a negative error code on failure.
int snd_ctl_remove_id | ( | struct snd_card * | card, |
struct snd_ctl_elem_id * | id | ||
) |
int snd_ctl_rename_id | ( | struct snd_card * | card, |
struct snd_ctl_elem_id * | src_id, | ||
struct snd_ctl_elem_id * | dst_id | ||
) |
snd_ctl_replace - replace the control instance of the card : the card instance : the control instance to replace : add the control if not already added
Replaces the given control. If the given control does not exist and the add_on_replace flag is set, the control is added. If the control exists, it is destroyed first.
Returns zero if successful, or a negative error code on failure.
It frees automatically the control which cannot be added or replaced.
void snd_ctl_sync_vmaster_hook | ( | struct snd_kcontrol * | kcontrol | ) |
int snd_ctl_unregister_ioctl | ( | snd_kctl_ioctl_func_t | fcn | ) |