ALSA: emu10k1: fix PCM playback buffer size constraints
authorOswald Buddenhagen <oswald.buddenhagen@gmx.de>
Thu, 18 May 2023 09:22:24 +0000 (11:22 +0200)
committerTakashi Iwai <tiwai@suse.de>
Thu, 18 May 2023 11:04:05 +0000 (13:04 +0200)
commit0be0a62fd08414e3cd67c8fb898b2bb9e74eb225
tree13843246d71dee9ac44781fd9f8be7a3ded6f1a7
parentfa75064d92fdec157d75375bca06c77fb30c25df
ALSA: emu10k1: fix PCM playback buffer size constraints

The period_bytes_min parameter and the buffer_bytes minimum constraint
made no sense at all, as they didn't reflect any hardware limitation.
Instead, apply a frame-based period_size minimum constraint, which is
derived from the cache size (it would be actually possible to go below
that, but it would require special handling, and it would be practically
impossible to keep up with the IRQ rate anyway).

Sync up the constraints of the EFX playback with those of the regular
playback, as there is no reason for them to diverge.

N.b., the maximum buffer size is actually arbitrary - the hardware could
go waay beyond 128 KiB.

Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Link: https://lore.kernel.org/r/20230518092224.3696958-9-oswald.buddenhagen@gmx.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/emu10k1/emupcm.c