summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJonathan Aillet <jonathan.aillet@iot.bzh>2019-05-23 12:01:46 +0200
committerJonathan Aillet <jonathan.aillet@iot.bzh>2019-05-24 16:34:45 +0200
commite20fca4d144c431dd58face1be7d996ce15815f1 (patch)
treea0fe1c914823b5f10fb66d35fdc0799db4d75e92 /lib
parente5d4099e2274288b02c065975130541ec4fd9015 (diff)
Remove obsolete links to softmixer controls
Remove obsolete links to playbacks/captures softmixer controls. These links are not used anymore (only 'halmap' controls are used). It also means that references to controls in 'halmixer' section of json configuration files must be removed (as it's done for example json configuration file in this commit). BUG-AGL : SPEC-2329 Change-Id: Ic5a7f055d09b44021d817c04d56023fed3c0e478 Signed-off-by: Jonathan Aillet <jonathan.aillet@iot.bzh>
Diffstat (limited to 'lib')
-rw-r--r--lib/4a-hal-utilities/4a-hal-utilities-data.c2
-rw-r--r--lib/4a-hal-utilities/4a-hal-utilities-data.h3
-rw-r--r--lib/4a-hal-utilities/4a-hal-utilities-hal-streams-handler.c36
-rw-r--r--lib/4a-hal-utilities/4a-hal-utilities-hal-streams-handler.h6
4 files changed, 3 insertions, 44 deletions
diff --git a/lib/4a-hal-utilities/4a-hal-utilities-data.c b/lib/4a-hal-utilities/4a-hal-utilities-data.c
index 8f30596..10fdf27 100644
--- a/lib/4a-hal-utilities/4a-hal-utilities-data.c
+++ b/lib/4a-hal-utilities/4a-hal-utilities-data.c
@@ -219,8 +219,6 @@ int HalUtlRemoveSelectedHalFromList(struct HalData **halDataList, struct HalData
free(matchingHal->internalHalData->prefix);
HalUtlRemoveAllMixerData(&matchingHal->internalHalData->streamsData);
- HalUtlRemoveAllMixerData(&matchingHal->internalHalData->playbacksData);
- HalUtlRemoveAllMixerData(&matchingHal->internalHalData->capturesData);
HalUtlFreeAlsaCtlsMap(matchingHal->internalHalData->alsaMapT);
diff --git a/lib/4a-hal-utilities/4a-hal-utilities-data.h b/lib/4a-hal-utilities/4a-hal-utilities-data.h
index a782417..b3874e7 100644
--- a/lib/4a-hal-utilities/4a-hal-utilities-data.h
+++ b/lib/4a-hal-utilities/4a-hal-utilities-data.h
@@ -56,9 +56,6 @@ struct InternalHalData {
struct InternalHalMixerData *streamsData;
afb_event_t streamUpdates;
- struct InternalHalMixerData *playbacksData;
- struct InternalHalMixerData *capturesData;
-
struct InternalHalAlsaMapT *alsaMapT;
afb_api_t apiHandle;
diff --git a/lib/4a-hal-utilities/4a-hal-utilities-hal-streams-handler.c b/lib/4a-hal-utilities/4a-hal-utilities-hal-streams-handler.c
index c38bfdd..806387a 100644
--- a/lib/4a-hal-utilities/4a-hal-utilities-hal-streams-handler.c
+++ b/lib/4a-hal-utilities/4a-hal-utilities-hal-streams-handler.c
@@ -103,8 +103,6 @@ void HalUtlActionOnMixer(afb_req_t request, enum ActionOnMixerType actionType)
count = 1;
break;
- case ACTION_ON_MIXER_PLAYBACK:
- case ACTION_ON_MIXER_CAPTURE:
case ACTION_ON_MIXER_ALL_STREAM:
count = (int) HalUtlGetNumberOfMixerDataInList(&currentMixerData);
toReturnJ = json_object_new_object();
@@ -163,10 +161,8 @@ void HalUtlActionOnMixer(afb_req_t request, enum ActionOnMixerType actionType)
}
// TBD JAI : When mixer events will be available, use them instead of generating events at calls
- if((actionType == ACTION_ON_MIXER_STREAM ||
- actionType == ACTION_ON_MIXER_ALL_STREAM) &&
- ((! currentMixerData->event) ||
- (afb_event_push(currentMixerData->event, json_object_get(responseJ)) < 0))) {
+ if(! currentMixerData->event ||
+ (afb_event_push(currentMixerData->event, json_object_get(responseJ)) < 0)) {
AFB_API_ERROR(apiHandle, "Could not generate an event for stream %s", currentMixerData->verb);
}
@@ -175,12 +171,6 @@ void HalUtlActionOnMixer(afb_req_t request, enum ActionOnMixerType actionType)
toReturnJ = responseJ;
break;
- case ACTION_ON_MIXER_PLAYBACK:
- case ACTION_ON_MIXER_CAPTURE:
- json_object_object_add(toReturnJ, currentMixerData->verbToCall, responseJ);
- currentMixerData = currentMixerData->next;
- break;
-
case ACTION_ON_MIXER_ALL_STREAM:
json_object_object_add(toReturnJ, currentMixerData->verb, responseJ);
currentMixerData = currentMixerData->next;
@@ -200,18 +190,6 @@ void HalUtlActionOnMixer(afb_req_t request, enum ActionOnMixerType actionType)
apiToCall);
break;
- case ACTION_ON_MIXER_PLAYBACK:
- afb_req_success(request,
- toReturnJ,
- "Actions correctly transferred to all playbacks without any error raised");
- break;
-
- case ACTION_ON_MIXER_CAPTURE:
- afb_req_success(request,
- toReturnJ,
- "Actions correctly transferred to all captures without any error raised");
- break;
-
case ACTION_ON_MIXER_ALL_STREAM:
afb_req_success(request,
toReturnJ,
@@ -228,16 +206,6 @@ void HalUtlActionOnStream(afb_req_t request)
HalUtlActionOnMixer(request, ACTION_ON_MIXER_STREAM);
}
-void HalUtlActionOnPlayback(afb_req_t request)
-{
- HalUtlActionOnMixer(request, ACTION_ON_MIXER_PLAYBACK);
-}
-
-void HalUtlActionOnCapture(afb_req_t request)
-{
- HalUtlActionOnMixer(request, ACTION_ON_MIXER_CAPTURE);
-}
-
void HalUtlActionOnAllStream(afb_req_t request)
{
HalUtlActionOnMixer(request, ACTION_ON_MIXER_ALL_STREAM);
diff --git a/lib/4a-hal-utilities/4a-hal-utilities-hal-streams-handler.h b/lib/4a-hal-utilities/4a-hal-utilities-hal-streams-handler.h
index 204fe18..e6f0d99 100644
--- a/lib/4a-hal-utilities/4a-hal-utilities-hal-streams-handler.h
+++ b/lib/4a-hal-utilities/4a-hal-utilities-hal-streams-handler.h
@@ -27,15 +27,11 @@
// Enum for the type of action on mixer
enum ActionOnMixerType {
ACTION_ON_MIXER_STREAM = 1,
- ACTION_ON_MIXER_PLAYBACK = 2,
- ACTION_ON_MIXER_CAPTURE = 3,
- ACTION_ON_MIXER_ALL_STREAM = 4
+ ACTION_ON_MIXER_ALL_STREAM = 2
};
// Actions to be call when a stream verb is called
void HalUtlActionOnStream(afb_req_t request);
-void HalUtlActionOnPlayback(afb_req_t request);
-void HalUtlActionOnCapture(afb_req_t request);
void HalUtlActionOnAllStream(afb_req_t request);
// Add/Remove stream data and verb functions