summaryrefslogtreecommitdiffstats
path: root/alsa-binding/Alsa-SetGet.c
AgeCommit message (Collapse)AuthorFilesLines
2019-01-25Rework ALSA control set/get functionhalibut_7.90.0halibut/7.90.07.90.0Jonathan Aillet1-80/+134
Rework ALSA control set/get function to : - Improve malformed JSON request detection. - Optimize execution when an array of control to set/get is received. - Send back error when the control is not found (instead of a warning). - Send back errors when an error happened during call to ALSA set/get functions (instead of warnings). Change-Id: Id3c0092bfb50979cbec048fa431d989c3c34db33 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2019-01-25Improve prints when setting values of controlJonathan Aillet1-3/+8
Improve prints when setting values of control by : - Increasing print level of error print - Printing more information when sent values array is not corresponding to the number of values of the control. Change-Id: I1ffe4bce78921e885da9dced21bd3bbb4e1c2aa6 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2019-01-25Send back cardid only if request is validJonathan Aillet1-7/+9
When trying to get information about ALSA card, fail if request JSON is malformed. However, send back information about all ALSA cards when no request JSON has been transfered. Change-Id: I2d45abb59d00cea27bfb09e74b15cc82cf84a086 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-12-20alsaSetGetCtls: fixed a memory leakguppy_6.99.4guppy_6.99.3guppy/6.99.4guppy/6.99.36.99.46.99.3Thierry Bultel1-2/+5
By reading the sources of libasound, snd_ctl_elem_list_alloc_space needs a snd_ctl_elem_list_free_space to free the allocated memory Change-Id: I47280fa95c5a47a993c399329aaf655f8c83dd2a Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
2018-07-20Use some app-fwk macros to support v2 and v3Jonathan Aillet1-4/+8
Use some application framework macros to support both v2 and v3 compilation. Change-Id: I3051bbeff8788ea2c71545e5d253619d4749ff41 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-07-20Use app-fwk macro to get verbosity levelJonathan Aillet1-1/+1
Use application framework macro to get verbosity level instead of a legacy function. Change-Id: I925b2ccea3c7d58bc50281eb8d39f82dac1f49b4 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-07-20Correct warning that was raised at compilationJonathan Aillet1-4/+4
Correct warning that was raised at compilation concerning 3 subjects : - Too short strings for 'snprintf'. - Forget cast returns of 'json_object_array_length' function. - Checking return of 'asprintf' function. Change-Id: I0fc702750841a0f8da921c3c3b1453c5afee0fd8 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-06-26Fixed crash when 'set' request is based on numidsflounder_5.99.1flounder/5.99.15.99.1Thierry Bultel1-3/+10
When numids are given, the 'tag' field is not initialized to NULL, and leads to a crash on strcasecmp. Change-Id: I23a1552bba565259280140a5e099be10613ab1bc Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
2018-06-06Add an option to 'ctlget' verbJonathan Aillet1-1/+11
Add a new way to ask for alsa controls info by implementing the possibility to ask for alsa control using its label. It is a clean way to get control numid using control label. Bug-AGL: SPEC-1405 Change-Id: If5387c63a41a07d451a21edab86e9bb90b4908c4 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2018-06-06Add an option to 'infoget' verbJonathan Aillet1-20/+70
Add a new way to get card info when using 'infoget' verb : When the request contains a section 'devpath', the path specified will be used to search for the device. Bug-AGL: SPEC-1405 Change-Id: Idc99a27229f0db3484f62f8f761b7e0daee13a3c Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
2017-11-02Fix FD leaking on Alsa ControlFulup Ar Foll1-1/+3
2017-10-24Initial working version as independent repoFulup Ar Foll1-0/+815