Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp122653lqo; Thu, 9 May 2024 14:50:02 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVz/7SO7WCerqWyUXvjNR/2zRkgKXZm8s+zZnvxEujjTgeR9m0TsoJAbgKzAxFAR8UC18LzeykCoTCifevfCj4lyyurmhYKLxMH5Hgc8g== X-Google-Smtp-Source: AGHT+IFVx0r+p1fZw6oB22m/RdN811KgNBfxxueRjZi8Sg8EG4V6WWs6O9cXGhahOo8AhCw6o+MY X-Received: by 2002:a05:6214:43c9:b0:6a0:bab8:68a2 with SMTP id 6a1803df08f44-6a1683859b8mr6969356d6.50.1715291402117; Thu, 09 May 2024 14:50:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715291402; cv=pass; d=google.com; s=arc-20160816; b=U+u9yc/z3lsudognbD6HeY8WbGpMr6/GfoT6lj7nL4vQJZ5dOu8IhQ4hHLWamTVxzb VaDAJvGSpavdGTX90+3QuZA4fymq9ZubGaXCARjvGifyrbb5WoeX8fE9F5ZDBgO9uKC0 EDYekPzNYS01D+JP2fhLXExuGfopjPSyBu28ODcgm6dnRcjVkzkd+mepgrfwGcdV3zrn CXoAk/acIPlf10uh1dhaayBD5y42atZb3tcQH5/6GZaamtiACv4k0U/o6IGH2d6/UPsK j1YBkkjdvjCz1xFl/lgcULTh+CmHYvFOuUNU5hPrdeiqKl2dzjaBnr0MdD8bQ+xXF0rY YUiA== 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=vsHhs1cefp7jBsXfNMjMddfKHMvYPmG767OdbGYguio=; fh=iRZivtppW/TNTAfzyCFB4Ao7jKoLfwnwVSfzppsNZsY=; b=v6OPTw6R+/yOFLlinX9FY0RhN/lY6GUxoIfDA+PRj26WMYXQObdWVJba4Cc3gKlqZ/ 1pY0XLvutD3U8IfJZs4o57xkhfFtwhyL1C7rU75haogqTgsHRGERMmvlN79/ehaCFpnq FwWIX998NAbTYb9YJ3LHRPdl+JE+MNSoB1ZrU800fSUUyxCa97DE5BwZX0+wsnTFGUmi eaI+SMrLFdJSygDXE+7kBtS3F4Qv3AbhlOnOJ9Q0hhOlGO/QespSM0aCBC/EdRE8vngw sqF3DQutOo549L7xEaL4tkiIPd7a2dNy1PsNhmRZUrxeNhpF2pWP9TkHMjr15/SSG7WU VMSA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=Wec7jvMq; 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-175011-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-175011-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id 6a1803df08f44-6a15f29a4a6si22432816d6.294.2024.05.09.14.50.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 May 2024 14:50:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-175011-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=Wec7jvMq; 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-175011-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-175011-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id B9E1C1C22114 for ; Thu, 9 May 2024 21:50:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 16A821292FF; Thu, 9 May 2024 21:49:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="Wec7jvMq" 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 BF0D91A2C03; Thu, 9 May 2024 21:49:46 +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=1715291388; cv=none; b=eirX81JWszhck1GFVkCLuvvv0b5QTTU7FGmc6ZZWFzEas6YxLiQ2jaXpYWejl3mp66n+rNmTAZo3ThNAvEpZ2VzoVxtpC/1YpXElN7YqGgefndJsQLVxbvjlLgm2QKru3trT+7XAA+HxwpIDNWIWxgYUaVDntCD7rTwDbMRzpY0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715291388; c=relaxed/simple; bh=YCmpm9M7rg8bBTlTTi1uizIbI7KtF4vkiyWgevlyEds=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=l2xIKeEhl8IWNYJqFS3xs1G1JSBdFDZ8NHs5RuDeU3CjGsU0Hrwr6khmC0xmUkxJpsDOiTQx1WV4YkS38cwkvvivUCUA4Vzmbc6zDxxABTeM3mFe//+ffLMDG5qg0Uym1M3ubxUYfu36UivGE2ldBFaIBRd43XIocJXxq4TRksM= 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=Wec7jvMq; 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 (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 449LeJ75002135; Thu, 9 May 2024 21:49:28 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=vsHhs1cefp7jBsXfNMjMddfKHMvYPmG767OdbGYguio=; b=We c7jvMqaesiri1Q+2hFG3qFpCtMJXuUwvOlGGiIV55AquBd4b4NMIjxvRgSRDAA2H Qc83nV+Lnut39c/jpF8qLaz1zfrcYly+9a3fHDqAtSNBKJ3s/2bmupPzjF+noPx7 028F/a/AWN9r/RpZAu48vljrXKG0Qv5BxWIeV1Io1mHOoHMCCkb/UWAIZYM2WuVm yWgv9lUAWpavCqA/vrB+bFVeRS8bf1zLQeTsurosT8m5JuKlRx3a4+WHLtsCUDS2 ygVDiNObE4hRSVDdUds2jJr2Q3P7K3RgLAX3TG0lP2O4EbZuJSkeSfgHj2tImZoM cbc7eNZOhCDXbEgHKuUw== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3y16kp80bh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 09 May 2024 21:49:28 +0000 (GMT) Received: from nalasex01b.na.qualcomm.com (nalasex01b.na.qualcomm.com [10.47.209.197]) by NALASPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 449LnLKn030148 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 9 May 2024 21:49:21 GMT Received: from [10.71.112.114] (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; Thu, 9 May 2024 14:49:20 -0700 Message-ID: <072960e7-c8db-b25c-46f8-019534d325d4@quicinc.com> Date: Thu, 9 May 2024 14:49:20 -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 26/39] ASoC: qcom: qdsp6: Add support to track available USB PCM devices Content-Language: en-US To: Pierre-Louis Bossart , , , , , , , , , , , , , , , , CC: , , , , , , References: <20240507195116.9464-1-quic_wcheng@quicinc.com> <20240507195116.9464-27-quic_wcheng@quicinc.com> <875b643f-af2c-4a1b-87e8-80cd6f236dea@linux.intel.com> <76a943f7-d839-4378-aa12-7fb32e3077e6@linux.intel.com> From: Wesley Cheng In-Reply-To: <76a943f7-d839-4378-aa12-7fb32e3077e6@linux.intel.com> 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: ZQ3i_RvxmNE7-LOMZcLE_vjCphChvZ9_ X-Proofpoint-ORIG-GUID: ZQ3i_RvxmNE7-LOMZcLE_vjCphChvZ9_ 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-09_12,2024-05-09_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 mlxlogscore=827 impostorscore=0 bulkscore=0 priorityscore=1501 phishscore=0 malwarescore=0 clxscore=1015 mlxscore=0 adultscore=0 lowpriorityscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2405010000 definitions=main-2405090155 Hi Pierre, On 5/9/2024 6:02 AM, Pierre-Louis Bossart wrote: > > > On 5/8/24 18:57, Wesley Cheng wrote: >> Hi Pierre, >> >> On 5/7/2024 2:23 PM, Pierre-Louis Bossart wrote: >>> >>>> @@ -113,6 +120,12 @@ static int q6usb_alsa_connection_cb(struct >>>> snd_soc_usb *usb, >>>>       if (connected) { >>>>           /* We only track the latest USB headset plugged in */ >>>>           data->active_usb_chip_idx = sdev->card_idx; >>>> + >>>> +        set_bit(sdev->card_idx, &data->available_card_slot); >>>> +        data->status[sdev->card_idx].sdev = sdev; >>> >>> Not following the 'only track the latest USB headset plugged in', I >>> don't see anything that discard the previously latest headset... >>> >>> If you plug headset1, then headset2, how is headset1 marked as not >>> available for USB offload? >>> >> >> It won't mark headset1 as not available for offload, because offload >> could happen on either depending on what is selected (from the kcontrol >> as well). > > Right, so the wording 'only track the latest USB headset plugged in' is > incorrect or obsolete, isn't it? Sure, I can reword it. Will specify that it "selects the latest USB headset plugged in for offloading" Thanks Wesley Cheng