Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp608185lqo; Wed, 8 May 2024 09:17:21 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUt3IhbxSKs1qT+q9phyIvGdbT1fUlnHKKqoFWEPyBI7C/FHDxMMyTD/ZRxKFTJld2ecMHms6UJ4IftSFBG3mzMab6s3uzDOxHVPDSJow== X-Google-Smtp-Source: AGHT+IGdxJD+8ngOkvkusW4huItoSeQKprM4tH82DELi6//LMbdinmwzoZOBc7A4W1eTtrFR1vIt X-Received: by 2002:a05:6a21:3e0c:b0:1a7:a6f3:1827 with SMTP id adf61e73a8af0-1afc8db5bf9mr3492736637.46.1715185040794; Wed, 08 May 2024 09:17:20 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715185040; cv=pass; d=google.com; s=arc-20160816; b=OS5TW9Y64nWruu0thYIjycE2Qq4ddfaEyFztQepiS1VC5OHssa0A5Y3HtP8i7UfXZx q0Dhg0f4WK930W9b5MBV19LVxIeYXVriJ+UOkNCY+/LqrDy0m86iFqDplr/ya/MOcMsS ic2TkvKxh8qG/BC58KNNnMJHD7qiC5xSuabCZc4EX1UsD7ASH4pYZE+6z8kKQ2m4zG6y b2dTfCrO7OAvUgVJnwfc44+kvkeRVxrnKyzUdJkb+qPt2X9T/Ak9UzehcXvbugKMkGE4 gTHUoekXg4mAysPOcJQiprpcMVnzBsdnyaIhkxSqlv8A3t9l1qikhyStviu8xi1cKBPD fntA== 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:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=bhFgyhxqcn476E3N4MFmHJMJEEES1aHhY9gQwlTWXdQ=; fh=3eVbvXVT2F7w23cFT6imnzbn3TO4xlidhy25820AHtI=; b=PWUw+r5SIyYUm8y4kH/NCRSF4LPD9cBUx0wnZ9m/evRbTo13fFYRF1MmrypvT6SSsk f1TqVYP75zrLIZIhqOuw0q8I0q7hLjfIHbpbMuePN1NrA/VuohqPPSpAtB7WP7pl2Atu LtWbof2MNYxoL7LmgNXZF2fwuHMjm0n0redEgFWcqVjV22DEIVksb0hKH5BSyYSIwz3D EUIv59zRptVLl5NI9jImCdWQ0qy0UDVaaI0lJt9ndL0PofvJwJv6SMJ1fJgU56iQuTl2 iiUT+gtdUS6jqI6gvrdiIsZ9SVt1/7ohDMoZRRpLM0QJD2TUPmGJkI54nK9MVj2C/3eF dh6A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=NG1sgdGj; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-173292-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-173292-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id y4-20020a62f244000000b006f4477420b1si11526888pfl.244.2024.05.08.09.17.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 May 2024 09:17:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-173292-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=NG1sgdGj; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-173292-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-173292-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.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 sy.mirrors.kernel.org (Postfix) with ESMTPS id B273EB24604 for ; Wed, 8 May 2024 13:19:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 718AA7D3FE; Wed, 8 May 2024 13:16:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="NG1sgdGj" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) (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 C43A286640; Wed, 8 May 2024 13:16:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.7 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715174182; cv=none; b=Yak6nhQYKi0Uq3R4PrBnOYejAf96dATuigszEMQ/Eq2NltWX51NtY+rqjUF7gkmzBcaxBGy2xCOiJlxvG7RWKOOICJizxgzV8LuIsg36ediUClaaIf5Kqu835udtAf9LkQnlssPjHo00jY3qf8qleO1vd8VGnjjxVQN/Mu9oA1E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715174182; c=relaxed/simple; bh=Pbghh143acCbPWT9OSSfKb3SaczwJwuLEG9zgGuWUjc=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=e/pWX2NNm2lSLc8HWWJk6TD5YkRBfMLXn8InQsVr3dnzOKaqTMni39IgJouGpzhHRcydCafFNUDV+GmNHavGa+onBfsCZvgu3P3XxqHOX7o/SEZn7yrjMyRP9jV/OVWSys7Fpno1L8ysZoK/qBUnk+SHChDvQT7T9tmDghjXhSQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=NG1sgdGj; arc=none smtp.client-ip=192.198.163.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1715174181; x=1746710181; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=Pbghh143acCbPWT9OSSfKb3SaczwJwuLEG9zgGuWUjc=; b=NG1sgdGjHs28SX9YP78hO/RpegsdWIfBRtG/KZ5W9MIkONYewHH+2/mW t6EyLob50Yl/GtRUyq5PRrwYpaihNPd4/mXyUGDSl2+9wKIPQp6BY92uB TmO0TzkpvQQXD3nJjPBFHzDpYtPNaWZBmLWXo+H0jDCzNDQEhyJJ7BJUq dfWuLpfv6NcOM4nEMvxFEexF0hl4wO62Btu/mePPOEUbR6xQqRx0zhKme mCWawmXlkfsP0LltIlyytt5feIxiK08oYD2BStzCmLmbqK1R/Jv2Ur7ja YumrjO2XmEwrnXqCR2endttH4/FxLFt5BsFmsD04kqKVO9LxtyM3JQgPt w==; X-CSE-ConnectionGUID: FPgocgStR9aX9RdWxH314w== X-CSE-MsgGUID: vLhKxbQ0RfOZy+fvYZlxRg== X-IronPort-AV: E=McAfee;i="6600,9927,11066"; a="36413289" X-IronPort-AV: E=Sophos;i="6.08,145,1712646000"; d="scan'208";a="36413289" Received: from fmviesa005.fm.intel.com ([10.60.135.145]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 May 2024 06:16:20 -0700 X-CSE-ConnectionGUID: MQxi/U5oS8ewAq1bHz0clQ== X-CSE-MsgGUID: yinIUFupQ928TFhDXIeDlw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,145,1712646000"; d="scan'208";a="33356817" Received: from sskolar-mobl.amr.corp.intel.com (HELO [10.212.67.115]) ([10.212.67.115]) by fmviesa005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 May 2024 06:16:19 -0700 Message-ID: <6fe8f489-d8a2-4951-96fa-875ac9b29d23@linux.intel.com> Date: Tue, 7 May 2024 16:33:11 -0500 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v21 33/39] ASoC: usb: Fetch ASoC sound card information To: Wesley Cheng , srinivas.kandagatla@linaro.org, mathias.nyman@intel.com, perex@perex.cz, conor+dt@kernel.org, corbet@lwn.net, lgirdwood@gmail.com, andersson@kernel.org, krzk+dt@kernel.org, gregkh@linuxfoundation.org, Thinh.Nguyen@synopsys.com, broonie@kernel.org, bgoswami@quicinc.com, tiwai@suse.com, bagasdotme@gmail.com, robh@kernel.org, konrad.dybcio@linaro.org Cc: 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 References: <20240507195116.9464-1-quic_wcheng@quicinc.com> <20240507195116.9464-34-quic_wcheng@quicinc.com> Content-Language: en-US From: Pierre-Louis Bossart In-Reply-To: <20240507195116.9464-34-quic_wcheng@quicinc.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit > +/** > + * snd_soc_usb_device_offload_available() - Fetch BE DAI link sound card > + * @dev: the device to find in SOC USB > + * > + * Finds the component linked to a specific SOC USB instance, and returns > + * the sound card number for the platform card supporting offloading. > + * > + */ > +int snd_soc_usb_device_offload_available(struct device *dev) > +{ > + struct snd_soc_usb *ctx; > + > + ctx = snd_soc_find_usb_ctx(dev); > + if (!ctx) > + return -ENODEV; > + > + return ctx->component->card->snd_card->number; > +} Presumably there's a notification to help applications discard this information on removal?