diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-13 13:32:54 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-13 13:32:54 -0500 |
commit | 66dc918d42eaaa9afe42a47d07526765162017a9 (patch) | |
tree | 947411841773dfb076f1aa78bc5be868bc4281a6 /sound/usb/mixer.c | |
parent | b2034d474b7e1e8578bd5c2977024b51693269d9 (diff) | |
parent | 6db9a0f326d3144d790d9479309df480a8f562e4 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: (348 commits)
ALSA: hda - Fix NULL-derefence with a single mic in STAC auto-mic detection
ALSA: hda - Add missing NID 0x19 fixup for Sony VAIO
ALSA: hda - Fix ALC275 enable hardware EQ for SONY VAIO
ALSA: oxygen: fix Xonar DG input
ALSA: hda - Fix EAPD on Lenovo NB ALC269 to low
ALSA: hda - Fix missing EAPD for Acer 4930G
ALSA: hda: Disable 4/6 channels on some NVIDIA GPUs.
ALSA: hda - Add static_hdmi_pcm option to HDMI codec parser
ALSA: hda - Don't refer ELD when unplugged
ASoC: tpa6130a2: Fix compiler warning
ASoC: tlv320dac33: Add DAPM selection for LOM invert
ASoC: DMIC codec: Adding a generic DMIC codec
ALSA: snd-usb-us122l: Fix missing NULL checks
ALSA: snd-usb-us122l: Fix MIDI output
ASoC: soc-cache: Fix invalid memory access during snd_soc_lzo_cache_sync()
ASoC: Fix section mismatch in wm8995.c
ALSA: oxygen: add S/PDIF source selection for Claro cards
ALSA: oxygen: fix CD/MIDI for X-Meridian (2G)
ASoC: fix migor audio build
ALSA: include delay.h for msleep in Xonar DG support
...
Diffstat (limited to 'sound/usb/mixer.c')
-rw-r--r-- | sound/usb/mixer.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c index f2d74d654b3c..7df89b3d7ded 100644 --- a/sound/usb/mixer.c +++ b/sound/usb/mixer.c | |||
@@ -1633,18 +1633,11 @@ static int parse_audio_extension_unit(struct mixer_build *state, int unitid, voi | |||
1633 | static int mixer_ctl_selector_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) | 1633 | static int mixer_ctl_selector_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) |
1634 | { | 1634 | { |
1635 | struct usb_mixer_elem_info *cval = kcontrol->private_data; | 1635 | struct usb_mixer_elem_info *cval = kcontrol->private_data; |
1636 | char **itemlist = (char **)kcontrol->private_value; | 1636 | const char **itemlist = (const char **)kcontrol->private_value; |
1637 | 1637 | ||
1638 | if (snd_BUG_ON(!itemlist)) | 1638 | if (snd_BUG_ON(!itemlist)) |
1639 | return -EINVAL; | 1639 | return -EINVAL; |
1640 | uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED; | 1640 | return snd_ctl_enum_info(uinfo, 1, cval->max, itemlist); |
1641 | uinfo->count = 1; | ||
1642 | uinfo->value.enumerated.items = cval->max; | ||
1643 | if (uinfo->value.enumerated.item >= cval->max) | ||
1644 | uinfo->value.enumerated.item = cval->max - 1; | ||
1645 | strlcpy(uinfo->value.enumerated.name, itemlist[uinfo->value.enumerated.item], | ||
1646 | sizeof(uinfo->value.enumerated.name)); | ||
1647 | return 0; | ||
1648 | } | 1641 | } |
1649 | 1642 | ||
1650 | /* get callback for selector unit */ | 1643 | /* get callback for selector unit */ |