summaryrefslogtreecommitdiff
path: root/sound/usb
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2020-12-14 09:05:24 +0100
committerTakashi Iwai <tiwai@suse.de>2020-12-14 09:05:29 +0100
commite5fab13a7c54b8e69ea3bb27067eb06aba5f19b5 (patch)
tree32ee15f944c907b7442da9d124efba8e67c7ece6 /sound/usb
parentd84489e374f5b9b3ab424a5169e68e06a4329524 (diff)
parentc6dde8ffd071aea9d1ce64279178e470977b235c (diff)
downloadlwn-e5fab13a7c54b8e69ea3bb27067eb06aba5f19b5.tar.gz
lwn-e5fab13a7c54b8e69ea3bb27067eb06aba5f19b5.zip
Merge branch 'for-linus' into for-next
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb')
-rw-r--r--sound/usb/mixer_us16x08.c2
-rw-r--r--sound/usb/stream.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/sound/usb/mixer_us16x08.c b/sound/usb/mixer_us16x08.c
index 92b1a6d9c931..bd63a9ce6a70 100644
--- a/sound/usb/mixer_us16x08.c
+++ b/sound/usb/mixer_us16x08.c
@@ -607,7 +607,7 @@ static int snd_us16x08_eq_put(struct snd_kcontrol *kcontrol,
static int snd_us16x08_meter_info(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo)
{
- uinfo->count = 1;
+ uinfo->count = 34;
uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
uinfo->value.integer.max = 0x7FFF;
uinfo->value.integer.min = 0;
diff --git a/sound/usb/stream.c b/sound/usb/stream.c
index 7f58c7625cd4..ee9aa1dcf0d8 100644
--- a/sound/usb/stream.c
+++ b/sound/usb/stream.c
@@ -192,16 +192,16 @@ static int usb_chmap_ctl_get(struct snd_kcontrol *kcontrol,
struct snd_pcm_chmap *info = snd_kcontrol_chip(kcontrol);
struct snd_usb_substream *subs = info->private_data;
struct snd_pcm_chmap_elem *chmap = NULL;
- int i;
+ int i = 0;
- memset(ucontrol->value.integer.value, 0,
- sizeof(ucontrol->value.integer.value));
if (subs->cur_audiofmt)
chmap = subs->cur_audiofmt->chmap;
if (chmap) {
for (i = 0; i < chmap->channels; i++)
ucontrol->value.integer.value[i] = chmap->map[i];
}
+ for (; i < subs->channels_max; i++)
+ ucontrol->value.integer.value[i] = 0;
return 0;
}