Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 316166
b: refs/heads/master
c: d7dc9e3
h: refs/heads/master
v: v3
  • Loading branch information
Markus Bollinger authored and Takashi Iwai committed Jun 20, 2012
1 parent a3c6dd6 commit 20467f5
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 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: e0815f35ccd276a903298ad4c3d8d10b65933b86
refs/heads/master: d7dc9e32ae64b5db777017344da61a285c2347f8
23 changes: 15 additions & 8 deletions trunk/sound/pci/pcxhr/pcxhr_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1133,13 +1133,12 @@ static u_int64_t pcxhr_stream_read_position(struct pcxhr_mgr *mgr,
hw_sample_count = ((u_int64_t)rmh.stat[0]) << 24;
hw_sample_count += (u_int64_t)rmh.stat[1];

snd_printdd("stream %c%d : abs samples real(%ld) timer(%ld)\n",
snd_printdd("stream %c%d : abs samples real(%llu) timer(%llu)\n",
stream->pipe->is_capture ? 'C' : 'P',
stream->substream->number,
(long unsigned int)hw_sample_count,
(long unsigned int)(stream->timer_abs_periods +
stream->timer_period_frag +
mgr->granularity));
hw_sample_count,
stream->timer_abs_periods + stream->timer_period_frag +
mgr->granularity);
return hw_sample_count;
}

Expand Down Expand Up @@ -1243,10 +1242,18 @@ irqreturn_t pcxhr_interrupt(int irq, void *dev_id)

if ((dsp_time_diff < 0) &&
(mgr->dsp_time_last != PCXHR_DSP_TIME_INVALID)) {
snd_printdd("ERROR DSP TIME old(%d) new(%d) -> "
"resynchronize all streams\n",
/* handle dsp counter wraparound without resync */
int tmp_diff = dsp_time_diff + PCXHR_DSP_TIME_MASK + 1;
snd_printdd("WARNING DSP timestamp old(%d) new(%d)",
mgr->dsp_time_last, dsp_time_new);
mgr->dsp_time_err++;
if (tmp_diff > 0 && tmp_diff <= (2*mgr->granularity)) {
snd_printdd("-> timestamp wraparound OK: "
"diff=%d\n", tmp_diff);
dsp_time_diff = tmp_diff;
} else {
snd_printdd("-> resynchronize all streams\n");
mgr->dsp_time_err++;
}
}
#ifdef CONFIG_SND_DEBUG_VERBOSE
if (dsp_time_diff == 0)
Expand Down

0 comments on commit 20467f5

Please sign in to comment.