/* * Copyright (C) 2025 Amlogic Corporation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef _AUDIO_MPEGH_H_ #define _AUDIO_MPEGH_H_ #ifdef __cplusplus extern "C" { #endif struct audio_stream_out; struct aml_audio_device; struct aml_audio_buffer; #define AML_MPEGH_AUDIO_LANG 0 #define AML_MPEGH_LABEL_LANG 1 #define AML_MPEGH_DRC_ATT 2 #define AML_MPEGH_ACCESSIBILITY 3 #define AML_MPEGH_DRC_EFFECT 4 #define AML_MPEGH_DRC_ALBUM 5 #define AML_MPEGH_DRC_BOOST 6 #define AML_MPEGH_TL 7 #define AML_MPEGH_PERSISTENCE_BUFSIZE 2048 #define AML_MPEGH_UIMANAGER_INPUT_FILE_DUMP_DIR "/data/vendor/audiohal/ui_manager_input.raw" #define AML_MPEGH_UIMANAGER_OUTPUT_FILE_DUMP_DIR "/data/vendor/audiohal/ui_manager_output.raw" #define AML_MPEGH_UI_MANAGER_SYSTEM_SETTING_NUM 8 typedef enum { MPEGH_UI_OK = 0, MPEGH_UI_OUT_OF_MEMORY, MPEGH_UI_BUFFER_TOO_SMALL, /* This error is not recoverable until a new RAP frame is processed. */ MPEGH_UI_INVALID_PARAM, MPEGH_UI_NOT_ALLOWED, MPEGH_UI_INVALID_STATE, MPEGH_UI_PARSE_ERROR, MPEGH_UI_OK_BUT_NO_VALID_DATA } MPEGH_UI_ERROR; int aml_mpegh_process(void **mpegh_uimanager_handle, struct audio_buffer *abuffer, int *asiupdate); int aml_mpegh_applyxmlaction (struct aml_audio_device *adev, char *xmlstr, int xmlsize); char *aml_mpegh_getxmlsceneinfo (struct aml_audio_device *adev); int set_mpegh_parameters(struct aml_audio_device *adev, struct str_parms *parms); int aml_mpegh_base64_encode(const unsigned char* input, int input_length, struct aml_audio_device *adev); int aml_mpegh_close(struct aml_audio_device *adev, void *handle); #ifdef __cplusplus } #endif #endif