Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp109814rwl; Wed, 4 Jan 2023 16:06:36 -0800 (PST) X-Google-Smtp-Source: AMrXdXtPBfRznfQwT3+YHrAs1Gjo2QwB/56Vjyo8mHKeVzK+bxuoTOR8LG3WPe5Xngzuxzo+iOqh X-Received: by 2002:a17:907:b9d5:b0:7c1:f6c:dd4e with SMTP id xa21-20020a170907b9d500b007c10f6cdd4emr42068650ejc.40.1672877195943; Wed, 04 Jan 2023 16:06:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672877195; cv=none; d=google.com; s=arc-20160816; b=hTq19kX71yqYZtyFOYGp+pMTIyAkwxVZchIzMIkjLkZfyKrsqi+MV6YFT3sVERXxrp Ch3Rf7SpJsaPrNdT7Z2suHn9f2qkPyH86/1hQ84rx1+wdH//kk2hWXKyi4CgLx9TMfLA aFjxcIOcQaCrSRy7rjSKVqvz7ltJv5gs9Z2b5VjhQJjsPhMGCOcbTfVUttIIdSD1MTdl QqKS6r8IUnkH9HQES/NxtvMWAUNX2Hpvm7wz/RIyLzVKhVKHstyb5YYQnM6NYmn4Ay+f dH1pepVCKhJhbl4MHV6V/0Z7STswY3O6hEGJyhYw8y9RFryZpmVlHvtauvU+ZesxsNww iNLA== 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=xuCIEu7QDsrROEyEO8/PC90XI/5xv3+Q8FVaeVyVv08=; b=lUJRVFt+qWvQURjJPvRzJTxD0Ot/6gvj0x41h2aMtNjPgUju+JYE4Vy/TicJUdwmE5 lnRzTt17oD+sbOAPd3N9sDnJYwePZROi3sNpPrwGut73ExUcepN31qklBLMLnefaXgpz NW83ZETQ890wcJWotm3i916VHzpT4VL+RPevoY5EAiebUrk9m+NwU/mun2qY0yeGeFbG zuJ2sPjOxtAxf8IMnGTB5RSFzlXP3Nn5CjWrttsFsmARW1EHTPqLZyllMiziGfiASk6r wtF8uy3ZJbI4eU/gYC0YVlwe3uqs1h7DF2lyYRB/oeUbQ0ObJVovIG2FJLvxzdFEdkJb cOEg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=ZlmRWpB0; 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=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hb39-20020a170907162700b007f38bd15f62si33142286ejc.551.2023.01.04.16.06.22; Wed, 04 Jan 2023 16:06:35 -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=@intel.com header.s=Intel header.b=ZlmRWpB0; 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235303AbjADX73 (ORCPT + 56 others); Wed, 4 Jan 2023 18:59:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48380 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234761AbjADX7Q (ORCPT ); Wed, 4 Jan 2023 18:59:16 -0500 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E079C43198; Wed, 4 Jan 2023 15:59:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1672876756; x=1704412756; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=5oJu9RcpF0Fz6JcRHF4cNVph8pynM8F7sOctJiWYBYE=; b=ZlmRWpB0FZr9kI/PUIw0PI3SHiy4OAuXFqyWpOreFrCu5cmRIsRu6yMq tONE4jcg+mM3L9NqRHN54fmhlrxvRDJpkgefjBNEwxeei1luc5WFGPpYJ JcXG59dB63ZeCkQiaonKtFAZJnNsBHVVyAHORiH6XBVv00pqwZw/tBk4n bQaRg/tXkLIPPS/9BG9fFtmg9u5K2aABVDejkO6NjKpWlBRRzHFRY4AQC TGYIgSRQSmhW5wYVVzYbMZOpRTwB834XqJHZNZzlQdKzdCtJXDex5ImgL hkaDGZeGyFni5R6bfjvYelM8fOFp3S3Nh6cpbfDImTvWn5WDeZUgVNKT5 Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10580"; a="323306077" X-IronPort-AV: E=Sophos;i="5.96,301,1665471600"; d="scan'208";a="323306077" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jan 2023 15:58:50 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10580"; a="900745339" X-IronPort-AV: E=Sophos;i="5.96,301,1665471600"; d="scan'208";a="900745339" Received: from kvthalli-mobl1.amr.corp.intel.com (HELO [10.212.102.90]) ([10.212.102.90]) by fmsmga006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jan 2023 15:58:49 -0800 Message-ID: Date: Wed, 4 Jan 2023 17:41:22 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0 Thunderbird/102.4.2 Subject: Re: [RFC PATCH 03/14] ASoC: qcom: Add USB backend ASoC driver for Q6 Content-Language: en-US To: Wesley Cheng , srinivas.kandagatla@linaro.org, mathias.nyman@intel.com, perex@perex.cz, broonie@kernel.org, lgirdwood@gmail.com, andersson@kernel.org, krzysztof.kozlowski+dt@linaro.org, gregkh@linuxfoundation.org, Thinh.Nguyen@synopsys.com, bgoswami@quicinc.com, tiwai@suse.com, robh+dt@kernel.org, agross@kernel.org Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org, linux-arm-msm@vger.kernel.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, quic_jackp@quicinc.com, quic_plai@quicinc.com References: <20221223233200.26089-1-quic_wcheng@quicinc.com> <20221223233200.26089-4-quic_wcheng@quicinc.com> From: Pierre-Louis Bossart In-Reply-To: <20221223233200.26089-4-quic_wcheng@quicinc.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE 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 > +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. > + data->active_idx = card_idx; > + } else { > + snd_soc_dapm_disable_pin(dapm, "USB_RX_BE"); > + } > + snd_soc_dapm_sync(dapm); > + > + return 0; > +}