Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 170071
b: refs/heads/master
c: 8066e51
h: refs/heads/master
i:
  170069: df3b4d6
  170067: 0d08c95
  170063: 0fc9183
v: v3
  • Loading branch information
Krzysztof Helt authored and Takashi Iwai committed Oct 11, 2009
1 parent fe81a60 commit 9b91a14
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 633c7e92bdd54ba939f2bd3b78c72e1e1a1dd077
refs/heads/master: 8066e51ae7329220f459470a38387f8533e99141
10 changes: 9 additions & 1 deletion trunk/sound/core/isadma.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,16 +85,24 @@ EXPORT_SYMBOL(snd_dma_disable);
unsigned int snd_dma_pointer(unsigned long dma, unsigned int size)
{
unsigned long flags;
unsigned int result;
unsigned int result, result1;

flags = claim_dma_lock();
clear_dma_ff(dma);
if (!isa_dma_bridge_buggy)
disable_dma(dma);
result = get_dma_residue(dma);
/*
* HACK - read the counter again and choose higher value in order to
* avoid reading during counter lower byte roll over if the
* isa_dma_bridge_buggy is set.
*/
result1 = get_dma_residue(dma);
if (!isa_dma_bridge_buggy)
enable_dma(dma);
release_dma_lock(flags);
if (unlikely(result < result1))
result = result1;
#ifdef CONFIG_SND_DEBUG
if (result > size)
snd_printk(KERN_ERR "pointer (0x%x) for DMA #%ld is greater than transfer size (0x%x)\n", result, dma, size);
Expand Down

0 comments on commit 9b91a14

Please sign in to comment.