patch-2.4.19 linux-2.4.19/drivers/sound/emu10k1/efxmgr.c
Next file: linux-2.4.19/drivers/sound/emu10k1/efxmgr.h
Previous file: linux-2.4.19/drivers/sound/emu10k1/cardwo.h
Back to the patch index
Back to the overall index
- Lines: 40
- Date:
Fri Aug 2 17:39:44 2002
- Orig file:
linux-2.4.18/drivers/sound/emu10k1/efxmgr.c
- Orig date:
Mon Feb 25 11:38:06 2002
diff -urN linux-2.4.18/drivers/sound/emu10k1/efxmgr.c linux-2.4.19/drivers/sound/emu10k1/efxmgr.c
@@ -38,7 +38,7 @@
struct dsp_patch *patch;
struct dsp_rpatch *rpatch;
char s[PATCH_NAME_SIZE + 4];
- u32 *gpr_used;
+ unsigned long *gpr_used;
int i;
DPD(2, "emu10k1_find_control_gpr(): %s %s\n", patch_name, gpr_name);
@@ -103,7 +103,7 @@
card->ac97.mixer_state[oss_mixer] = (right << 8) | left;
- if (!card->isaps)
+ if (!card->is_aps)
card->ac97.write_mixer(&card->ac97, oss_mixer, left, right);
emu10k1_set_volume_gpr(card, card->mgr.ctrl_gpr[oss_mixer][0], left,
@@ -171,7 +171,6 @@
{
struct patch_manager *mgr = &card->mgr;
unsigned long flags;
- int muting;
static const s32 log2lin[4] ={ // attenuation (dB)
0x7fffffff, // 0.0
@@ -183,12 +182,10 @@
if (addr < 0)
return;
- muting = (scale == 0x10) ? 0x7f: scale;
-
vol = (100 - vol ) * scale / 100;
// Thanks to the comp.dsp newsgroup for this neat trick:
- vol = (vol >= muting) ? 0 : (log2lin[vol & 3] >> (vol >> 2));
+ vol = (vol >= scale) ? 0 : (log2lin[vol & 3] >> (vol >> 2));
spin_lock_irqsave(&mgr->lock, flags);
emu10k1_set_control_gpr(card, addr, vol, 0);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)