alistair23-linux/sound/hda
Takashi Iwai 88452da92b ALSA: hda: Use standard waitqueue for RIRB wakeup
The HD-audio CORB/RIRB communication was programmed in a way that was
documented in the reference in decades ago, which is essentially a
polling in the waiter side.  It's working fine but costs CPU cycles on
some platforms that support only slow communications.  Also, for some
platforms that had unreliable communications, we put longer wait time
(2 ms), which accumulate quite long time if you execute many verbs in
a shot (e.g. at the initialization or resume phase).

This patch attempts to improve the situation by introducing the
standard waitqueue in the RIRB waiter side instead of polling.  The
test results on my machine show significant improvements.  The time
spent for "cat /proc/asound/card*/codec#*" were changed like:

* Intel SKL + Realtek codec
  before the patch:
   0.00user 0.04system 0:00.10elapsed 40.0%CPU
  after the patch:
   0.00user 0.01system 0:00.10elapsed 10.0%CPU

* Nvidia GP107GL + Nvidia HDMI codec
  before the patch:
   0.00user 0.00system 0:02.76elapsed 0.0%CPU
  after the patch:
   0.00user 0.00system 0:00.01elapsed 17.0%CPU

So, for Intel chips, the total time is same, while the total time is
greatly reduced (from 2.76 to 0.01s) for Nvidia chips.
The only negative data here is the increase of CPU time for Nvidia,
but this is the unavoidable cost for faster wakeups, supposedly.

Link: https://lore.kernel.org/r/20191210145727.22054-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-12-10 18:22:46 +01:00
..
ext ALSA: hdac: clear link output stream mapping 2019-10-07 03:58:48 +02:00
array.c treewide: Add SPDX license identifier for missed files 2019-05-21 10:50:45 +02:00
hda_bus_type.c treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
hdac_bus.c ALSA: hda: Use standard waitqueue for RIRB wakeup 2019-12-10 18:22:46 +01:00
hdac_component.c Linux 5.1-rc5 2019-04-15 15:51:49 +10:00
hdac_controller.c ALSA: hda: Use standard waitqueue for RIRB wakeup 2019-12-10 18:22:46 +01:00
hdac_device.c Revert "ALSA: hda: Add codec on bus address table lately" 2019-08-15 21:43:05 +02:00
hdac_i915.c ALSA: hda: Fix 1-minute detection delay when i915 module is not available 2019-07-27 08:31:46 +02:00
hdac_regmap.c ALSA: hda: Disable regmap internal locking 2019-11-05 12:54:53 +01:00
hdac_stream.c ALSA: hda: Modify stream stripe mask only when needed 2019-12-03 07:46:30 +01:00
hdac_sysfs.c ALSA: hda: Simplify snd_hdac_refresh_widgets() 2019-07-05 12:01:06 +02:00
hdmi_chmap.c treewide: Add SPDX license identifier for missed files 2019-05-21 10:50:45 +02:00
intel-dsp-config.c ALSA: hda: Allow non-Intel device probe gracefully 2019-10-28 16:09:02 +01:00
intel-nhlt.c ALSA: hda: add Intel DSP configuration / probe code 2019-10-23 06:31:37 +02:00
Kconfig ALSA: hda: add Intel DSP configuration / probe code 2019-10-23 06:31:37 +02:00
local.h ALSA: hda: Unexport a few more stuff 2019-08-14 20:00:56 +02:00
Makefile ALSA: hda: add Intel DSP configuration / probe code 2019-10-23 06:31:37 +02:00
trace.c ALSA: hda - Re-add tracepoints to HD-audio core driver 2015-03-23 13:17:58 +01:00
trace.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00