]> git.alsa-project.org Git - alsa-lib.git/commit
pcm: direct: correctly apply existing interval settings
authorAndreas Pape <apape@de.adit-jv.com>
Wed, 17 Jun 2020 11:42:35 +0000 (13:42 +0200)
committerJaroslav Kysela <perex@perex.cz>
Wed, 17 Jun 2020 13:33:55 +0000 (15:33 +0200)
commit5394f605bce7cb3fce0b9ef35890f938f6699244
tree4980c1f66b287621cf8b3f2f08094d881a1d7cb0
parent198eb642bc75acb5dc842ed5e3e23236d3a4f6f0
pcm: direct: correctly apply existing interval settings

Feature 'variable periodsize' allows to extend user period size up to
buffer_size/2 independent of slave period. On enlargement of the settings
for period_time.max and period_size.max the setting for openmax
was not updated.

This lead to the effect, that if the slave period itself had openmax
set it was still set on the extended size. Configuration of a period
matching half buffer size was thus rejected.

Example for failure: period size of 384 (half buffer size) is requested
which is rejected and rounded down to 352:

PERIOD_SIZE: [32 352]
BUFFER_SIZE: [64 768]

When correctly applying the openmax setting:

PERIOD_SIZE: [32 384]
BUFFER_SIZE: [64 768]

Signed-off-by: Andreas Pape <apape@de.adit-jv.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
src/pcm/pcm_direct.c