summaryrefslogtreecommitdiff
path: root/src/include/acpi/acpi_soundwire.h
blob: 50c088afcef08e9e091d2684b57db6b027163b04 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/* SPDX-License-Identifier: GPL-2.0-only */

#ifndef __ACPI_ACPI_SOUNDWIRE_H__
#define __ACPI_ACPI_SOUNDWIRE_H__

#include <acpi/acpi_device.h>
#include <device/soundwire.h>

/**
 * soundwire_dp_prop_cb() - Callback to add custom data port properties.
 * @dsd: ACPI Device Property handle for this data port.
 * @port_id: Data Port ID from 0-14.
 * @codec: Properties that were passed to soundwire_gen_codec().
 */
typedef void soundwire_dp_prop_cb(struct acpi_dp *dsd, unsigned int port_id,
				  const struct soundwire_codec *codec);

/**
 * soundwire_gen_codec() - Generate SoundWire properties for codec device.
 * @dsd: ACPI Device Property handle.
 * @prop: Properties for codec which includes all other properties.
 * @dp_prop_cb: Callback to allow custom codec properties.
 */
void soundwire_gen_codec(struct acpi_dp *dsd, const struct soundwire_codec *codec,
			 soundwire_dp_prop_cb dp_prop_cb);

/**
 * soundwire_link_prop_cb() - Callback to add custom link properties.
 * @dsd: ACPI Device Property handle for master link.
 * @link_id: Link number for this master.
 * @controller: Properties that were passed to soundwire_gen_controller().
 */
typedef void soundwire_link_prop_cb(struct acpi_dp *dsd, unsigned int link_id,
				    const struct soundwire_controller *controller);

/**
 * soundwire_gen_controller() - Generate SoundWire properties for master links.
 * @dsd: ACPI Device Property handle for controller.
 * @prop: Properties for controller which includes all other properties.
 * @link_prop_cb: Callback to allow custom link properties.
 */
void soundwire_gen_controller(struct acpi_dp *dsd, const struct soundwire_controller *prop,
			      soundwire_link_prop_cb link_prop_cb);

#endif /* __ACPI_ACPI_SOUNDWIRE_H__ */