From 757c9b407938b65b1e31ccc62217910d4f942dcb Mon Sep 17 00:00:00 2001 From: Jonathan Aillet Date: Mon, 11 Jun 2018 01:45:57 +0200 Subject: Update 4a-hal to work with new 4a-softmixer Update 4a-hal to work with new 4a-softmixer version : - Update audio configuration files to match the configuration format expected by the mixer. - Parse mixer attach response to get information about 'streams', 'playbacks', and 'captures'. store them in new field of controller hal data structure. - Create verb for each returned stream, but only one playback/capture verb even if threre are multiple playbacks/captures returned by the mixer attch verb. - Return 'streams', 'playbacks', and 'captures' when info verb is called. - If info verb is called with a json request, the request is transfered to the mixer. Change-Id: I65593281c34aa91ad87afbf8bebff755cc5cc6d0 Signed-off-by: Jonathan Aillet --- 4a-hal/4a-hal-utilities/4a-hal-utilities-data.c | 3 ++- 4a-hal/4a-hal-utilities/4a-hal-utilities-data.h | 7 +++++-- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to '4a-hal/4a-hal-utilities') diff --git a/4a-hal/4a-hal-utilities/4a-hal-utilities-data.c b/4a-hal/4a-hal-utilities/4a-hal-utilities-data.c index e8f54a2..aa4fabc 100644 --- a/4a-hal/4a-hal-utilities/4a-hal-utilities-data.c +++ b/4a-hal/4a-hal-utilities/4a-hal-utilities-data.c @@ -42,7 +42,8 @@ uint8_t HalUtlRemoveAllCtlHalStreamsData(struct CtlHalMixerDataT *ctlHalStreamsD return -2; for(cpt = 0; cpt < ctlHalStreamsData->count; cpt++) { - free(ctlHalStreamsData->data[cpt].name); + free(ctlHalStreamsData->data[cpt].verb); + free(ctlHalStreamsData->data[cpt].verbToCall); free(ctlHalStreamsData->data[cpt].streamCardId); } diff --git a/4a-hal/4a-hal-utilities/4a-hal-utilities-data.h b/4a-hal/4a-hal-utilities/4a-hal-utilities-data.h index 244546f..c33f90d 100644 --- a/4a-hal/4a-hal-utilities/4a-hal-utilities-data.h +++ b/4a-hal/4a-hal-utilities/4a-hal-utilities-data.h @@ -38,7 +38,8 @@ enum HalStatus { // Structure to store stream data struct CtlHalMixerData { - char *name; + char *verb; + char *verbToCall; char *streamCardId; }; @@ -51,10 +52,12 @@ struct CtlHalMixerDataT { // Structure to store specific controller hal data struct CtlHalSpecificData { char *mixerApiName; - char *mixerVerbName; + char *prefix; json_object *halMixerJ; struct CtlHalMixerDataT ctlHalStreamsData; + struct CtlHalMixerDataT ctlHalPlaybacksData; + struct CtlHalMixerDataT ctlHalCapturesData; struct CtlHalAlsaMapT *ctlHalAlsaMapT; AFB_ApiT apiHandle; -- cgit