diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-03-28 14:22:59 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-03-28 14:22:59 -0300 |
commit | c599755e8210ed32a69a488d22dac0aca121fef5 (patch) | |
tree | 11574011953900f89efc48b0d7ffcb97809159dc /linux/drivers | |
parent | 86cdf6980ce363417a611ef9a6f689875fb1b79e (diff) | |
download | mediapointer-dvb-s2-c599755e8210ed32a69a488d22dac0aca121fef5.tar.gz mediapointer-dvb-s2-c599755e8210ed32a69a488d22dac0aca121fef5.tar.bz2 |
Make code sync with recent ALSA changes on -git
From: Mauro Carvalho Chehab <mchehab@infradead.org>
kernel-sync
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers')
-rw-r--r-- | linux/drivers/media/video/cx88/cx88-alsa.c | 98 | ||||
-rw-r--r-- | linux/drivers/media/video/saa7134/saa7134-alsa.c | 120 | ||||
-rw-r--r-- | linux/drivers/media/video/saa7134/saa7134.h | 6 |
3 files changed, 223 insertions, 1 deletions
diff --git a/linux/drivers/media/video/cx88/cx88-alsa.c b/linux/drivers/media/video/cx88/cx88-alsa.c index 8ecdb41af..cd3fa72fc 100644 --- a/linux/drivers/media/video/cx88/cx88-alsa.c +++ b/linux/drivers/media/video/cx88/cx88-alsa.c @@ -65,7 +65,11 @@ struct cx88_audio_dev { /* audio controls */ int irq; +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) snd_card_t *card; +#else + struct snd_card *card; +#endif spinlock_t reg_lock; @@ -84,7 +88,11 @@ struct cx88_audio_dev { struct cx88_buffer *buf; long opened; +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) snd_pcm_substream_t *substream; +#else + struct snd_pcm_substream *substream; +#endif }; typedef struct cx88_audio_dev snd_cx88_card_t; @@ -101,7 +109,11 @@ typedef struct cx88_audio_dev snd_cx88_card_t; static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */ static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */ static int enable[SNDRV_CARDS] = {1, [1 ... (SNDRV_CARDS - 1)] = 1}; +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) static snd_card_t *snd_cx88_cards[SNDRV_CARDS]; +#else +static struct snd_card *snd_cx88_cards[SNDRV_CARDS]; +#endif #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10) static unsigned int dummy; @@ -334,7 +346,11 @@ static int dsp_buffer_free(snd_cx88_card_t *chip) /* * Digital hardware definition */ +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) static snd_pcm_hardware_t snd_cx88_digital_hw = { +#else +static struct snd_pcm_hardware snd_cx88_digital_hw = { +#endif .info = SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_BLOCK_TRANSFER | @@ -356,16 +372,28 @@ static snd_pcm_hardware_t snd_cx88_digital_hw = { /* * audio pcm capture runtime free */ +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) static void snd_card_cx88_runtime_free(snd_pcm_runtime_t *runtime) +#else +static void snd_card_cx88_runtime_free(struct snd_pcm_runtime *runtime) +#endif { } /* * audio pcm capture open callback */ +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) static int snd_cx88_pcm_open(snd_pcm_substream_t *substream) +#else +static int snd_cx88_pcm_open(struct snd_pcm_substream *substream) +#endif { snd_cx88_card_t *chip = snd_pcm_substream_chip(substream); +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) snd_pcm_runtime_t *runtime = substream->runtime; +#else + struct snd_pcm_runtime *runtime = substream->runtime; +#endif int err; if (test_and_set_bit(0, &chip->opened)) @@ -394,7 +422,11 @@ _error: /* * audio close callback */ +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) static int snd_cx88_close(snd_pcm_substream_t *substream) +#else +static int snd_cx88_close(struct snd_pcm_substream *substream) +#endif { snd_cx88_card_t *chip = snd_pcm_substream_chip(substream); @@ -407,8 +439,13 @@ static int snd_cx88_close(snd_pcm_substream_t *substream) /* * hw_params callback */ +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) static int snd_cx88_hw_params(snd_pcm_substream_t * substream, snd_pcm_hw_params_t * hw_params) +#else +static int snd_cx88_hw_params(struct snd_pcm_substream * substream, + struct snd_pcm_hw_params * hw_params) +#endif { snd_cx88_card_t *chip = snd_pcm_substream_chip(substream); struct cx88_buffer *buf; @@ -467,7 +504,11 @@ static int snd_cx88_hw_params(snd_pcm_substream_t * substream, /* * hw free callback */ +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) static int snd_cx88_hw_free(snd_pcm_substream_t * substream) +#else +static int snd_cx88_hw_free(struct snd_pcm_substream * substream) +#endif { snd_cx88_card_t *chip = snd_pcm_substream_chip(substream); @@ -483,7 +524,11 @@ static int snd_cx88_hw_free(snd_pcm_substream_t * substream) /* * prepare callback */ +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) static int snd_cx88_prepare(snd_pcm_substream_t *substream) +#else +static int snd_cx88_prepare(struct snd_pcm_substream *substream) +#endif { return 0; } @@ -492,7 +537,11 @@ static int snd_cx88_prepare(snd_pcm_substream_t *substream) /* * trigger callback */ +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) static int snd_cx88_card_trigger(snd_pcm_substream_t *substream, int cmd) +#else +static int snd_cx88_card_trigger(struct snd_pcm_substream *substream, int cmd) +#endif { snd_cx88_card_t *chip = snd_pcm_substream_chip(substream); int err; @@ -519,10 +568,18 @@ static int snd_cx88_card_trigger(snd_pcm_substream_t *substream, int cmd) /* * pointer callback */ +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) static snd_pcm_uframes_t snd_cx88_pointer(snd_pcm_substream_t *substream) +#else +static snd_pcm_uframes_t snd_cx88_pointer(struct snd_pcm_substream *substream) +#endif { snd_cx88_card_t *chip = snd_pcm_substream_chip(substream); +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) snd_pcm_runtime_t *runtime = substream->runtime; +#else + struct snd_pcm_runtime *runtime = substream->runtime; +#endif if (chip->read_count) { chip->read_count -= snd_pcm_lib_period_bytes(substream); @@ -539,7 +596,11 @@ static snd_pcm_uframes_t snd_cx88_pointer(snd_pcm_substream_t *substream) /* * operators */ +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) static snd_pcm_ops_t snd_cx88_pcm_ops = { +#else +static struct snd_pcm_ops snd_cx88_pcm_ops = { +#endif .open = snd_cx88_pcm_open, .close = snd_cx88_close, .ioctl = snd_pcm_lib_ioctl, @@ -556,7 +617,11 @@ static snd_pcm_ops_t snd_cx88_pcm_ops = { static int __devinit snd_cx88_pcm(snd_cx88_card_t *chip, int device, char *name) { int err; +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) snd_pcm_t *pcm; +#else + struct snd_pcm *pcm; +#endif err = snd_pcm_new(chip->card, name, device, 0, 1, &pcm); if (err < 0) @@ -571,7 +636,12 @@ static int __devinit snd_cx88_pcm(snd_cx88_card_t *chip, int device, char *name) /**************************************************************************** CONTROL INTERFACE ****************************************************************************/ +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) static int snd_cx88_capture_volume_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_info_t *info) +#else +static int snd_cx88_capture_volume_info(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_info *info) +#endif { info->type = SNDRV_CTL_ELEM_TYPE_INTEGER; info->count = 1; @@ -582,7 +652,12 @@ static int snd_cx88_capture_volume_info(snd_kcontrol_t *kcontrol, snd_ctl_elem_i } /* OK - TODO: test it */ +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) static int snd_cx88_capture_volume_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *value) +#else +static int snd_cx88_capture_volume_get(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *value) +#endif { snd_cx88_card_t *chip = snd_kcontrol_chip(kcontrol); struct cx88_core *core=chip->core; @@ -593,7 +668,12 @@ static int snd_cx88_capture_volume_get(snd_kcontrol_t *kcontrol, snd_ctl_elem_va } /* OK - TODO: test it */ +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) static int snd_cx88_capture_volume_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_value_t *value) +#else +static int snd_cx88_capture_volume_put(struct snd_kcontrol *kcontrol, + struct snd_ctl_elem_value *value) +#endif { snd_cx88_card_t *chip = snd_kcontrol_chip(kcontrol); struct cx88_core *core=chip->core; @@ -609,7 +689,11 @@ static int snd_cx88_capture_volume_put(snd_kcontrol_t *kcontrol, snd_ctl_elem_va return v != old_control; } +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) static snd_kcontrol_new_t snd_cx88_capture_volume = { +#else +static struct snd_kcontrol_new snd_cx88_capture_volume = { +#endif .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = "Capture Volume", .info = snd_cx88_capture_volume_info, @@ -655,7 +739,11 @@ static int snd_cx88_free(snd_cx88_card_t *chip) /* * Component Destructor */ +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) static void snd_cx88_dev_free(snd_card_t * card) +#else +static void snd_cx88_dev_free(struct snd_card * card) +#endif { snd_cx88_card_t *chip = card->private_data; @@ -668,8 +756,14 @@ static void snd_cx88_dev_free(snd_card_t * card) */ static int devno; +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) static int __devinit snd_cx88_create(snd_card_t *card, struct pci_dev *pci, snd_cx88_card_t **rchip) +#else +static int __devinit snd_cx88_create(struct snd_card *card, + struct pci_dev *pci, + snd_cx88_card_t **rchip) +#endif { snd_cx88_card_t *chip; struct cx88_core *core; @@ -740,7 +834,11 @@ static int __devinit snd_cx88_create(snd_card_t *card, struct pci_dev *pci, static int __devinit cx88_audio_initdev(struct pci_dev *pci, const struct pci_device_id *pci_id) { +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) snd_card_t *card; +#else + struct snd_card *card; +#endif snd_cx88_card_t *chip; int err; diff --git a/linux/drivers/media/video/saa7134/saa7134-alsa.c b/linux/drivers/media/video/saa7134/saa7134-alsa.c index 393a3a3bd..f670f4c8c 100644 --- a/linux/drivers/media/video/saa7134/saa7134-alsa.c +++ b/linux/drivers/media/video/saa7134/saa7134-alsa.c @@ -80,7 +80,11 @@ MODULE_PARM_DESC(enable, "Enable (or not) the SAA7134 capture interface(s)."); */ typedef struct snd_card_saa7134 { +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) snd_card_t *card; +#else + struct snd_card *card; +#endif spinlock_t mixer_lock; int mixer_volume[MIXER_ADDR_LAST+1][2]; int capture_source[MIXER_ADDR_LAST+1][2]; @@ -107,10 +111,18 @@ typedef struct snd_card_saa7134_pcm { spinlock_t lock; +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) snd_pcm_substream_t *substream; +#else + struct snd_pcm_substream *substream; +#endif } snd_card_saa7134_pcm_t; +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) static snd_card_t *snd_saa7134_cards[SNDRV_CARDS]; +#else +static struct snd_card *snd_saa7134_cards[SNDRV_CARDS]; +#endif /* @@ -263,10 +275,18 @@ out: * */ +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) static int snd_card_saa7134_capture_trigger(snd_pcm_substream_t * substream, +#else +static int snd_card_saa7134_capture_trigger(struct snd_pcm_substream * substream, +#endif int cmd) { +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) snd_pcm_runtime_t *runtime = substream->runtime; +#else + struct snd_pcm_runtime *runtime = substream->runtime; +#endif snd_card_saa7134_pcm_t *pcm = runtime->private_data; struct saa7134_dev *dev=pcm->dev; int err = 0; @@ -344,9 +364,17 @@ static int dsp_buffer_free(struct saa7134_dev *dev) * */ +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) static int snd_card_saa7134_capture_prepare(snd_pcm_substream_t * substream) +#else +static int snd_card_saa7134_capture_prepare(struct snd_pcm_substream * substream) +#endif { +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) snd_pcm_runtime_t *runtime = substream->runtime; +#else + struct snd_pcm_runtime *runtime = substream->runtime; +#endif int bswap, sign; u32 fmt, control; snd_card_saa7134_t *saa7134 = snd_pcm_substream_chip(substream); @@ -433,9 +461,18 @@ static int snd_card_saa7134_capture_prepare(snd_pcm_substream_t * substream) * */ +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) static snd_pcm_uframes_t snd_card_saa7134_capture_pointer(snd_pcm_substream_t * substream) +#else +static snd_pcm_uframes_t +snd_card_saa7134_capture_pointer(struct snd_pcm_substream * substream) +#endif { +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) snd_pcm_runtime_t *runtime = substream->runtime; +#else + struct snd_pcm_runtime *runtime = substream->runtime; +#endif snd_card_saa7134_pcm_t *pcm = runtime->private_data; struct saa7134_dev *dev=pcm->dev; @@ -453,7 +490,11 @@ static snd_pcm_uframes_t snd_card_saa7134_capture_pointer(snd_pcm_substream_t * * ALSA hardware capabilities definition */ +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) static snd_pcm_hardware_t snd_card_saa7134_capture = +#else +static struct snd_pcm_hardware snd_card_saa7134_capture = +#endif { .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | SNDRV_PCM_INFO_BLOCK_TRANSFER | @@ -476,7 +517,11 @@ static snd_pcm_hardware_t snd_card_saa7134_capture = .periods_max = 1024, }; +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) static void snd_card_saa7134_runtime_free(snd_pcm_runtime_t *runtime) +#else +static void snd_card_saa7134_runtime_free(struct snd_pcm_runtime *runtime) +#endif { snd_card_saa7134_pcm_t *pcm = runtime->private_data; @@ -493,8 +538,13 @@ static void snd_card_saa7134_runtime_free(snd_pcm_runtime_t *runtime) * */ +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) static int snd_card_saa7134_hw_params(snd_pcm_substream_t * substream, snd_pcm_hw_params_t * hw_params) +#else +static int snd_card_saa7134_hw_params(struct snd_pcm_substream * substream, + struct snd_pcm_hw_params * hw_params) +#endif { snd_card_saa7134_t *saa7134 = snd_pcm_substream_chip(substream); struct saa7134_dev *dev; @@ -573,7 +623,11 @@ static int snd_card_saa7134_hw_params(snd_pcm_substream_t * substream, * */ +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) static int snd_card_saa7134_hw_free(snd_pcm_substream_t * substream) +#else +static int snd_card_saa7134_hw_free(struct snd_pcm_substream * substream) +#endif { snd_card_saa7134_t *saa7134 = snd_pcm_substream_chip(substream); struct saa7134_dev *dev; @@ -599,7 +653,11 @@ static int snd_card_saa7134_hw_free(snd_pcm_substream_t * substream) * */ +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) static int snd_card_saa7134_capture_close(snd_pcm_substream_t * substream) +#else +static int snd_card_saa7134_capture_close(struct snd_pcm_substream * substream) +#endif { return 0; } @@ -614,9 +672,17 @@ static int snd_card_saa7134_capture_close(snd_pcm_substream_t * substream) * */ +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) static int snd_card_saa7134_capture_open(snd_pcm_substream_t * substream) +#else +static int snd_card_saa7134_capture_open(struct snd_pcm_substream * substream) +#endif { +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) snd_pcm_runtime_t *runtime = substream->runtime; +#else + struct snd_pcm_runtime *runtime = substream->runtime; +#endif snd_card_saa7134_pcm_t *pcm; snd_card_saa7134_t *saa7134 = snd_pcm_substream_chip(substream); struct saa7134_dev *dev = saa7134->dev; @@ -652,7 +718,11 @@ static int snd_card_saa7134_capture_open(snd_pcm_substream_t * substream) * ALSA capture callbacks definition */ +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) static snd_pcm_ops_t snd_card_saa7134_capture_ops = { +#else +static struct snd_pcm_ops snd_card_saa7134_capture_ops = { +#endif .open = snd_card_saa7134_capture_open, .close = snd_card_saa7134_capture_close, .ioctl = snd_pcm_lib_ioctl, @@ -673,7 +743,11 @@ static snd_pcm_ops_t snd_card_saa7134_capture_ops = { static int snd_card_saa7134_pcm(snd_card_saa7134_t *saa7134, int device) { +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) snd_pcm_t *pcm; +#else + struct snd_pcm *pcm; +#endif int err; if ((err = snd_pcm_new(saa7134->card, "SAA7134 PCM", device, 0, 1, &pcm)) < 0) @@ -691,7 +765,12 @@ static int snd_card_saa7134_pcm(snd_card_saa7134_t *saa7134, int device) .get = snd_saa7134_volume_get, .put = snd_saa7134_volume_put, \ .private_value = addr } +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) static int snd_saa7134_volume_info(snd_kcontrol_t * kcontrol, snd_ctl_elem_info_t * uinfo) +#else +static int snd_saa7134_volume_info(struct snd_kcontrol * kcontrol, + struct snd_ctl_elem_info * uinfo) +#endif { uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; uinfo->count = 2; @@ -700,7 +779,12 @@ static int snd_saa7134_volume_info(snd_kcontrol_t * kcontrol, snd_ctl_elem_info_ return 0; } +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) static int snd_saa7134_volume_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) +#else +static int snd_saa7134_volume_get(struct snd_kcontrol * kcontrol, + struct snd_ctl_elem_value * ucontrol) +#endif { snd_card_saa7134_t *chip = snd_kcontrol_chip(kcontrol); int addr = kcontrol->private_value; @@ -710,7 +794,12 @@ static int snd_saa7134_volume_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_ return 0; } +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) static int snd_saa7134_volume_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) +#else +static int snd_saa7134_volume_put(struct snd_kcontrol * kcontrol, + struct snd_ctl_elem_value * ucontrol) +#endif { snd_card_saa7134_t *chip = snd_kcontrol_chip(kcontrol); int change, addr = kcontrol->private_value; @@ -741,7 +830,12 @@ static int snd_saa7134_volume_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_ .get = snd_saa7134_capsrc_get, .put = snd_saa7134_capsrc_put, \ .private_value = addr } +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) static int snd_saa7134_capsrc_info(snd_kcontrol_t * kcontrol, snd_ctl_elem_info_t * uinfo) +#else +static int snd_saa7134_capsrc_info(struct snd_kcontrol * kcontrol, + struct snd_ctl_elem_info * uinfo) +#endif { uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; uinfo->count = 2; @@ -750,7 +844,12 @@ static int snd_saa7134_capsrc_info(snd_kcontrol_t * kcontrol, snd_ctl_elem_info_ return 0; } +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) static int snd_saa7134_capsrc_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) +#else +static int snd_saa7134_capsrc_get(struct snd_kcontrol * kcontrol, + struct snd_ctl_elem_value * ucontrol) +#endif { snd_card_saa7134_t *chip = snd_kcontrol_chip(kcontrol); int addr = kcontrol->private_value; @@ -763,7 +862,12 @@ static int snd_saa7134_capsrc_get(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_ return 0; } +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) static int snd_saa7134_capsrc_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_t * ucontrol) +#else +static int snd_saa7134_capsrc_put(struct snd_kcontrol * kcontrol, + struct snd_ctl_elem_value * ucontrol) +#endif { snd_card_saa7134_t *chip = snd_kcontrol_chip(kcontrol); int change, addr = kcontrol->private_value; @@ -840,7 +944,11 @@ static int snd_saa7134_capsrc_put(snd_kcontrol_t * kcontrol, snd_ctl_elem_value_ return change; } +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) static snd_kcontrol_new_t snd_saa7134_controls[] = { +#else +static struct snd_kcontrol_new snd_saa7134_controls[] = { +#endif SAA713x_VOLUME("Video Volume", 0, MIXER_ADDR_TVTUNER), SAA713x_CAPSRC("Video Capture Switch", 0, MIXER_ADDR_TVTUNER), SAA713x_VOLUME("Line Volume", 1, MIXER_ADDR_LINE1), @@ -859,7 +967,11 @@ SAA713x_CAPSRC("Line Capture Switch", 2, MIXER_ADDR_LINE2), static int snd_card_saa7134_new_mixer(snd_card_saa7134_t * chip) { +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) snd_card_t *card = chip->card; +#else + struct snd_card *card = chip->card; +#endif unsigned int idx; int err; @@ -873,7 +985,11 @@ static int snd_card_saa7134_new_mixer(snd_card_saa7134_t * chip) return 0; } +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) static void snd_saa7134_free(snd_card_t * card) +#else +static void snd_saa7134_free(struct snd_card * card) +#endif { snd_card_saa7134_t *chip = card->private_data; @@ -900,7 +1016,11 @@ static void snd_saa7134_free(snd_card_t * card) static int alsa_card_saa7134_create(struct saa7134_dev *dev, int devnum) { +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) snd_card_t *card; +#else + struct snd_card *card; +#endif snd_card_saa7134_t *chip; int err; diff --git a/linux/drivers/media/video/saa7134/saa7134.h b/linux/drivers/media/video/saa7134/saa7134.h index 703b28731..54070d135 100644 --- a/linux/drivers/media/video/saa7134/saa7134.h +++ b/linux/drivers/media/video/saa7134/saa7134.h @@ -412,7 +412,11 @@ struct saa7134_dmasound { unsigned int read_count; void * priv_data; #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0) - snd_pcm_substream_t *substream; +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,17) + snd_pcm_substream_t *substream; +#else + struct snd_pcm_substream *substream; +#endif #endif }; |