/* SPDX-License-Identifier: GPL-2.0 */
/*
 * audio_output_control_impl.h  --  Mediatek Soundbar kcontrol
 *
 * Copyright (c) 2020 MediaTek Inc.
 * Author: Wen Cai <wen.cai@mediatek.com>
 *
 */
#ifndef _AUDIO_OUTPUT_CONTROL_IMPL_H_
#define _AUDIO_OUTPUT_CONTROL_IMPL_H_


#include <linux/types.h>
#include <sound/soc.h>

#ifndef NULL
#define NULL ((void *)0)
#endif
#define true 1
#define false 0
//typedef unsigned char bool;

enum audio_mute_e {
	AUDIO_MUTE_INVALID = -1,
	AUDIO_MUTE_OFF,
	AUDIO_MUTE_ON,
};

enum audio_sample_rate_e {
	AUDIO_32KHZ,
	AUDIO_44_1KHZ,
	AUDIO_48KHZ,
	AUDIO_96KHZ,
	AUDIO_192KHZ,
};

#define MAX_SPEAKER_OUT_CH 16
#define MAX_HDMI_OUT_CH 2
#define MAX_AUDIO_OUT_CH (MAX_SPEAKER_OUT_CH * 2)
#define MAX_AUDIO_OUT_CH_NOTIFY MAX_SPEAKER_OUT_CH

struct audio_out_chmap_t {
	int chmap[MAX_AUDIO_OUT_CH];
};

struct audio_output_control_data {
	enum audio_mute_e speaker_mute;
	enum audio_sample_rate_e audio_out_sample_rate;
	struct audio_out_chmap_t audio_out_chmap;
	int main_out_gain;
	int main_out_gain2;
	enum audio_mute_e mixer_mute;
};

int impl_audio_output_initialize(void);

int impl_speaker_mute_put(int value);
int impl_speaker_mute_get(void);
int impl_audio_out_sample_rate_put(int value);
int impl_audio_out_sample_rate_get(void);
int impl_audio_out_chmap_put(struct audio_out_chmap_t *chmap);
int impl_audio_out_chmap_get(struct audio_out_chmap_t *chmap);
int impl_main_out_gain_put(int value);
int impl_main_out_gain_get(void);
int impl_main_out_gain2_put(int value);
int impl_main_out_gain2_get(void);
int impl_mixer_mute_put(int value);
int impl_mixer_mute_get(void);

#endif

