diff mbox series

ALSA: usb-audio: US16x08: fix value count for level meters

Message ID 20201127132635.18947-1-marcan@marcan.st (mailing list archive)
State Accepted
Commit 402d5840b0d40a2a26c8651165d29b534abb6d36
Headers show
Series ALSA: usb-audio: US16x08: fix value count for level meters | expand

Commit Message

Hector Martin Nov. 27, 2020, 1:26 p.m. UTC
The level meter control returns 34 integers of info. This fixes:

snd-usb-audio 3-1:1.0: control 2:0:0:Level Meter:0: access overflow

Cc: stable@vger.kernel.org
Signed-off-by: Hector Martin <marcan@marcan.st>
---
 sound/usb/mixer_us16x08.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Takashi Iwai Nov. 27, 2020, 1:57 p.m. UTC | #1
On Fri, 27 Nov 2020 14:26:35 +0100,
Hector Martin wrote:
> 
> The level meter control returns 34 integers of info. This fixes:
> 
> snd-usb-audio 3-1:1.0: control 2:0:0:Level Meter:0: access overflow
> 
> Cc: stable@vger.kernel.org
> Signed-off-by: Hector Martin <marcan@marcan.st>

Thanks, applied now.


Takashi
diff mbox series

Patch

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;