Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e1315cf0 authored by Eric Laurent's avatar Eric Laurent
Browse files

New effect library API

Moved and renamed media/EffectApi.h to hardware/audio_effect.h
Modified the effect library API to expose a library info structure
containing an interface functions table.
Also removed enums for audio channels, audio format and devices
from effect API and use values from system/audio.h instead.

Modified effects factory to support new library interface format and
load libraries and efffects listed in audio_effects.conf file.
The file audio_effects.conf is first loaded from /vendor/etc and
then from /system/etc/audio_effects.conf if not found.

Modified existing effect libraries to implement the new library interface.

Change-Id: Ie52351e071b6d352fa2fbc06c3846686f8c45df9
parent a3e73df3
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -23,7 +23,7 @@
#include <media/IAudioFlinger.h>
#include <media/IEffect.h>
#include <media/IEffectClient.h>
#include <media/EffectApi.h>
#include <hardware/audio_effect.h>
#include <media/AudioSystem.h>

#include <utils/RefBase.h>
@@ -298,7 +298,7 @@ public:
     */
            int32_t     id() const { return mId; }

    /* Returns a descriptor for the effect (see effect_descriptor_t in EffectApi.h).
    /* Returns a descriptor for the effect (see effect_descriptor_t in audio_effect.h).
     */
            effect_descriptor_t descriptor() const;

@@ -324,7 +324,7 @@ public:
     *
     * Parameters:
     *      param:  pointer to effect_param_t structure containing the parameter
     *          and its value (See EffectApi.h).
     *          and its value (See audio_effect.h).
     * Returned status (from utils/Errors.h) can be:
     *  - NO_ERROR: successful operation.
     *  - INVALID_OPERATION: the application does not have control of the effect engine.
@@ -340,7 +340,7 @@ public:
     *
     * Parameters:
     *      param:  pointer to effect_param_t structure containing the parameter
     *          and its value (See EffectApi.h).
     *          and its value (See audio_effect.h).
     *
     * Returned status (from utils/Errors.h) can be:
     *  - NO_ERROR: successful operation.
@@ -368,7 +368,7 @@ public:
     *
     * Parameters:
     *      param:  pointer to effect_param_t structure containing the parameter
     *          and the returned value (See EffectApi.h).
     *          and the returned value (See audio_effect.h).
     *
     * Returned status (from utils/Errors.h) can be:
     *  - NO_ERROR: successful operation.
@@ -379,7 +379,7 @@ public:
     virtual status_t   getParameter(effect_param_t *param);

     /* Sends a command and receives a response to/from effect engine.
      *     See EffectApi.h for details on effect command() function, valid command codes
      *     See audio_effect.h for details on effect command() function, valid command codes
      *     and formats.
      */
     virtual status_t command(uint32_t cmdCode,

include/media/EffectApi.h

deleted100644 → 0
+0 −796

File deleted.

Preview size limit exceeded, changes collapsed.

+1 −1
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@
#ifndef ANDROID_EFFECTBASSBOOSTAPI_H_
#define ANDROID_EFFECTBASSBOOSTAPI_H_

#include <media/EffectApi.h>
#include <hardware/audio_effect.h>

#if __cplusplus
extern "C" {
+1 −1
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@
#ifndef ANDROID_EFFECTENVIRONMENTALREVERBAPI_H_
#define ANDROID_EFFECTENVIRONMENTALREVERBAPI_H_

#include <media/EffectApi.h>
#include <hardware/audio_effect.h>

#if __cplusplus
extern "C" {
+1 −1
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@
#ifndef ANDROID_EFFECTEQUALIZERAPI_H_
#define ANDROID_EFFECTEQUALIZERAPI_H_

#include <media/EffectApi.h>
#include <hardware/audio_effect.h>

#ifndef OPENSL_ES_H_
static const effect_uuid_t SL_IID_EQUALIZER_ = { 0x0bed4300, 0xddd6, 0x11db, 0x8f34, { 0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b } };
Loading