]> git.alsa-project.org Git - alsa-lib.git/commit
ucm: fix the logic of choosing the default cdev
authorTanu Kaskinen <tanu.kaskinen@linux.intel.com>
Tue, 17 Feb 2015 19:15:22 +0000 (21:15 +0200)
committerTakashi Iwai <tiwai@suse.de>
Tue, 17 Feb 2015 21:15:53 +0000 (22:15 +0100)
commita102e66440c7579e9a82ee869b7dc7a53393e3df
tree34ffd5bdc05f4c173212d263dc59d9dfda9f8020
parent1dd239b781402d21aa84ff9783926bb972547595
ucm: fix the logic of choosing the default cdev

If the cdev has not been configured explicitly, use the PlaybackCTL
or CaptureCTL value if one of them is set. If neither are set, or if
both are set to different values, then there's no sensible default, so
executing the sequence should fail. The previous code probably tried
to implement this logic, but it was buggy.

Also use more descriptive variable names than "cdev1" and "cdev2".

Signed-off-by: Tanu Kaskinen <tanu.kaskinen@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
src/ucm/main.c