Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp26179944rwd; Mon, 3 Jul 2023 06:30:50 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7lK8Hy1dLCtsvgBwvoSPtJwt3zj2UQbnzfpyABlr4kJwL7hpnV29YPACg9te2+rUSz6Y6+ X-Received: by 2002:a05:6808:489:b0:3a2:fe8b:9e1e with SMTP id z9-20020a056808048900b003a2fe8b9e1emr7906695oid.21.1688391050265; Mon, 03 Jul 2023 06:30:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688391050; cv=none; d=google.com; s=arc-20160816; b=p1GtSmA5Wb+4LJrHp0R/TRPyPgmkFjvOphyF+RL9Fjw/2rvJOJmecGMFaf85qvyfm5 v6FW7xtBALmeJdtXA1XgqHfI0qsjqJcuDo2riu3l7o2Yxkmsp9XBoYacPeUKaWIxG1z/ J+6Q+HDIuvs5xOawh9SnKIhbJGVbhJdKeGihlVJ0A5ba3Na3RHx9Ztk1kbx3aQ2KQmeN 1YLwFoKg+r8uNiyMUmWqsrOxTp6qnAIwZYyDo9aiBiJTvUknHyfoA3qkLJvpU00RFMTJ A0y49KDb8uAYJx+OlVUaajDTJ4wYEZcH8a3GZIrFKb6TkUrfH+w1aKh9sE+7i4IVaGgY p6qA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=bvGoH1/ZQh+1WXHUvAHyD9eDUO4xLUcbdMszquO7UlA=; fh=FdX6V0tZVaZSG07d+8wouDhtRf781mJlglMBCa6T1cs=; b=objoyUjGmixbDUPgaVlLzDouwaCwd5qb8s0pEpk7n1gtynI6SHREgrYE0K3NYbyWgi sAX4q9NTBgETs0FfM8PTVNileWIv7gHdLFlRNPVhSHarzvv4Ff4L2hMbREPQEAMlmh8k U6A+23HRINiCXVk7qwuGoJ+7V08Bl5YRvcB1bjdR638zE4EfOVrq7NxbuQitb7Y2SKzY 2OqakryXvgDE7h86E5nIT1j+tqOeCxuNdi0QNu16Kb1SUJWLVP7mSKQr/1gk0363s3n7 pzITwD6RLTuKrFGTpTTA1xUhlKYlPQ6dGOGKOsa3tiEqk+7cC2+MOhquuhqv+/p4CFVP +L3w== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=xs4all.nl Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n127-20020a632785000000b00557221e784asi19462610pgn.293.2023.07.03.06.30.33; Mon, 03 Jul 2023 06:30: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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=xs4all.nl Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231352AbjGCNNE (ORCPT + 99 others); Mon, 3 Jul 2023 09:13:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43150 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231463AbjGCNND (ORCPT ); Mon, 3 Jul 2023 09:13:03 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7EA9E91; Mon, 3 Jul 2023 06:13:01 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 1458160F2F; Mon, 3 Jul 2023 13:13:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DC9EAC433C9; Mon, 3 Jul 2023 13:12:56 +0000 (UTC) Message-ID: Date: Mon, 3 Jul 2023 15:12:55 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH 1/6] media: v4l2: Add audio capture and output support Content-Language: en-US To: Mark Brown , Takashi Iwai Cc: 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 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> From: Hans Verkuil In-Reply-To: <43f0ecdf-7454-49ae-96b3-2eae5487e9a5@sirena.org.uk> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,NICE_REPLY_A,RCVD_IN_DNSWL_HI, 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 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... Regards, Hans