12 Sep
2011
12 Sep
'11
1:54 p.m.
At Mon, 12 Sep 2011 09:53:28 +0200, Takashi Iwai wrote:
At Sun, 04 Sep 2011 22:32:44 +0200, Clemens Ladisch wrote:
Raymond Yau wrote:
The possible way is to save the contents of 128K memory mapped I/O ports before suspend to non-volatile memory and restore them after resume
Is there any way for alsa driver to allocate non-volatile memory ?
'Normal' memory is saved over suspend. Just use {k|v}malloc.
If it's a 128kB bulk memory, vmalloc() is a more sensible choice.
BTW, in many cases, you don't have to save/restore the whole mmio region. Instead, stop the stream, save / restore some important registers and do the similar procedure for the normal prepare callback in the resume, and restart the stream again.
Takashi