diff options
author | Mengdong Lin <mengdong.lin@intel.com> | 2013-11-27 04:00:51 (GMT) |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2013-11-27 11:16:32 (GMT) |
commit | 0e24dbb7f44877a3565ee461d2209b0942b1a753 (patch) | |
tree | 1fdef5cb4b6247a677311754fd868ae7ee01e200 /sound/pci/hda/hda_codec.h | |
parent | 3e9bc58fef3b7a1ee95b36c26671198a985293c7 (diff) | |
download | linux-0e24dbb7f44877a3565ee461d2209b0942b1a753.tar.xz |
ALSA: hda - suspend codecs in parallel
The time to suspend a single codec may be several hundreds of ms. When runtime
power saving is disabled, driver suspend time can be long especially when there
are more than one codec on the bus.
To reduce driver suspend time, this patch creates a work queue for the bus, and
suspends the codecs in parallel if there are multiple codecs on the bus.
[fixed cosmetic issues by tiwai]
Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
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 | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_codec.h b/sound/pci/hda/hda_codec.h index a3e5f45..9a2798a 100644 --- a/sound/pci/hda/hda_codec.h +++ b/sound/pci/hda/hda_codec.h @@ -673,6 +673,7 @@ struct hda_bus { /* codec linked list */ struct list_head codec_list; + unsigned int num_codecs; /* link caddr -> codec */ struct hda_codec *caddr_tbl[HDA_MAX_CODEC_ADDRESS + 1]; @@ -683,6 +684,9 @@ struct hda_bus { struct hda_bus_unsolicited *unsol; char workq_name[16]; struct workqueue_struct *workq; /* common workqueue for codecs */ +#ifdef CONFIG_PM + struct workqueue_struct *pm_wq; /* workqueue to parallel codec PM */ +#endif /* assigned PCMs */ DECLARE_BITMAP(pcm_dev_bits, SNDRV_PCM_DEVICES); @@ -917,6 +921,7 @@ struct hda_codec { unsigned long power_off_acct; unsigned long power_jiffies; spinlock_t power_lock; + struct work_struct pm_work; /* task to parallel multi-codec PM */ #endif /* filter the requested power state per nid */ |