This source file includes following definitions.
- sof_hda_bus_init
1
2
3
4
5
6
7
8
9
10 #include <linux/io.h>
11 #include <sound/hdaudio.h>
12 #include "../sof-priv.h"
13 #include "hda.h"
14
15 #if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA_AUDIO_CODEC)
16 #include "../../codecs/hdac_hda.h"
17 #define sof_hda_ext_ops snd_soc_hdac_hda_get_ops()
18 #else
19 #define sof_hda_ext_ops NULL
20 #endif
21
22
23
24
25 void sof_hda_bus_init(struct hdac_bus *bus, struct device *dev)
26 {
27 #if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA)
28 snd_hdac_ext_bus_init(bus, dev, NULL, sof_hda_ext_ops);
29 #else
30 memset(bus, 0, sizeof(*bus));
31 bus->dev = dev;
32
33 INIT_LIST_HEAD(&bus->stream_list);
34
35 bus->irq = -1;
36
37
38
39
40
41 bus->idx = 0;
42
43 spin_lock_init(&bus->reg_lock);
44 #endif
45 }