Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 79c7cdd5 authored by Takashi Iwai's avatar Takashi Iwai
Browse files

ALSA: Add kernel-doc comments to vmaster stuff



Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent f5b1db63
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -71,6 +71,10 @@
!Esound/pci/ac97/ac97_codec.c
!Esound/pci/ac97/ac97_codec.c
!Esound/pci/ac97/ac97_pcm.c
!Esound/pci/ac97/ac97_pcm.c
     </sect1>
     </sect1>
     <sect1><title>Virtual Master Control API</title>
!Esound/core/vmaster.c
!Iinclude/sound/control.h
     </sect1>
  </chapter>
  </chapter>
  <chapter><title>MIDI API</title>
  <chapter><title>MIDI API</title>
     <sect1><title>Raw MIDI API</title>
     <sect1><title>Raw MIDI API</title>
+32 −0
Original line number Original line Diff line number Diff line
@@ -176,12 +176,44 @@ int _snd_ctl_add_slave(struct snd_kcontrol *master, struct snd_kcontrol *slave,
/* optional flags for slave */
/* optional flags for slave */
#define SND_CTL_SLAVE_NEED_UPDATE	(1 << 0)
#define SND_CTL_SLAVE_NEED_UPDATE	(1 << 0)


/**
 * snd_ctl_add_slave - Add a virtual slave control
 * @master: vmaster element
 * @slave: slave element to add
 *
 * Add a virtual slave control to the given master element created via
 * snd_ctl_create_virtual_master() beforehand.
 * Returns zero if successful or a negative error code.
 *
 * All slaves must be the same type (returning the same information
 * via info callback).  The fucntion doesn't check it, so it's your
 * responsibility.
 *
 * Also, some additional limitations:
 * at most two channels,
 * logarithmic volume control (dB level) thus no linear volume,
 * master can only attenuate the volume without gain
 */
static inline int
static inline int
snd_ctl_add_slave(struct snd_kcontrol *master, struct snd_kcontrol *slave)
snd_ctl_add_slave(struct snd_kcontrol *master, struct snd_kcontrol *slave)
{
{
	return _snd_ctl_add_slave(master, slave, 0);
	return _snd_ctl_add_slave(master, slave, 0);
}
}


/**
 * snd_ctl_add_slave_uncached - Add a virtual slave control
 * @master: vmaster element
 * @slave: slave element to add
 *
 * Add a virtual slave control to the given master.
 * Unlike snd_ctl_add_slave(), the element added via this function
 * is supposed to have volatile values, and get callback is called
 * at each time quried from the master.
 *
 * When the control peeks the hardware values directly and the value
 * can be changed by other means than the put callback of the element,
 * this function should be used to keep the value always up-to-date.
 */
static inline int
static inline int
snd_ctl_add_slave_uncached(struct snd_kcontrol *master,
snd_ctl_add_slave_uncached(struct snd_kcontrol *master,
			   struct snd_kcontrol *slave)
			   struct snd_kcontrol *slave)
+14 −2
Original line number Original line Diff line number Diff line
@@ -340,8 +340,20 @@ static void master_free(struct snd_kcontrol *kcontrol)
}
}




/*
/**
 * Create a virtual master control with the given name
 * snd_ctl_make_virtual_master - Create a virtual master control
 * @name: name string of the control element to create
 * @tlv: 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 @tlv 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 type, and should be the max 0dB.
 */
 */
struct snd_kcontrol *snd_ctl_make_virtual_master(char *name,
struct snd_kcontrol *snd_ctl_make_virtual_master(char *name,
						 const unsigned int *tlv)
						 const unsigned int *tlv)