summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/cx88
diff options
context:
space:
mode:
authorNickolay V. Shmyrev <devnull@localhost>2005-10-25 19:24:47 +0000
committerNickolay V. Shmyrev <devnull@localhost>2005-10-25 19:24:47 +0000
commitf04ee55a60017731a2c3144437e1032f5550f988 (patch)
tree3756db67df12f255a8fa3c1604e955482791bb4d /linux/drivers/media/video/cx88
parentdade121b62461fc01d9fe24ceb1c30afef7c4be8 (diff)
downloadmediapointer-dvb-s2-f04ee55a60017731a2c3144437e1032f5550f988.tar.gz
mediapointer-dvb-s2-f04ee55a60017731a2c3144437e1032f5550f988.tar.bz2
* ../linux/drivers/media/video/cx88/cx88-alsa.c:
(snd_cx88_pointer), (snd_cx88_create): - Fix build warnings and errors. Signed-off-by: Nickolay V. Shmyrev <nshmyrev@yandex.ru>
Diffstat (limited to 'linux/drivers/media/video/cx88')
-rw-r--r--linux/drivers/media/video/cx88/cx88-alsa.c40
1 files changed, 29 insertions, 11 deletions
diff --git a/linux/drivers/media/video/cx88/cx88-alsa.c b/linux/drivers/media/video/cx88/cx88-alsa.c
index 39bbcacc5..7c5cba501 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.9 2005/10/16 12:13:58 mchehab Exp $
+ * $Id: cx88-alsa.c,v 1.10 2005/10/25 19:24:47 nsh Exp $
*
* Support for audio capture
* PCI function #1 of the cx2388x.
@@ -89,6 +89,10 @@ struct cx88_audio_dev {
};
typedef struct cx88_audio_dev snd_cx88_card_t;
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,8)
+#define chip_t snd_cx88_card_t
+#endif
+
/****************************************************************************
Module global static vars
****************************************************************************/
@@ -102,7 +106,13 @@ static int pcm_substreams[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 8};
static snd_cx88_card_t *snd_dummy_cards[SNDRV_CARDS] = SNDRV_DEFAULT_PTR;
#endif
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10)
+static unsigned int dummy;
+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.");
/****************************************************************************
@@ -326,6 +336,7 @@ 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 |
@@ -345,6 +356,7 @@ 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 {
@@ -374,7 +386,9 @@ 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
*/
@@ -496,11 +510,13 @@ 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,
@@ -533,6 +549,7 @@ static int __devinit snd_cx88_pcm(snd_cx88_card_t *chip, int device, char *name)
128 * 1024,
(255 * 4092 + 1023) & ~1023);
}
+#endif
/****************************************************************************
CONTROL INTERFACE
@@ -698,8 +715,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
@@ -718,8 +735,16 @@ 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;
@@ -746,13 +771,6 @@ 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