|
snd_register_device - Register the ALSA device file for the card : the device type, SNDRV_DEVICE_TYPE_XXX : the card instance : the device index : the file operations : user pointer for f_ops->open()
Registers an ALSA device file for the given card. The operators have to be set in reg parameter.
This function uses the card's device pointer to link to the correct &struct device.
Returns zero if successful, or a negative error code on failure.
|
#define | snd_card_set_dev(card, devptr) ((card)->dev = (devptr)) |
|
#define | __snd_printk(level, file, line, format, args...) printk(format, ##args) |
|
#define | snd_printk(fmt, args...) __snd_printk(0, __FILE__, __LINE__, fmt, ##args) |
|
#define | snd_printd(fmt, args...) do { } while (0) |
|
#define | _snd_printd(level, fmt, args...) do { } while (0) |
|
#define | snd_BUG() do { } while (0) |
|
#define | snd_BUG_ON(cond) __snd_bug_on(0 && (cond)) /* always false */ |
|
#define | snd_printdd(format, args...) do { } while (0) |
|
#define | SNDRV_OSS_VERSION ((3<<16)|(8<<8)|(1<<4)|(0)) /* 3.8.1a */ |
|
enum | { SND_PR_ALWAYS,
SND_PR_DEBUG,
SND_PR_VERBOSE
} |
|
struct snd_card * | snd_cards [SNDRV_CARDS] |
|
int | snd_unregister_device (int type, struct snd_card *card, int dev) |
|
void * | snd_lookup_minor_data (unsigned int minor, int type) |
|
int | snd_add_device_sysfs_file (int type, struct snd_card *card, int dev, struct device_attribute *attr) |
|
int | snd_minor_info_init (void) |
|
int | snd_minor_info_done (void) |
|
int | copy_to_user_fromio (void __user *dst, const volatile void __iomem *src, size_t count) |
|
int | copy_from_user_toio (volatile void __iomem *dst, const void __user *src, size_t count) |
|
int | snd_card_locked (int card) |
|
int | snd_card_create (int idx, const char *id, struct module *module, int extra_size, struct snd_card **card_ret) |
|
int | snd_card_disconnect (struct snd_card *card) |
|
int | snd_card_free (struct snd_card *card) |
|
int | snd_card_free_when_closed (struct snd_card *card) |
|
void | snd_card_set_id (struct snd_card *card, const char *id) |
|
int | snd_card_register (struct snd_card *card) |
|
int | snd_card_info_init (void) |
|
int | snd_card_info_done (void) |
|
int | snd_component_add (struct snd_card *card, const char *component) |
|
int | snd_card_file_add (struct snd_card *card, struct file *file) |
|
int | snd_card_file_remove (struct snd_card *card, struct file *file) |
|
void | snd_card_unref (struct snd_card *card) |
|
int | snd_device_new (struct snd_card *card, snd_device_type_t type, void *device_data, struct snd_device_ops *ops) |
|
int | snd_device_register (struct snd_card *card, void *device_data) |
|
int | snd_device_register_all (struct snd_card *card) |
|
int | snd_device_disconnect (struct snd_card *card, void *device_data) |
|
int | snd_device_disconnect_all (struct snd_card *card) |
|
int | snd_device_free (struct snd_card *card, void *device_data) |
|
int | snd_device_free_all (struct snd_card *card, snd_device_cmd_t cmd) |
|
void | release_and_free_resource (struct resource *res) |
|
snd_card_create - create and initialize a soundcard structure : card index (address) [0 ... (SNDRV_CARDS-1)] : card identification (ASCII string) : top level module for locking : allocate this extra size after the main soundcard structure : the pointer to store the created card instance
Creates and initializes a soundcard structure.
The function allocates snd_card instance via kzalloc with the given space for the driver to use freely. The allocated struct is stored in the given card_ret pointer.
Returns zero if successful or a negative error code.
Definition at line 149 of file init.c.
snd_card_disconnect - disconnect all APIs from the file-operations (user space) : soundcard structure
Disconnects all APIs from the file-operations (user space).
Returns zero, otherwise a negative error code.
Note: The current implementation replaces all active file->f_op with special dummy file operations (they do nothing except release).
Definition at line 345 of file init.c.
snd_card_register - register the soundcard : soundcard structure
This function registers all the devices assigned to the soundcard. Until calling this, the ALSA control interface is blocked from the external accesses. Thus, you should call this function at the end of the initialization of the card.
Returns zero otherwise a negative error code if the registration failed.
Definition at line 682 of file init.c.
snd_device_disconnect - disconnect the device : the card instance : the data pointer to disconnect
Turns the device into the disconnection state, invoking dev_disconnect callback, if the device was already registered.
Usually called from snd_card_disconnect().
Returns zero if successful, or a negative error code on failure or if the device not found.
Definition at line 122 of file device.c.
snd_device_free - release the device from the card : the card instance : the data pointer to release
Removes the device from the list on the card and invokes the callbacks, dev_disconnect and dev_free, corresponding to the state. Then release the device.
Returns zero if successful, or a negative error code on failure or if the device not found.
Definition at line 79 of file device.c.
snd_device_new - create an ALSA device component : the card instance : the device type, SNDRV_DEV_XXX : the data pointer of this device : the operator table
Creates a new device component for the given data pointer. The device will be assigned to the card and managed together by the card.
The data pointer plays a role as the identifier, too, so the pointer address must be unique and unchanged.
Returns zero if successful, or a negative error code on failure.
Definition at line 44 of file device.c.
void* snd_lookup_minor_data |
( |
unsigned int |
minor, |
|
|
int |
type |
|
) |
| |
snd_lookup_minor_data - get user data of a registered device : the minor number : device type (SNDRV_DEVICE_TYPE_XXX)
Checks that a minor device with the specified type is registered, and returns its user data pointer.
This function increments the reference counter of the card instance if an associated instance with the given minor number and type is found. The caller must call snd_card_unref() appropriately later.
Definition at line 106 of file sound.c.