This source file includes following definitions.
- snd_soc_acpi_find_machine
- snd_soc_acpi_find_package_from_hid
- snd_soc_acpi_codec_list
1
2
3
4
5
6 #ifndef __LINUX_SND_SOC_ACPI_H
7 #define __LINUX_SND_SOC_ACPI_H
8
9 #include <linux/stddef.h>
10 #include <linux/acpi.h>
11 #include <linux/mod_devicetable.h>
12
13 struct snd_soc_acpi_package_context {
14 char *name;
15 int length;
16 struct acpi_buffer *format;
17 struct acpi_buffer *state;
18 bool data_valid;
19 };
20
21
22 #define SND_ACPI_I2C_ID_LEN (4 + ACPI_ID_LEN + 3 + 1)
23
24 #if IS_ENABLED(CONFIG_ACPI)
25
26 struct snd_soc_acpi_mach *
27 snd_soc_acpi_find_machine(struct snd_soc_acpi_mach *machines);
28
29 bool snd_soc_acpi_find_package_from_hid(const u8 hid[ACPI_ID_LEN],
30 struct snd_soc_acpi_package_context *ctx);
31
32
33 struct snd_soc_acpi_mach *snd_soc_acpi_codec_list(void *arg);
34
35 #else
36
37 static inline struct snd_soc_acpi_mach *
38 snd_soc_acpi_find_machine(struct snd_soc_acpi_mach *machines)
39 {
40 return NULL;
41 }
42
43 static inline bool
44 snd_soc_acpi_find_package_from_hid(const u8 hid[ACPI_ID_LEN],
45 struct snd_soc_acpi_package_context *ctx)
46 {
47 return false;
48 }
49
50
51 static inline struct snd_soc_acpi_mach *snd_soc_acpi_codec_list(void *arg)
52 {
53 return NULL;
54 }
55 #endif
56
57
58
59
60
61
62
63
64 struct snd_soc_acpi_mach_params {
65 u32 acpi_ipc_irq_index;
66 const char *platform;
67 u32 codec_mask;
68 u32 dmic_num;
69 };
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91 struct snd_soc_acpi_mach {
92 const u8 id[ACPI_ID_LEN];
93 const char *drv_name;
94 const char *fw_filename;
95 const char *board;
96 struct snd_soc_acpi_mach * (*machine_quirk)(void *arg);
97 const void *quirk_data;
98 void *pdata;
99 struct snd_soc_acpi_mach_params mach_params;
100 const char *sof_fw_filename;
101 const char *sof_tplg_filename;
102 };
103
104 #define SND_SOC_ACPI_MAX_CODECS 3
105
106
107
108
109
110
111
112
113
114
115 struct snd_soc_acpi_codecs {
116 int num_codecs;
117 u8 codecs[SND_SOC_ACPI_MAX_CODECS][ACPI_ID_LEN];
118 };
119
120 #endif