Skip to content

Commit 027bbc1

Browse files
eldadtiwai
authored andcommitted
ALSA: usb-audio: show err in set_sample_rate_v2 debug
Show the error code returned from the USB subsystem in the debug messages. Signed-off-by: Eldad Zack <eldad@fogrefinery.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
1 parent ef02e29 commit 027bbc1

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎sound/usb/clock.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -331,8 +331,8 @@ static int get_sample_rate_v2(struct snd_usb_audio *chip, int iface,
331331
snd_usb_ctrl_intf(chip) | (clock << 8),
332332
&data, sizeof(data));
333333
if (err < 0) {
334-
snd_printk(KERN_WARNING "%d:%d:%d: cannot get freq (v2)\n",
335-
dev->devnum, iface, altsetting);
334+
snd_printk(KERN_WARNING "%d:%d:%d: cannot get freq (v2): err %d\n",
335+
dev->devnum, iface, altsetting, err);
336336
return 0;
337337
}
338338

@@ -360,8 +360,8 @@ static int set_sample_rate_v2(struct snd_usb_audio *chip, int iface,
360360
UAC2_CS_CONTROL_SAM_FREQ << 8,
361361
snd_usb_ctrl_intf(chip) | (clock << 8),
362362
&data, sizeof(data))) < 0) {
363-
snd_printk(KERN_ERR "%d:%d:%d: cannot set freq %d (v2)\n",
364-
dev->devnum, iface, fmt->altsetting, rate);
363+
snd_printk(KERN_ERR "%d:%d:%d: cannot set freq %d (v2): err %d\n",
364+
dev->devnum, iface, fmt->altsetting, rate, err);
365365
return err;
366366
}
367367

0 commit comments

Comments
 (0)