Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp842620lqo; Wed, 8 May 2024 17:43:14 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUElMnOTfroMFd0IjLeMC9XbpQ5AwF5lepGl9I8yg3AJSw1Of3uyGiKQskgEhqUABl5hZpq9ATq2Dyfok8ZerqXZ26thPjGZNjc+4stLw== X-Google-Smtp-Source: AGHT+IGlMOxBNu7lojDTGCZVEPPFVs1016lZNr8tNnQAzQO+Cjoz6BvuCrieWws7yMPkphpvtPpB X-Received: by 2002:a05:6a21:35c6:b0:1a7:3b4b:4153 with SMTP id adf61e73a8af0-1afc8dc8a0amr4609682637.58.1715215394157; Wed, 08 May 2024 17:43:14 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715215394; cv=pass; d=google.com; s=arc-20160816; b=XwW5r+3apB+zsn7hNaSc5T+TCEzQIQLcUgudQpZ4RxfOH0GmyzA+5wiaVTyA3bB7ne WxBvUfcaD33EdsFWTM9zSsWAd51bXLfIjF9ijwHQloBI3IejBpZcz9BDjXP0qkjsHYij RQA7I2RQgR2LEz4rjXIv51arSKNMlRS/R36hkY+Y0PhXQWf+MDiX3R+7B/YpD/nWd/XQ jsyqL/C38xYsGnSXYeMS6lbBcG4W/Z9QqL+tsoOzALqoERRenLn+xoF9kEjrVcH0gZQR y/esh/z4UqD0aYJ9GYfTTITEfyxwxfGZkf9jxvqr3QZNIWK4Yoj8T5DuHTypT4WnwHgf G3Ng== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:references:cc:to:from :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=S4gM+pVUJ5Q6pLxDg6wjqkjqYaNOpOAT6Tz8qpd8mM8=; fh=iRZivtppW/TNTAfzyCFB4Ao7jKoLfwnwVSfzppsNZsY=; b=S+4fSOqPfij1GRzIry5jHkKlhfXhky3+pioBHejdkkvLlu4qbFU3SQbtdhcT8xTftf ve23gSuCdRocgLKINoEcqVcz4d85xogbEskJFBN3VXOItFCsCwmrNDBtJQg8l89CuxSw D8XduX/vvzsof2prN/LXHiZ9jyBOfZD8NUzbhX/y5i5ap3raQT461sNoicuD5h7kYbBG 86VvUERtUkYvWMRSr7fznqUv1nk0ueOnNnqQp5VNmYk1nsbRfjnhUMeTTrDSrQsjPEpX Fo6ZNRuoj1hFt454FHs09Ffe3OJlihifWjWP1ykWrJTH+RO5+I0PXNlb0KEk0S47Pc/j jQlw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=IA40vaTa; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-173974-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-173974-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2b670e341f5si322823a91.22.2024.05.08.17.43.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 May 2024 17:43:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-173974-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=IA40vaTa; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-173974-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-173974-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 6351CB21BD0 for ; Thu, 9 May 2024 00:43:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2A6043A8CB; Thu, 9 May 2024 00:42:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="IA40vaTa" Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (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 B4A21376FC; Thu, 9 May 2024 00:42:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715215367; cv=none; b=qupYuFmSHB3+f5FJ+MobW5hrL8N7hReAJmlAhcqFUtTd77uAqeBespkzIWO6spKx1nWY8FgsanG21KlnRdJTcWUIwDZVC0MxHzt/1gT21iUklxYkbCr1EGa5FWSQHh4/THfZ1od3vmOI0/7lBsN/K8NPONJfR9fQ+Wm1f3ingsE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715215367; c=relaxed/simple; bh=yMcVIWeEy97ZjKAUkHxNI+odNAy+ZoUDCqohKsxBv1k=; h=Message-ID:Date:MIME-Version:Subject:From:To:CC:References: In-Reply-To:Content-Type; b=o/Pa2r71PvkCT8LccVpOdO2CABjmDyUGeUdO6KJtl4BTA2qbWEiLqL2XQJhfMcTqcG+MAJkGhhtya1/hLW2J3PIoDcnDpec7kMlSR1tjFeelC96123gHGPzZsMsrzlfzZxNZWSidJLmjiO1FmBMu4HMp/tGnt8lNWCZZTsItkfQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=IA40vaTa; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 448BZrIM002462; Thu, 9 May 2024 00:42:13 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= message-id:date:mime-version:subject:from:to:cc:references :in-reply-to:content-type:content-transfer-encoding; s= qcppdkim1; bh=S4gM+pVUJ5Q6pLxDg6wjqkjqYaNOpOAT6Tz8qpd8mM8=; b=IA 40vaTaODHqMcYjc0YZYQOnmiSqEm6zgJaBJgVDHvoBeFkY5lwIhSW6iPWPM2hjA7 ZBeTmxAMvw4H4dki8xkpZq7FozPLdbcGzF1A8Cyk7ExeALZQI4ij5IwI4RyW1aXm Uny+vLtozkTb0ClVwuYrzlG9FLs1A3HSgm7ofu7wPL6r1utpYdcByoRgh3hGIhJC soE6Aj+309FQ0R4jvTmAOZjTdbYYt7duaBHTGFmgQOR4ACKlJ6zWS6KyqEummdzr 5ktQNYnJleUIUwLYhfpDAjkqRpX9FIXHVLlQFT9a6c8Me7ddJRT+1z6YKeQYVW5w XmxhGm0V+ApZnSVHDcHA== Received: from nalasppmta02.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3y08ne1hnw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 09 May 2024 00:42:12 +0000 (GMT) Received: from nalasex01b.na.qualcomm.com (nalasex01b.na.qualcomm.com [10.47.209.197]) by NALASPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 4490gAJu019359 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 9 May 2024 00:42:10 GMT Received: from [10.110.126.205] (10.80.80.8) by nalasex01b.na.qualcomm.com (10.47.209.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Wed, 8 May 2024 17:42:09 -0700 Message-ID: Date: Wed, 8 May 2024 17:42:09 -0700 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: [PATCH v21 34/39] ALSA: usb-audio: Add USB offloading capable kcontrol Content-Language: en-US From: Wesley Cheng To: Pierre-Louis Bossart , , , , , , , , , , , , , , , , CC: , , , , , , References: <20240507195116.9464-1-quic_wcheng@quicinc.com> <20240507195116.9464-35-quic_wcheng@quicinc.com> <4ce8ee3b-21d3-4aa3-8fd5-7dcccc2b8abe@linux.intel.com> In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01b.na.qualcomm.com (10.47.209.197) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: E4KjvUFRQ8zlDlU_RC6jOoWXubnoPsOR X-Proofpoint-ORIG-GUID: E4KjvUFRQ8zlDlU_RC6jOoWXubnoPsOR X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.650,FMLib:17.11.176.26 definitions=2024-05-08_09,2024-05-08_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 priorityscore=1501 malwarescore=0 suspectscore=0 spamscore=0 impostorscore=0 phishscore=0 adultscore=0 clxscore=1015 lowpriorityscore=0 mlxlogscore=999 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2405010000 definitions=main-2405090002 Hi Pierre, On 5/8/2024 12:41 PM, Wesley Cheng wrote: > Hi Pierre, > > On 5/7/2024 2:37 PM, Pierre-Louis Bossart wrote: >> >> >> On 5/7/24 14:51, Wesley Cheng wrote: >>> In order to allow userspace/applications know about USB offloading >>> status, >>> expose a sound kcontrol that fetches information about which sound card >>> index is associated with the ASoC platform card supporting >>> offloading.  In >>> the USB audio offloading framework, the ASoC BE DAI link is the entity >>> responsible for registering to the SOC USB layer.  SOC USB will >>> expose more >>> details about the current offloading status, which includes the USB >>> sound >>> card and USB PCM device indexes currently being used. >>> >>> 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. Thanks Wesley Cheng