From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7DB59EB64DC for ; Mon, 3 Jul 2023 13:25:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231381AbjGCNZM (ORCPT ); Mon, 3 Jul 2023 09:25:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48746 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231367AbjGCNZJ (ORCPT ); Mon, 3 Jul 2023 09:25:09 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5C16FE41; Mon, 3 Jul 2023 06:25:06 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 8851A219D0; Mon, 3 Jul 2023 13:25:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1688390705; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=pecUI4xOagetnVa0y89RSrIZk+VfXoyy55j+EXMIhrE=; b=F05OyKorIVsZtJqSMTMTx2t4OhAdEC/+OO3iv9HroaH4bvA/CM8OMjuNHFZ2+GEHEXkgqH uFTcf7/rSKY7BW3dM7dhnk9sWJ+2GIYX9wQmt+rLnjVoSivGha8kzGX57U01sopLZEhHYB IXoW6+Ab60AQaXMd1aiGey/SEvhI804= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1688390705; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=pecUI4xOagetnVa0y89RSrIZk+VfXoyy55j+EXMIhrE=; b=tuFNu4N3pjt+/HNuE1JNIS8OM3bR2Y7JFd2FQpVfNUN1FcT+bRDEe+pgdO0Pspz50R1ewD rihp3pAoxFfHeaBQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id EA3A6138FC; Mon, 3 Jul 2023 13:25:04 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 1n/1NzDMomQMGAAAMHmgww (envelope-from ); Mon, 03 Jul 2023 13:25:04 +0000 Date: Mon, 03 Jul 2023 15:25:04 +0200 Message-ID: <8735255dqn.wl-tiwai@suse.de> From: Takashi Iwai To: Hans Verkuil Cc: Mark Brown , Shengjiu Wang , Sakari Ailus , Shengjiu Wang , tfiga@chromium.org, m.szyprowski@samsung.com, mchehab@kernel.org, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Xiubo.Lee@gmail.com, festevam@gmail.com, nicoleotsuka@gmail.com, lgirdwood@gmail.com, perex@perex.cz, tiwai@suse.com, alsa-devel@alsa-project.org, linuxppc-dev@lists.ozlabs.org, Jacopo Mondi Subject: Re: [PATCH 1/6] media: v4l2: Add audio capture and output support In-Reply-To: References: <1688002673-28493-1-git-send-email-shengjiu.wang@nxp.com> <1688002673-28493-2-git-send-email-shengjiu.wang@nxp.com> <87h6ql5hch.wl-tiwai@suse.de> <43f0ecdf-7454-49ae-96b3-2eae5487e9a5@sirena.org.uk> User-Agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/27.2 Mule/6.0 MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 03 Jul 2023 15:12:55 +0200, Hans Verkuil wrote: > > On 03/07/2023 14:53, Mark Brown wrote: > > On Mon, Jul 03, 2023 at 02:07:10PM +0200, Takashi Iwai wrote: > >> Shengjiu Wang wrote: > > > >>> There is no such memory to memory interface defined in ALSA.  Seems > >>> ALSA is not designed for M2M cases. > > > >> There is no restriction to implement memory-to-memory capture in ALSA > >> framework. It'd be a matter of the setup of PCM capture source, and > >> you can create a corresponding kcontrol element to switch the mode or > >> assign a dedicated PCM substream, for example. It's just that there > >> was little demand for that. > > > > Yeah, it's not a terrible idea. We might use it more if we ever get > > better support for DSP audio, routing between the DSP and external > > devices if driven from the CPU would be a memory to memory thing. > > > >> I'm not much against adding the audio capture feature to V4L2, > >> though, if it really makes sense. But creating a crafted /dev/audio* > >> doesn't look like a great idea to me, at least. > > > > I've still not looked at the code at all. > > My main concern is that these cross-subsystem drivers are a pain to > maintain. So there have to be good reasons to do this. > > Also it is kind of weird to have to use the V4L2 API in userspace to > deal with a specific audio conversion. Quite unexpected. > > But in the end, that's a decision I can't make. > > So I wait for that feedback. Note that if the decision is made that this > can use V4L2, then there is quite a lot more that needs to be done: > documentation, new compliance tests, etc. It's adding a new API, and that > comes with additional work... All agreed. Especially in this case, it doesn't have to be in V4L2 API, as it seems. (Though, the support of audio on V4L2 might be useful if it's closely tied with the a stream. But that's another story.) thanks, Takashi