diff options
author | Keyon Jie <yang.jie@linux.intel.com> | 2018-12-11 16:30:27 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2018-12-19 12:07:18 -0500 |
commit | 18d43c9b88eb335440c5e769eb6c2d5bc908dc61 (patch) | |
tree | e617735e43f26f255ee9c7c4c1e0a15d90d366a1 /sound | |
parent | 9cf6533e8060d3896b88ea14b27f620e6504b84b (diff) |
ALSA: HDA: export process_unsol_events()
The SOF implementation does not rely on the hdac_bus library, however
for HDMI and HDaudio codec support it does need to deal with
unsolicited events. Instead of re-inventing the wheel, export this
symbol to reuse this part of the library directly.
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/hda/hdac_bus.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sound/hda/hdac_bus.c b/sound/hda/hdac_bus.c index 714a51721a31..012305177f68 100644 --- a/sound/hda/hdac_bus.c +++ b/sound/hda/hdac_bus.c | |||
@@ -9,8 +9,6 @@ | |||
9 | #include <sound/hdaudio.h> | 9 | #include <sound/hdaudio.h> |
10 | #include "trace.h" | 10 | #include "trace.h" |
11 | 11 | ||
12 | static void process_unsol_events(struct work_struct *work); | ||
13 | |||
14 | static const struct hdac_bus_ops default_ops = { | 12 | static const struct hdac_bus_ops default_ops = { |
15 | .command = snd_hdac_bus_send_cmd, | 13 | .command = snd_hdac_bus_send_cmd, |
16 | .get_response = snd_hdac_bus_get_response, | 14 | .get_response = snd_hdac_bus_get_response, |
@@ -37,7 +35,7 @@ int snd_hdac_bus_init(struct hdac_bus *bus, struct device *dev, | |||
37 | bus->io_ops = io_ops; | 35 | bus->io_ops = io_ops; |
38 | INIT_LIST_HEAD(&bus->stream_list); | 36 | INIT_LIST_HEAD(&bus->stream_list); |
39 | INIT_LIST_HEAD(&bus->codec_list); | 37 | INIT_LIST_HEAD(&bus->codec_list); |
40 | INIT_WORK(&bus->unsol_work, process_unsol_events); | 38 | INIT_WORK(&bus->unsol_work, snd_hdac_bus_process_unsol_events); |
41 | spin_lock_init(&bus->reg_lock); | 39 | spin_lock_init(&bus->reg_lock); |
42 | mutex_init(&bus->cmd_mutex); | 40 | mutex_init(&bus->cmd_mutex); |
43 | bus->irq = -1; | 41 | bus->irq = -1; |
@@ -148,7 +146,7 @@ EXPORT_SYMBOL_GPL(snd_hdac_bus_queue_event); | |||
148 | /* | 146 | /* |
149 | * process queued unsolicited events | 147 | * process queued unsolicited events |
150 | */ | 148 | */ |
151 | static void process_unsol_events(struct work_struct *work) | 149 | void snd_hdac_bus_process_unsol_events(struct work_struct *work) |
152 | { | 150 | { |
153 | struct hdac_bus *bus = container_of(work, struct hdac_bus, unsol_work); | 151 | struct hdac_bus *bus = container_of(work, struct hdac_bus, unsol_work); |
154 | struct hdac_device *codec; | 152 | struct hdac_device *codec; |
@@ -171,6 +169,7 @@ static void process_unsol_events(struct work_struct *work) | |||
171 | drv->unsol_event(codec, res); | 169 | drv->unsol_event(codec, res); |
172 | } | 170 | } |
173 | } | 171 | } |
172 | EXPORT_SYMBOL_GPL(snd_hdac_bus_process_unsol_events); | ||
174 | 173 | ||
175 | /** | 174 | /** |
176 | * snd_hdac_bus_add_device - Add a codec to bus | 175 | * snd_hdac_bus_add_device - Add a codec to bus |