ALSA: pcmtest: minor optimizations
authorIvan Orlov <ivan.orlov0322@gmail.com>
Thu, 13 Jul 2023 07:59:53 +0000 (11:59 +0400)
committerTakashi Iwai <tiwai@suse.de>
Fri, 14 Jul 2023 06:07:45 +0000 (08:07 +0200)
commitf9d1b819307c242f2e648f16a05c0f908c525616
tree36047e2638f31f7cbebe7820c774e6be1981df37
parent678a0bbe158076805843f6a58aa09b365fc43871
ALSA: pcmtest: minor optimizations

Decrease the buffer filling overhead with conditional remainder
calculation in the 'inc_buf_pos' inline function.

Fix the driver to use already defined variables where it is possible
in 'check_buf_block_ni' and 'fill_block_pattern_n' functions.

Signed-off-by: Ivan Orlov <ivan.orlov0322@gmail.com>
Link: https://lore.kernel.org/r/20230713075953.13692-2-ivan.orlov0322@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/drivers/pcmtest.c