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

Commit 20a5bac5 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "hal: audio-test: remove code sections referring to audio-alsa"

parents 1d741bd8 ddd67d43
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -50,7 +50,6 @@ include $(CLEAR_VARS)

mm-aac-enc-test-inc    := $(LOCAL_PATH)/inc
mm-aac-enc-test-inc    += $(LOCAL_PATH)/test
mm-aac-enc-test-inc    += $(TARGET_OUT_HEADERS)/mm-audio/audio-alsa
mm-aac-enc-test-inc    += $(TARGET_OUT_HEADERS)/mm-core/omxcore

LOCAL_MODULE            := mm-aenc-omxaac-test
@@ -60,7 +59,6 @@ LOCAL_C_INCLUDES := $(mm-aac-enc-test-inc)
LOCAL_PRELINK_MODULE    := false
LOCAL_SHARED_LIBRARIES  := libmm-omxcore
LOCAL_SHARED_LIBRARIES  += libOmxAacEnc
LOCAL_SHARED_LIBRARIES  += libaudioalsa
LOCAL_SRC_FILES         := test/omx_aac_enc_test.c

include $(BUILD_EXECUTABLE)
+0 −50
Original line number Diff line number Diff line
@@ -56,9 +56,6 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <pthread.h>
#include "QOMX_AudioExtensions.h"
#include "QOMX_AudioIndexExtensions.h"
#ifdef AUDIOV2 
#include "control.h" 
#endif
#include <linux/ioctl.h>

typedef unsigned char uint8;
@@ -82,14 +79,6 @@ void audaac_rec_install_bits
void audaac_rec_install_adts_header_variable (uint16  byte_num);
void Release_Encoder();

#ifdef AUDIOV2
unsigned short session_id;
int device_id;
int control = 0;
const char *device="handset_tx";
#define DIR_TX 2
#endif

#define AACHDR_LAYER_SIZE             2
#define AACHDR_CRC_SIZE               1
#define AAC_PROFILE_SIZE              2
@@ -705,22 +694,6 @@ int main(int argc, char **argv)
                DEBUG_PRINT ("\nOMX_FreeHandle error. Error code: %d\n", result);
            }
            /* Deinit OpenMAX */
            if(tunnel)
            {
                #ifdef AUDIOV2
                if (msm_route_stream(DIR_TX,session_id,device_id, 0))
                {
                    DEBUG_PRINT("\ncould not set stream routing\n");
                    return -1;
                }
                if (msm_en_device(device_id, 0))
                {
                    DEBUG_PRINT("\ncould not enable device\n");
                    return -1;
                }
                msm_mixer_close();
                #endif
            }
            OMX_Deinit();
            ebd_cnt=0;
            bOutputEosReached = false;
@@ -898,29 +871,6 @@ int Play_Encoder()
    OMX_SetParameter(aac_enc_handle,OMX_IndexParamAudioAac,&aacparam);
    OMX_GetExtensionIndex(aac_enc_handle,"OMX.Qualcomm.index.audio.sessionId",&index);
    OMX_GetParameter(aac_enc_handle,index,&streaminfoparam);
    if(tunnel)
    {
    #ifdef AUDIOV2
    session_id = streaminfoparam.sessionId;
    control = msm_mixer_open("/dev/snd/controlC0", 0);
    if(control < 0)
    printf("ERROR opening the device\n");
    device_id = msm_get_device(device);
    DEBUG_PRINT ("\ndevice_id = %d\n",device_id);
    DEBUG_PRINT("\nsession_id = %d\n",session_id);
    if (msm_en_device(device_id, 1))
    {
        perror("could not enable device\n");
        return -1;
    }

    if (msm_route_stream(DIR_TX,session_id,device_id, 1))
    {
        perror("could not set stream routing\n");
        return -1;
    }
    #endif
    }
    DEBUG_PRINT ("\nOMX_SendCommand Encoder -> IDLE\n");
    OMX_SendCommand(aac_enc_handle, OMX_CommandStateSet, OMX_StateIdle,0);
    /* wait_for_event(); should not wait here event complete status will
+0 −2
Original line number Diff line number Diff line
@@ -52,7 +52,6 @@ mm-amr-enc-test-inc := $(LOCAL_PATH)/inc
mm-amr-enc-test-inc    += $(LOCAL_PATH)/test

mm-amr-enc-test-inc    += $(TARGET_OUT_HEADERS)/mm-core/omxcore
mm-amr-enc-test-inc    += $(TARGET_OUT_HEADERS)/mm-audio/audio-alsa
LOCAL_MODULE            := mm-aenc-omxamr-test
LOCAL_MODULE_TAGS       := optional
LOCAL_CFLAGS            := $(libOmxAmrEnc-def)
@@ -60,7 +59,6 @@ LOCAL_C_INCLUDES := $(mm-amr-enc-test-inc)
LOCAL_PRELINK_MODULE    := false
LOCAL_SHARED_LIBRARIES  := libmm-omxcore
LOCAL_SHARED_LIBRARIES  += libOmxAmrEnc
LOCAL_SHARED_LIBRARIES  += libaudioalsa
LOCAL_SRC_FILES         := test/omx_amr_enc_test.c

include $(BUILD_EXECUTABLE)
+0 −49
Original line number Diff line number Diff line
@@ -57,10 +57,6 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <pthread.h>
#include "QOMX_AudioExtensions.h"
#include "QOMX_AudioIndexExtensions.h"
#ifdef AUDIOV2
#include "control.h"
#endif


#include <linux/ioctl.h>

@@ -72,14 +68,6 @@ QOMX_AUDIO_STREAM_INFO_DATA streaminfoparam;
/* maximum ADTS frame header length                */
void Release_Encoder();

