OSDN Git Service

ucm: Handle repeat device and modifier enables/disables
authorArun Raghavan <arun.raghavan@collabora.co.uk>
Wed, 23 May 2012 12:46:33 +0000 (18:16 +0530)
committerTakashi Iwai <tiwai@suse.de>
Tue, 29 May 2012 09:59:26 +0000 (11:59 +0200)
commite8923f2e7569cc390129572bfbd6552cbb407207
treed641a4879a154f657d6d77e8eae785b8ae95fc5b
parente4d9c348304880399e622d99d0177f434a517d88
ucm: Handle repeat device and modifier enables/disables

Currently, enabling a device twice can cause it to be added to
snd_use_case_mgr_t->active_devices twice, causing the list to become a
loop and subsequent uses to result in an infinite loop.

This patch makes sure we don't enable/disable a device twice, and avoid
doing the same for modifiers.

Signed-off-by: Arun Raghavan <arun.raghavan@collabora.co.uk>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
src/ucm/main.c