[alsa-devel] [PATCH 2/3] Add TLV to M-Audio volume controls
Felix Homann
linuxaudio at showlabor.de
Mon Apr 23 11:16:07 CEST 2012
Signed-off-by: Felix Homann <linuxaudio at showlabor.de>
diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c
index c374c72..596744f 100644
--- a/sound/usb/mixer.c
+++ b/sound/usb/mixer.c
@@ -501,6 +501,11 @@ static int mixer_vol_tlv(struct snd_kcontrol *kcontrol, int op_flag,
return 0;
}
+/* This symbol is exported in order to reuse it in mixer_quirks.c */
+int (*snd_usb_mixer_vol_tlv)(struct snd_kcontrol *kcontrol, int op_flag,
+ unsigned int size,
+ unsigned int __user *_tlv) = &mixer_vol_tlv;
+
/*
* parser routines begin here...
*/
diff --git a/sound/usb/mixer_quirks.c b/sound/usb/mixer_quirks.c
index e486c51..5b52275 100644
--- a/sound/usb/mixer_quirks.c
+++ b/sound/usb/mixer_quirks.c
@@ -41,6 +41,8 @@
#include "helper.h"
extern struct snd_kcontrol_new *snd_usb_feature_unit_ctl;
+extern int (*snd_usb_mixer_vol_tlv)(struct snd_kcontrol *kcontrol, int op_flag,
+ unsigned int size, unsigned int __user *_tlv);
/* private_free callback */
static void usb_mixer_elem_free(struct snd_kcontrol *kctl)
@@ -594,7 +596,7 @@ static int snd_maudio_ftu_create_volume_ctls(struct usb_mixer_interface *mixer)
in + 1, out + 1);
err = snd_create_std_mono_ctl(mixer, id, control,
cmask, val_type, name,
- NULL);
+ snd_usb_mixer_vol_tlv);
if (err < 0)
return err;
}
@@ -605,7 +607,7 @@ static int snd_maudio_ftu_create_volume_ctls(struct usb_mixer_interface *mixer)
in - 7, out + 1);
err = snd_create_std_mono_ctl(mixer, id, control,
cmask, val_type, name,
- NULL);
+ snd_usb_mixer_vol_tlv);
if (err < 0)
return err;
}
--
1.7.5.4
More information about the Alsa-devel
mailing list