#ifdef AUDIOV2
unsigned short session_id;
int device_id;
int control = 0;
const char *device="handset_tx";
#define DIR_TX 2
#endif

uint32_t samplerate = 8000;
uint32_t channels = 1;
uint32_t bandmode = 7;
@@ -635,22 +623,6 @@ int main(int argc, char **argv)
            }

            /* Deinit OpenMAX */
        if(tunnel)
        {
            #ifdef AUDIOV2
            if (msm_route_stream(DIR_TX,session_id,device_id, 0))
            {
                DEBUG_PRINT("\ncould not set stream routing\n");
                return -1;
            }
            if (msm_en_device(device_id, 0))
            {
                DEBUG_PRINT("\ncould not enable device\n");
                return -1;
            }
            msm_mixer_close();
            #endif
        }
            OMX_Deinit();
            ebd_cnt=0;
            bOutputEosReached = false;
@@ -830,27 +802,6 @@ int Play_Encoder()
    OMX_SetParameter(amr_enc_handle,OMX_IndexParamAudioAmr,&amrparam);
    OMX_GetExtensionIndex(amr_enc_handle,"OMX.Qualcomm.index.audio.sessionId",&index);
    OMX_GetParameter(amr_enc_handle,index,&streaminfoparam);
    if(tunnel) {
    #ifdef AUDIOV2
    session_id = streaminfoparam.sessionId;
    control = msm_mixer_open("/dev/snd/controlC0", 0);
    if(control < 0)
    printf("ERROR opening the device\n");
    device_id = msm_get_device(device);
    DEBUG_PRINT ("\ndevice_id = %d\n",device_id);
    DEBUG_PRINT("\nsession_id = %d\n",session_id);
    if (msm_en_device(device_id, 1))
    {
        perror("could not enable device\n");
        return -1;
    }
    if (msm_route_stream(DIR_TX,session_id,device_id, 1))
    {
        perror("could not set stream routing\n");
        return -1;
    }
    #endif
    }

    DEBUG_PRINT ("\nOMX_SendCommand Encoder -> IDLE\n");
    OMX_SendCommand(amr_enc_handle, OMX_CommandStateSet, OMX_StateIdle,0);
+0 −2
Original line number Diff line number Diff line
@@ -51,7 +51,6 @@ include $(CLEAR_VARS)
mm-evrc-enc-test-inc    := $(LOCAL_PATH)/inc
mm-evrc-enc-test-inc    += $(LOCAL_PATH)/test
mm-evrc-enc-test-inc    += $(TARGET_OUT_HEADERS)/mm-core/omxcore
mm-evrc-enc-test-inc     += $(TARGET_OUT_HEADERS)/mm-audio/audio-alsa
LOCAL_MODULE            := mm-aenc-omxevrc-test
LOCAL_MODULE_TAGS       := optional
LOCAL_CFLAGS            := $(libOmxEvrcEnc-def)
@@ -59,7 +58,6 @@ LOCAL_C_INCLUDES := $(mm-evrc-enc-test-inc)
LOCAL_PRELINK_MODULE    := false
LOCAL_SHARED_LIBRARIES  := libmm-omxcore
LOCAL_SHARED_LIBRARIES  += libOmxEvrcEnc
LOCAL_SHARED_LIBRARIES  += libaudioalsa
LOCAL_SRC_FILES         := test/omx_evrc_enc_test.c

include $(BUILD_EXECUTABLE)
Loading