diff options
author | James Courtier-Dutton <James@superbug.co.uk> | 2007-11-10 12:55:14 -0500 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2008-01-31 11:30:24 -0500 |
commit | c94fa4c9168e51a8dab8e72cb9f0d89673fc8d8c (patch) | |
tree | 08169553a3b69a284b322941131f406661e499e8 /sound/pci/emu10k1/emu10k1_callback.c | |
parent | 3839e4f136d6da3dc85d237aa9569ee94bfea763 (diff) |
[ALSA] emu10k1: General cleanup, add new locks, fix alsa bug#3501, kernel bug#9304.
Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'sound/pci/emu10k1/emu10k1_callback.c')
-rw-r--r-- | sound/pci/emu10k1/emu10k1_callback.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/sound/pci/emu10k1/emu10k1_callback.c b/sound/pci/emu10k1/emu10k1_callback.c index 01965bd99966..45088ebcce50 100644 --- a/sound/pci/emu10k1/emu10k1_callback.c +++ b/sound/pci/emu10k1/emu10k1_callback.c | |||
@@ -35,9 +35,9 @@ struct best_voice { | |||
35 | /* | 35 | /* |
36 | * prototypes | 36 | * prototypes |
37 | */ | 37 | */ |
38 | static void lookup_voices(struct snd_emux *emu, struct snd_emu10k1 *hw, | 38 | static void lookup_voices(struct snd_emux *emux, struct snd_emu10k1 *hw, |
39 | struct best_voice *best, int active_only); | 39 | struct best_voice *best, int active_only); |
40 | static struct snd_emux_voice *get_voice(struct snd_emux *emu, | 40 | static struct snd_emux_voice *get_voice(struct snd_emux *emux, |
41 | struct snd_emux_port *port); | 41 | struct snd_emux_port *port); |
42 | static int start_voice(struct snd_emux_voice *vp); | 42 | static int start_voice(struct snd_emux_voice *vp); |
43 | static void trigger_voice(struct snd_emux_voice *vp); | 43 | static void trigger_voice(struct snd_emux_voice *vp); |
@@ -45,7 +45,6 @@ static void release_voice(struct snd_emux_voice *vp); | |||
45 | static void update_voice(struct snd_emux_voice *vp, int update); | 45 | static void update_voice(struct snd_emux_voice *vp, int update); |
46 | static void terminate_voice(struct snd_emux_voice *vp); | 46 | static void terminate_voice(struct snd_emux_voice *vp); |
47 | static void free_voice(struct snd_emux_voice *vp); | 47 | static void free_voice(struct snd_emux_voice *vp); |
48 | |||
49 | static void set_fmmod(struct snd_emu10k1 *hw, struct snd_emux_voice *vp); | 48 | static void set_fmmod(struct snd_emu10k1 *hw, struct snd_emux_voice *vp); |
50 | static void set_fm2frq2(struct snd_emu10k1 *hw, struct snd_emux_voice *vp); | 49 | static void set_fm2frq2(struct snd_emu10k1 *hw, struct snd_emux_voice *vp); |
51 | static void set_filterQ(struct snd_emu10k1 *hw, struct snd_emux_voice *vp); | 50 | static void set_filterQ(struct snd_emu10k1 *hw, struct snd_emux_voice *vp); |
@@ -75,9 +74,9 @@ static struct snd_emux_operators emu10k1_ops = { | |||
75 | }; | 74 | }; |
76 | 75 | ||
77 | void | 76 | void |
78 | snd_emu10k1_ops_setup(struct snd_emux *emu) | 77 | snd_emu10k1_ops_setup(struct snd_emux *emux) |
79 | { | 78 | { |
80 | emu->ops = emu10k1_ops; | 79 | emux->ops = emu10k1_ops; |
81 | } | 80 | } |
82 | 81 | ||
83 | 82 | ||
@@ -166,7 +165,11 @@ free_voice(struct snd_emux_voice *vp) | |||
166 | struct snd_emu10k1 *hw; | 165 | struct snd_emu10k1 *hw; |
167 | 166 | ||
168 | hw = vp->hw; | 167 | hw = vp->hw; |
169 | if (vp->ch >= 0) { | 168 | /* FIXME: emu10k1_synth is broken. */ |
169 | /* This can get called with hw == 0 */ | ||
170 | /* Problem apparent on plug, unplug then plug */ | ||
171 | /* on the Audigy 2 ZS Notebook. */ | ||
172 | if (hw && (vp->ch >= 0)) { | ||
170 | snd_emu10k1_ptr_write(hw, IFATN, vp->ch, 0xff00); | 173 | snd_emu10k1_ptr_write(hw, IFATN, vp->ch, 0xff00); |
171 | snd_emu10k1_ptr_write(hw, DCYSUSV, vp->ch, 0x807f | DCYSUSV_CHANNELENABLE_MASK); | 174 | snd_emu10k1_ptr_write(hw, DCYSUSV, vp->ch, 0x807f | DCYSUSV_CHANNELENABLE_MASK); |
172 | // snd_emu10k1_ptr_write(hw, DCYSUSV, vp->ch, 0); | 175 | // snd_emu10k1_ptr_write(hw, DCYSUSV, vp->ch, 0); |