ALSA: usb-audio: Limit retrying sample rate reads

There are many USB audio devices with buggy firmware that don't react
with the sample rate reading properly.  This often results in the
flood of error messages and slowing down the operation.

The sample rate read back is basically only for confirming the sample
rate setup, and it's not critically important.  As a compromise, in
this patch, we stop the sample rate read back once when the device
gives errors more than tolerance (twice, as of now).  This should
improve most of error cases while we still can catch the firmware
bugginess.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
Takashi Iwai
2016-04-29 11:49:04 +02:00
والد a33d595996
کامیت 57dd5414a0
2فایلهای تغییر یافته به همراه5 افزوده شده و 0 حذف شده

مشاهده پرونده

@@ -50,6 +50,7 @@ struct snd_usb_audio {
int num_interfaces;
int num_suspended_intf;
int sample_rate_read_error;
struct list_head pcm_list; /* list of pcm streams */
struct list_head ep_list; /* list of audio-related endpoints */