diff options
-rw-r--r-- | sound/pci/ali5451/ali5451.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/pci/ali5451/ali5451.c b/sound/pci/ali5451/ali5451.c index e1ed59549c50..cb59f994c68f 100644 --- a/sound/pci/ali5451/ali5451.c +++ b/sound/pci/ali5451/ali5451.c | |||
@@ -1250,7 +1250,7 @@ static int snd_ali_playback_hw_params(struct snd_pcm_substream *substream, | |||
1250 | evoice->substream = substream; | 1250 | evoice->substream = substream; |
1251 | } | 1251 | } |
1252 | } else { | 1252 | } else { |
1253 | if (!evoice) { | 1253 | if (evoice) { |
1254 | snd_ali_free_voice(codec, evoice); | 1254 | snd_ali_free_voice(codec, evoice); |
1255 | pvoice->extra = evoice = NULL; | 1255 | pvoice->extra = evoice = NULL; |
1256 | } | 1256 | } |
@@ -1267,7 +1267,7 @@ static int snd_ali_playback_hw_free(struct snd_pcm_substream *substream) | |||
1267 | struct snd_ali_voice *evoice = pvoice ? pvoice->extra : NULL; | 1267 | struct snd_ali_voice *evoice = pvoice ? pvoice->extra : NULL; |
1268 | 1268 | ||
1269 | snd_pcm_lib_free_pages(substream); | 1269 | snd_pcm_lib_free_pages(substream); |
1270 | if (!evoice) { | 1270 | if (evoice) { |
1271 | snd_ali_free_voice(codec, evoice); | 1271 | snd_ali_free_voice(codec, evoice); |
1272 | pvoice->extra = NULL; | 1272 | pvoice->extra = NULL; |
1273 | } | 1273 | } |
@@ -1356,7 +1356,7 @@ static int snd_ali_playback_prepare(struct snd_pcm_substream *substream) | |||
1356 | VOL, | 1356 | VOL, |
1357 | CTRL, | 1357 | CTRL, |
1358 | EC); | 1358 | EC); |
1359 | if (!evoice) { | 1359 | if (evoice) { |
1360 | evoice->count = pvoice->count; | 1360 | evoice->count = pvoice->count; |
1361 | evoice->eso = pvoice->count << 1; | 1361 | evoice->eso = pvoice->count << 1; |
1362 | ESO = evoice->eso - 1; | 1362 | ESO = evoice->eso - 1; |