linux/sound/soc/tegra/tegra210_peq.h

/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * tegra210_peq.h - Definitions for Tegra210 PEQ driver
 *
 * Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
 *
 */

#ifndef __TEGRA210_PEQ_H__
#define __TEGRA210_PEQ_H__

#include <linux/platform_device.h>
#include <linux/regmap.h>
#include <sound/soc.h>

/* Register offsets from PEQ base */
#define TEGRA210_PEQ_SOFT_RESET
#define TEGRA210_PEQ_CG
#define TEGRA210_PEQ_STATUS
#define TEGRA210_PEQ_CFG
#define TEGRA210_PEQ_CFG_RAM_CTRL
#define TEGRA210_PEQ_CFG_RAM_DATA
#define TEGRA210_PEQ_CFG_RAM_SHIFT_CTRL
#define TEGRA210_PEQ_CFG_RAM_SHIFT_DATA

/* Fields in TEGRA210_PEQ_CFG */
#define TEGRA210_PEQ_CFG_BIQUAD_STAGES_SHIFT
#define TEGRA210_PEQ_CFG_BIQUAD_STAGES_MASK

#define TEGRA210_PEQ_CFG_MODE_SHIFT
#define TEGRA210_PEQ_CFG_MODE_MASK

#define TEGRA210_PEQ_RAM_CTRL_RW_READ
#define TEGRA210_PEQ_RAM_CTRL_RW_WRITE
#define TEGRA210_PEQ_RAM_CTRL_ADDR_INIT_EN
#define TEGRA210_PEQ_RAM_CTRL_SEQ_ACCESS_EN
#define TEGRA210_PEQ_RAM_CTRL_RAM_ADDR_MASK

/* PEQ register definition ends here */
#define TEGRA210_PEQ_MAX_BIQUAD_STAGES

#define TEGRA210_PEQ_MAX_CHANNELS

#define TEGRA210_PEQ_BIQUAD_INIT_STAGE

#define TEGRA210_PEQ_GAIN_PARAM_SIZE_PER_CH
#define TEGRA210_PEQ_SHIFT_PARAM_SIZE_PER_CH

int tegra210_peq_regmap_init(struct platform_device *pdev);
int tegra210_peq_component_init(struct snd_soc_component *cmpnt);
void tegra210_peq_restore(struct regmap *regmap, u32 *biquad_gains,
			  u32 *biquad_shifts);
void tegra210_peq_save(struct regmap *regmap, u32 *biquad_gains,
		       u32 *biquad_shifts);

#endif