Age | Commit message (Collapse) | Author | Files | Lines |
|
Add 'soundcard-added'/'soundcard-removed' application framework
events to be notified when ALSA card are added/removed.
Use subscribe verb and json '{ "devid" : "added" }' to subscribe
to added card events.
Use subscribe verb and json '{ "devid" : "removed" }' to subscribe
to removed card events.
Bug-AGL: SPEC-2749
Change-Id: Ia021d7f6984b2263a5011121a69f17bb4ee2bf9e
Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
|
|
Make a function to get card number from card path, will be needed to
for added/removed card events.
Bug-AGL: SPEC-2749
Change-Id: Ic0cc6fd84a54432c696892772f2f66d1bde59a65
Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
|
|
Declare 'getCardInfo' function as public, will be needed to
get information about added/removed card events.
Bug-AGL: SPEC-2749
Change-Id: Ic23542a64e92fd2b3f91853a968b3feff5b76cc5
Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
|
|
Rework ALSA card control events subscription and handling to:
- Clean unnecessary part of codes.
- Increase reliability of ALSA control events polling callback.
Bug-AGL: SPEC-2749
Change-Id: I75dc90483254b1befdf83968c9032ec877c1d895
Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
|
|
When a audio card with control event generation is removed,
avoid epoll errors to be fired indefinitely by event loop.
Bug-AGL: SPEC-2749
Change-Id: I65dddc2f9714fa2303773b212bc3cad7cb164d73
Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
|
|
Minor syntax changes in get card info functions.
Bug-AGL: SPEC-2749
Change-Id: I90c896618fca73dbae9e51ff996ac5613713d7b6
Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
|
|
Rework ALSA card get info function to :
- Be able to probe an ALSA card depending on multiple parameters
(card number, card path, card id, card short name, card long name,
card driver, card mixer name, card components). If several parameters
are requested, all should be true to find a corresponding card.
- Be able to add parameters about a playback device depending on
multiple parameters (device number, device id, device name).
The combination of all card parameters and all device parameters
should be true to find a corresponding card/device.
- If a corresponding card/device is found, information about it
will be returned as a json object.
- If multiple card/device are corresponding to the request,
all cards information will be returned in a json array.
- If no request json is available, all cards information
will be returned (using a json array).
- Add the possibility to ask for multiple card/device in one verb
call using a json array in request json. Each case will be handled
as an individual request. The response will be an array of the same
length as the request json, with each response case corresponding
to the request case.
Change-Id: Ia71e40ce10c8bb10d51099832748c5621d202647
Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
|
|
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>
|
|
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>
|
|
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>
|
|
Improve ALSA control creation by :
- Checking supported controls type at function start.
- Prevent segfault when a none INTEGER control is updated.
Change-Id: Icbff18ec6fc6c35938bf2945edc27c36fecf99d1
Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
|
|
Fix dbScale generation when a custom INTEGER ALSA control is added.
Change-Id: I935de59d1ca30466c071972939c8ef200007ceb3
Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
|
|
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>
|
|
Bug-AGL SPEC-1682
Change-Id: Ic4a8925d8be17ab6d53d18ca8abaf99ce348ded8
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
|
|
Use some application framework macros to support both
v2 and v3 compilation.
Change-Id: I3051bbeff8788ea2c71545e5d253619d4749ff41
Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
|
|
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>
|
|
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>
|
|
Set application framework binding version in cmake instead of
setting it before including binding header.
Change-Id: Ic841069248d40fdd023c8056a614e484004be298
Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
|
|
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>
|
|
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>
|
|
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>
|
|
Handle volume in dB instead of absolute value.
Allows a more natural augmentation/diminution of volume.
Bug-AGL: SPEC-1405
Change-Id: If186c826e7008283f7c05599efa6158ac613a380
Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
|
|
When 'ping' verb is called, be sure that we won't generate a segfault
by using 'json_object_get' before responding.
Bug-AGL: SPEC-1405
Change-Id: I22fb8e1e492a33e7310d009998fd3c72383e702d
Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
|
|
Signed-off-by: Fulup Ar Foll <fulup@iot.bzh>
|
|
|
|
|
|
Change HAL register to fallback to driver name when not direct match found
|
|
|
|
|
|
|
|
Change-Id: I0c29015e252d1091a9350fc85e05c1a444bb7579
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
|
|
Change-Id: Ia1a2ed447fd9b5831eec58606a0f7694e6569017
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
|
|
|