Skip to content

audio/pcm: use host os_timestamp for PLAYBACK to fix reload crash#30

Open
jjohnson wants to merge 1 commit into
t2linux:aurfrom
jjohnson:fix-playback-timestamp-domain
Open

audio/pcm: use host os_timestamp for PLAYBACK to fix reload crash#30
jjohnson wants to merge 1 commit into
t2linux:aurfrom
jjohnson:fix-playback-timestamp-domain

Conversation

@jjohnson
Copy link
Copy Markdown

PLAYBACK used dev_timestamp from the T2 coprocessor clock domain,
which drifts from the host's ktime_get_boottime() after module reload.
This produced wild position values in aaudio_pcm_pointer, triggering
XRUN and a scheduling-while-atomic panic when snd_pcm_do_stop ran
from DMA IRQ context.

Switch PLAYBACK to os_timestamp (host boottime at message receipt),
matching what CAPTURE already does. The mailbox transit delay (~100
microseconds at most) is negligible in a 347 ms ALSA buffer and
eliminates the crash entirely.

PLAYBACK used dev_timestamp from the T2 coprocessor clock domain,
which drifts from the host's ktime_get_boottime() after module reload.
This produced wild position values in aaudio_pcm_pointer, triggering
XRUN and a scheduling-while-atomic panic when snd_pcm_do_stop ran
from DMA IRQ context.

Switch PLAYBACK to os_timestamp (host boottime at message receipt),
matching what CAPTURE already does. The mailbox transit delay (~100
microseconds at most) is negligible in a 347 ms ALSA buffer and
eliminates the crash entirely.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant