Hi, while trying to find out why a USB handset (Yealink P1K) frequently gets muted when changing volume, I found that short USB responses cause the problem.
The function get_ctl_value(..) in usbmixer.c requests the state of a certain control and retries up to 10 times if an error occurs. However a short USB response is not treated as an error as neither the transfer flag URB_SHORT_NOT_OK is set nor is the return value of snd_usb_ctl_msg(..) compared with the requested amount of data. As a result the function get_ctl_value(..) might not retry the USB request but returns an unpredictable result without reporting an error.
The attached patch forces the number of returned bytes to be at least val_len. It was generated from kernel version 2.6.21. If there are any issues with the patch please let me know. Otherwise I would be happy if it could be applied to the ALSA sources. Regards, -Thomas