summaryrefslogtreecommitdiff
path: root/linux
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2007-08-18 08:22:06 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-08-18 08:22:06 -0300
commit96cbbc792854ad33325f55e2b095d27d195537e7 (patch)
tree0a1a2b20fbc58ae19955e65e30193faf330fc26d /linux
parent043941b563e911ccb213664f4471e985da89147a (diff)
parentf2ead120937d5077a260732019a12e6ed6c6752e (diff)
downloadmediapointer-dvb-s2-96cbbc792854ad33325f55e2b095d27d195537e7.tar.gz
mediapointer-dvb-s2-96cbbc792854ad33325f55e2b095d27d195537e7.tar.bz2
merge: http://linuxtv.org/hg/~tap/v4l-dvb
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux')
-rw-r--r--linux/drivers/media/dvb/dvb-core/dvb_ca_en50221.c1
-rw-r--r--linux/drivers/media/dvb/dvb-core/dvbdev.c2
-rw-r--r--linux/drivers/media/dvb/frontends/dvb-pll.c1
-rw-r--r--linux/drivers/media/video/cx88/cx88-alsa.c94
-rw-r--r--linux/drivers/media/video/cx88/cx88-tvaudio.c11
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-alsa.c115
-rw-r--r--linux/sound/pci/bt87x.c17
7 files changed, 14 insertions, 227 deletions
diff --git a/linux/drivers/media/dvb/dvb-core/dvb_ca_en50221.c b/linux/drivers/media/dvb/dvb-core/dvb_ca_en50221.c
index 4fadddb26..423eaeb03 100644
--- a/linux/drivers/media/dvb/dvb-core/dvb_ca_en50221.c
+++ b/linux/drivers/media/dvb/dvb-core/dvb_ca_en50221.c
@@ -37,6 +37,7 @@
#include <linux/delay.h>
#include <linux/spinlock.h>
#include <linux/sched.h>
+#include "compat.h"
#include "dvb_ca_en50221.h"
#include "dvb_ringbuffer.h"
diff --git a/linux/drivers/media/dvb/dvb-core/dvbdev.c b/linux/drivers/media/dvb/dvb-core/dvbdev.c
index 564c57b79..b4165ddb3 100644
--- a/linux/drivers/media/dvb/dvb-core/dvbdev.c
+++ b/linux/drivers/media/dvb/dvb-core/dvbdev.c
@@ -211,7 +211,7 @@ int dvb_register_device(struct dvb_adapter *adap, struct dvb_device **pdvbdev,
{
struct dvb_device *dvbdev;
struct file_operations *dvbdevfops;
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,23)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18)
struct device *clsdev;
#else
struct class_device *clsdev;
diff --git a/linux/drivers/media/dvb/frontends/dvb-pll.c b/linux/drivers/media/dvb/frontends/dvb-pll.c
index 11f7d5939..2ea254570 100644
--- a/linux/drivers/media/dvb/frontends/dvb-pll.c
+++ b/linux/drivers/media/dvb/frontends/dvb-pll.c
@@ -21,6 +21,7 @@
#include <linux/module.h>
#include <linux/dvb/frontend.h>
#include <asm/types.h>
+#include "compat.h"
#include "dvb-pll.h"
diff --git a/linux/drivers/media/video/cx88/cx88-alsa.c b/linux/drivers/media/video/cx88/cx88-alsa.c
index a2d0abae6..bf5477afa 100644
--- a/linux/drivers/media/video/cx88/cx88-alsa.c
+++ b/linux/drivers/media/video/cx88/cx88-alsa.c
@@ -66,11 +66,7 @@ struct cx88_audio_dev {
/* audio controls */
int irq;
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,16)
- snd_card_t *card;
-#else
struct snd_card *card;
-#endif
spinlock_t reg_lock;
@@ -89,11 +85,7 @@ struct cx88_audio_dev {
struct cx88_buffer *buf;
long opened;
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,16)
- snd_pcm_substream_t *substream;
-#else
struct snd_pcm_substream *substream;
-#endif
};
typedef struct cx88_audio_dev snd_cx88_card_t;
@@ -110,11 +102,7 @@ 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,16)
-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;
@@ -352,11 +340,7 @@ static int dsp_buffer_free(snd_cx88_card_t *chip)
/*
* Digital hardware definition
*/
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,16)
-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 |
@@ -378,28 +362,16 @@ static struct snd_pcm_hardware snd_cx88_digital_hw = {
/*
* audio pcm capture runtime free
*/
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,16)
-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,16)
-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,16)
- 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))
@@ -428,11 +400,7 @@ _error:
/*
* audio close callback
*/
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,16)
-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);
@@ -445,13 +413,8 @@ static int snd_cx88_close(struct snd_pcm_substream *substream)
/*
* hw_params callback
*/
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,16)
-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;
@@ -508,11 +471,7 @@ static int snd_cx88_hw_params(struct snd_pcm_substream * substream,
/*
* hw free callback
*/
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,16)
-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);
@@ -528,11 +487,7 @@ static int snd_cx88_hw_free(struct snd_pcm_substream * substream)
/*
* prepare callback
*/
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,16)
-static int snd_cx88_prepare(snd_pcm_substream_t *substream)
-#else
static int snd_cx88_prepare(struct snd_pcm_substream *substream)
-#endif
{
return 0;
}
@@ -541,11 +496,7 @@ static int snd_cx88_prepare(struct snd_pcm_substream *substream)
/*
* trigger callback
*/
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,16)
-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;
@@ -572,18 +523,10 @@ static int snd_cx88_card_trigger(struct snd_pcm_substream *substream, int cmd)
/*
* pointer callback
*/
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,16)
-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,16)
- 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);
@@ -600,11 +543,7 @@ static snd_pcm_uframes_t snd_cx88_pointer(struct snd_pcm_substream *substream)
/*
* operators
*/
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,16)
-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,
@@ -621,11 +560,7 @@ static struct snd_pcm_ops 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,16)
- snd_pcm_t *pcm;
-#else
struct snd_pcm *pcm;
-#endif
err = snd_pcm_new(chip->card, name, device, 0, 1, &pcm);
if (err < 0)
@@ -640,12 +575,8 @@ 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,16)
-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;
@@ -656,12 +587,8 @@ static int snd_cx88_capture_volume_info(struct snd_kcontrol *kcontrol,
}
/* OK - TODO: test it */
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,16)
-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;
@@ -672,12 +599,8 @@ static int snd_cx88_capture_volume_get(struct snd_kcontrol *kcontrol,
}
/* OK - TODO: test it */
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,16)
-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;
@@ -693,11 +616,7 @@ static int snd_cx88_capture_volume_put(struct snd_kcontrol *kcontrol,
return v != old_control;
}
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,16)
-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,
@@ -743,11 +662,7 @@ static int snd_cx88_free(snd_cx88_card_t *chip)
/*
* Component Destructor
*/
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,16)
-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;
@@ -760,14 +675,9 @@ static void snd_cx88_dev_free(struct snd_card * card)
*/
static int devno;
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,16)
-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;
@@ -837,11 +747,7 @@ static int __devinit snd_cx88_create(struct snd_card *card,
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,16)
- snd_card_t *card;
-#else
struct snd_card *card;
-#endif
snd_cx88_card_t *chip;
int err;
diff --git a/linux/drivers/media/video/cx88/cx88-tvaudio.c b/linux/drivers/media/video/cx88/cx88-tvaudio.c
index 1060f4815..460ae4082 100644
--- a/linux/drivers/media/video/cx88/cx88-tvaudio.c
+++ b/linux/drivers/media/video/cx88/cx88-tvaudio.c
@@ -68,6 +68,10 @@ static unsigned int always_analog = 0;
module_param(always_analog,int,0644);
MODULE_PARM_DESC(always_analog,"force analog audio out");
+static unsigned int radio_deemphasis = 0;
+module_param(radio_deemphasis,int,0644);
+MODULE_PARM_DESC(radio_deemphasis, "Radio deemphasis time constant, "
+ "0=None, 1=50us (elsewhere), 2=75us (USA)");
#define dprintk(fmt, arg...) if (audio_debug) \
printk(KERN_DEBUG "%s/0: " fmt, core->name , ## arg)
@@ -684,6 +688,10 @@ static void set_audio_standard_FM(struct cx88_core *core,
};
/* It is enough to leave default values? */
+ /* No, it's not! The deemphasis registers are reset to the 75us
+ * values by default. Analyzing the spectrum of the decoded audio
+ * reveals that "no deemphasis" is the same as 75 us, while the 50 us
+ * setting results in less deemphasis. */
static const struct rlist fm_no_deemph[] = {
{AUD_POLYPH80SCALEFAC, 0x0003},
@@ -694,6 +702,7 @@ static void set_audio_standard_FM(struct cx88_core *core,
set_audio_start(core, SEL_FMRADIO);
switch (deemph) {
+ default:
case FM_NO_DEEMPH:
set_audio_registers(core, fm_no_deemph);
break;
@@ -763,7 +772,7 @@ void cx88_set_tvaudio(struct cx88_core *core)
set_audio_standard_EIAJ(core);
break;
case WW_FM:
- set_audio_standard_FM(core, FM_NO_DEEMPH);
+ set_audio_standard_FM(core, radio_deemphasis);
break;
case WW_NONE:
default:
diff --git a/linux/drivers/media/video/saa7134/saa7134-alsa.c b/linux/drivers/media/video/saa7134/saa7134-alsa.c
index 13916f207..aeedf3eec 100644
--- a/linux/drivers/media/video/saa7134/saa7134-alsa.c
+++ b/linux/drivers/media/video/saa7134/saa7134-alsa.c
@@ -74,11 +74,7 @@ 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,16)
- 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];
@@ -106,18 +102,10 @@ typedef struct snd_card_saa7134_pcm {
spinlock_t lock;
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,16)
- 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,16)
-static snd_card_t *snd_saa7134_cards[SNDRV_CARDS];
-#else
static struct snd_card *snd_saa7134_cards[SNDRV_CARDS];
-#endif
/*
@@ -274,18 +262,10 @@ out:
*
*/
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,16)
-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)
+ int cmd)
{
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,16)
- 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;
@@ -363,17 +343,9 @@ static int dsp_buffer_free(struct saa7134_dev *dev)
*
*/
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,16)
-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,16)
- 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);
@@ -460,18 +432,10 @@ static int snd_card_saa7134_capture_prepare(struct snd_pcm_substream * substream
*
*/
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,16)
-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,16)
- 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;
@@ -489,11 +453,7 @@ snd_card_saa7134_capture_pointer(struct snd_pcm_substream * substream)
* ALSA hardware capabilities definition
*/
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,16)
-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 |
@@ -516,11 +476,7 @@ static struct snd_pcm_hardware snd_card_saa7134_capture =
.periods_max = 1024,
};
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,16)
-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;
@@ -537,13 +493,8 @@ static void snd_card_saa7134_runtime_free(struct snd_pcm_runtime *runtime)
*
*/
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,16)
-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;
@@ -622,11 +573,7 @@ static int snd_card_saa7134_hw_params(struct snd_pcm_substream * substream,
*
*/
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,16)
-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;
@@ -652,11 +599,7 @@ static int snd_card_saa7134_hw_free(struct snd_pcm_substream * substream)
*
*/
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,16)
-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
{
snd_card_saa7134_t *saa7134 = snd_pcm_substream_chip(substream);
struct saa7134_dev *dev = saa7134->dev;
@@ -678,17 +621,9 @@ static int snd_card_saa7134_capture_close(struct snd_pcm_substream * substream)
*
*/
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,16)
-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,16)
- 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;
@@ -735,11 +670,7 @@ static int snd_card_saa7134_capture_open(struct snd_pcm_substream * substream)
* ALSA capture callbacks definition
*/
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,16)
-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,
@@ -760,11 +691,7 @@ static struct snd_pcm_ops 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,16)
- 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)
@@ -782,12 +709,8 @@ 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,16)
-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;
@@ -796,12 +719,8 @@ static int snd_saa7134_volume_info(struct snd_kcontrol * kcontrol,
return 0;
}
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,16)
-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;
@@ -811,12 +730,8 @@ static int snd_saa7134_volume_get(struct snd_kcontrol * kcontrol,
return 0;
}
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,16)
-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);
struct saa7134_dev *dev = chip->dev;
@@ -891,12 +806,8 @@ static int snd_saa7134_volume_put(struct snd_kcontrol * kcontrol,
.get = snd_saa7134_capsrc_get, .put = snd_saa7134_capsrc_put, \
.private_value = addr }
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,16)
-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;
@@ -905,12 +816,8 @@ static int snd_saa7134_capsrc_info(struct snd_kcontrol * kcontrol,
return 0;
}
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,16)
-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;
@@ -923,12 +830,8 @@ static int snd_saa7134_capsrc_get(struct snd_kcontrol * kcontrol,
return 0;
}
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,16)
-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;
@@ -1005,11 +908,7 @@ static int snd_saa7134_capsrc_put(struct snd_kcontrol * kcontrol,
return change;
}
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,16)
-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),
@@ -1028,11 +927,7 @@ 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,16)
- snd_card_t *card = chip->card;
-#else
struct snd_card *card = chip->card;
-#endif
unsigned int idx;
int err;
@@ -1046,11 +941,7 @@ static int snd_card_saa7134_new_mixer(snd_card_saa7134_t * chip)
return 0;
}
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,16)
-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;
@@ -1077,11 +968,7 @@ static void snd_saa7134_free(struct snd_card * card)
static int alsa_card_saa7134_create(struct saa7134_dev *dev, int devnum)
{
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,16)
- snd_card_t *card;
-#else
struct snd_card *card;
-#endif
snd_card_saa7134_t *chip;
int err;
diff --git a/linux/sound/pci/bt87x.c b/linux/sound/pci/bt87x.c
index cbbd22b4a..a6e7971e3 100644
--- a/linux/sound/pci/bt87x.c
+++ b/linux/sound/pci/bt87x.c
@@ -35,23 +35,6 @@
#include <sound/control.h>
#include <sound/initval.h>
#include "compat.h"
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,16)
-/* structs that used to be typedefs */
-#define snd_card _snd_card
-#define snd_pcm _snd_pcm
-#define snd_pcm_substream _snd_pcm_substream
-#define snd_pcm_hardware _snd_pcm_hardware
-#define snd_pcm_runtime _snd_pcm_runtime
-#define snd_pcm_hw_params sndrv_pcm_hw_params
-#define snd_pcm_ops _snd_pcm_ops
-#define snd_ctl_elem_info sndrv_ctl_elem_info
-#define snd_ctl_elem_value sndrv_ctl_elem_value
-#undef snd_kcontrol
-#define snd_kcontrol _snd_kcontrol
-#define snd_kcontrol_new _snd_kcontrol_new
-#undef snd_device
-#define snd_device _snd_device
-#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14)
/* From linux/pch_ids.h, appeared in 2.6.14 */
#define PCI_DEVICE_ID_BROOKTREE_879 0x0879