Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2640567lqp; Mon, 25 Mar 2024 05:24:57 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUtF0TPIf18i0n8GDrljJor0TRPtl8P+mHcmqOyrjETBkaAhRHSnpPd5Dr5VQwCIvVev8tXfX0MydvhESlhZXGnNUAyJ35wQ1aTyS/Y0A== X-Google-Smtp-Source: AGHT+IFmtLFJQnQ3N/kqInTh3CU4NKUwHD+kj9TJHOvXU0bhAvtdZIglvQPYg30OjSls0I4I8vXt X-Received: by 2002:a05:6214:2b08:b0:693:73f9:8f72 with SMTP id jx8-20020a0562142b0800b0069373f98f72mr6288676qvb.31.1711369496955; Mon, 25 Mar 2024 05:24:56 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711369496; cv=pass; d=google.com; s=arc-20160816; b=Ftn5M2Tg+odduNXZRBdorYHeha91xPh0hfCweanM3wc5bqXXWcAC0DgQeljhsaZFdi AIaxVxmdY0JDnhnTBi6wDPSQ4woYBqCzIMyo1Z2ZDdaWdvrWGj3GGtJkaptkzp0rbZha GdK0NMFtUprF2vyD7qbPNXthmyWwRhkgvIPvK+0vAZezN5cYzDIUbwRy1iiRn0qrZhAi sluZRjsKOlnVa62duiy5dD9JxUBSQUzEKOcdHfRbKFRkkKev7mqZNDAxN3jxNt8C9f2b FjFrg19lGud6mpfrexIzDMFc79WBFe01IWhFBk2yAclmAqgYMuzbXgJie/yV602p3RLf 2XCw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-id:precedence:message-id:date :subject:cc:to:from:dkim-signature; bh=jMh34jf4s6vSoWqvWlOz1uTF/jW64ljn7FLzVGPFfxU=; fh=etGReo/v0G6F6hGvfzUZvY9m3KalSWvAPn3Eyup8Iwg=; b=wd1MkahbeukJaQ4VpzZgRXWPmHuN5No5U7X693yuz3aF1wirx/kJY6edYJN2+IuNMl HCHQFMCzzyShe7utFofOv9+riYAyobr/HWNyMfjNfw9ac3XL8DaLJOWImzntWuTGcTyk kgx9fvOK/jdAD9XOnwhlBg4rO2tE83GeGMm1iXPYLkOigpRtiWd0tbrD1RPvQXakgB6Y 5MXnCJVJsZKE257zxQjlalAyWujE4SrVEQ1U1PbbNmhZft23bEIUVGD+u8sLVrbPM/nh 8jnVIFa4XFQ0EH43rTsoV1X8tVkNs9BADFP5asEEXu2DnnfUtktFIArb06ZRub1GrXOE yIcQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@rock-chips.com header.s=default header.b=XJu3axtJ; arc=pass (i=1 spf=pass spfdomain=rock-chips.com dkim=pass dkdomain=rock-chips.com dmarc=pass fromdomain=rock-chips.com); spf=pass (google.com: domain of linux-kernel+bounces-116453-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-116453-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=rock-chips.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id g12-20020a0562141ccc00b0068eda254d98si7442929qvd.29.2024.03.25.05.24.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 05:24:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-116453-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@rock-chips.com header.s=default header.b=XJu3axtJ; arc=pass (i=1 spf=pass spfdomain=rock-chips.com dkim=pass dkdomain=rock-chips.com dmarc=pass fromdomain=rock-chips.com); spf=pass (google.com: domain of linux-kernel+bounces-116453-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-116453-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=rock-chips.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id ADC301C35EC1 for ; Mon, 25 Mar 2024 12:24:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BFC3274BEB; Mon, 25 Mar 2024 07:31:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=rock-chips.com header.i=@rock-chips.com header.b="XJu3axtJ" Received: from mail-m32123.qiye.163.com (mail-m32123.qiye.163.com [220.197.32.123]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 110E413C66E; Mon, 25 Mar 2024 03:17:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=220.197.32.123 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711336626; cv=none; b=a+uaW4ebEYZ62snPgvGV5ZUKDT8TWaQEz+bB79JGbyOdI2f9AqI2iEmS1hg5vIroWr4zQeM5kne3RoxpQCTesAKWkf3Tib897beEIK2E5EfgxX5UhCLxB3r31nGJQTXhdvS5FN+ifXyWgb1YME3wuGPmyzRVedPQlJLQc1H7+U4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711336626; c=relaxed/simple; bh=IV+b5GbhTAg4OFsAhpQ2bmvejJAJKfMTsfB5GnpgPsg=; h=From:To:Cc:Subject:Date:Message-Id; b=Grbs1gTImPG5E/7ze6qTYyMjzO+sE3Rwg4mLYDedntQm9EbNF8I3olIJ83Q3IGkW4J6+PrSRdutq/YNFjjwoEoTSptxs5gNTjrAoamvYiPCwpqeCvAaFhTcscZT9prb3QCdlidc0eSw9GJmiXA8bGXpHaEd1dQSCCdTp0/01xhM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=rock-chips.com; spf=pass smtp.mailfrom=rock-chips.com; dkim=pass (1024-bit key) header.d=rock-chips.com header.i=@rock-chips.com header.b=XJu3axtJ; arc=none smtp.client-ip=220.197.32.123 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=rock-chips.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rock-chips.com DKIM-Signature: a=rsa-sha256; b=XJu3axtJuclKjDhrBiJnfTTZK1beWCElLQpLCJ5C0A3Z0UK70ZnF8fBg/PxSPLRmYBjnhK46XOcecJ909nhrPk7cH0/VXPmKLQkfPqn+7Sd4sSBwjETQv+zBG8HK26ljiVGSAkoO5dAJ4UrFFFHDKIx49wyPdl2wXJrFJ2rE8p4=; c=relaxed/relaxed; s=default; d=rock-chips.com; v=1; bh=jMh34jf4s6vSoWqvWlOz1uTF/jW64ljn7FLzVGPFfxU=; h=date:mime-version:subject:message-id:from; Received: from localhost.localdomain (unknown [58.22.7.114]) by smtp.qiye.163.com (Hmail) with ESMTPA id 8C1707C0373; Mon, 25 Mar 2024 10:38:10 +0800 (CST) From: Sugar Zhang To: heiko@sntech.de, vkoul@kernel.org Cc: linux-rockchip@lists.infradead.org, Sugar Zhang , dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v1] dmaengine: Add support for audio interleaved transfer Date: Mon, 25 Mar 2024 10:37:49 +0800 Message-Id: <20240325103731.v1.1.I502ea9c86c8403dc5b1f38abf40be8b6ee13c1dc@changeid> X-Mailer: git-send-email 2.7.4 X-HM-Spam-Status: e1kfGhgUHx5ZQUpXWQgPGg8OCBgUHx5ZQUlOS1dZFg8aDwILHllBWSg2Ly tZV1koWUFDSUNOT01LS0k3V1ktWUFJV1kPCRoVCBIfWUFZGUtLQ1ZNTkJOQ0JMSENOTkpVEwETFh oSFyQUDg9ZV1kYEgtZQVlOQ1VJSVVMVUpKT1lXWRYaDxIVHRRZQVlPS0hVSk1PSUxOVUpLS1VKQk tLWQY+ X-HM-Tid: 0a8e7378f5c309d2kunm8c1707c0373 X-HM-MType: 1 X-HM-Sender-Digest: e1kMHhlZQR0aFwgeV1kSHx4VD1lBWUc6MDo6SBw*NDMLHg04HAscSjQd MRkKCT9VSlVKTEpKSEhPSUJKTU5CVTMWGhIXVQgOHBoJVQETGhUcOwkUGBBWGBMSCwhVGBQWRVlX WRILWUFZTkNVSUlVTFVKSk9ZV1kIAVlBSkJLTTcG Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: This patch add support for interleaved transfer which used for interleaved audio or 2d video data transfer. for audio situation, we add 'nump' for number of period frames. Signed-off-by: Sugar Zhang --- include/linux/dmaengine.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h index 752dbde..5263cde 100644 --- a/include/linux/dmaengine.h +++ b/include/linux/dmaengine.h @@ -144,6 +144,7 @@ struct data_chunk { * Otherwise, destination is filled contiguously (icg ignored). * Ignored if dst_inc is false. * @numf: Number of frames in this template. + * @nump: Number of period frames in this template. * @frame_size: Number of chunks in a frame i.e, size of sgl[]. * @sgl: Array of {chunk,icg} pairs that make up a frame. */ @@ -156,6 +157,7 @@ struct dma_interleaved_template { bool src_sgl; bool dst_sgl; size_t numf; + size_t nump; size_t frame_size; struct data_chunk sgl[]; }; -- 2.7.4