aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/cs4281.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/cs4281.c')
-rw-r--r--sound/pci/cs4281.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/sound/pci/cs4281.c b/sound/pci/cs4281.c
index 7556fd90d0eb..ef9308f7c45b 100644
--- a/sound/pci/cs4281.c
+++ b/sound/pci/cs4281.c
@@ -766,13 +766,13 @@ static void snd_cs4281_mode(struct cs4281 *chip, struct cs4281_dma *dma,
766 if (!capture) { 766 if (!capture) {
767 if (dma->left_slot == chip->src_left_play_slot) { 767 if (dma->left_slot == chip->src_left_play_slot) {
768 unsigned int val = snd_cs4281_rate(runtime->rate, NULL); 768 unsigned int val = snd_cs4281_rate(runtime->rate, NULL);
769 snd_assert(dma->right_slot == chip->src_right_play_slot, ); 769 snd_BUG_ON(dma->right_slot != chip->src_right_play_slot);
770 snd_cs4281_pokeBA0(chip, BA0_DACSR, val); 770 snd_cs4281_pokeBA0(chip, BA0_DACSR, val);
771 } 771 }
772 } else { 772 } else {
773 if (dma->left_slot == chip->src_left_rec_slot) { 773 if (dma->left_slot == chip->src_left_rec_slot) {
774 unsigned int val = snd_cs4281_rate(runtime->rate, NULL); 774 unsigned int val = snd_cs4281_rate(runtime->rate, NULL);
775 snd_assert(dma->right_slot == chip->src_right_rec_slot, ); 775 snd_BUG_ON(dma->right_slot != chip->src_right_rec_slot);
776 snd_cs4281_pokeBA0(chip, BA0_ADCSR, val); 776 snd_cs4281_pokeBA0(chip, BA0_ADCSR, val);
777 } 777 }
778 } 778 }
@@ -1209,7 +1209,8 @@ static void snd_cs4281_gameport_trigger(struct gameport *gameport)
1209{ 1209{
1210 struct cs4281 *chip = gameport_get_port_data(gameport); 1210 struct cs4281 *chip = gameport_get_port_data(gameport);
1211 1211
1212 snd_assert(chip, return); 1212 if (snd_BUG_ON(!chip))
1213 return;
1213 snd_cs4281_pokeBA0(chip, BA0_JSPT, 0xff); 1214 snd_cs4281_pokeBA0(chip, BA0_JSPT, 0xff);
1214} 1215}
1215 1216
@@ -1217,7 +1218,8 @@ static unsigned char snd_cs4281_gameport_read(struct gameport *gameport)
1217{ 1218{
1218 struct cs4281 *chip = gameport_get_port_data(gameport); 1219 struct cs4281 *chip = gameport_get_port_data(gameport);
1219 1220
1220 snd_assert(chip, return 0); 1221 if (snd_BUG_ON(!chip))
1222 return 0;
1221 return snd_cs4281_peekBA0(chip, BA0_JSPT); 1223 return snd_cs4281_peekBA0(chip, BA0_JSPT);
1222} 1224}
1223 1225
@@ -1228,7 +1230,8 @@ static int snd_cs4281_gameport_cooked_read(struct gameport *gameport,
1228 struct cs4281 *chip = gameport_get_port_data(gameport); 1230 struct cs4281 *chip = gameport_get_port_data(gameport);
1229 unsigned js1, js2, jst; 1231 unsigned js1, js2, jst;
1230 1232
1231 snd_assert(chip, return 0); 1233 if (snd_BUG_ON(!chip))
1234 return 0;
1232 1235
1233 js1 = snd_cs4281_peekBA0(chip, BA0_JSC1); 1236 js1 = snd_cs4281_peekBA0(chip, BA0_JSC1);
1234 js2 = snd_cs4281_peekBA0(chip, BA0_JSC2); 1237 js2 = snd_cs4281_peekBA0(chip, BA0_JSC2);