xref: /linux/sound/pci/hda/hda_component.h (revision 3d0fe49454652117522f60bfbefb978ba0e5300b)
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /*
3  * HD audio Component Binding Interface
4  *
5  * Copyright (C) 2021 Cirrus Logic, Inc. and
6  *                    Cirrus Logic International Semiconductor Ltd.
7  */
8 
9 #include <linux/acpi.h>
10 #include <linux/component.h>
11 
12 #define HDA_MAX_COMPONENTS	4
13 #define HDA_MAX_NAME_SIZE	50
14 
15 struct hda_component {
16 	struct device *dev;
17 	char name[HDA_MAX_NAME_SIZE];
18 	struct hda_codec *codec;
19 	struct acpi_device *adev;
20 	bool acpi_notifications_supported;
21 	void (*acpi_notify)(acpi_handle handle, u32 event, struct device *dev);
22 	void (*pre_playback_hook)(struct device *dev, int action);
23 	void (*playback_hook)(struct device *dev, int action);
24 	void (*post_playback_hook)(struct device *dev, int action);
25 };
26