xref: /linux/sound/hda/controllers/intel.h (revision c22407252a2421286998323831095e6b8a1d9532)
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /*
3  */
4 #ifndef __SOUND_HDA_INTEL_H
5 #define __SOUND_HDA_INTEL_H
6 
7 #include "hda_controller.h"
8 
9 struct hda_intel {
10 	struct azx chip;
11 
12 	/* sync probing */
13 	struct completion probe_wait;
14 	struct delayed_work probe_work;
15 
16 	/* card list (for power_save trigger) */
17 	struct list_head list;
18 
19 	/* extra flags */
20 	unsigned int irq_pending_warned:1;
21 	unsigned int probe_continued:1;
22 	unsigned int runtime_pm_disabled:1;
23 
24 	/* vga_switcheroo setup */
25 	unsigned int use_vga_switcheroo:1;
26 	unsigned int vga_switcheroo_registered:1;
27 	unsigned int init_failed:1; /* delayed init failed */
28 	unsigned int freed:1; /* resources already released */
29 
30 	bool need_i915_power:1; /* the hda controller needs i915 power */
31 
32 	int probe_retry;	/* being probe-retry */
33 };
34 
35 struct hda_intel_stream {
36 	struct azx_dev azx_dev;
37 
38 	/* for pending irqs */
39 	struct hda_intel *hda;
40 	struct work_struct irq_pending_work;
41 	bool irq_pending;
42 };
43 
44 #define azx_dev_to_istream(azx_dev) \
45 	container_of(azx_dev, struct hda_intel_stream, azx_dev)
46 
47 #endif
48