xref: /openbmc/linux/sound/soc/amd/acp/acp-mach.h (revision 2a598d0b)
1 /* SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) */
2 /*
3  * This file is provided under a dual BSD/GPLv2 license. When using or
4  * redistributing this file, you may do so under either license.
5  *
6  * Copyright(c) 2021 Advanced Micro Devices, Inc. All rights reserved.
7  *
8  * Author: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com>
9  */
10 #ifndef __ACP_MACH_H
11 #define __ACP_MACH_H
12 
13 #include <sound/core.h>
14 #include <sound/jack.h>
15 #include <sound/pcm_params.h>
16 #include <sound/soc-dapm.h>
17 #include <linux/input.h>
18 #include <linux/module.h>
19 #include <sound/soc.h>
20 
21 #define TDM_CHANNELS	8
22 
23 enum be_id {
24 	HEADSET_BE_ID = 0,
25 	AMP_BE_ID,
26 	DMIC_BE_ID,
27 };
28 
29 enum cpu_endpoints {
30 	NONE = 0,
31 	I2S_HS,
32 	I2S_SP,
33 	I2S_BT,
34 	DMIC,
35 };
36 
37 enum codec_endpoints {
38 	DUMMY = 0,
39 	RT5682,
40 	RT1019,
41 	MAX98360A,
42 	RT5682S,
43 	NAU8825,
44 };
45 
46 enum platform_end_point {
47 	RENOIR = 0,
48 	REMBRANDT,
49 };
50 
51 struct acp_card_drvdata {
52 	unsigned int hs_cpu_id;
53 	unsigned int amp_cpu_id;
54 	unsigned int dmic_cpu_id;
55 	unsigned int hs_codec_id;
56 	unsigned int amp_codec_id;
57 	unsigned int dmic_codec_id;
58 	unsigned int dai_fmt;
59 	unsigned int platform;
60 	struct clk *wclk;
61 	struct clk *bclk;
62 	bool soc_mclk;
63 	bool tdm_mode;
64 };
65 
66 int acp_sofdsp_dai_links_create(struct snd_soc_card *card);
67 int acp_legacy_dai_links_create(struct snd_soc_card *card);
68 extern const struct dmi_system_id acp_quirk_table[];
69 
70 #endif
71