提交 ff2a8c53 编写于 作者: S Saranya Gopal 提交者: Greg Kroah-Hartman

usbcore: Select only first configuration for non-UAC3 compliant devices

In most of the UAC1 and UAC2 audio devices, the first
configuration is most often the best configuration.
However, with recent patch to support UAC3 configuration,
second configuration was unintentionally chosen for
some of the UAC1/2 devices that had more than one
configuration. This was because of the existing check
after the audio config check which selected any config
which had a non-vendor class. This patch fixes this issue.

Fixes: f13912d3 ("usbcore: Select UAC3 configuration for audio if present")
Reported-by: NCon Kolivas <kernel@kolivas.org>
Signed-off-by: NSaranya Gopal <saranya.gopal@intel.com>
Tested-by: NCon Kolivas <kernel@kolivas.org>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 0a99cc4b
......@@ -143,9 +143,12 @@ int usb_choose_configuration(struct usb_device *udev)
continue;
}
if (i > 0 && desc && is_audio(desc) && is_uac3_config(desc)) {
best = c;
break;
if (i > 0 && desc && is_audio(desc)) {
if (is_uac3_config(desc)) {
best = c;
break;
}
continue;
}
/* From the remaining configs, choose the first one whose
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册