Received: by 2002:ab2:69cc:0:b0:1fd:c486:4f03 with SMTP id n12csp312793lqp; Tue, 11 Jun 2024 05:36:12 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVXKNrGAEEAiv+QRAsq0d8xGnAH+Vkhs8tWclCkfOMPhZgWJttq9Ajxl5SXnKp1jRUwIzsQVXdcWaIiv6kOJO42jVgttZeal/PZdanJTQ== X-Google-Smtp-Source: AGHT+IEGA0GBdE80vw8uzngAfrfqPgoJcxO9wyYP3gL4DbJA7MMM0+1N+SgHuqjjVJ6kP02x29xI X-Received: by 2002:a17:906:5a98:b0:a6f:1025:8dd5 with SMTP id a640c23a62f3a-a6f10259056mr458222066b.75.1718109372471; Tue, 11 Jun 2024 05:36:12 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718109372; cv=pass; d=google.com; s=arc-20160816; b=iN1tkER/egLvwii7qwPZqiGC4KLwtBJeA8Z09/YlJyUbOrO0qAHUZ/2gArTa27gnDM iQziqzCtpkIUhFAG1y1TOIbDa+xbzmUInhek7T836nqBkKVI+ctjIWvvSdoHOEJWydWg /VQypAgH6ud2bdlNfrb4mIc60KS75BUEY67TmDxmRilgT+ONUHsvVGU226DY1exmFSrk axvy4+oEhqN896+LFiCQ6nZshqDyTyjj0uZLH3EViImKQ7lYwf6Yf0co8Gk2Z47w2IVt LFFfKkIClUw2GMFLv0fmV3sMeejcfUIVjLmR8S5iSNB4zKhONKYANCh/y1a+YIvZp+gu vwVw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=KOWpJtHBV4XE8VhY7yrO/kJc+8536QocG6HEWhHlh4g=; fh=8dwNF8PZlrEidlpvNhtVsp6cGjGGXGa++KbQBFE2ntA=; b=l2j0RxSbOlFT8bsTLnh9eT84GYU0lLCQaXFKwV2a2oHWRcAvSqmmBeHLqO+mNTq6Sk jS2y2n9rj3usU1RggIx+LvrKKk712hNFlwM69i0jwTUc32IbAlUzGcqimNAd6jUBImup o2SwcD3SxsvJlI78Jqlx8DcPwBAGKmxpEpu6QFjaBRiB3V7kxByhIC7Jjs5bUGbLzz9d t64Wh1yx5UN8o5M7tknm1oGlc28p4H4ZM0YaNciR52Ma05NShRr1xyYyaokzVyfI+GF0 Vg2zHdYU7vNGx6jimaTHfmTyGSazUIZh4iaooJjTIpKriDXj4e4wDjsFTFm4O9dwbpVU p5kQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=Nhcx8DHA; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-209864-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-209864-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-57c867dd476si1760132a12.431.2024.06.11.05.36.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Jun 2024 05:36:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-209864-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=Nhcx8DHA; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-209864-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-209864-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.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 am.mirrors.kernel.org (Postfix) with ESMTPS id 215861F24D55 for ; Tue, 11 Jun 2024 12:36:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DC53717C20E; Tue, 11 Jun 2024 12:36:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="Nhcx8DHA" Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) (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 EAD7F176223; Tue, 11 Jun 2024 12:36:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.23.248 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718109365; cv=none; b=MCACbJ3ggnuE6MQKRdJpYuUz9WB39V8R2zR4V2avAPN5FWLqIm2T2SXHjzYDhgkR9lxATGBJHsCUWfphmbLDdCK0vE2ii2P6PuxyjNlW6RqH2gWw6AyymDpMtN2wgpbfQ+23ziDEV1NrdRgLiWa3v17yDRz6DuSPPvUtCNcQRig= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718109365; c=relaxed/simple; bh=KOWpJtHBV4XE8VhY7yrO/kJc+8536QocG6HEWhHlh4g=; h=Date:From:To:CC:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=GH0hR7doyeTp9svSjlBuro8gmXkfclmE0qmPj4QUZE1JWaEY3ZiNi3PUb4aSl1wDbJ2Pb5LHRVavUDcUkLRJHVgF7sVHxRQvcQh+wQ8HFhY5ZjeCvsTZp1dKDWEN6WZsSKg/uJ0QxwJfb6KgSATnzwcBnOmDJ2bcse+z24pm3kM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=Nhcx8DHA; arc=none smtp.client-ip=198.47.23.248 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 45BCZWRd047923; Tue, 11 Jun 2024 07:35:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1718109332; bh=KOWpJtHBV4XE8VhY7yrO/kJc+8536QocG6HEWhHlh4g=; h=Date:From:To:CC:Subject:References:In-Reply-To; b=Nhcx8DHA/kSRjceH/kbOpERTMx87jQRTzlsoYjbgvjz43SrXNNW7tR4t4/Hqg797q VCqL4tvR7/jF9LSr4Vma2FpVhXWhxrFIvfYoifJWz8mVRLcl6nDraflpVRXs9+aBwU Kh1o2mfDAMVuzIuHQ4Zj5iGtNz5MqvehV0L4n3lI= Received: from DLEE105.ent.ti.com (dlee105.ent.ti.com [157.170.170.35]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 45BCZWuJ116422 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 11 Jun 2024 07:35:32 -0500 Received: from DLEE112.ent.ti.com (157.170.170.23) by DLEE105.ent.ti.com (157.170.170.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Tue, 11 Jun 2024 07:35:31 -0500 Received: from lelvsmtp5.itg.ti.com (10.180.75.250) by DLEE112.ent.ti.com (157.170.170.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Tue, 11 Jun 2024 07:35:31 -0500 Received: from localhost (jluthra.dhcp.ti.com [172.24.227.116]) by lelvsmtp5.itg.ti.com (8.15.2/8.15.2) with ESMTP id 45BCZV1O121832; Tue, 11 Jun 2024 07:35:31 -0500 Date: Tue, 11 Jun 2024 18:05:30 +0530 From: Jai Luthra To: Mark Brown , Lars-Peter Clausen CC: Jaroslav Kysela , Takashi Iwai , Liam Girdwood , Peter Ujfalusi , , , , Devarsh Thakkar , Vignesh Raghavendra , Jayesh Choudhary Subject: Re: Re: [PATCH v2 1/2] ALSA: dmaengine: Synchronize dma channel in prepare() Message-ID: References: <20240610-asoc_next-v2-0-b52aaf5d67c4@ti.com> <20240610-asoc_next-v2-1-b52aaf5d67c4@ti.com> <3557bd0f-86b4-4dce-90dd-59303f4f1154@metafoo.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="a2pm5t3dxnjeog5a" Content-Disposition: inline In-Reply-To: X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 --a2pm5t3dxnjeog5a Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Lars, Mark, On Jun 11, 2024 at 11:39:12 +0100, Mark Brown wrote: > On Mon, Jun 10, 2024 at 05:45:52PM -0700, Lars-Peter Clausen wrote: > > On 6/10/24 03:56, Jai Luthra wrote: >=20 > > > Sometimes the stream may be stopped due to XRUN events, in which case > > > the userspace can call snd_pcm_drop() and snd_pcm_prepare() to stop a= nd > > > start the stream again. >=20 > > > In these cases, we must wait for the DMA channel to synchronize before > > > marking the stream as prepared for playback, as the DMA channel gets > > > stopped by snd_pcm_drop() without any synchronization. >=20 > > We should really implement the sync_stop() PCM callback and let the ALSA > > core let care of the sync. >=20 > Good point, that's a better idea. Thanks for the suggestion, sending a v3 with the change. Peter, I've kept your R-by intact as it is a minor change. --=20 Thanks, Jai GPG Fingerprint: 4DE0 D818 E5D5 75E8 D45A AFC5 43DE 91F9 249A 7145 --a2pm5t3dxnjeog5a Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEETeDYGOXVdejUWq/FQ96R+SSacUUFAmZoRI8ACgkQQ96R+SSa cUWdgg/8CE3gIScDM3oCtEbZLGwD4OSB1rjOChUtnO5P0OPRFipfhafhKyDsKtcZ JlU9aFk+lazrHXLzQNrR2Uz9ljyhm1fc3FH+OCi04cTlRlu6Eees02ZwbQaSGV1g kDQumGpedl0oh5+dc5eTypM3CzJpmTIumJYruaGqQzj0f9P2gyOMuvrlVorwQef7 Q3aWIZOJrj+F0hAchTFUN+1jW9IGnQJLnr1kPTurHP8wntJGjMV8bE00Jji5iZCE /zxtqWpMB/tG8Utl41W6dV3UJ7esQFhtX+xyihclFEVfvHli+k6HNtIG4aPAf82K LNzhGRLDAeUq7EmPk7x3GHVkRhJ2A4RbLBSfYhhHOEfO7B+WPnZqCCj9WjL1UUwJ of3PUoqDV6jHX0kkzb+2Oe0p4YtcIUhlwBWlFXJd4Pe8tGd6ISc2IznTGCViun0P YHVH5hWEBf4iuax1gvCiaRCE/VUJIQNs6gMTNlwq/6HiP9yJQm4C8v7rgPFZz8a4 QzfaCwpopSB1husKft8lmrLb8brM1ca4iHTuqJToZuQ4dEsOI7GvNodhuVY1XVGE YJrze66Vn1qZMJHj1zJ3P8bbqWX5I4VuhcOKUv7BoPLMotefjCPUrLQ/F+xcwW3Q TbFHBLZBaR3lYNgBq/b0D6LebzUzhCwqBQNAwlosRMs7KmgpZi0= =iOPb -----END PGP SIGNATURE----- --a2pm5t3dxnjeog5a--