xref: /openbmc/linux/sound/soc/amd/acp/acp-mach.h (revision 77423a62)
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 enum be_id {
22 	HEADSET_BE_ID = 0,
23 	AMP_BE_ID,
24 	DMIC_BE_ID,
25 };
26 
27 enum cpu_endpoints {
28 	NONE = 0,
29 	I2S_HS,
30 	I2S_SP,
31 	I2S_BT,
32 	DMIC,
33 };
34 
35 enum codec_endpoints {
36 	DUMMY = 0,
37 	RT5682,
38 	RT1019,
39 	MAX98360A,
40 	RT5682S,
41 	NAU8825,
42 };
43 
44 enum platform_end_point {
45 	RENOIR = 0,
46 	REMBRANDT,
47 };
48 
49 struct acp_card_drvdata {
50 	unsigned int hs_cpu_id;
51 	unsigned int amp_cpu_id;
52 	unsigned int dmic_cpu_id;
53 	unsigned int hs_codec_id;
54 	unsigned int amp_codec_id;
55 	unsigned int dmic_codec_id;
56 	unsigned int dai_fmt;
57 	unsigned int platform;
58 	struct clk *wclk;
59 	struct clk *bclk;
60 	bool soc_mclk;
61 };
62 
63 int acp_sofdsp_dai_links_create(struct snd_soc_card *card);
64 int acp_legacy_dai_links_create(struct snd_soc_card *card);
65 
66 #endif
67