linux/sound/soc/codecs/rt1320-sdw.h

/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * rt1320-sdw.h -- RT1320 SDCA ALSA SoC audio driver header
 *
 * Copyright(c) 2024 Realtek Semiconductor Corp.
 */

#ifndef __RT1320_SDW_H__
#define __RT1320_SDW_H__

#include <linux/regmap.h>
#include <linux/soundwire/sdw.h>
#include <linux/soundwire/sdw_type.h>
#include <linux/soundwire/sdw_registers.h>
#include <sound/soc.h>

/* imp-defined registers */
#define RT1320_DEV_VERSION_ID_1

#define RT1320_KR0_STATUS_CNT
#define RT1320_HIFI_VER_0
#define RT1320_HIFI_VER_1
#define RT1320_HIFI_VER_2
#define RT1320_HIFI_VER_3

/* RT1320 SDCA Control - function number */
#define FUNC_NUM_AMP

/* RT1320 SDCA entity */
#define RT1320_SDCA_ENT0
#define RT1320_SDCA_ENT_PDE11
#define RT1320_SDCA_ENT_PDE23
#define RT1320_SDCA_ENT_PDE27
#define RT1320_SDCA_ENT_FU14
#define RT1320_SDCA_ENT_FU21
#define RT1320_SDCA_ENT_FU113
#define RT1320_SDCA_ENT_CS14
#define RT1320_SDCA_ENT_CS21
#define RT1320_SDCA_ENT_CS113
#define RT1320_SDCA_ENT_SAPU
#define RT1320_SDCA_ENT_PPU21

/* RT1320 SDCA control */
#define RT1320_SDCA_CTL_SAMPLE_FREQ_INDEX
#define RT1320_SDCA_CTL_REQ_POWER_STATE
#define RT1320_SDCA_CTL_FU_MUTE
#define RT1320_SDCA_CTL_FU_VOLUME
#define RT1320_SDCA_CTL_SAPU_PROTECTION_MODE
#define RT1320_SDCA_CTL_SAPU_PROTECTION_STATUS
#define RT1320_SDCA_CTL_POSTURE_NUMBER
#define RT1320_SDCA_CTL_FUNC_STATUS

/* RT1320 SDCA channel */
#define CH_01
#define CH_02

/* Function_Status */
#define FUNCTION_NEEDS_INITIALIZATION

/* Sample Frequency Index */
#define RT1320_SDCA_RATE_16000HZ
#define RT1320_SDCA_RATE_32000HZ
#define RT1320_SDCA_RATE_44100HZ
#define RT1320_SDCA_RATE_48000HZ
#define RT1320_SDCA_RATE_96000HZ
#define RT1320_SDCA_RATE_192000HZ

enum {};

/*
 * The version id will be useful to distinguish the capability between the different IC versions.
 * Currently, VA and VB have different DSP FW versions.
 */
enum rt1320_version_id {};

#define RT1320_VER_B_ID

struct rt1320_sdw_priv {};

#endif /* __RT1320_SDW_H__ */