Received: by 10.192.165.156 with SMTP id m28csp198428imm; Sun, 15 Apr 2018 20:56:40 -0700 (PDT) X-Google-Smtp-Source: AIpwx49SbWu0qZbnRQ+yvDI5RjxAKyvIpIct2U/lD65ev9g8z/51XALAdKKy9oFU1fmJpNMfRsgE X-Received: by 2002:a17:902:8bc6:: with SMTP id r6-v6mr13999067plo.66.1523851000816; Sun, 15 Apr 2018 20:56:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523851000; cv=none; d=google.com; s=arc-20160816; b=wyys/dzUmI5VEtyGYgo/35vJVReddkRYiijKdTQ+S81KzSXen9QUFKaL3antA3Wh/o uW5Spi/KEfb8hOIZMnM2NLTYQUGSrMz09M57ioq7h1/h0skxFRHHAkUDguGThuQkK+40 tAualFfWnW1a3UROD/Qsgk8kSs1rRv9G7zjtleAMzzGV22KEzHlmRbJm6pXKGGNp3s5Q 31YMnPJX3FcsLAsxrKVUxyTltzP6FUpwdEnD56/Q4o47FuPE0qTuPiAuuIE8/Ma1XQtE 6FcpbDkPi6SAhMQVVwZLbOxB77e2g0nUWlaE/DFcIQjmtJR1GSCk9Uv3J5g1tnsjrzE4 KwDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=QBK4eByN9buUluTjYsDDx3ed+N9yVq5xkZlsg8v73uM=; b=gvyZt8/rINRmDwps2ddV+hdRivEgMofBp42afBHK4rurA5JQLLK6UAdDrZWIs8zTrS 4Wndzmz7KhVv3ztzowUMgQR2ZTblW13QHA03FeutCVyznkKqm7D+7AiafbESeG58iVon vbuRg16AesAr+HIcRshWf4E4rgi/G1sfbCnrD68MEforvbJ3chyHNEn7u3FK2nxVBj0B u/YtW/O5xaW7QNBI+l9un982po/pMaSh91FZUzhmc0Y1FRlWa5cBR09XvFvPBURPvmwy FuLSofGBz4p40Cs8MJE6zk+iWEUeaxRlknLLryX3NEKOIUcdJLG9A+8AwGJYdfryTqc6 P7mw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t24-v6si1356228plo.258.2018.04.15.20.56.26; Sun, 15 Apr 2018 20:56:40 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753141AbeDPDyE (ORCPT + 99 others); Sun, 15 Apr 2018 23:54:04 -0400 Received: from mga17.intel.com ([192.55.52.151]:52593 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753107AbeDPDyD (ORCPT ); Sun, 15 Apr 2018 23:54:03 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Apr 2018 20:54:02 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,458,1517904000"; d="scan'208";a="216849434" Received: from vkoul-udesk7.iind.intel.com (HELO localhost) ([10.223.84.143]) by orsmga005.jf.intel.com with ESMTP; 15 Apr 2018 20:54:00 -0700 Date: Mon, 16 Apr 2018 09:28:33 +0530 From: Vinod Koul To: Baolin Wang Cc: Dan Williams , Eric Long , Mark Brown , dmaengine@vger.kernel.org, LKML Subject: Re: [PATCH 4/5] dmaengine: sprd: Add Spreadtrum DMA configuration Message-ID: <20180416035831.GO6014@localhost> References: <0c2b76aba6a49e583f920ae582d6815fa9cc4361.1523346135.git.baolin.wang@linaro.org> <20180411093634.GC6014@localhost> <20180412093735.GF6014@localhost> <20180413034332.GI6014@localhost> <20180413063641.GL6014@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 13, 2018 at 02:41:48PM +0800, Baolin Wang wrote: > On 13 April 2018 at 14:36, Vinod Koul wrote: > > On Fri, Apr 13, 2018 at 02:17:34PM +0800, Baolin Wang wrote: > > > >> > Agreed, users only care about grabbing a channel, setting a descriptor and > >> > submitting that. > >> > > >> > I think you need to go back and think about this a bit, please do go thru > >> > dmaengine documentation and see other driver examples. > >> > > >> > We don't typically expose these to users, they give us a transfer and we set > >> > that up in hardware for efficient. Its DMA so people expect us to use fastest > >> > mechanism available. > >> > >> But there are some configuration are really special for Spreadtrum > >> DMA, and must need user to specify how to configure, especially some > >> scenarios of audio. So I wander if we can add one pointer for > >> 'dma_slave_config' to expand some special DMA configuration > >> requirements, like: > >> > >> struct dma_slave_config { > >> ...... > >> unsigned int slave_id; > >> void *platform_data; > >> }; > >> > >> So if some DMA has some special configuration (such as Spreadtrum > >> DMA), they can user this platform_data pointer. Like xilinx DMA, they > >> also have some special configuration. > > > > Well we all think our HW is special and needs some additional stuff, most of > > the cases turns out not to be the case. > > > > Can you explain how audio in this case additional configuration... > > Beside the general configuration, our audio driver will configure the > fragment length, block length, maybe transaction length, and they must > specify the request type and interrupt type, these are what we want to > export for users. As I said before, you need to derive fragment, block or transaction from given prep_cyclic values. Interrupt type needs to be derived with the flags passed. Please do see how other drivers make use of it. -- ~Vinod