]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - sound/pci/pcxhr/pcxhr_core.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6
[linux-2.6-omap-h63xx.git] / sound / pci / pcxhr / pcxhr_core.c
index fdc652c6992d02265254ce5bd4fcb1a36c386962..78aa81feaa4a9edfccb8fde5444b580d3afbb1a6 100644 (file)
@@ -20,7 +20,6 @@
  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
  */
 
-#include <sound/driver.h>
 #include <linux/delay.h>
 #include <linux/firmware.h>
 #include <linux/interrupt.h>
@@ -274,12 +273,9 @@ int pcxhr_load_xilinx_binary(struct pcxhr_mgr *mgr, const struct firmware *xilin
 
        /* test first xilinx */
        chipsc = PCXHR_INPL(mgr, PCXHR_PLX_CHIPSC);
-       if (!second) {
-               if (chipsc & PCXHR_CHIPSC_GPI_USERI) {
-                       snd_printdd("no need to load first xilinx\n");
-                       return 0; /* first xilinx is already present and cannot be reset */
-               }
-       } else {
+       /* REV01 cards do not support the PCXHR_CHIPSC_GPI_USERI bit anymore */
+       /* this bit will always be 1; no possibility to test presence of first xilinx */
+       if(second) {
                if ((chipsc & PCXHR_CHIPSC_GPI_USERI) == 0) {
                        snd_printk(KERN_ERR "error loading first xilinx\n");
                        return -EINVAL;
@@ -901,7 +897,7 @@ int pcxhr_set_pipe_state(struct pcxhr_mgr *mgr, int playback_mask, int capture_m
 #ifdef CONFIG_SND_DEBUG_DETECT
        do_gettimeofday(&my_tv2);
        snd_printdd("***SET PIPE STATE*** TIME = %ld (err = %x)\n",
-                   my_tv2.tv_usec - my_tv1.tv_usec, err);
+                   (long)(my_tv2.tv_usec - my_tv1.tv_usec), err);
 #endif
        return 0;
 }
@@ -1009,30 +1005,37 @@ void pcxhr_msg_tasklet(unsigned long arg)
                        int nb_stream = (prmh->stat[i] >> (2*FIELD_SIZE)) & MASK_FIRST_FIELD;
                        int pipe = prmh->stat[i] & MASK_FIRST_FIELD;
                        int is_capture = prmh->stat[i] & 0x400000;
-                       u32 err;
+                       u32 err2;
 
                        if (prmh->stat[i] & 0x800000) { /* if BIT_END */
                                snd_printdd("TASKLET : End%sPipe %d\n",
                                            is_capture ? "Record" : "Play", pipe);
                        }
                        i++;
-                       err = prmh->stat[i] ? prmh->stat[i] : prmh->stat[i+1];
-                       if (err)
-                               pcxhr_handle_async_err(mgr, err, PCXHR_ERR_PIPE,
+                       err2 = prmh->stat[i] ? prmh->stat[i] : prmh->stat[i+1];
+                       if (err2)
+                               pcxhr_handle_async_err(mgr, err2,
+                                                      PCXHR_ERR_PIPE,
                                                       pipe, is_capture);
                        i += 2;
                        for (j = 0; j < nb_stream; j++) {
-                               err = prmh->stat[i] ? prmh->stat[i] : prmh->stat[i+1];
-                               if (err)
-                                       pcxhr_handle_async_err(mgr, err, PCXHR_ERR_STREAM,
-                                                              pipe, is_capture);
+                               err2 = prmh->stat[i] ?
+                                       prmh->stat[i] : prmh->stat[i+1];
+                               if (err2)
+                                       pcxhr_handle_async_err(mgr, err2,
+                                                              PCXHR_ERR_STREAM,
+                                                              pipe,
+                                                              is_capture);
                                i += 2;
                        }
                        for (j = 0; j < nb_audio; j++) {
-                               err = prmh->stat[i] ? prmh->stat[i] : prmh->stat[i+1];
-                               if (err)
-                                       pcxhr_handle_async_err(mgr, err, PCXHR_ERR_AUDIO,
-                                                              pipe, is_capture);
+                               err2 = prmh->stat[i] ?
+                                       prmh->stat[i] : prmh->stat[i+1];
+                               if (err2)
+                                       pcxhr_handle_async_err(mgr, err2,
+                                                              PCXHR_ERR_AUDIO,
+                                                              pipe,
+                                                              is_capture);
                                i += 2;
                        }
                }
@@ -1134,7 +1137,7 @@ static void pcxhr_update_timer_pos(struct pcxhr_mgr *mgr,
 }
 
 
-irqreturn_t pcxhr_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+irqreturn_t pcxhr_interrupt(int irq, void *dev_id)
 {
        struct pcxhr_mgr *mgr = dev_id;
        unsigned int reg;