1/* SPDX-License-Identifier: GPL-2.0-only */
2/*
3 * Copyright(c) 2023 Intel Corporation.
4 */
5
6#ifndef __SOF_SSP_COMMON_H
7#define __SOF_SSP_COMMON_H
8
9/* Cirrus Logic */
10#define CS35L41_ACPI_HID	"CSC3541"
11#define CS42L42_ACPI_HID	"10134242"
12
13/* Dialog */
14#define DA7219_ACPI_HID		"DLGS7219"
15
16/* Everest */
17#define ES8316_ACPI_HID		"ESSX8316"
18#define ES8326_ACPI_HID		"ESSX8326"
19#define ES8336_ACPI_HID		"ESSX8336"
20
21#define MAX_98357A_ACPI_HID	"MX98357A"
22#define MAX_98360A_ACPI_HID	"MX98360A"
23#define MAX_98373_ACPI_HID	"MX98373"
24#define MAX_98390_ACPI_HID	"MX98390"
25
26/* Nuvoton */
27#define NAU8318_ACPI_HID	"NVTN2012"
28#define NAU8825_ACPI_HID	"10508825"
29
30/* Realtek */
31#define RT1011_ACPI_HID		"10EC1011"
32#define RT1015_ACPI_HID		"10EC1015"
33#define RT1015P_ACPI_HID	"RTL1015"
34#define RT1019P_ACPI_HID	"RTL1019"
35#define RT1308_ACPI_HID		"10EC1308"
36#define RT5650_ACPI_HID		"10EC5650"
37#define RT5682_ACPI_HID		"10EC5682"
38#define RT5682S_ACPI_HID	"RTL5682"
39
40enum sof_ssp_codec {
41	CODEC_NONE,
42
43	/* headphone codec */
44	CODEC_CS42L42,
45	CODEC_DA7219,
46	CODEC_ES8316,
47	CODEC_ES8326,
48	CODEC_ES8336,
49	CODEC_NAU8825,
50	CODEC_RT5650,
51	CODEC_RT5682,
52	CODEC_RT5682S,
53
54	/* speaker amplifier */
55	CODEC_CS35L41,
56	CODEC_MAX98357A,
57	CODEC_MAX98360A,
58	CODEC_MAX98373,
59	CODEC_MAX98390,
60	CODEC_NAU8318,
61	CODEC_RT1011,
62	CODEC_RT1015,
63	CODEC_RT1015P,
64	CODEC_RT1019P,
65	CODEC_RT1308,
66};
67
68enum sof_ssp_codec sof_ssp_detect_codec_type(struct device *dev);
69enum sof_ssp_codec sof_ssp_detect_amp_type(struct device *dev);
70
71#if IS_ENABLED(CONFIG_SND_SOC_INTEL_SOF_SSP_COMMON)
72const char *sof_ssp_get_codec_name(enum sof_ssp_codec codec_type);
73#else
74static inline const char *sof_ssp_get_codec_name(enum sof_ssp_codec codec_type)
75{
76	return NULL;
77}
78#endif
79
80#endif /* __SOF_SSP_COMMON_H */
81