Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Functions
vmaster.c File Reference
#include <linux/slab.h>
#include <linux/export.h>
#include <sound/core.h>
#include <sound/control.h>
#include <sound/tlv.h>

Go to the source code of this file.

Data Structures

struct  link_ctl_info
 
struct  link_master
 
struct  link_slave
 

Functions

int _snd_ctl_add_slave (struct snd_kcontrol *master, struct snd_kcontrol *slave, unsigned int flags)
 
 EXPORT_SYMBOL (_snd_ctl_add_slave)
 
: name string of the control element to create

snd_ctl_make_virtual_master - Create a virtual master control

: optional TLV int array for dB information

Creates a virtual matster control with the given name string. Returns the created control element, or NULL for errors (ENOMEM).

After creating a vmaster element, you can add the slave controls via snd_ctl_add_slave() or snd_ctl_add_slave_uncached().

The optional argument can be used to specify the TLV information for dB scale of the master control. It should be a single element with SNDRV_CTL_TLVT_DB_SCALE, #SNDRV_CTL_TLV_DB_MINMAX or SNDRV_CTL_TLVT_DB_MINMAX_MUTE type, and should be the max 0dB.

struct snd_kcontrolsnd_ctl_make_virtual_master (char *name, const unsigned int *tlv)
 
 EXPORT_SYMBOL (snd_ctl_make_virtual_master)
 
int snd_ctl_add_vmaster_hook (struct snd_kcontrol *kcontrol, void(*hook)(void *private_data, int), void *private_data)
 
 EXPORT_SYMBOL_GPL (snd_ctl_add_vmaster_hook)
 
void snd_ctl_sync_vmaster_hook (struct snd_kcontrol *kcontrol)
 
 EXPORT_SYMBOL_GPL (snd_ctl_sync_vmaster_hook)
 

Function Documentation

int _snd_ctl_add_slave ( struct snd_kcontrol master,
struct snd_kcontrol slave,
unsigned int  flags 
)

Definition at line 250 of file vmaster.c.

EXPORT_SYMBOL ( _snd_ctl_add_slave  )
EXPORT_SYMBOL ( snd_ctl_make_virtual_master  )
EXPORT_SYMBOL_GPL ( snd_ctl_add_vmaster_hook  )
EXPORT_SYMBOL_GPL ( snd_ctl_sync_vmaster_hook  )
int snd_ctl_add_vmaster_hook ( struct snd_kcontrol kcontrol,
void(*)(void *private_data, int hook,
void private_data 
)

snd_ctl_add_vmaster_hook - Add a hook to a vmaster control : vmaster kctl element : the hook function : the private_data pointer to be saved

Adds the given hook to the vmaster control element so that it's called at each time when the value is changed.

Definition at line 427 of file vmaster.c.

struct snd_kcontrol* snd_ctl_make_virtual_master ( char name,
const unsigned int tlv 
)
read

Definition at line 376 of file vmaster.c.

void snd_ctl_sync_vmaster_hook ( struct snd_kcontrol kcontrol)

snd_ctl_sync_vmaster_hook - Sync the vmaster hook : vmaster kctl element

Call the hook function to synchronize with the current value of the given vmaster element. NOP when NULL is passed to or the hook doesn't exist.

Definition at line 446 of file vmaster.c.