Received: by 2002:ab2:2994:0:b0:1ef:ca3e:3cd5 with SMTP id n20csp375876lqb; Thu, 14 Mar 2024 13:57:59 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXUNP+efEZW2gOq/bD3BBe6EQTdsYHyLDjnPJFjDR7nak+q73r93KjvA3gff7IeJbivqa+qLnpCgIc4CXipnhcEhXMiCO41YukkhjC5nQ== X-Google-Smtp-Source: AGHT+IH/H+jRC86RKzLdDoL9AQJvKe63CPdxDr7VuAJQm4GAI9/SYrjrVtRxePMRwNwI7CD+Yqo1 X-Received: by 2002:a05:6a21:7898:b0:1a3:46fd:6e2d with SMTP id bf24-20020a056a21789800b001a346fd6e2dmr1387905pzc.7.1710449879601; Thu, 14 Mar 2024 13:57:59 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710449879; cv=pass; d=google.com; s=arc-20160816; b=oWoTBQeNZ+lZng1xuZ6p6Y2yrjUc5rB6P5jEQz5P2MhXohijH9KB/tYc2poF3SDHnh eiAXJnueY4fpTZd9UJHEhj6TCJzRArUXZkOVLAl9mBeTPWL5sWz0VjRmIarqFifb9KWF Cl+Vejc2eYJn3LPWjI3N7+5PVYZTqncswxVLpGWsTV9ZGTYqFOZgx2yekpCmYoRRV6tU maB6mO9/+vIsLwYajafg/12T+pTM7625BIrbP22UuulcAfHxO5NX7bdQp1n3Tjm9TV1l /A4gZJkNgjW7VB2kRrZ+P3WxQwE1EibOm00O+uLNZWtaE0E58Pu7MA0+AzKMUFfuPjfH OFvQ== 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:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=i1RRwlY+GSx5CIfYwtnNU1qLUiFuXaO9rJ+b19a99LU=; fh=uvLGT3tSIgQgyVIcr/D3siGcmhI+DemWUHzzWQE5nA4=; b=FW1sPkqCeS7Tq0sfUOOycFEFguI85t2EytFpIyikzIYMgnbBH40l8okST9O0ibW9Vd TTBBDuF1AKbURgqv1o8B3cxieocKSP/EMgWGYbU2AYpKdXFYFL6nQ+F80ewcqLDTO88b 8x2ogfwqVnj1nwWuscpwrrwI6YUSTmLBd58WlLdHmAev/4Ee7wQ4MPflpXhvFQDV5syK aOu0nqpPtcjEDp0uci8LgXBYhgbUbxGAmCewObKhMCSUyzW6cVqXItnCzdQ9FIrYJXyj 5m+0UBbBQeq3ZADzdYt9b2S6cm33vCV8AmqoxnX54BXHrXuPHLy6MoAi28QYNPIOAb7z d+vQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=VypaMdDu; 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-103790-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-103790-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id gz11-20020a17090b0ecb00b0029b7a26a204si1298556pjb.158.2024.03.14.13.57.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Mar 2024 13:57:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-103790-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=VypaMdDu; 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-103790-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-103790-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 46C59283643 for ; Thu, 14 Mar 2024 20:57:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4F08D7641B; Thu, 14 Mar 2024 20:57:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="VypaMdDu" 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 DF31B763E4; Thu, 14 Mar 2024 20:57:43 +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=1710449865; cv=none; b=Z6vxvILyVPabkfbz8PGZ/b9JTCRCtyBNwtaUYNfUTg2FEl92PEyQLGSGBhxP6bkuyzLcI79j54kcLsJKCYxfnAAiXTU1kqwJFH/ukxUaDJ6PE4Bj7FoFJV6vJGBe5PVB16lsKzrkm3nzXZQxKsMKNOMEuBVw0v/PAyCPOk/jMUo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710449865; c=relaxed/simple; bh=i/In70euOucOu10Yn4mf9BZSNHDbmPI7QOVoNvr1wN0=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=e/Nq4/TEwD36LnwfEosxO1zQ3fEEQQu2hvpwD77PaGFMO+LjfsxX6KHSBJKrSl2hr8ZP9fTazr4zEoVQFJx9K7VGDKH0ePaU0qZ+A0xzaLIyzQJX4fxAyyO8QWFpOS7978NHMkwWtjs7FpIBJE0UxqlhT9jTc6UZ5fB1u3YnI6w= 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=VypaMdDu; 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 (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 42EKFsjk019502; Thu, 14 Mar 2024 20:57:21 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= message-id:date:mime-version:subject:to:cc:references:from :in-reply-to:content-type:content-transfer-encoding; s= qcppdkim1; bh=i1RRwlY+GSx5CIfYwtnNU1qLUiFuXaO9rJ+b19a99LU=; b=Vy paMdDuLHTBjsvksPD2BnAdKbsOB51/5Li48ozD40T3l6rwY/B8nOD1KgUDng+sO3 aiaKBQRFPLsVhYNNk1dD3NVvrA2h3AJs8i3LKGOkWHs91I3yKQS6k6Z8jXZAblbZ XnWX+kdgFjWTEj1sUGMlzP5+TQP0c3Ei+sRSCMdmlMD2M6GgRkigVqaZfBYHLpCA LC2sZrKu/v4LCyVOXaLBWxaJT/9sDaOofQ9xNSObmdPran5eK+ggiUNcp9u0YLSr gibSEaPxQ/pBdwBRDjOk/FkIOuSn23Ab+UZLXeuggME+SClx8erC9dBqmnIQtUZu mn4R55nTAKEDQkQ5LqJg== Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3wv81bg2qb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 14 Mar 2024 20:57:21 +0000 (GMT) Received: from nalasex01b.na.qualcomm.com (nalasex01b.na.qualcomm.com [10.47.209.197]) by NALASPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 42EKvK31005345 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 14 Mar 2024 20:57:20 GMT Received: from [10.71.112.106] (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.1118.40; Thu, 14 Mar 2024 13:57:19 -0700 Message-ID: <0e9f0f2f-a404-3b76-3c52-9eca7594efa3@quicinc.com> Date: Thu, 14 Mar 2024 13:57:19 -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:91.0) Gecko/20100101 Thunderbird/91.13.1 Subject: Re: [PATCH v18 20/41] ALSA: usb-audio: qcom: Introduce QC USB SND offloading support Content-Language: en-US To: Albert Wang CC: , , , , , , , , , , , , , , , , , , , , , References: <20240228013619.29758-1-quic_wcheng@quicinc.com> <20240228013619.29758-21-quic_wcheng@quicinc.com> From: Wesley Cheng In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) 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: hogKYBgJv_8ag5r84EkBXjMbinIFbgfn X-Proofpoint-ORIG-GUID: hogKYBgJv_8ag5r84EkBXjMbinIFbgfn X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-03-14_13,2024-03-13_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 impostorscore=0 spamscore=0 bulkscore=0 adultscore=0 mlxlogscore=999 mlxscore=0 clxscore=1015 malwarescore=0 priorityscore=1501 lowpriorityscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2402120000 definitions=main-2403140161 Hi Albert On 3/14/2024 3:29 AM, Albert Wang wrote: > On Thu, Mar 14, 2024 at 3:18 AM 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 currently >> 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 lands >> 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.1509961-1-guanyulin@google.com/ >>> . >> >> Yes, I saw that patch as well. I'll take a look once this series lands >> upstream. >> >> Thanks >> Wesley Cheng