]> asedeno.scripts.mit.edu Git - linux.git/commit
ALSA: firewire-lib: fix insufficient PCM rule for period/buffer size
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Tue, 30 Oct 2018 06:31:15 +0000 (15:31 +0900)
committerTakashi Iwai <tiwai@suse.de>
Tue, 30 Oct 2018 11:22:12 +0000 (12:22 +0100)
commit826b5de90c0bca4e9de6231da9e1730480621588
tree504349d4e97ca62d7aa72a97a017b09b3d113742
parentac237c28d5ac1b241d58b1b7b4b9fa10efb22fb5
ALSA: firewire-lib: fix insufficient PCM rule for period/buffer size

In a former commit, PCM constraint based on LCM of SYT_INTERVAL was
obsoleted with PCM rule. However, the new PCM rule brings -EINVAL in
some cases that max/min values of size of buffer/period is not
multiples of one of values of SYT_INTERVAL. For example, pulseaudio
always fail to configure PCM substream.

This commit changes strategy for the PCM rule. Although the buggy rules
had a single dependency (rate from period, period from rate, rate from
buffer, buffer from rate), a revised rule has double dependencies
(period from period/rate, buffer from buffer/rate). A step of value is
calculated with table of SYT_INTERVAL and list of available rates. This
prevents interval template which brings -EINVAL to a call of
snd_interval_refine().

Fixes: 5950229582bc('ALSA: firewire-lib: add PCM rules to obsolete PCM constraints based on LCM of SYT_INTERVAL')
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/firewire/amdtp-stream.c