patch-2.4.22 linux-2.4.22/drivers/sound/emu10k1/mixer.c
Next file: linux-2.4.22/drivers/sound/es1371.c
Previous file: linux-2.4.22/drivers/sound/emu10k1/main.c
Back to the patch index
Back to the overall index
- Lines: 117
- Date:
2003-08-25 04:44:42.000000000 -0700
- Orig file:
linux-2.4.21/drivers/sound/emu10k1/mixer.c
- Orig date:
2002-08-02 17:39:44.000000000 -0700
diff -urN linux-2.4.21/drivers/sound/emu10k1/mixer.c linux-2.4.22/drivers/sound/emu10k1/mixer.c
@@ -459,29 +459,29 @@
break;
if (addr >= 0) {
- unsigned int state = card->ac97.mixer_state[id];
+ unsigned int state = card->ac97->mixer_state[id];
if (ch == 1) {
state >>= 8;
- card->ac97.stereo_mixers |= (1 << id);
+ card->ac97->stereo_mixers |= (1 << id);
}
- card->ac97.supported_mixers |= (1 << id);
+ card->ac97->supported_mixers |= (1 << id);
if (id == SOUND_MIXER_TREBLE) {
- set_treble(card, card->ac97.mixer_state[id] & 0xff, (card->ac97.mixer_state[id] >> 8) & 0xff);
+ set_treble(card, card->ac97->mixer_state[id] & 0xff, (card->ac97->mixer_state[id] >> 8) & 0xff);
} else if (id == SOUND_MIXER_BASS) {
- set_bass(card, card->ac97.mixer_state[id] & 0xff, (card->ac97.mixer_state[id] >> 8) & 0xff);
+ set_bass(card, card->ac97->mixer_state[id] & 0xff, (card->ac97->mixer_state[id] >> 8) & 0xff);
} else
emu10k1_set_volume_gpr(card, addr, state & 0xff,
volume_params[id]);
} else {
- card->ac97.stereo_mixers &= ~(1 << id);
- card->ac97.stereo_mixers |= card->ac97_stereo_mixers;
+ card->ac97->stereo_mixers &= ~(1 << id);
+ card->ac97->stereo_mixers |= card->ac97_stereo_mixers;
if (ch == 0) {
- card->ac97.supported_mixers &= ~(1 << id);
- card->ac97.supported_mixers |= card->ac97_supported_mixers;
+ card->ac97->supported_mixers &= ~(1 << id);
+ card->ac97->supported_mixers |= card->ac97_supported_mixers;
}
}
break;
@@ -502,9 +502,9 @@
case CMD_AC97_BOOST:
if(ctl->val[0])
- emu10k1_ac97_write(&card->ac97, 0x18, 0x0);
+ emu10k1_ac97_write(card->ac97, 0x18, 0x0);
else
- emu10k1_ac97_write(&card->ac97, 0x18, 0x0808);
+ emu10k1_ac97_write(card->ac97, 0x18, 0x0808);
break;
default:
ret = -EINVAL;
@@ -579,7 +579,7 @@
int val;
int scale;
- card->ac97.modcnt++;
+ card->ac97->modcnt++;
if (get_user(val, (int *)arg))
return -EFAULT;
@@ -591,7 +591,7 @@
if (right > 100) right = 100;
if (left > 100) left = 100;
- card->ac97.mixer_state[oss_mixer] = (right << 8) | left;
+ card->ac97->mixer_state[oss_mixer] = (right << 8) | left;
if (oss_mixer == SOUND_MIXER_TREBLE) {
set_treble(card, left, right);
return 0;
@@ -601,7 +601,7 @@
}
if (oss_mixer == SOUND_MIXER_VOLUME)
- scale = 1 << card->ac97.bit_resolution;
+ scale = 1 << card->ac97->bit_resolution;
else
scale = volume_params[oss_mixer];
@@ -609,7 +609,7 @@
emu10k1_set_volume_gpr(card, card->mgr.ctrl_gpr[oss_mixer][1], right, scale);
if (card->ac97_supported_mixers & (1 << oss_mixer))
- card->ac97.write_mixer(&card->ac97, oss_mixer, left, right);
+ card->ac97->write_mixer(card->ac97, oss_mixer, left, right);
return 0;
}
@@ -625,9 +625,9 @@
if (cmd == SOUND_MIXER_INFO) {
mixer_info info;
- strncpy(info.id, card->ac97.name, sizeof(info.id));
+ strncpy(info.id, card->ac97->name, sizeof(info.id));
strncpy(info.name, "Creative SBLive - Emu10k1", sizeof(info.name));
- info.modify_counter = card->ac97.modcnt;
+ info.modify_counter = card->ac97->modcnt;
if (copy_to_user((void *)arg, &info, sizeof(info)))
return -EFAULT;
@@ -638,7 +638,7 @@
if ((_SIOC_DIR(cmd) == (_SIOC_WRITE|_SIOC_READ)) && oss_mixer <= SOUND_MIXER_NRDEVICES)
ret = emu10k1_dsp_mixer(card, oss_mixer, arg);
else
- ret = card->ac97.mixer_ioctl(&card->ac97, cmd, arg);
+ ret = card->ac97->mixer_ioctl(card->ac97, cmd, arg);
}
if (ret < 0)
@@ -658,7 +658,7 @@
list_for_each(entry, &emu10k1_devs) {
card = list_entry(entry, struct emu10k1_card, list);
- if (card->ac97.dev_mixer == minor)
+ if (card->ac97->dev_mixer == minor)
goto match;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)