Jerry Jenkins Jerry_J_Jenkins@hotmail.com writes:
Based on this thought, I need a function to retrieve the buffer. Then I found that snd_pcm_mmap_begin is the right one. But no documents said that it is responsible for return the driver's buffer. Well, I can verify that, and the result is really delightful for the time being. In the long run I prefer the configure time check. I can check that at runtime in DSDB_MMAPCopy and print some messages if the behavior of snd_pcm_mmap_begin changes, but I can't prevent others from accessing the buffer before DSDB_MMAPCopy check it.
If the behavior is subject to change, there is no way you can test that at configure time. This needs to be a run time check.