Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758000Ab3DYNJs (ORCPT ); Thu, 25 Apr 2013 09:09:48 -0400 Received: from caramon.arm.linux.org.uk ([78.32.30.218]:38502 "EHLO caramon.arm.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755629Ab3DYNJq (ORCPT ); Thu, 25 Apr 2013 09:09:46 -0400 Date: Thu, 25 Apr 2013 14:09:22 +0100 From: Russell King - ARM Linux To: Linus Walleij Cc: Lee Jones , Rabin Vincent , Linus WALLEIJ , Arnd Bergmann , Vinod Koul , "linux-kernel@vger.kernel.org" , Per Forlin , Dan Williams , "linux-arm-kernel@lists.infradead.org" Subject: Re: [PATCH 04/32] dmaengine: ste_dma40: Amalgamate DMA source and destination channel numbers Message-ID: <20130425130922.GE14496@n2100.arm.linux.org.uk> References: <1366279934-30761-1-git-send-email-lee.jones@linaro.org> <1366279934-30761-5-git-send-email-lee.jones@linaro.org> <20130425090612.GC4623@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.19 (2009-01-05) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1531 Lines: 38 On Thu, Apr 25, 2013 at 02:43:16PM +0200, Linus Walleij wrote: > So while there is no active usecase, Linux surely has the ambition to do > that as can be seen in: > > /** > * enum dma_transfer_direction - dma transfer mode and direction indicator > * @DMA_MEM_TO_MEM: Async/Memcpy mode > * @DMA_MEM_TO_DEV: Slave mode & From Memory to Device > * @DMA_DEV_TO_MEM: Slave mode & From Device to Memory > * @DMA_DEV_TO_DEV: Slave mode & From Device to Device > */ > enum dma_transfer_direction { > DMA_MEM_TO_MEM, > DMA_MEM_TO_DEV, > DMA_DEV_TO_MEM, > DMA_DEV_TO_DEV, > DMA_TRANS_NONE, > }; > > I think we need a handshake with Vinod on this. DEV_TO_DEV was added when the change to dma_transfer_direction happened, to "fill in" the full pattern. There's a problem with device to device transfers though - you have to consider the rate at which the devices produce and consume data, and whether they both can cope with differing data rates. Take for instance your audio in to audio out idea - even if they are both operating at the same bits per sample and sample rate, if they are independently clocked, chances are that the clocks are not exactly the same, which means you will either underrun or overrun one of the FIFOs in the system. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/