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 10:47:48 +0000 (12:47 +0200)
commit6610b57ed85ebe1fdc98a388e8a7984fc59d3bb4
tree60f0c9bff1e13cc8e3af8646659fdbdac949eab6
parente10c6705991d89209167e9929cec7d29a1941a51
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