sound: pcm_lib: fix unsorted list constraint handling
commit05ef392f96688bb1e9628c821da3ea75dca38215
authorClemens Ladisch <clemens@ladisch.de>
Tue, 25 Aug 2009 06:15:41 +0000 (25 08:15 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 9 Sep 2009 03:33:23 +0000 (8 20:33 -0700)
treed0a5f459234ffe7e3dbdf2d20a7f8887176e3d36
parentcd88717a8a863f15762e9125636e123ec10f8f4f
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