Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp152566lqo; Thu, 9 May 2024 16:02:17 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXMs3+qiVWBChWptIWVRfyIV2u0g88VR391DOti4Qg2CKKlh2QxgkheRLkh3/fe3klWw6kCL74QqCqyrxBZgjzXd9Pxwryi7CRGLL7+SA== X-Google-Smtp-Source: AGHT+IGrWDsbmYuDNfsp5M7bp0MrDUgaEcqhN3A4KtAhfte2BUVVX3tK2EXksl4ktVIF+OUJ0vJ1 X-Received: by 2002:a05:622a:64f:b0:43a:a965:b0f3 with SMTP id d75a77b69052e-43dfdb4915dmr8927381cf.49.1715295736757; Thu, 09 May 2024 16:02:16 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715295736; cv=pass; d=google.com; s=arc-20160816; b=TMpcOLFdbWfzHwoTA5+1ojaqdtcj0lpLPDogdYk15E0hNneL5Bo9g0kyiFAVSI5Hci Pp2E9aRzC+hbQY415KnzKi4i89LL80bq+4+BJys1Wqj1dQEkUYmdefagz7+TNVlnco4B SS7TVPFxkXo5zP+YBVnntgQaXR+7O7GYR7b6sQ2FXmzsJtQa2tl2Uk2XCUW0NlhOhEpN VG2kegu9r5YbkLKFw6DzzI5PsnaTaAO5kZlsMBds74Mp1m7uzNUn/LVRBbP5B7a82bBQ 4cr6sh2csi49U5YbZoUIYLm3H8nlGvCL+jNHjn8Q2s1GBXjS50OBxUxQcucBppRTRgg6 JthA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=LMprannytXlVewVrsxNE50HJ/VlSTGuZ6AlwLvJajp8=; fh=3eVbvXVT2F7w23cFT6imnzbn3TO4xlidhy25820AHtI=; b=h9kgsLL0fRz3JtEj9Q+CINd7wOikfBODki0VwF7hj7QpraCJUWWAt2REeRgtZiAKhI 0OEKylC8qOz84XvMQ8pp9nIexboeGgXmfMqOJ94vn1PGjiIxd6qrj2fo6GowfoTwTdGP 4VfwnUgTT3RXm6UdUbiNTxo9Vg3qR1IO/d8Ma/mVJ0FL4zimjYvw2Ta5YT8ifrDjZ8jG nqsq7qbViboYOMiCdmYcVgcessDfgA9ZRdUKO7fqW1pbUAAY636nGwDjVgAYzBtuUJXs KljqtQS4vjf0MJddAgaE64nhOUaR2a8ka7ESPMkdhaBrQnYwVee35/5ahHx4Czw5WlWn Q1Xg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=AtyDnETV; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-174841-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-174841-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id d75a77b69052e-43df56a3324si23669791cf.484.2024.05.09.16.02.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 May 2024 16:02:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-174841-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=AtyDnETV; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-174841-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-174841-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id B03F21C22B58 for ; Thu, 9 May 2024 19:57:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CB51385C58; Thu, 9 May 2024 19:56:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="AtyDnETV" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.16]) (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 6767685933; Thu, 9 May 2024 19:56:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.16 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715284588; cv=none; b=Euherp0V6Kgy+7S2D3vNCZzj11ZNU7PrOrwxf2yW4540bef2EjXdoSrwbK2IbbzJdaaa7dg8HIxsFc0gRvH2LYNJG+7RdqH0Dn9iQixDkuxmAkFaMDffsu/k3fxzI7BfPL0uekHqabZu5BKDenhd+CKfXXCNW7NdKRmm0wI3w3M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715284588; c=relaxed/simple; bh=KWpE0p6D5Mx4AC48PvOC39QYe6ueT3DevHp41Jg8ly4=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=LX7qVZRmbfz7SmjjxA58wH6gJIpGBy/Ua/LQj0465rnE0vutYsLgiHwyCG6cVJK6JRT18nbXiyPlB88SkJB2DCAuxIlw+QI3hKJTxlUrlceKAHA5dFeIL60Jg2vYZ3+8u3Az0rUzfcXbOsa5GRqG2Yvu7ku1D2mtD2gC2cAXliQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=AtyDnETV; arc=none smtp.client-ip=192.198.163.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1715284587; x=1746820587; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=KWpE0p6D5Mx4AC48PvOC39QYe6ueT3DevHp41Jg8ly4=; b=AtyDnETVdOXnZhlxOvSzgvhX0I74dBcFiIj4RAh0AlR53vYsBNMOAgHd lV8t8ZwpsflL3Dw/XBfBxjkCpvpfSSWnjHaIJrySpcGAzRXGX/EriIeKe kk/3BoLH/UqbQNMDEviaazUWUGDdMGqjMSIyrN1UrMC30cYzLQ86D5P64 zLHRBXBrt4NfJjguxqw6Kmwe03SV4hwNe3D5Ct6Se3PGhSIl5j+j1Ylly wdOXhj2IhHEEE0EWtjIqQYOMh9BkaUpAJRK42/8ofh1LbcCDNyupCzci3 arDL3bTFYPX2xyIP92ur91o5Wijkd0n9XmmTbKjWE5ZoITGEK8NHziUTZ g==; X-CSE-ConnectionGUID: qG9lyM2jSdCuU1GGSj3Kgg== X-CSE-MsgGUID: BDnbUtm5S+ynl+nSRg0eQg== X-IronPort-AV: E=McAfee;i="6600,9927,11068"; a="11454287" X-IronPort-AV: E=Sophos;i="6.08,148,1712646000"; d="scan'208";a="11454287" Received: from orviesa004.jf.intel.com ([10.64.159.144]) by fmvoesa110.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 May 2024 12:56:26 -0700 X-CSE-ConnectionGUID: a41ju8XXQeG9r7e6NCexkA== X-CSE-MsgGUID: lQw9T7pCRA6d3UjUMCy9SQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,148,1712646000"; d="scan'208";a="34213124" Received: from ajunnare-mobl.amr.corp.intel.com (HELO [10.213.181.85]) ([10.213.181.85]) by orviesa004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 May 2024 12:56:23 -0700 Message-ID: Date: Thu, 9 May 2024 08:11:33 -0500 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 v21 34/39] ALSA: usb-audio: Add USB offloading capable kcontrol To: Wesley Cheng , srinivas.kandagatla@linaro.org, mathias.nyman@intel.com, perex@perex.cz, conor+dt@kernel.org, corbet@lwn.net, lgirdwood@gmail.com, andersson@kernel.org, krzk+dt@kernel.org, gregkh@linuxfoundation.org, Thinh.Nguyen@synopsys.com, broonie@kernel.org, bgoswami@quicinc.com, tiwai@suse.com, bagasdotme@gmail.com, robh@kernel.org, konrad.dybcio@linaro.org Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-sound@vger.kernel.org, linux-usb@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-doc@vger.kernel.org, alsa-devel@alsa-project.org References: <20240507195116.9464-1-quic_wcheng@quicinc.com> <20240507195116.9464-35-quic_wcheng@quicinc.com> <4ce8ee3b-21d3-4aa3-8fd5-7dcccc2b8abe@linux.intel.com> Content-Language: en-US From: Pierre-Louis Bossart In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit >>>> It is expected for the USB offloading driver to add the kcontrol to the >>>> sound card associated with the USB audio device.  An example output >>>> would >>>> look like: >>>> >>>> tinymix -D 1 get 'USB Offload Playback Capable Card' >>>> 0 (range -1->32) >>> >>> You already gave the following examples in patch 29: >>> >>> " >>> USB offloading idle: >>> tinymix -D 0 get 'USB Offload Playback Route Status' >>> -->-1, -1 (range -1->32) >>> >>> USB offloading active(USB card#1 pcm#0): >>> tinymix -D 0 get 'USB Offload Playback Route Status' >>> -->1, 0 (range -1->32) >>> " >>> >>> Can you clarify how many controls there would be in the end? >> >> For USB offload situations, there will be a set of controls for >> playback status and playback select.  The offload jack will also be >> there to tell us if there is an offload path available for the >> platform ASoC sound card. >> >>> Also isn't tinymix -D N going to give you the controls for card N? >>> >> >> Yes, since the offload portion is handled as a DPCM DAI link to the >> platform ASoC card, it will be included as a kcontrol for that. >> >> Thanks >> Wesley Cheng >> >> > > Sorry for responding again.  I read your email again, and wanted to also > add that aside from the above, which are all within the ASoC layer, as > we discussed previously, we should have a kcontrol in the USB SND card > to determine if there is an ASoC platform card capable of offloading. > This is also available from the SND card created by the USB audio device. That makes sense: if the application wanted to use a given endpoint, it could check if there is a 'better' path exposed by another card. It'd be a lot easier than reading controls from random cards. Was this part of this patchset or more of an idea for a future addition?