]> 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 369c19fea985f11af6c108ac1e9aa3e6668c0485..96640d9c227d83628234c81033fd31b870b00b4e 100644 (file)
@@ -20,7 +20,6 @@
  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
  */
 
-#include <sound/driver.h>
 #include <linux/interrupt.h>
 #include <linux/vmalloc.h>
 #include <linux/firmware.h>
@@ -66,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 */
@@ -356,6 +358,12 @@ int pcxhr_setup_firmware(struct pcxhr_mgr *mgr)
        return 0;
 }
 
+MODULE_FIRMWARE("pcxhr/xi_1_882.dat");
+MODULE_FIRMWARE("pcxhr/xc_1_882.dat");
+MODULE_FIRMWARE("pcxhr/e321_512.e56");
+MODULE_FIRMWARE("pcxhr/b321_512.b56");
+MODULE_FIRMWARE("pcxhr/d321_512.d56");
+
 #else /* old style firmware loading */
 
 /* pcxhr hwdep interface id string */
@@ -389,7 +397,7 @@ static int pcxhr_hwdep_dsp_load(struct snd_hwdep *hw,
                           (unsigned long)fw.size);
                return -ENOMEM;
        }
-       if (copy_from_user(fw.data, dsp->image, dsp->length)) {
+       if (copy_from_user((void *)fw.data, dsp->image, dsp->length)) {
                vfree(fw.data);
                return -EFAULT;
        }