Update dma.cpp

it is the first workable version ofr new APIs