aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/bt87x.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/bt87x.c')
-rw-r--r--sound/pci/bt87x.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sound/pci/bt87x.c b/sound/pci/bt87x.c
index 4ecdd635ed1..3aa8d973540 100644
--- a/sound/pci/bt87x.c
+++ b/sound/pci/bt87x.c
@@ -227,7 +227,6 @@ static inline void snd_bt87x_writel(struct snd_bt87x *chip, u32 reg, u32 value)
227static int snd_bt87x_create_risc(struct snd_bt87x *chip, struct snd_pcm_substream *substream, 227static int snd_bt87x_create_risc(struct snd_bt87x *chip, struct snd_pcm_substream *substream,
228 unsigned int periods, unsigned int period_bytes) 228 unsigned int periods, unsigned int period_bytes)
229{ 229{
230 struct snd_sg_buf *sgbuf = snd_pcm_substream_sgbuf(substream);
231 unsigned int i, offset; 230 unsigned int i, offset;
232 u32 *risc; 231 u32 *risc;
233 232
@@ -246,6 +245,7 @@ static int snd_bt87x_create_risc(struct snd_bt87x *chip, struct snd_pcm_substrea
246 rest = period_bytes; 245 rest = period_bytes;
247 do { 246 do {
248 u32 cmd, len; 247 u32 cmd, len;
248 unsigned int addr;
249 249
250 len = PAGE_SIZE - (offset % PAGE_SIZE); 250 len = PAGE_SIZE - (offset % PAGE_SIZE);
251 if (len > rest) 251 if (len > rest)
@@ -260,7 +260,8 @@ static int snd_bt87x_create_risc(struct snd_bt87x *chip, struct snd_pcm_substrea
260 if (len == rest) 260 if (len == rest)
261 cmd |= RISC_EOL | RISC_IRQ; 261 cmd |= RISC_EOL | RISC_IRQ;
262 *risc++ = cpu_to_le32(cmd); 262 *risc++ = cpu_to_le32(cmd);
263 *risc++ = cpu_to_le32((u32)snd_pcm_sgbuf_get_addr(sgbuf, offset)); 263 addr = snd_pcm_sgbuf_get_addr(substream, offset);
264 *risc++ = cpu_to_le32(addr);
264 offset += len; 265 offset += len;
265 rest -= len; 266 rest -= len;
266 } while (rest > 0); 267 } while (rest > 0);