ALSA: usb-audio: Rename and export mixer_vol_tlv
authorFelix Homann <linuxaudio@showlabor.de>
Mon, 23 Apr 2012 18:24:24 +0000 (20:24 +0200)
committerTakashi Iwai <tiwai@suse.de>
Tue, 24 Apr 2012 06:01:27 +0000 (08:01 +0200)
Rename mixer_vol_tlv to snd_usb_mixer_vol_tlv and export it to make
it reuseable in mixer_quirks.c.

Signed-off-by: Felix Homann <linuxaudio@showlabor.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/usb/mixer.c
sound/usb/mixer.h

index c374c7242ab2255cd5331c8d9cc6b34526664347..bb56f5353fe0091ac90c405a1ba542cb16feb170 100644 (file)
@@ -486,7 +486,7 @@ static int set_cur_mix_value(struct usb_mixer_elem_info *cval, int channel,
 /*
  * TLV callback for mixer volume controls
  */
-static int mixer_vol_tlv(struct snd_kcontrol *kcontrol, int op_flag,
+int snd_usb_mixer_vol_tlv(struct snd_kcontrol *kcontrol, int op_flag,
                         unsigned int size, unsigned int __user *_tlv)
 {
        struct usb_mixer_elem_info *cval = kcontrol->private_data;
@@ -1158,7 +1158,7 @@ static void build_feature_ctl(struct mixer_build *state, void *raw_desc,
                if (control == UAC_FU_VOLUME) {
                        check_mapped_dB(map, cval);
                        if (cval->dBmin < cval->dBmax || !cval->initialized) {
-                               kctl->tlv.c = mixer_vol_tlv;
+                               kctl->tlv.c = snd_usb_mixer_vol_tlv;
                                kctl->vd[0].access |= 
                                        SNDRV_CTL_ELEM_ACCESS_TLV_READ |
                                        SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK;
index 81b2d8a32fb0f82e33475fabf6aa890ca7a675f4..a7f3d45a8acf1f6255a86f88038ca64012069137 100644 (file)
@@ -68,4 +68,7 @@ int snd_usb_mixer_activate(struct usb_mixer_interface *mixer);
 int snd_usb_mixer_add_control(struct usb_mixer_interface *mixer,
                              struct snd_kcontrol *kctl);
 
+int snd_usb_mixer_vol_tlv(struct snd_kcontrol *kcontrol, int op_flag,
+                         unsigned int size, unsigned int __user *_tlv);
+
 #endif /* __USBMIXER_H */