ALSA: emu10k1: simplify snd_emu10k1_audigy_dsp_convert_32_to_2x16()
Instead of spending lots of instructions on masking and transplanting the sign bit, sidestep the issue by replacing the last bit shift with a wrapping addition to self. Solution stolen from kX-project, after I pondered other ideas first. Also, the function really doesn't need to return a constant int value. Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Link: https://lore.kernel.org/r/20230510173917.3073107-5-oswald.buddenhagen@gmx.deSigned-off-by: Takashi Iwai <tiwai@suse.de>
Showing
Please register or sign in to comment