summaryrefslogtreecommitdiff
path: root/src/control/ctlparse.c
Commit message (Collapse)AuthorAgeFilesLines
* control: snd_ctl_ascii_elem_id_get() - do not show unset numidJaroslav Kysela2021-02-261-6/+11
| | | | Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* control: ctlparse - fix enum values in '' or ""Jaroslav Kysela2020-07-271-11/+15
| | | | | | | | This comit fixes the enum value string parser (fixes aaf3a081bff1cc85635f7a3c3d4287c4addbbd84). BugLink: https://github.com/alsa-project/alsa-ucm-conf/pull/40 Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* control: ctlparse - use type-specific bound on element countJohn Keeping2020-06-161-1/+23
| | | | | | | | | | | | Using a fixed bound of 128 means that too many values may be set for an INTEGER64 type and that any elements past 128 are out of reach for BYTE type controls. Derive the maximum number of elements from the type so that the full range is parsed for all types. Signed-off-by: John Keeping <john@metanate.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* control: use more precise rounding in snd_ctl_ascii_value_parse()Jaroslav Kysela2020-06-051-8/+11
| | | | Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* control: ctlparse - accept enum values in '' or ""Jaroslav Kysela2019-11-281-2/+8
| | | | Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* Print unsigned ints with %u instead of %i. (snd_ctl_ascii_elem_id_get)Quipyowert22019-04-091-3/+3
| | | | | Signed-off-by: Nathan Mills <the.true.nathan.mills@gmail.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* Change FSF address (Franklin Street)Jaroslav Kysela2017-11-141-1/+1
| | | | Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* ctl: use automatic variable instead of call of alloca(3)Takashi Sakamoto2016-06-271-4/+3
| | | | | | | | | | | | | | | | Inner this library, layouts of all structures are public. At a compilation time, each size of the structures can be calculated. It means that we can use automatic variable instead of calling alloca(3) to program this library because in both ways storages are kept on stack frame of process VMA. Besides, the usage of automatic variables requires less instructions than calls of alloca(3). Furthermore, alloca(3) is not described in any C language standards. This commit replaces calls of alloca(3) just for structures with automatic variables, for control features. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* coverity fixesJaroslav Kysela2016-01-121-2/+2
|
* control: Allow cset'ing specific values in the multi-value caseTakashi Iwai2015-06-101-0/+3
| | | | | | | | | Improve the parser to allow empty elements followed by a comma. Now amixer works like below for setting only the third element. % amixer cset 'IIR1 Band1' ,,200 Reported-and-tested-by: Arun Raghavan <arun@accosted.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* control: enable octal and hexadecimal parseLu, Han2015-01-141-2/+2
| | | | | | | | Use zero-base for strtol(), so get_integer() and get_integer64() can parse decimal, octal and hexadecimal data from input string. Signed-off-by: Lu, Han <han.lu@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* control: enhance doc for snd_ctl_ascii_value_parse() functionJaroslav Kysela2013-04-111-0/+3
| | | | Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* all places: doxygen cleanupsJaroslav Kysela2013-04-081-0/+1
| | | | | | I see no errors with these changes using doxygen 1.8.1.1 . Signed-off-by: Jaroslav Kysela <perex@perex.cz>
* ucm: Improve cset command parsingTakashi Iwai2012-08-101-13/+33
| | | | | | | | | | | | The cset command parsing in ucm/main.c assumes implicitly that the argument contains no space, thus an example below wouldn't work: cset "name='Input Select' Digital Mic" This patch introduces a new internal API function __snd_ctl_ascii_elem_id_parse() to improve the cset parser. Reported-by: Tanu Kaskinen <tanu.kaskinen@digia.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ctlparse: Respect softfloat configure optionAlexander Stein2011-05-201-0/+9
| | | | | | | If we want softlfoat we can't use ceil which uses libm. Signed-off-by: Alexander Stein <a.stein@systec-electronic.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
* ucm: ctlparse - always terminate cset bufferLiam Girdwood2010-12-221-1/+1
| | | | Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
* control: add ASCII parsers from amixerJaroslav Kysela2010-11-041-0/+351
Signed-off-by: Jaroslav Kysela <perex@perex.cz>