]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - sound/pci/emu10k1/emufx.c
ALSA: Kill snd_assert() in sound/pci/*
[linux-2.6-omap-h63xx.git] / sound / pci / emu10k1 / emufx.c
index 354a892adb40da522ecd30d50473d8863c5eb4ef..7dba08f0ab8e2c9d9e166fd12f3ed9934ed3cd34 100644 (file)
@@ -487,7 +487,8 @@ static void snd_emu10k1_write_op(struct snd_emu10k1_fx8010_code *icode,
                                 u32 op, u32 r, u32 a, u32 x, u32 y)
 {
        u_int32_t *code;
-       snd_assert(*ptr < 512, return);
+       if (snd_BUG_ON(*ptr >= 512))
+               return;
        code = (u_int32_t __force *)icode->code + (*ptr) * 2;
        set_bit(*ptr, icode->code_valid);
        code[0] = ((x & 0x3ff) << 10) | (y & 0x3ff);
@@ -503,7 +504,8 @@ static void snd_emu10k1_audigy_write_op(struct snd_emu10k1_fx8010_code *icode,
                                        u32 op, u32 r, u32 a, u32 x, u32 y)
 {
        u_int32_t *code;
-       snd_assert(*ptr < 1024, return);
+       if (snd_BUG_ON(*ptr >= 1024))
+               return;
        code = (u_int32_t __force *)icode->code + (*ptr) * 2;
        set_bit(*ptr, icode->code_valid);
        code[0] = ((x & 0x7ff) << 12) | (y & 0x7ff);
@@ -1261,7 +1263,7 @@ static int __devinit _snd_emu10k1_audigy_init_efx(struct snd_emu10k1 *emu)
 A_OP(icode, &ptr, iMAC0, A_GPR(var), A_GPR(var), A_GPR(vol), A_EXTIN(input))
 
        /* emu1212 DSP 0 and DSP 1 Capture */
-       if (emu->card_capabilities->emu1010) {
+       if (emu->card_capabilities->emu_model) {
                if (emu->card_capabilities->ca0108_chip) {
                        /* Note:JCD:No longer bit shift lower 16bits to upper 16bits of 32bit value. */
                        A_OP(icode, &ptr, iMACINT0, A_GPR(tmp), A_C_00000000, A3_EMU32IN(0x0), A_C_00000001);
@@ -1515,7 +1517,7 @@ A_OP(icode, &ptr, iMAC0, A_GPR(var), A_GPR(var), A_GPR(vol), A_EXTIN(input))
 
        /* digital outputs */
        /* A_PUT_STEREO_OUTPUT(A_EXTOUT_FRONT_L, A_EXTOUT_FRONT_R, playback + SND_EMU10K1_PLAYBACK_CHANNELS); */
-       if (emu->card_capabilities->emu1010) {
+       if (emu->card_capabilities->emu_model) {
                /* EMU1010 Outputs from PCM Front, Rear, Center, LFE, Side */
                snd_printk("EMU outputs on\n");
                for (z = 0; z < 8; z++) {
@@ -1563,7 +1565,7 @@ A_OP(icode, &ptr, iMAC0, A_GPR(var), A_GPR(var), A_GPR(vol), A_EXTIN(input))
        A_PUT_OUTPUT(A_EXTOUT_ADC_CAP_R, capture+1);
 #endif
 
-       if (emu->card_capabilities->emu1010) {
+       if (emu->card_capabilities->emu_model) {
                if (emu->card_capabilities->ca0108_chip) {
                        snd_printk("EMU2 inputs on\n");
                        for (z = 0; z < 0x10; z++) {