aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/bt87x.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2008-08-21 07:00:13 -0400
committerJaroslav Kysela <perex@perex.cz>2008-08-25 03:57:18 -0400
commit77a23f2695bb2de0cd74599400dc55109c531b72 (patch)
tree4960195e04016928dea83deb85e0f3bf97024a8a /sound/pci/bt87x.c
parent46480b3a5f88f20dbf25d95fe74d7b4798d5bc86 (diff)
ALSA: Clean up SG-buffer helper functions and macros
Clean up SG-buffer helper functions and macros. Helpers take substream as arguments now. Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
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 4ecdd635ed1d..3aa8d973540a 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);