]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - sound/pci/pcxhr/pcxhr.c
ALSA: Kill snd_assert() in sound/pci/*
[linux-2.6-omap-h63xx.git] / sound / pci / pcxhr / pcxhr.c
index 7fdcdc8c6b6478bbce2fff1c3f784ed90fb51a37..0e06c6c9fcc01d1406e3ba61921aece7bef9196f 100644 (file)
@@ -464,7 +464,8 @@ static int pcxhr_update_r_buffer(struct pcxhr_stream *stream)
        pcxhr_init_rmh(&rmh, CMD_UPDATE_R_BUFFERS);
        pcxhr_set_pipe_cmd_params(&rmh, is_capture, stream->pipe->first_audio, stream_num, 0);
 
-       snd_assert(subs->runtime->dma_bytes < 0x200000);        /* max buffer size is 2 MByte */
+       /* max buffer size is 2 MByte */
+       snd_BUG_ON(subs->runtime->dma_bytes >= 0x200000);
        rmh.cmd[1] = subs->runtime->dma_bytes * 8;              /* size in bits */
        rmh.cmd[2] = subs->runtime->dma_addr >> 24;             /* most significant byte */
        rmh.cmd[2] |= 1<<19;                                    /* this is a circular buffer */
@@ -516,7 +517,7 @@ static void pcxhr_trigger_tasklet(unsigned long arg)
        int capture_mask = 0;
        int playback_mask = 0;
 
-#ifdef CONFIG_SND_DEBUG_DETECT
+#ifdef CONFIG_SND_DEBUG_VERBOSE
        struct timeval my_tv1, my_tv2;
        do_gettimeofday(&my_tv1);
 #endif
@@ -623,7 +624,7 @@ static void pcxhr_trigger_tasklet(unsigned long arg)
 
        mutex_unlock(&mgr->setup_mutex);
 
-#ifdef CONFIG_SND_DEBUG_DETECT
+#ifdef CONFIG_SND_DEBUG_VERBOSE
        do_gettimeofday(&my_tv2);
        snd_printdd("***TRIGGER TASKLET*** TIME = %ld (err = %x)\n",
                    (long)(my_tv2.tv_usec - my_tv1.tv_usec), err);
@@ -1228,7 +1229,8 @@ static int __devinit pcxhr_probe(struct pci_dev *pci, const struct pci_device_id
                return -ENOMEM;
        }
 
-       snd_assert(pci_id->driver_data < PCI_ID_LAST, return -ENODEV);
+       if (snd_BUG_ON(pci_id->driver_data >= PCI_ID_LAST))
+               return -ENODEV;
        card_name = pcxhr_board_params[pci_id->driver_data].board_name;
        mgr->playback_chips = pcxhr_board_params[pci_id->driver_data].playback_chips;
        mgr->capture_chips  = pcxhr_board_params[pci_id->driver_data].capture_chips;