Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp1892310lqb; Mon, 27 May 2024 00:25:40 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXIk476Z6taFZoGAiqLm6+5VSacsXya4zdCPA2Z48pDrSX1UHyGADS1+UmUS6k81DO0d1DCWb5/kFDQqMR+74uC6jxwPQ4kcq1W4rapIw== X-Google-Smtp-Source: AGHT+IHj1ko2iSiK3wgLJTKBPPwkuSVVX3GFyuKVYRqY1tm10P3Radrk8nMHUuA4Qea5YJrZUZmb X-Received: by 2002:a17:907:75c7:b0:a59:cc9b:d6f8 with SMTP id a640c23a62f3a-a62646d5680mr721502866b.39.1716794740034; Mon, 27 May 2024 00:25:40 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716794740; cv=pass; d=google.com; s=arc-20160816; b=BHcWsPwlVpRlscbgnZj/LJd1gACa08+s3HARjLAF1bRX5OpO0cMW8nLvYUgZH15Aki qqeo6S3m4/pJBduvVSlB2g5ggUj9ZWqoKvXRtSQn1bUeU/JI0ZmhUigzbe0SOdddFtV2 LAn1ylRBFzW3g7EEFcdD1nnjFLkcPAOke6dk5Jxm07G/0pE5+BTh5D500cLYXyMJBGmw lVAiSHb1cvH1YRv2zWfs6nOyIijXjmJlbeLiySV7Y8zpoBxXVzNzt5D2r3hZBb1RjiTR 5qbGH8ShozoPFvCYO/71iz1QgX5a85YgAZVpwETPVvng6BYsd+PhRKiSvAESQ+4vhb8e GFTA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:autocrypt:content-language :references:cc:to:from:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature:dkim-filter; bh=JP1jmp3oHy2EazcUWfK2EK+MJMI+3j8kMee4KTey8kU=; fh=1fk+Yez1dbz4v+ekPTS2J8sb++jOvoIUN0NjYtFSPY8=; b=M3k6IsuFaNIZsx9mP/StSZvQrG+TFKbieswR/DEbErvO8GHXz24JWLrnqTkmSfSN5y sGyIXNEtMzSGF0VoPzEtHAnj0QRY1T09C2TSoY4yTpN0puD4CKYwaxpqkvQa+9qdQD4d ONpBSUkq691uzOql3uFaMJDN/x5L+vFkj1aj+W9AtktAusM1st1oJQJl+TdS7Imwri3v c0zgesQhr+VAXMfP96K1ckdDcpOHGewt7MehRTh1UCp6aDXfIz99JVlZlzUMMIH+wSu2 cf9VDW77RD803HffuC4xfar6EVlimXYLNg/8bKYrm/uNBDMgEfmeV2oki4o007Cqvx5D pToA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@perex.cz header.s=default header.b="L9jYX/i1"; arc=pass (i=1 spf=pass spfdomain=perex.cz dkim=pass dkdomain=perex.cz dmarc=pass fromdomain=perex.cz); spf=pass (google.com: domain of linux-kernel+bounces-190140-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-190140-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=perex.cz Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a626c80060csi352828666b.176.2024.05.27.00.25.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 00:25:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-190140-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@perex.cz header.s=default header.b="L9jYX/i1"; arc=pass (i=1 spf=pass spfdomain=perex.cz dkim=pass dkdomain=perex.cz dmarc=pass fromdomain=perex.cz); spf=pass (google.com: domain of linux-kernel+bounces-190140-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-190140-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=perex.cz 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 99A6A1F2166F for ; Mon, 27 May 2024 07:25:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4C904208D1; Mon, 27 May 2024 07:25:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=perex.cz header.i=@perex.cz header.b="L9jYX/i1" Received: from mail1.perex.cz (mail1.perex.cz [77.48.224.245]) (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 A64FD1BDDF; Mon, 27 May 2024 07:25:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=77.48.224.245 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716794721; cv=none; b=RHcDAH/lxstwNGpqNk+oSoiTvJUW/CyVlA+5HsYlbo8pSPbgvzk7m9Oh6yXibFhEoESCYm60lWFYr9WYQLVCGQ1miemi8JxLlPMt0MfKBoeEvBly4Io+ia6JOo0aFiSMgNk1rfkvfxYtj2NCT4ajifB2usU631U5y+UwvfomAF4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716794721; c=relaxed/simple; bh=Kl2GnBuyQuBgvhfCMlLOdm7ASQcO6ePk3EB+ts82o4g=; h=Message-ID:Date:MIME-Version:Subject:From:To:Cc:References: In-Reply-To:Content-Type; b=QNqLylN0rWrcFylkgiZsGgQfZp7taBy08x+EhNkxlO6rzYLLDWsEFtFiBhCMvCP9XfX1YoZG4qmo8it5VMIYSLWJOXinheDKiwsfR7jPiW9mh2RNZVBZZwCaMaUMb3QR7SFbW77rbyQ5L88d2f7DAc3n+NE1dp3RdAJBogPkgfI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=perex.cz; spf=pass smtp.mailfrom=perex.cz; dkim=pass (1024-bit key) header.d=perex.cz header.i=@perex.cz header.b=L9jYX/i1; arc=none smtp.client-ip=77.48.224.245 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=perex.cz Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=perex.cz Received: from mail1.perex.cz (localhost [127.0.0.1]) by smtp1.perex.cz (Perex's E-mail Delivery System) with ESMTP id 639E14B93; Mon, 27 May 2024 09:25:15 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.perex.cz 639E14B93 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=perex.cz; s=default; t=1716794715; bh=JP1jmp3oHy2EazcUWfK2EK+MJMI+3j8kMee4KTey8kU=; h=Date:Subject:From:To:Cc:References:In-Reply-To:From; b=L9jYX/i1vKqNU0V2fSvMtCeBc5OsK+QViPcpfe9AtsOA2yNcpOBiT6Ac4g9xiGlOm bLtkPsM+E1ybCyGA5NhMO5Jtd4/XXOWResALkVKXdOlztGBuA1IZ62tS2qu08OGWfo pT76o4mmmHuBcYFnLKvPlOZrHDZNRJnLxt+oGMG0= Received: from [192.168.100.98] (unknown [192.168.100.98]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: perex) by mail1.perex.cz (Perex's E-mail Delivery System) with ESMTPSA; Mon, 27 May 2024 09:24:54 +0200 (CEST) Message-ID: Date: Mon, 27 May 2024 09:24:53 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v15 00/16] Add audio support in v4l2 framework From: Jaroslav Kysela To: Nicolas Dufresne , Takashi Iwai Cc: Hans Verkuil , Shengjiu Wang , =?UTF-8?Q?Amadeusz_S=C5=82awi=C5=84ski?= , Mauro Carvalho Chehab , Mark Brown , Sebastian Fricke , Shengjiu Wang , sakari.ailus@iki.fi, tfiga@chromium.org, m.szyprowski@samsung.com, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Xiubo.Lee@gmail.com, festevam@gmail.com, nicoleotsuka@gmail.com, lgirdwood@gmail.com, tiwai@suse.com, alsa-devel@alsa-project.org, linuxppc-dev@lists.ozlabs.org References: <1710834674-3285-1-git-send-email-shengjiu.wang@nxp.com> <20240503094225.47fe4836@sal.lan> <22d94c69-7e9f-4aba-ae71-50cc2e5dd8ab@xs4all.nl> <51408e79-646d-4d23-bc5b-cd173d363327@linux.intel.com> <2f771fe9-7c09-4e74-9b04-de52581133fd@linux.intel.com> <28d423b1-49d8-4180-8394-622b1afd9cd9@perex.cz> <850a80b2-d952-4c14-bd0b-98cb5a5c0233@perex.cz> <8a6f84ac-5813-4954-b852-84f5118e607c@perex.cz> <87o7975qcw.wl-tiwai@suse.de> <3b9c9649-c657-4636-b4ef-31df82c58bba@perex.cz> Content-Language: en-US Autocrypt: addr=perex@perex.cz; keydata= xsFNBFvNeCsBEACUu2ZgwoGXmVFGukNPWjA68/7eMWI7AvNHpekSGv3z42Iy4DGZabs2Jtvk ZeWulJmMOh9ktP9rVWYKL9H54gH5LSdxjYYTQpSCPzM37nisJaksC8XCwD4yTDR+VFCtB5z/ E7U0qujGhU5jDTne3dZpVv1QnYHlVHk4noKxLjvEQIdJWzsF6e2EMp4SLG/OXhdC9ZeNt5IU HQpcKgyIOUdq+44B4VCzAMniaNLKNAZkTQ6Hc0sz0jXdq+8ZpaoPEgLlt7IlztT/MUcH3ABD LwcFvCsuPLLmiczk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hsJFTAhBZI5xMSnqhaMmWCL99OWwfyJn2omp8R+lBfAJZR31vW6wzsj ssOvKIbgBpV/o3oGyAofIXPYzhY+jhWgOYtiPw9bknu748K+kK3fk0OeEG6doO4leB7LuWig dmLZkcLlJzSE6UhEwHZ8WREOMIGJnMF51WcF0A3JUeKpYYEvSJNDEm7dRtpb0x/Y5HIfrg5/ qAKutAYPY7ClQLu5RHv5uqshiwyfGPaiE8Coyphvd5YbOlMm3mC/DbEstHG7zA89fN9gAzsJ 0TFL5lNz1s/fo+//ktlG9H28EHD8WOwkpibsngpvY+FKUGfJgIxpmdXVOkiORWQpndWyRIqw k8vz1gDNeG7HOIh46GnKIrQiUXVzAuUvM5vI9YaW3YRNTcn3pguQRt+Tl9Y6G+j+yvuLL173 m4zRUU6DOygmpQAVYSOJvKAJ07AhQGaWAAi5msM6BcTU4YGcpW7FHr6+xaFDlRHzf1lkvavX WoxP1IA1DFuBMeYMzfyi4qDWjXc+C51ZaQd39EulYMh+JVaWRoY= In-Reply-To: <3b9c9649-c657-4636-b4ef-31df82c58bba@perex.cz> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 16. 05. 24 16:50, Jaroslav Kysela wrote: > On 15. 05. 24 22:33, Nicolas Dufresne wrote: >> In GFX, they solve this issue with fences. That allow setting up the next >> operation in the chain before the data has been produced. > > The fences look really nicely and seem more modern. It should be possible with > dma-buf/sync_file.c interface to handle multiple jobs simultaneously and share > the state between user space and kernel driver. > > In this case, I think that two non-blocking ioctls should be enough - add a > new job with source/target dma buffers guarded by one fence and abort (flush) > all active jobs. > > I'll try to propose an API extension for the ALSA's compress API in the > linux-sound mailing list soon. I found using sync_file during the implementation to be overkill for resource management, so I proposed a simple queue with the standard poll mechanism. https://lore.kernel.org/linux-sound/20240527071133.223066-1-perex@perex.cz/ Jaroslav -- Jaroslav Kysela Linux Sound Maintainer; ALSA Project; Red Hat, Inc.