Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp1636609rwl; Thu, 5 Jan 2023 17:14:14 -0800 (PST) X-Google-Smtp-Source: AMrXdXuySsz7PioaFKyUzAIawgnqLufIg/wU1pucSgw445O5iHKXJChwGXfxUUtVEvrjKktRSnIn X-Received: by 2002:a17:907:8b95:b0:84c:95c7:304b with SMTP id tb21-20020a1709078b9500b0084c95c7304bmr27234675ejc.14.1672967654071; Thu, 05 Jan 2023 17:14:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672967654; cv=none; d=google.com; s=arc-20160816; b=F+nXDeSNaU+xYFMqqD4gCvcJWExj6XWvz0QEnosE4SZVo88dRrtcc1dZ+xwFk1+hps fDz53Pn+q5Tc5uYHU85/WUthrKm+4fxAuCigBBy6pl6wMEOTobdyrb3wtVpe3SF/4Tlo qa5050+S+490wNDeIsWtQLuBNN3mcXzJqMJfP8qD3Wq1EsLlMqg/MMkN6iWxNB/rlQQv YKFDiX49ZEkGR5gFXo1uow6Y4B9x5FkTgknJVtHdKSV/pPRJ3OmDzOWPRcUoNW6bzNIs sJExCsF0BrA1hrO1zNeJIvcAqfQ9veqVuV3V/ssDJ5uEM/TMbPfQpdyVuvjHDmO48TVe ZU3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=FcuAOQbllRhmH8qhEZKJY9Hw6HNDVm92HvBhxZczYDQ=; b=HL0wrQo1gH0yJY+OknqokVmmBy8yJjzv4jwhHLVQcnwnGv/KeqtSJl2vcNyoixNdMz QDKEXS/xNo6q0uH1SV9iZvNTsFYrGEjHmvNiQlMEKjhtOIfc3o1NPBw9hUAz2sXukuC8 F203zSUs6zl8yCBL0l9WvYfCRhWpY98eEpzK5lK/eh0fh/qR+SCPLk6vIyRvlLvEb1rl Dl2X7NPRe63QRFmMN6rrgnVQaQQmmOLwINGrtbhbSN5HdNvXUXFxDDaXTwrR/26OH7TP Dr/HPoMFpJJkIA43Og+Jik3+3TW95Fd2tkmIC8ISKnFnqi0KqUrPur0XwItzQ2YxlGX9 HoWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=porboc8+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id du14-20020a17090772ce00b00802855d77a8si39123109ejc.220.2023.01.05.17.14.00; Thu, 05 Jan 2023 17:14:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=porboc8+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236696AbjAFBHN (ORCPT + 57 others); Thu, 5 Jan 2023 20:07:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33034 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236627AbjAFBGz (ORCPT ); Thu, 5 Jan 2023 20:06:55 -0500 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 142F66E435; Thu, 5 Jan 2023 17:06:53 -0800 (PST) Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 305N8x3o008970; Fri, 6 Jan 2023 01:05:57 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=FcuAOQbllRhmH8qhEZKJY9Hw6HNDVm92HvBhxZczYDQ=; b=porboc8+tR1WTFp5opFaP3VOlLpToAKQamRr/twhlhaGhuMrbHMm++UhtqcEaZVA60Wc 5XoM0BrhgJKagE8vYpIt1RW1FDoRUryrAe51fkidYN/H01grpz9myLqcp0DaU46YUqVQ oVoWvTWF+h4JSHu0wu4mi0d853SZH6i26qOTE6eTGhmjJEQYMv8LDAH304Tfbe1p2sDY z08rVnsNpTSlQLhfNAaQtF+LNfZH0X6iuWzKGz4M9tAmruuisZMVmJqinyXohWx5vAdg u9bduvjY17V1L4gXbeZcuJ/JmA0K1TJcRNobsbDROd6tNFo6ndmlZ/X245S04o7bmTkp nA== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3mwvaphnau-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 06 Jan 2023 01:05:57 +0000 Received: from nalasex01b.na.qualcomm.com (nalasex01b.na.qualcomm.com [10.47.209.197]) by NALASPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 30615uO7019008 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 6 Jan 2023 01:05:56 GMT Received: from [10.110.47.113] (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.986.36; Thu, 5 Jan 2023 17:05:55 -0800 Message-ID: <0f903c49-a989-14a6-bac1-c4cae21839eb@quicinc.com> Date: Thu, 5 Jan 2023 17:05:54 -0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [RFC PATCH 03/14] ASoC: qcom: Add USB backend ASoC driver for Q6 Content-Language: en-US To: Pierre-Louis Bossart , , , , , , , , , , , , , CC: , , , , , , References: <20221223233200.26089-1-quic_wcheng@quicinc.com> <20221223233200.26089-4-quic_wcheng@quicinc.com> From: Wesley Cheng In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.80.80.8] 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: 6_IpYtxD6uzAwC3wkpJuW8wRxLMR9ea2 X-Proofpoint-ORIG-GUID: 6_IpYtxD6uzAwC3wkpJuW8wRxLMR9ea2 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.923,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2023-01-05_14,2023-01-05_02,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 bulkscore=0 priorityscore=1501 suspectscore=0 clxscore=1015 mlxscore=0 impostorscore=0 phishscore=0 spamscore=0 mlxlogscore=789 adultscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2301060006 X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Pierre, On 1/4/2023 3:41 PM, Pierre-Louis Bossart wrote: > >> +int q6usb_alsa_connection_cb(struct snd_soc_usb *usb, int card_idx, >> + int connected) >> +{ >> + struct snd_soc_dapm_context *dapm; >> + struct q6usb_port_data *data; >> + >> + if (!usb->component) >> + return 0; >> + >> + dapm = snd_soc_component_get_dapm(usb->component); >> + data = dev_get_drvdata(usb->component->dev); >> + >> + if (connected) { >> + snd_soc_dapm_enable_pin(dapm, "USB_RX_BE"); >> + /* We only track the latest USB headset plugged in */ > > that answers to my earlier question on how to deal with multiple > devices, but is this a desirable policy? This could lead to a lot of > confusion. If there are restrictions to a single device, then it might > be more interesting for userspace or the user to indicate which USB > device gets to use USB offload and all others use legacy. > Yeah, as mentioned its still pretty open ended. I think from the feedback received from Mark/Takashi, this was a viable option for now. Would you happen to have any insight/input on how the userspace can pass down that selection to the ASoC framework? Maybe some kind of PCM IOCTL call? Thanks Wesley Cheng