summaryrefslogtreecommitdiff
path: root/linux/sound
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2008-10-21 11:40:40 -0200
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-10-21 11:40:40 -0200
commitbed15b4571693483571303bd2470b79d35bc0ec3 (patch)
treed02be32d3cfad9a188cf0b81965e66f35fedd2c6 /linux/sound
parentcb8889206ccd1bba415637cab83e4ef38fd74b1e (diff)
downloadmediapointer-dvb-s2-bed15b4571693483571303bd2470b79d35bc0ec3.tar.gz
mediapointer-dvb-s2-bed15b4571693483571303bd2470b79d35bc0ec3.tar.bz2
Fix snd_bt87x for kernels lower than 2.6.28
From: Mauro Carvalho Chehab <mchehab@redhat.com> Based on a patch from Hans Verkuil <hverkuil@xs4all.nl> Priority: normal Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'linux/sound')
-rw-r--r--linux/sound/pci/bt87x.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/linux/sound/pci/bt87x.c b/linux/sound/pci/bt87x.c
index 6c70b246d..0dd872610 100644
--- a/linux/sound/pci/bt87x.c
+++ b/linux/sound/pci/bt87x.c
@@ -244,6 +244,9 @@ static int snd_bt87x_create_risc(struct snd_bt87x *chip, struct snd_pcm_substrea
{
unsigned int i, offset;
u32 *risc;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 28)
+ struct snd_sg_buf *sgbuf = snd_pcm_substream_sgbuf(substream);
+#endif
if (chip->dma_risc.area == NULL) {
if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(chip->pci),
@@ -275,7 +278,11 @@ static int snd_bt87x_create_risc(struct snd_bt87x *chip, struct snd_pcm_substrea
if (len == rest)
cmd |= RISC_EOL | RISC_IRQ;
*risc++ = cpu_to_le32(cmd);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 28)
+ addr = snd_pcm_sgbuf_get_addr(sgbuf, offset);
+#else
addr = snd_pcm_sgbuf_get_addr(substream, offset);
+#endif
*risc++ = cpu_to_le32(addr);
offset += len;
rest -= len;