diff options
Diffstat (limited to 'linux/drivers/media/video/cx88/cx88-alsa.c')
-rw-r--r-- | linux/drivers/media/video/cx88/cx88-alsa.c | 37 |
1 files changed, 14 insertions, 23 deletions
diff --git a/linux/drivers/media/video/cx88/cx88-alsa.c b/linux/drivers/media/video/cx88/cx88-alsa.c index 3893f36c6..21f915754 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.11 2005/12/04 21:06:50 mkrufky Exp $ + * $Id: cx88-alsa.c,v 1.12 2005/12/10 03:41:57 mchehab Exp $ * * Support for audio capture * PCI function #1 of the cx2388x. @@ -112,7 +112,6 @@ module_param_array(enable, bool, dummy, 0444); #else module_param_array(enable, bool, NULL, 0444); #endif - MODULE_PARM_DESC(enable, "Enable cx88x soundcard. default enabled."); /**************************************************************************** @@ -137,7 +136,7 @@ MODULE_PARM_DESC(debug,"enable debug messages"); * BOARD Specific: Sets audio DMA */ -int cx88_start_audio_dma(snd_cx88_card_t *chip) +int _cx88_start_audio_dma(snd_cx88_card_t *chip) { struct cx88_core *core=chip->core; @@ -166,7 +165,7 @@ int cx88_start_audio_dma(snd_cx88_card_t *chip) /* * BOARD Specific: Resets audio DMA */ -int cx88_stop_audio_dma(snd_cx88_card_t *chip) +int _cx88_stop_audio_dma(snd_cx88_card_t *chip) { struct cx88_core *core=chip->core; /* stop dma */ @@ -189,7 +188,7 @@ static void cx8801_timeout(unsigned long data) if (debug) cx88_sram_channel_dump(chip->core, &cx88_sram_channels[SRAM_CH26]); - cx88_stop_audio_dma(chip); + _cx88_stop_audio_dma(chip); #if 0 do_cancel_buffers(dev,"timeout",1); #endif @@ -336,7 +335,6 @@ static void snd_cx88_pci_error(bt87x_t *chip, unsigned int status) /* * Digital hardware definition */ -#if 0 static snd_pcm_hardware_t snd_cx88_digital_hw = { .info = SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | @@ -356,7 +354,6 @@ static snd_pcm_hardware_t snd_cx88_digital_hw = { /* * Sets board to provide digital audio */ - static int snd_cx88_set_digital_hw(snd_cx88_card_t *chip, snd_pcm_runtime_t *runtime) { static struct { @@ -386,9 +383,7 @@ static int snd_cx88_set_digital_hw(snd_cx88_card_t *chip, snd_pcm_runtime_t *run runtime->hw.rate_max = chip->dig_rate; return 0; } -#endif -#if 0 /* * audio open callback */ @@ -510,13 +505,11 @@ static snd_pcm_uframes_t snd_cx88_pointer(snd_pcm_substream_t *substream) // snd_pcm_runtime_t *runtime = substream->runtime; // return (snd_pcm_uframes_t)bytes_to_frames(runtime, chip->current_line * chip->line_bytes); - return 0; } /* * operators */ - static snd_pcm_ops_t snd_cx88_pcm_ops = { .open = snd_cx88_pcm_open, .close = snd_cx88_close, @@ -549,7 +542,6 @@ static int __devinit snd_cx88_pcm(snd_cx88_card_t *chip, int device, char *name) 128 * 1024, (255 * 4092 + 1023) & ~1023); } -#endif /**************************************************************************** CONTROL INTERFACE @@ -715,8 +707,8 @@ static int devno=0; static int __devinit snd_cx88_create(snd_card_t *card, struct pci_dev *pci, snd_cx88_card_t **rchip) { - snd_cx88_card_t *chip; - struct cx88_core *core; + snd_cx88_card_t *chip; + struct cx88_core *core; int err; static snd_device_ops_t ops = { .dev_free = snd_cx88_dev_free @@ -735,16 +727,8 @@ static int __devinit snd_cx88_create(snd_card_t *card, struct pci_dev *pci, } memset(chip,0,sizeof(*chip)); - core = cx88_core_get(chip->pci); - if (NULL == core) { - err = -EINVAL; - kfree (chip); - return err; - } - chip->core = core; - if (!pci_dma_supported(pci,0xffffffff)) { - dprintk(0, "%s/1: Oops: no 32bit PCI DMA ???\n", core->name); + dprintk(0, "%s/1: Oops: no 32bit PCI DMA ???\n",core->name); err = -EIO; kfree (chip); return err; @@ -771,6 +755,13 @@ static int __devinit snd_cx88_create(snd_card_t *card, struct pci_dev *pci, } #endif + core = cx88_core_get(chip->pci); + if (NULL == core) { + err = -EINVAL; + kfree (chip); + return err; + } + chip->core = core; #if 1 /* Should be tested if it is wright */ chip->dig_rate=48000; #endif |