Skip to content

Commit

Permalink
ALSA: usb-audio: show err in set_sample_rate_v2 debug
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
eldad authored and tiwai committed Apr 4, 2013
1 parent ef02e29 commit 027bbc1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions sound/usb/clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -331,8 +331,8 @@ static int get_sample_rate_v2(struct snd_usb_audio *chip, int iface,
snd_usb_ctrl_intf(chip) | (clock << 8),
&data, sizeof(data));
if (err < 0) {
snd_printk(KERN_WARNING "%d:%d:%d: cannot get freq (v2)\n",
dev->devnum, iface, altsetting);
snd_printk(KERN_WARNING "%d:%d:%d: cannot get freq (v2): err %d\n",
dev->devnum, iface, altsetting, err);
return 0;
}

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

Expand Down

0 comments on commit 027bbc1

Please sign in to comment.