You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
1.6 KiB
43 lines
1.6 KiB
/*
|
|
* Copyright (c) Hisilicon Technologies Co., Ltd. Technologies Co., Ltd. 2020-2020. All rights reserved.
|
|
* Description: audio hal settings manage header file.
|
|
* Author: yinyingcai
|
|
* Create: 2020-05-11
|
|
* Notes: NA
|
|
* History: 2020-05-11 yinyingcai for CodingStyle
|
|
*/
|
|
#ifndef AUDIO_SETTING_H
|
|
#define AUDIO_SETTING_H
|
|
|
|
#include <stdlib.h>
|
|
|
|
#define MAX_SUPPORTED_EDID_NUM 16
|
|
#define MAX_SUPPORTED_SAMPLE_RATES_NUM 8
|
|
|
|
typedef struct {
|
|
int enAudFmtCode;
|
|
uint32_t enSupportSampleRate[MAX_SUPPORTED_SAMPLE_RATES_NUM];
|
|
uint32_t u32SupportSampleRateNum;
|
|
char u8AudChannel;
|
|
} EDID_AUDIO_INFO_S;
|
|
|
|
struct audio_setting {
|
|
uint32_t hdmiMode;
|
|
uint32_t spdifMode;
|
|
uint32_t Hbr2LbrMode;
|
|
EDID_AUDIO_INFO_S edidAudio[MAX_SUPPORTED_EDID_NUM];
|
|
uint32_t edidAudioNum;
|
|
char u8AudChannel;
|
|
uint32_t trueHDmaxChannel;
|
|
};
|
|
|
|
int initAndOpenHDMI(struct audio_setting *setting);
|
|
void deinit_and_close_hdmi(void);
|
|
int setSpdifMode(struct audio_setting *setting, uint32_t SpdifMode);
|
|
int setHdmiMode(struct audio_setting *setting, uint32_t HdmiMode);
|
|
int setHbr2LbrMode(struct audio_setting *setting, uint32_t Hbr2LbrMode);
|
|
void get_support_formats(struct audio_setting *setting, char* value, uint32_t length);
|
|
void get_support_channels(const struct audio_setting* setting, char* value, int targetFormat, uint32_t length);
|
|
void get_support_rates(const struct audio_setting* setting, char* value, int targetFormat, uint32_t length);
|
|
#endif
|