refine dma.h and dma.c