Received: by 2002:ab2:620c:0:b0:1ef:ffd0:ce49 with SMTP id o12csp608555lqt; Mon, 18 Mar 2024 19:26:45 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVG6rGLQp2deo60OC5n5ZZblng/A+a+C+mhhn2/OFy2Huy5wba224+jV5l+mFujNLa2TSAWVCgaBlxiURGZ+gKF+n1YC7GNEItadibiUg== X-Google-Smtp-Source: AGHT+IGUeWwZ+XOvcYqt8nafufeKEs6sgL7b3AHYGG51cIosmfEHsrwaU3Mq5LxBdNwtM0ZMwm2B X-Received: by 2002:a17:906:8c9:b0:a46:30f4:6321 with SMTP id o9-20020a17090608c900b00a4630f46321mr660421eje.58.1710815205256; Mon, 18 Mar 2024 19:26:45 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710815205; cv=pass; d=google.com; s=arc-20160816; b=oEh+hMmpCUSj6V+QDsNHIJIYflACieLtdWcFJJCJ1rTvItukvQRX1rUDBFBgIIu8Ce pj2J3Dsv4pC5XcPgs7pnYaN4/dBeAPgtX6AqKgVCUIprxZ0OQ5fVZCXu5V3Pa7atIx3k X34TK6GTR4R8SRLTsbnoOZA0IO4y47x9bZL6Fox25O6ECVT6kkscAMe7XO7G7CNEVW9+ 7CFdEpqUmnoUADfCC9qcWixrkF2de0QfrLPQ4pdJz1YL47yu36rrQBacYxlj16F/MxX/ Z0Qujpmf5lBdjKH6+kZCVXEDAfDvUHqCZNX0rYItzQzeR7r68Eu36JyS3x79vaXLkujQ iciw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=9PVwebktWBWty2mBrf17cNCGtAzEMmWTbg3BNLwRbR4=; fh=Eqn9PPb8HoXZx5dWMPpH/XHLgI78cdFHx1Z7Fd4Ed/4=; b=nHRZp0zznPcpDIXA7jQv5lKIuuuQTb8eHYbVI2tYgPIR2v55jc9DDY9isduoJZbsVf YFN7R0H7CIqIb2EH8ok+NjX7J5I2r6Y/CuZ+NQAdfCReqHLEbw1vM0coVKZvrSeYHulP N2ZtUBrovGjYbAh0ub+EI/0/valJ4YeiKMRCCZj/Dei5zSDlJLql41JS7xdbZIpaXAcl Lip84F6USXDai/pu5+HvMMqwP5Jx+KtdAFu1PbYvtFwM8t7fCqgeMjajxXVkzM5kzwmi O/ayV79xqWuuvcNI0Gn1iOmRmwc2Zk17dOjL2WtFWutJ4oguODDo0X4ys/EZyem+xcig cG2Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=u+QpXFOH; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-106920-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-106920-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id qk38-20020a1709077fa600b00a469e80a73esi3042012ejc.1037.2024.03.18.19.26.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Mar 2024 19:26:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-106920-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=u+QpXFOH; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-106920-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-106920-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.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 am.mirrors.kernel.org (Postfix) with ESMTPS id CC63D1F21EC8 for ; Tue, 19 Mar 2024 02:26:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 068C2657AE; Tue, 19 Mar 2024 02:26:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="u+QpXFOH" Received: from mail-ej1-f45.google.com (mail-ej1-f45.google.com [209.85.218.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 525B6651B3 for ; Tue, 19 Mar 2024 02:26:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710815185; cv=none; b=GBT0EyHulrHbEra4qt3s07cUoSASaAQYNX/U/EoxdVeG5UccemOJcUVgOclMAs67/l2AeW2knbsx+/c7z5nR36GxFlvS8BQrBhlFA44ElBPGk5zkzEZv5y+LipRPQmOD8RS0cRfHG2Z8sPs9h1YNlLXcVQkaTw0SCd3PI81Zs1c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710815185; c=relaxed/simple; bh=sggre/bwedm+SjhOnNs5oKMSJXt1Hx/MhvbnEbYdQRE=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=ZJIn7nlB4Xr3aasn3ozpibIGKX7cwZp8cRdg6IKFTCIIEX+tQ6d3BgcGmLCT+sCoAz3qDpm2Bh22anoUszASsLncz5WvPessEPymH92ps61IDlnU42ZnCxL01yf65nZZ5XnXPfxfoj4GsgbQNbCMTsRLMUr+E8j98vc8HO4iWwE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=u+QpXFOH; arc=none smtp.client-ip=209.85.218.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Received: by mail-ej1-f45.google.com with SMTP id a640c23a62f3a-a467d8efe78so524230166b.3 for ; Mon, 18 Mar 2024 19:26:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1710815182; x=1711419982; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=9PVwebktWBWty2mBrf17cNCGtAzEMmWTbg3BNLwRbR4=; b=u+QpXFOHxIIm2aA8ZtgDstbdEP0JytJobxygrcibELE2iSg42kVC3nIhORU+hQRdCR g02IrjRD211Th2bTY7QgjIDz8/vvzyrWwbNp74QLJaFZFfbHDgcS2+5Tuoj0930kPNkf c5x6ok0I/EMtikTXIe6THfEeU4JEvOhnoN+MkV1pV8QRt5gUoq42kfYXtxdB4JbDg8Mq Ny7aNIrtG/saUzznCbyJGJp+gTdqkFow4k6LyzTqM8w2oRxnxSQ41Quu/jitkpJYs0uC 3GS4g2V6k/At4g57bbgqkF2rtgkVMB32SCqGrKB26kWQdo1HgPBZk0ytKK3VgS62qucq Xqsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710815182; x=1711419982; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9PVwebktWBWty2mBrf17cNCGtAzEMmWTbg3BNLwRbR4=; b=mx/99YazDwqsrAfe6P7+tqdtQPtQLjcUoJ46kwznSVc1oeeNXJj/LXxH2xMiqtmarM AJF9kvvjoNv28ozxD61zWvnANvRtGb8QAW4XnclIwhtI86Q7OMiB5DErTOMufoJnbNEc vmxBAEQWb6Aqkeh9PA9RxnD7jUycg2PLK/JgtiM40ZgOCDYUXlr4JyEkTMRxCMpJjMYl uBHnSj5PBu8Gvy+IL34JUTTfQ1sEC8+mli/nSB2Oek+vNrb7WmD+OgomNZmaM1M+08ww SVaKN0ofn1hGF3k9Q8TZs7rvaSSzgJULHaWo2SsT1IhPQ1MwkQFTTeurUYEVOpZzNF3C iJuw== X-Forwarded-Encrypted: i=1; AJvYcCVHMwcg9ZxbRpHsJ7NVBcMTNuc0aYiGYS7Frqc1CkZaoYAz5HTRgDU8QKf7zWZctp7yP8ANa5KXosDlo8fhs+QzbnY+axMxtAA/cNBy X-Gm-Message-State: AOJu0YwYyVmVdlqhrBrSAdhz+k/FobJCBay501bi7nPKbFAaUO6/MVxV cNShiC48qtuUkkPCrXdAB3YimAVnW272sKsSUUWFUEi6Kui7ScrzfXck/vIKA0ZB2bQrq0EY6GN AUyaXV/nz3/eJEpy20FU3VVXGR97It5CA9P5+ X-Received: by 2002:a17:906:81c9:b0:a46:6958:c415 with SMTP id e9-20020a17090681c900b00a466958c415mr639887ejx.8.1710815181445; Mon, 18 Mar 2024 19:26:21 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240228013619.29758-1-quic_wcheng@quicinc.com> <20240228013619.29758-21-quic_wcheng@quicinc.com> <0e9f0f2f-a404-3b76-3c52-9eca7594efa3@quicinc.com> In-Reply-To: <0e9f0f2f-a404-3b76-3c52-9eca7594efa3@quicinc.com> From: Albert Wang Date: Tue, 19 Mar 2024 10:26:08 +0800 Message-ID: Subject: Re: [PATCH v18 20/41] ALSA: usb-audio: qcom: Introduce QC USB SND offloading support To: Wesley Cheng Cc: srinivas.kandagatla@linaro.org, mathias.nyman@intel.com, perex@perex.cz, conor+dt@kernel.org, corbet@lwn.net, lgirdwood@gmail.com, andersson@kernel.org, krzysztof.kozlowski+dt@linaro.org, gregkh@linuxfoundation.org, Thinh.Nguyen@synopsys.com, broonie@kernel.org, bgoswami@quicinc.com, tiwai@suse.com, robh+dt@kernel.org, konrad.dybcio@linaro.org, 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable > We can discuss that offline and come up with an approach that is > reviewable by maintainers and the community. Sure, looking forward to working together with you! Thanks, Albert Wang On Fri, Mar 15, 2024 at 4:57=E2=80=AFAM Wesley Cheng wrote: > > Hi Albert > > On 3/14/2024 3:29 AM, Albert Wang wrote: > > On Thu, Mar 14, 2024 at 3:18=E2=80=AFAM Wesley Cheng wrote: > >> > >> Hi Albert, > >> > >> On 3/13/2024 1:03 AM, Albert Wang wrote: > >>> Hi Wesley, > >>> > >>> The suspend function `qc_usb_audio_offload_suspend()` looks to stop > >>> the traffic on the bus, so that the bus can be suspended. That allows > >>> the application processor(AP) to enter suspend. There is a subtle > >>> difference with our feature, which is to allow AP suspend with the > >>> Host and USB controller active to continue the audio offloading. We > >>> call this feature `allow AP suspend in playback`. So, I have some > >>> points to clarify with you: > >> > >> Yes, I'm aware of that feature also. > >> > >>> 1. Will the suspend flow `usb_audio_suspend() --> > >>> platform_ops->suspend_cb() --> qc_usb_audio_offload_suspend()` be > >>> called when offloading is active? > >> > >> It can be. This is why in our case, we are going to issue the > >> disconnect event to the audio DSP to stop the session if it is current= ly > >> in one. > >> > >>> 2. As my understanding, the suspend function is to allow AP suspend > >>> when the offloading is IDLE, but it won't allow AP suspend when in > >>> playback or capture. Please correct me if anything is wrong. > >> > >> As mentioned above, it will let apps go into PM suspend after forcing > >> the audio stream to be idle. We won't block PM suspend entry. > >> > > Right. Your design is to force the audio stream idle, or say, inform > > the audio DSP > > to stop the current offloading session first, then AP can go into PM > > suspend as usual. > > Then I can say the current design did not support the `allow AP > > suspend in playback` > > feature, right? > > > > Correct, this series does not cover this mechanism. > > >> Yes, I saw that patch as well. I'll take a look once this series land= s > >> upstream. > > > > That patch is rejected and archived now. So we need to find another > > approach to do > > that, even based on your framework. > > > > We can discuss that offline and come up with an approach that is > reviewable by maintainers and the community. > > Thanks > Wesley Cheng > > > Thanks, > > Albert > > > > > >>> 3. We would like to integrate the `allow AP suspend in playback` > >>> feature with your framework to become one upstream offload solution. > >>> Here is the patch: > >>> https://patchwork.kernel.org/project/linux-pm/patch/20240223143833.15= 09961-1-guanyulin@google.com/ > >>> . > >> > >> Yes, I saw that patch as well. I'll take a look once this series land= s > >> upstream. > >> > >> Thanks > >> Wesley Cheng