diff options
author | Ricardo Cerqueira <devnull@localhost> | 2006-01-05 03:31:42 +0000 |
---|---|---|
committer | Ricardo Cerqueira <devnull@localhost> | 2006-01-05 03:31:42 +0000 |
commit | b951721f0c713f7043f0346e16c9b0d5190633f3 (patch) | |
tree | b5f5254266a6353199d07e2eb95544d130ad6c08 /linux/drivers/media/video/cx88 | |
parent | f7f8cd7c769882afe66875f83b23602bb23efed4 (diff) | |
download | mediapointer-dvb-s2-b951721f0c713f7043f0346e16c9b0d5190633f3.tar.gz mediapointer-dvb-s2-b951721f0c713f7043f0346e16c9b0d5190633f3.tar.bz2 |
Workaround to deal with the cx88 DMA code conflicts
From: Ricardo Cerqueira <v4l@cerqueira.org>
Existing audio DMA uses conflict with cx88-alsa. This workaround disables
that code if cx88-alsa is being compiled
Signed-off-by:
Diffstat (limited to 'linux/drivers/media/video/cx88')
-rw-r--r-- | linux/drivers/media/video/cx88/cx88-alsa.c | 27 | ||||
-rw-r--r-- | linux/drivers/media/video/cx88/cx88-core.c | 3 | ||||
-rw-r--r-- | linux/drivers/media/video/cx88/cx88-tvaudio.c | 6 |
3 files changed, 20 insertions, 16 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, }; /* diff --git a/linux/drivers/media/video/cx88/cx88-core.c b/linux/drivers/media/video/cx88/cx88-core.c index bd1b6e782..df19d7309 100644 --- a/linux/drivers/media/video/cx88/cx88-core.c +++ b/linux/drivers/media/video/cx88/cx88-core.c @@ -1,5 +1,5 @@ /* - * $Id: cx88-core.c,v 1.51 2006/01/04 03:15:34 rmcc Exp $ + * $Id: cx88-core.c,v 1.52 2006/01/05 03:31:42 rmcc Exp $ * * device driver for Conexant 2388x based TV cards * driver core @@ -834,7 +834,6 @@ int cx88_start_audio_dma(struct cx88_core *core) /* start dma */ cx_write(MO_AUD_DMACNTRL, 0x0003); /* Up and Down fifo enable */ - return 0; } diff --git a/linux/drivers/media/video/cx88/cx88-tvaudio.c b/linux/drivers/media/video/cx88/cx88-tvaudio.c index 478723ca5..1c169059b 100644 --- a/linux/drivers/media/video/cx88/cx88-tvaudio.c +++ b/linux/drivers/media/video/cx88/cx88-tvaudio.c @@ -1,5 +1,5 @@ /* - $Id: cx88-tvaudio.c,v 1.51 2005/12/05 02:31:46 mchehab Exp $ + $Id: cx88-tvaudio.c,v 1.52 2006/01/05 03:31:42 rmcc Exp $ cx88x-audio.c - Conexant CX23880/23881 audio downstream driver driver @@ -136,12 +136,12 @@ static void set_audio_finish(struct cx88_core *core, u32 ctl) { u32 volume; -#if 1 +#ifndef USING_CX88_ALSA /* restart dma; This avoids buzz in NICAM and is good in others */ cx88_stop_audio_dma(core); #endif cx_write(AUD_RATE_THRES_DMD, 0x000000C0); -#if 1 +#ifndef USING_CX88_ALSA cx88_start_audio_dma(core); #endif |