aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/pcxhr/pcxhr.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/pcxhr/pcxhr.c')
-rw-r--r--sound/pci/pcxhr/pcxhr.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sound/pci/pcxhr/pcxhr.c b/sound/pci/pcxhr/pcxhr.c
index 2c7e25336795..0e06c6c9fcc0 100644
--- a/sound/pci/pcxhr/pcxhr.c
+++ b/sound/pci/pcxhr/pcxhr.c
@@ -464,7 +464,8 @@ static int pcxhr_update_r_buffer(struct pcxhr_stream *stream)
464 pcxhr_init_rmh(&rmh, CMD_UPDATE_R_BUFFERS); 464 pcxhr_init_rmh(&rmh, CMD_UPDATE_R_BUFFERS);
465 pcxhr_set_pipe_cmd_params(&rmh, is_capture, stream->pipe->first_audio, stream_num, 0); 465 pcxhr_set_pipe_cmd_params(&rmh, is_capture, stream->pipe->first_audio, stream_num, 0);
466 466
467 snd_assert(subs->runtime->dma_bytes < 0x200000); /* max buffer size is 2 MByte */ 467 /* max buffer size is 2 MByte */
468 snd_BUG_ON(subs->runtime->dma_bytes >= 0x200000);
468 rmh.cmd[1] = subs->runtime->dma_bytes * 8; /* size in bits */ 469 rmh.cmd[1] = subs->runtime->dma_bytes * 8; /* size in bits */
469 rmh.cmd[2] = subs->runtime->dma_addr >> 24; /* most significant byte */ 470 rmh.cmd[2] = subs->runtime->dma_addr >> 24; /* most significant byte */
470 rmh.cmd[2] |= 1<<19; /* this is a circular buffer */ 471 rmh.cmd[2] |= 1<<19; /* this is a circular buffer */
@@ -1228,7 +1229,8 @@ static int __devinit pcxhr_probe(struct pci_dev *pci, const struct pci_device_id
1228 return -ENOMEM; 1229 return -ENOMEM;
1229 } 1230 }
1230 1231
1231 snd_assert(pci_id->driver_data < PCI_ID_LAST, return -ENODEV); 1232 if (snd_BUG_ON(pci_id->driver_data >= PCI_ID_LAST))
1233 return -ENODEV;
1232 card_name = pcxhr_board_params[pci_id->driver_data].board_name; 1234 card_name = pcxhr_board_params[pci_id->driver_data].board_name;
1233 mgr->playback_chips = pcxhr_board_params[pci_id->driver_data].playback_chips; 1235 mgr->playback_chips = pcxhr_board_params[pci_id->driver_data].playback_chips;
1234 mgr->capture_chips = pcxhr_board_params[pci_id->driver_data].capture_chips; 1236 mgr->capture_chips = pcxhr_board_params[pci_id->driver_data].capture_chips;