diff options
author | Michael Krufky <mkrufky@linuxtv.org> | 2007-09-10 15:56:23 -0400 |
---|---|---|
committer | Michael Krufky <mkrufky@linuxtv.org> | 2007-09-10 15:56:23 -0400 |
commit | a5c1e0911d203b6d468173df00f64db8044e7bce (patch) | |
tree | 48836db400955ce93e44ba4e8eaddeabea210ea6 /linux/drivers/media/video/cx88 | |
parent | 8fc1625961d30be9a8665f97c7eb889e078c9e76 (diff) | |
download | mediapointer-dvb-s2-a5c1e0911d203b6d468173df00f64db8044e7bce.tar.gz mediapointer-dvb-s2-a5c1e0911d203b6d468173df00f64db8044e7bce.tar.bz2 |
compat: fix build for kernels < 2.6.19 (missing <sound/tlv.h>)
From: Michael Krufky <mkrufky@linuxtv.org>
include/sound/tlv.h was first added in 2.6.19
Disable the TLV support for kernels prior to 2.6.19
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Diffstat (limited to 'linux/drivers/media/video/cx88')
-rw-r--r-- | linux/drivers/media/video/cx88/cx88-alsa.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/linux/drivers/media/video/cx88/cx88-alsa.c b/linux/drivers/media/video/cx88/cx88-alsa.c index dab6fbc06..f441193eb 100644 --- a/linux/drivers/media/video/cx88/cx88-alsa.c +++ b/linux/drivers/media/video/cx88/cx88-alsa.c @@ -39,7 +39,9 @@ #include <sound/pcm_params.h> #include <sound/control.h> #include <sound/initval.h> +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19) #include <sound/tlv.h> +#endif #include "compat.h" #include "cx88.h" @@ -659,17 +661,23 @@ static int snd_cx88_volume_put(struct snd_kcontrol *kcontrol, return changed; } +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19) static const DECLARE_TLV_DB_SCALE(snd_cx88_db_scale, -6300, 100, 0); +#endif static struct snd_kcontrol_new snd_cx88_volume = { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19) .access = SNDRV_CTL_ELEM_ACCESS_READWRITE | SNDRV_CTL_ELEM_ACCESS_TLV_READ, +#endif .name = "Playback Volume", .info = snd_cx88_volume_info, .get = snd_cx88_volume_get, .put = snd_cx88_volume_put, +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19) .tlv.p = snd_cx88_db_scale, +#endif }; static int snd_cx88_switch_get(struct snd_kcontrol *kcontrol, |