summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/cx88/cx88-alsa.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drivers/media/video/cx88/cx88-alsa.c')
-rw-r--r--linux/drivers/media/video/cx88/cx88-alsa.c27
1 files changed, 16 insertions, 11 deletions
diff --git a/linux/drivers/media/video/cx88/cx88-alsa.c b/linux/drivers/media/video/cx88/cx88-alsa.c
index 2b78ad082..d37e47135 100644
--- a/linux/drivers/media/video/cx88/cx88-alsa.c
+++ b/linux/drivers/media/video/cx88/cx88-alsa.c
@@ -1,5 +1,5 @@
/*
- * $Id: cx88-alsa.c,v 1.26 2006/01/05 02:03:53 rmcc Exp $
+ * $Id: cx88-alsa.c,v 1.27 2006/01/05 03:31:42 rmcc Exp $
*
* Support for audio capture
* PCI function #1 of the cx2388x.
@@ -149,7 +149,7 @@ int _cx88_start_audio_dma(snd_cx88_card_t *chip)
struct sram_channel *audio_ch = &cx88_sram_channels[SRAM_CH25];
- dprintk(1, "Starting audio DMA for %i bpl and %i (%i) lines at ptr2 %08x\n",buf->bpl, chip->num_periods, audio_ch->fifo_size / buf->bpl, audio_ch->fifo_start);
+ dprintk(1, "Starting audio DMA for %i bytes/line and %i (%i) lines at address %08x\n",buf->bpl, chip->num_periods, audio_ch->fifo_size / buf->bpl, audio_ch->fifo_start);
/* setup fifo + format - out channel */
cx88_sram_channel_setup(chip->core, &cx88_sram_channels[SRAM_CH25],
@@ -163,7 +163,7 @@ int _cx88_start_audio_dma(snd_cx88_card_t *chip)
dprintk(1,"Enabling IRQ, setting mask from 0x%x to 0x%x\n",chip->core->pci_irqmask,(chip->core->pci_irqmask | 0x02));
/* enable irqs */
- cx_set(MO_PCI_INTMSK, 0x02);
+ cx_set(MO_PCI_INTMSK, chip->core->pci_irqmask | 0x02);
/* Enables corresponding bits at AUD_INT_STAT */
@@ -176,7 +176,7 @@ int _cx88_start_audio_dma(snd_cx88_card_t *chip)
/* start dma */
cx_set(MO_DEV_CNTRL2, (1<<5)); /* Enables Risc Processor */
- cx_write(MO_AUD_DMACNTRL, 0x11); /* audio downstream FIFO and RISC enable */
+ cx_set(MO_AUD_DMACNTRL, 0x11); /* audio downstream FIFO and RISC enable */
if (debug)
cx88_sram_channel_dump(chip->core, &cx88_sram_channels[SRAM_CH25]);
@@ -197,7 +197,12 @@ int _cx88_stop_audio_dma(snd_cx88_card_t *chip)
/* disable irqs */
cx_clear(MO_PCI_INTMSK, 0x02);
- cx_write(MO_AUD_INTMSK, 0);
+ cx_clear(MO_AUD_INTMSK,
+ (1<<16)|
+ (1<<12)|
+ (1<<4)|
+ (1<<0)
+ );
if (debug)
cx88_sram_channel_dump(chip->core, &cx88_sram_channels[SRAM_CH25]);
@@ -339,13 +344,13 @@ static snd_pcm_hardware_t snd_cx88_digital_hw = {
.rates = SNDRV_PCM_RATE_48000,
.rate_min = 48000,
.rate_max = 48000,
- .channels_min = 2,
+ .channels_min = 1,
.channels_max = 2,
- .buffer_bytes_max = (4*1024),
- .period_bytes_min = 1024,
- .period_bytes_max = 1024,
- .periods_min = 4,
- .periods_max = 4,
+ .buffer_bytes_max = (2*2048),
+ .period_bytes_min = 256,
+ .period_bytes_max = 2048,
+ .periods_min = 2,
+ .periods_max = 16,
};
/*