Commit graph

125 commits

Author SHA1 Message Date
Stephen Warren
0a4b1ee746 UCM: Fix deadlock following failed get _verb
When querying the current verb without a verb set, snd_use_case_get bails
out early without unlocking uc_mgr->mutex. This causes subsequent API calls
to hang. Instead, s/return/goto __end/.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2011-06-03 11:45:17 +02:00
Baek Chang
516569bbba UCM: fix memory leak when executing cset commands
fix memory leak when executing cset commands.
snd_ctl_elem's are allocated, but never free'ed

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-05-04 09:21:34 +02:00
Jaroslav Kysela
e419f63960 UCM: Fix LGPL licence ("how to receive" part referred GPL instead LGPL)
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2011-03-28 11:06:33 +02:00
Jaroslav Kysela
f2912f5099 UCM: Fix empty get_list - initialize returned pointer to NULL
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2011-03-19 01:09:41 +01:00
Jaroslav Kysela
60397387ef UCM: comment fixes and fix myvalue initialization fix in add_values()
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2011-03-19 00:54:43 +01:00
Margarita Olaya
ae0a44c628 alsa-lib: ucm: allow values to be read from devices
This allows devices value to be read using the get_value().
Also fix a little formatting.

Signed-off-by: Margarita Olaya Cabrera <magi@slimlogic.co.uk>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-18 18:28:07 +01:00
Jaroslav Kysela
038eaa429b ucm: add more error messages for cdev and cset commands
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2011-01-31 15:06:03 +01:00
Jaroslav Kysela
37c7e2843f ucm: allow bind modifier to specific instances, other fixes
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2011-01-31 14:24:19 +01:00
Liam Girdwood
a618cdf057 ucm: fix switch device & modifier when no transition is found
Fix some logic bugs in switch device and switch modifier when
transition sequences are not found. Also fix check for new device.

Reported-by: w0806.kim@samsung.com
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-01-11 19:05:40 +01:00
Liam Girdwood
df760d8b31 ucm: fix handling of cset with spaces in the control name
Always terminate the cset command based on the last space found within the
cset command since the control name may contain spaces.
2010-12-22 08:06:28 +01:00
Liam Girdwood
eba5471819 ucm: only select modifier when supported device is enabled
Make sure the supported device of a modifier is enabled before
we enable the modifier.

Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-22 08:06:16 +01:00
Liam Girdwood
265cf2c3ee ucm: implement basic script exec functionality
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-22 08:06:08 +01:00
Liam Girdwood
116fabd603 ucm: check the correct return value for modifier
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-22 08:05:57 +01:00
Liam Girdwood
ebb52f6911 ucm: check for valid value list before dereference.
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-22 08:05:50 +01:00
Liam Girdwood
6cda65ba98 ucm: remove unused code.
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-22 08:05:44 +01:00
Liam Girdwood
02bc123aae ucm: make sure active modifier and device lists are initialised
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2010-12-22 08:05:36 +01:00
Jaroslav Kysela
7d3de218ce ucm: initial implementation for cdev/cset
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-11-29 17:33:27 +01:00
Jaroslav Kysela
d8b7816196 ucm: add ValueDefaults section to the master file
- the get_value() function is recoded (tries to find the value in
  parent's list)

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-11-29 15:41:34 +01:00
Jaroslav Kysela
aaf55f1641 ucm: add cdev
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-11-23 15:58:14 +01:00
Jaroslav Kysela
cdc9dd50bf ucm: fix parser for sequences and fix wrong strcmp
The sequences are not parsed correctly. First cfg value is the command
and second value is the command argument.

Also, fix strcmp calls in ucm/main.c (reported by
abraham duenas <aduejazz@gmail.com>).

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-11-10 16:06:29 +01:00
Jaroslav Kysela
e820866637 ucm: implemented card list feature
- also added some test files to test/ucm tree

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-10-13 11:48:52 +02:00
Jaroslav Kysela
3a34394508 ucm: unify snd_use_case_geti(), add snd_use_case_card_list() template
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-10-12 13:29:05 +02:00
Jaroslav Kysela
6c6dc230bc ucm: added implementation for other ucm parts, only card name list is missing
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-09-22 15:35:11 +02:00
Jaroslav Kysela
404cd090b2 ucm: Introduce "Value {}" section, more implementation work
- new "Value {}" section is introduced for read-only values
  describing the PCM and control/mixer IDs (or any other
  things)
- more complete implementation for API functions

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-09-22 14:31:15 +02:00
Jaroslav Kysela
1c79fad969 ucm: Moved ucm to src/ucm subdirectory
- separate code to more files
- use standard lists to represent structures
- use alsa-lib configuration parser

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-09-15 08:09:31 +02:00