projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ALSA: hdspm - Fix buffer handling on RME MADI/MADIface/AES(32)
[cascardo/linux.git]
/
sound
/
pci
/
rme9652
/
hdspm.c
diff --git
a/sound/pci/rme9652/hdspm.c
b/sound/pci/rme9652/hdspm.c
index
9258897
..
509a35a
100644
(file)
--- a/
sound/pci/rme9652/hdspm.c
+++ b/
sound/pci/rme9652/hdspm.c
@@
-1231,8
+1231,17
@@
static snd_pcm_uframes_t hdspm_hw_pointer(struct hdspm *hdspm)
int position;
position = hdspm_read(hdspm, HDSPM_statusRegister);
int position;
position = hdspm_read(hdspm, HDSPM_statusRegister);
- position &= HDSPM_BufferPositionMask;
- position /= 4; /* Bytes per sample */
+
+ switch (hdspm->io_type) {
+ case RayDAT:
+ case AIO:
+ position &= HDSPM_BufferPositionMask;
+ position /= 4; /* Bytes per sample */
+ break;
+ default:
+ position = (position & HDSPM_BufferID) ?
+ (hdspm->period_bytes / 4) : 0;
+ }
return position;
}
return position;
}