The receive and transmit are rather complexing in Nios II.
As for the alt_dma_txchan_...and alt_dma_rxchan_....., the memory is the reference, that means: if u use alt_dma_txchan, the the memory is the transmitting one; if u use alt_dma_rxchan, the the memory is the receiving one.
But when it turns to the parameters of ioctl, the meaning is the reverse: ALT_DMA_TX_STREAM means the peripheral will do the stream transmitting work, so does the ALT_DMA_RX-STREAM.
It pained me so much when I use ALT_DMA_TX_STREAM_ON/OFF in alt_dma_rxchan_ioctl().
I have not fully understand the alt_avalon_dma_launch_bidir/txonly/rxonly yet, it's rather confusing.
In Nios I, the programming of DMA is rather easy, only copy_1_to_range(),copy_range_to_1() and copy_range_to_range() will do almost all the work!