sound: pcm_lib: fix unsorted list constraint handling
authorClemens Ladisch <clemens@ladisch.de>
Tue, 25 Aug 2009 06:15:41 +0000 (08:15 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 9 Sep 2009 03:16:56 +0000 (20:16 -0700)
commit4233307591d5a86c0712487b57a3939f9d31d8c9
tree7a1d71468d3a9777917cd9a48760ffa272cb92e8
parentd45bb9161000683a0f0e10dbca21a3a6f453a6e1
sound: pcm_lib: fix unsorted list constraint handling

commit b1ddaf681e362ed453182ddee1699d7487069a16 upstream.

snd_interval_list() expected a sorted list but did not document this, so
there are drivers that give it an unsorted list.  To fix this, change
the algorithm to work with any list.

This fixes the "Slave PCM not usable" error with USB devices that have
multiple alternate settings with sample rates in decreasing order, such
as the Philips Askey VC010 WebCam.

http://bugzilla.kernel.org/show_bug.cgi?id=14028

Reported-and-tested-by: Andrzej <adkadk@gmail.com>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
sound/core/pcm_lib.c