kernel_optimize_test/sound/x86
Takashi Iwai e1b239f371 ALSA: x86: Refactor PCM process engine
This is again a big rewrite of the driver; now it touches the code to
process PCM stream transfers.

The most fundamental change is that the driver may support more than
four periods.  Instead of keeping the same index between both the ring
buffer (with the fixed four buffer descriptors) and the PCM buffer
periods, we keep difference indices for both (bd_head and pcm_head
fields).  In addition, when the periods are more than four, we need to
track both head and next indices.  That is, we now have three indices:
bd_head, pcm_head and pcm_filled.

Also, the driver works better for periods < 4, too: the remaining BDs
out of four are marked as invalid, so that the hardware skips those
BDs in its loop.

By this flexibility, we can use even ALSA-lib dmix plugin, which
requires 16 periods as default.

The buffer size could be up to 20bit, so the max buffer size was
increased accordingly.  However, the buffer pre-allocation is kept as
the old value (600kB) as default.  The reason is the limited number of
BDs: since it doesn't suffice for the useful SG page management that
can fit with the usual page allocator like some other drivers, we have
to still allocate continuous pages, hence we shouldn't take too big
memories there.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2017-02-06 12:21:10 +01:00
..
intel_hdmi_audio.c ALSA: x86: Refactor PCM process engine 2017-02-06 12:21:10 +01:00
intel_hdmi_audio.h ALSA: x86: Refactor PCM process engine 2017-02-06 12:21:10 +01:00
intel_hdmi_lpe_audio.h ALSA: x86: Refactor PCM process engine 2017-02-06 12:21:10 +01:00
Kconfig
Makefile ALSA: x86: Fold intel_hdmi_audio_if.c into main file 2017-02-03 17:31:54 +01:00