ALSA: emu10k1: remove runtime 64-bit divisions
authorOswald Buddenhagen <oswald.buddenhagen@gmx.de>
Wed, 17 May 2023 16:48:00 +0000 (18:48 +0200)
committerTakashi Iwai <tiwai@suse.de>
Wed, 17 May 2023 20:10:57 +0000 (22:10 +0200)
commit9fe0731bc345230e8ce125056b9407c63960f74e
tree1097d65bb73a9ee25b1fbb09f85612dd75cf0a88
parent216abe45cf4addba4e4c1eb2fae24762ffdefe9e
ALSA: emu10k1: remove runtime 64-bit divisions

32-bit platforms don't like these. As we're actually dealing with
constants, factor out the calculations and pass them in as additional
arguments. To keep the call sites clean, wrap the actual functions in
macros which generate the arguments.

Fixes: bb5ceb43b7bf ("ALSA: emu10k1: fix non-zero mixer control defaults in highres mode")
Fixes: 1298bc978afb ("ALSA: emu10k1: enable bit-exact playback, part 1: DSP attenuation")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202305171622.jKTovBvy-lkp@intel.com/
Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>
Reported-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Closes: https://lore.kernel.org/r/CA+G9fYsShNP=LALHdMd-Btx3PBtO_CjyBNgpStr9fPGXNbRvdg@mail.gmail.com
Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Link: https://lore.kernel.org/r/20230517164800.3650699-1-oswald.buddenhagen@gmx.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/emu10k1/emufx.c