summaryrefslogtreecommitdiff
path: root/sound/pci/emu10k1/emuproc.c
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@gmx.de>2023-04-22 14:15:19 +0200
committerTakashi Iwai <tiwai@suse.de>2023-04-22 17:32:23 +0200
commite922da40befdbaa89cd85d3154b4a9cea8880fa0 (patch)
tree9d99d78f19a97b9db07738f64e7ef7e6b6e56641 /sound/pci/emu10k1/emuproc.c
parent335927b125af7937c0dd566ecd62a80f9f55c923 (diff)
ALSA: emu10k1: minor optimizations
- In snd_emu10k1_look_for_ctl(), evaluate the cheap condition first - In _snd_emu10k1_{audigy_,}init_efx(), don't use expensive bit setting loops to fill arrays - In snd_emu_proc_ptr_reg_read(), remove useless condition - iobase can be only 0 or 0x20 Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Link: https://lore.kernel.org/r/20230422121519.1052813-1-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/emu10k1/emuproc.c')
-rw-r--r--sound/pci/emu10k1/emuproc.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/sound/pci/emu10k1/emuproc.c b/sound/pci/emu10k1/emuproc.c
index 6e20cca9c98f..bec72dc60a41 100644
--- a/sound/pci/emu10k1/emuproc.c
+++ b/sound/pci/emu10k1/emuproc.c
@@ -477,10 +477,7 @@ static void snd_emu_proc_ptr_reg_read(struct snd_info_entry *entry,
for(i = offset; i < offset+length; i++) {
snd_iprintf(buffer, "%02X: ",i);
for (j = 0; j < voices; j++) {
- if(iobase == 0)
- value = snd_ptr_read(emu, 0, i, j);
- else
- value = snd_ptr_read(emu, 0x20, i, j);
+ value = snd_ptr_read(emu, iobase, i, j);
snd_iprintf(buffer, "%08lX ", value);
}
snd_iprintf(buffer, "\n");