Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp26208317rwd; Mon, 3 Jul 2023 06:52:50 -0700 (PDT) X-Google-Smtp-Source: APBJJlFDOVxTInSmMUllWb5evu5/iDRbXeuKVlqq1EVT+Yf3sO3f30lNKATYj1/rfbzIX/SiDl14 X-Received: by 2002:a17:90a:42:b0:262:e439:5013 with SMTP id 2-20020a17090a004200b00262e4395013mr9166671pjb.9.1688392370184; Mon, 03 Jul 2023 06:52:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688392370; cv=none; d=google.com; s=arc-20160816; b=OCK7gOrzv0zrmyV8VCO8MY9Dk87Q0ptiejGMqGxu+sbl5yg+HpcK7uNaqVBxgusj+j 07mKc5BxlmKiIZOQ6E3JXNPIQdIfURCzizqMltZMtybd/TeKUjI0dh+uPJB/qzuMIYLh JY15hJeGwdHOyIcJFcGD+VuLzSG5PFlEut1RhQaZX1SGL3thhL8Wwq4JvPgJQtWA4f2f L9T38YUN+MWz4ZHlxRsqqXUPgbZkluX/uaN12zeAV89SDoRWFn+sGMl2zfuriwkhI4Zw iilpEcw9nQnQQ1GFErjYEfLOIzK/VyFA6sH4QjM/w3EExzCiVnwhyjI8db2gk3wARnfb WeHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:subject:cc:to:from:message-id :date:dkim-signature:dkim-signature; bh=pecUI4xOagetnVa0y89RSrIZk+VfXoyy55j+EXMIhrE=; fh=SBNIS6YQyd85aePNrqZcxAJnoFXn4nojq6W2SsWtoG0=; b=gsh4EqtI5ENJVO+ViKYo/RaPlGakxXwsDFbCugz5GzihkDsJUy4VCyHRR0+zJydAGA kmRmjMaEsn6mcZC9R4f6IcKj4hHbOJkNVHzfym5376IkjfbHLJ6Tz9qKHSjzgtxwc+Ve eiOqm9sfDXb7bVAAU+G7ABOLLkHqxzwVGphfGbkItM/Rzkt/uxR8D1wHPZ9EkzAJybJq EP3uiF7Rand577nnMXhN7YAVVzp0JCMeEy7Du1xxp0IiO/y/suHiT/JNuVp5/aKBidqo B8n3uSWAFDMPJIi7Z5fAdmoM+CO5D2+EOhgHpFimxYfY07EtcnM/Ro45EbSM8gRXNRjm TkoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=F05OyKor; dkim=neutral (no key) header.i=@suse.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nh4-20020a17090b364400b00262fe4585f3si14180762pjb.150.2023.07.03.06.52.37; Mon, 03 Jul 2023 06:52:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=F05OyKor; dkim=neutral (no key) header.i=@suse.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229671AbjGCNZL (ORCPT + 99 others); Mon, 3 Jul 2023 09:25:11 -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 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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