diff options
author | Takashi Iwai <tiwai@suse.de> | 2015-02-17 14:46:40 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2015-02-17 14:46:40 +0100 |
commit | 922c88a8368a61ee93653d4a2888a7f4ce263102 (patch) | |
tree | ab75d851d8d609bef5a3baf4d30a9f1547fd6a1b /sound/pci/hda/hda_codec.h | |
parent | ALSA: hda - Drop hda_bus_template for snd_hda_bus_new() (diff) | |
download | linux-922c88a8368a61ee93653d4a2888a7f4ce263102.tar.xz linux-922c88a8368a61ee93653d4a2888a7f4ce263102.zip |
ALSA: hda - Embed struct hda_bus_unsolicited into struct hda_bus
There is no big merit to handle hda_bus_unsolicited object
individually, as it's tightly coupled with the hda_bus object itself.
Embedding it makes the code simpler in the end.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_codec.h')
-rw-r--r-- | sound/pci/hda/hda_codec.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/sound/pci/hda/hda_codec.h b/sound/pci/hda/hda_codec.h index 5a6594884069..96421a3b32cd 100644 --- a/sound/pci/hda/hda_codec.h +++ b/sound/pci/hda/hda_codec.h @@ -66,7 +66,6 @@ struct hda_beep; struct hda_codec; struct hda_pcm; struct hda_pcm_stream; -struct hda_bus_unsolicited; /* NID type */ typedef u16 hda_nid_t; @@ -101,6 +100,16 @@ struct hda_bus_ops { #endif }; +/* unsolicited event handler */ +#define HDA_UNSOL_QUEUE_SIZE 64 +struct hda_bus_unsolicited { + /* ring buffer */ + u32 queue[HDA_UNSOL_QUEUE_SIZE * 2]; + unsigned int rp, wp; + /* workqueue */ + struct work_struct work; +}; + /* * codec bus * @@ -126,7 +135,7 @@ struct hda_bus { struct mutex prepare_mutex; /* unsolicited event queue */ - struct hda_bus_unsolicited *unsol; + struct hda_bus_unsolicited unsol; char workq_name[16]; struct workqueue_struct *workq; /* common workqueue for codecs */ |