12 Jan
2012
12 Jan
'12
7:45 a.m.
At Thu, 12 Jan 2012 00:26:26 +0100, Torsten Schenk wrote:
+static int usb6fire_control_input_vol_info(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo)
+{
- uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
- uinfo->count = 2;
- uinfo->value.integer.min = -15;
- uinfo->value.integer.max = 15;
Some apps might not work with a negative minimum value. If you want to be conservative, shift up to zero and adjust later.
The actual dB range should be given anyway via additional TLV, thus you don't have to stick with the raw value too much.
static struct __devinitdata snd_kcontrol_new elements[] = { @@ -442,6 +497,15 @@ .get = usb6fire_control_digital_thru_get, .put = usb6fire_control_digital_thru_put },
- {
.iface = SNDRV_CTL_ELEM_IFACE_MIXER,
.name = "Input 1/2 Capture Volume",
.index = 0,
If this is the only volume element, you don't need to add "1/2", no?
thanks,
Takashi