]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - sound/pci/pcxhr/pcxhr_hwdep.c
ALSA: Kill snd_assert() in sound/pci/*
[linux-2.6-omap-h63xx.git] / sound / pci / pcxhr / pcxhr_hwdep.c
index d2f043278cf4f8a329affc0116d6d122f1f586ee..96640d9c227d83628234c81033fd31b870b00b4e 100644 (file)
@@ -65,15 +65,18 @@ static int pcxhr_init_board(struct pcxhr_mgr *mgr)
        if (err)
                return err;
        /* test 8 or 12 phys out */
-       snd_assert((rmh.stat[0] & MASK_FIRST_FIELD) == mgr->playback_chips*2,
-                  return -EINVAL);
+       if ((rmh.stat[0] & MASK_FIRST_FIELD) != mgr->playback_chips * 2)
+               return -EINVAL;
        /* test 8 or 2 phys in */
-       snd_assert(((rmh.stat[0] >> (2*FIELD_SIZE)) & MASK_FIRST_FIELD) ==
-                  mgr->capture_chips * 2, return -EINVAL);
+       if (((rmh.stat[0] >> (2 * FIELD_SIZE)) & MASK_FIRST_FIELD) !=
+           mgr->capture_chips * 2)
+               return -EINVAL;
        /* test max nb substream per board */
-       snd_assert((rmh.stat[1] & 0x5F) >= card_streams, return -EINVAL);
+       if ((rmh.stat[1] & 0x5F) < card_streams)
+               return -EINVAL;
        /* test max nb substream per pipe */
-       snd_assert(((rmh.stat[1]>>7)&0x5F) >= PCXHR_PLAYBACK_STREAMS, return -EINVAL);
+       if (((rmh.stat[1] >> 7) & 0x5F) < PCXHR_PLAYBACK_STREAMS)
+               return -EINVAL;
 
        pcxhr_init_rmh(&rmh, CMD_VERSION);
        /* firmware num for DSP */