ALSA: usb-audio: Skip bSynchAddress endpoint check if it is invalid
authorArd van Breemen <ard@kwaak.net>
Fri, 2 Aug 2019 11:52:14 +0000 (13:52 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 5 Oct 2019 11:09:37 +0000 (13:09 +0200)
commitca57eca32b3e1cd7c3d75389294dc198b904b34d
tree1fc8cdd01405c71a7e0d28ff03ea5f407c461f92
parentd76b5ac5016cd01939b18685981e17356a7e0a16
ALSA: usb-audio: Skip bSynchAddress endpoint check if it is invalid

[ Upstream commit 1b34121d9f26d272b0b2334209af6b6fc82d4bf1 ]

The Linux kernel assumes that get_endpoint(alts,0) and
get_endpoint(alts,1) are eachothers feedback endpoints.
To reassure that validity it will test bsynchaddress to comply with that
assumption. But if the bsyncaddress is 0 (invalid), it will flag that as
a wrong assumption and return an error.
Fix: Skip the test if bSynchAddress is 0.
Note: those with a valid bSynchAddress should have a code quirck added.

Signed-off-by: Ard van Breemen <ard@kwaak.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/usb/pcm.c