Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1116693ybt; Fri, 26 Jun 2020 21:58:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyL25Si29kjhhLqYTzLQPPMyv4N1jMDbHQZI44mqlsSJzsZK1cfm3DxHtr4m4kGY/YlsOyJ X-Received: by 2002:a50:cd1a:: with SMTP id z26mr7134358edi.120.1593233939192; Fri, 26 Jun 2020 21:58:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593233939; cv=none; d=google.com; s=arc-20160816; b=dwkWWOjs+SABLSumBHkeH+u7FO5s87O7GI2r6edOvjEnTiqcW7SH9wt8CTUVnsQiUz CayKTeveYy/S/h8/5J3R6xrJNIUjSf9D6hvF5sQRvXf7GiFTUlhQo0pLU0bCE0Ctz3Eq hPPVQTkorPN6G0QzIJXTg5UpiboIpNZJcms7mXt/OAWPM/46vMzLCpy34RYcVozRepSP 7bjXDlDipbptd7zH9GE8HiClkdxoDZqP1ysQwXj2Jc8OPurGPLOffcHeZtraEJ05MnFF 2EstzyST6YOvT9QDQ6QEpOFNSTFa0yjnQNYXMebkIkQdVLWFHOihCk7iynLgrzUDtAKj Kfeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:dkim-signature:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from; bh=kupu78+RlIzVp6swUHdt7ySzHcwXFYGpxZH6mlh5V08=; b=f8mmOJxTwCMILEjfBBh6FItyjgvJ4sl+OVs2mWCICUlUq9ITR98DihoPeNtKCoIwN9 jjXSDWfBxKgKj3OX5785TmnY/d3mmBN6xUflrbZcK0Zm3tgFdlQx5pD/3m+H3xfHzjpP FofN0nl97LG3qzViMQs5Lh0m4lK/LAMPcmD3avnT70c2d5y6bR+fa9n5z9lqd/5GPuHg yMmTA2n8jXOOnyR2qUJP/tVzIBNDw2PzeDvN1DHORTUB5REpbNkWLL7ghfes9HsZK7N8 TgMEJ5MftuBjB6M6EQwF32HXzyBJqL//1Uu37fwQ10PrfCsqMFj1sWArfukhtiw+kfQp viyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b="ODeC6E/p"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dt21si8457399ejb.402.2020.06.26.21.58.36; Fri, 26 Jun 2020 21:58:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b="ODeC6E/p"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726421AbgF0Eze (ORCPT + 99 others); Sat, 27 Jun 2020 00:55:34 -0400 Received: from hqnvemgate26.nvidia.com ([216.228.121.65]:17397 "EHLO hqnvemgate26.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725885AbgF0Ezd (ORCPT ); Sat, 27 Jun 2020 00:55:33 -0400 Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate26.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Fri, 26 Jun 2020 21:55:19 -0700 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Fri, 26 Jun 2020 21:55:32 -0700 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Fri, 26 Jun 2020 21:55:32 -0700 Received: from HQMAIL111.nvidia.com (172.20.187.18) by HQMAIL111.nvidia.com (172.20.187.18) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Sat, 27 Jun 2020 04:55:32 +0000 Received: from hqnvemgw03.nvidia.com (10.124.88.68) by HQMAIL111.nvidia.com (172.20.187.18) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Sat, 27 Jun 2020 04:55:32 +0000 Received: from audio.nvidia.com (Not Verified[10.24.34.185]) by hqnvemgw03.nvidia.com with Trustwave SEG (v7,5,8,10121) id ; Fri, 26 Jun 2020 21:55:31 -0700 From: Sameer Pujar To: , , , , , CC: , , , , , , , , , , , , , , , Sameer Pujar Subject: [PATCH v4 14/23] ASoC: soc-core: Probe auxiliary component before others Date: Sat, 27 Jun 2020 10:23:36 +0530 Message-ID: <1593233625-14961-15-git-send-email-spujar@nvidia.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1593233625-14961-1-git-send-email-spujar@nvidia.com> References: <1593233625-14961-1-git-send-email-spujar@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1593233719; bh=kupu78+RlIzVp6swUHdt7ySzHcwXFYGpxZH6mlh5V08=; h=X-PGP-Universal:From:To:CC:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:MIME-Version:Content-Type; b=ODeC6E/pm6bVQyWRVxz1At0w/yx8+MIF7i+jrqRFkq2WnVRWV6lPmZx0tn89UKOY+ /4jE47M6aV81IX45h0fFvYKxX2p/hTik1PueRQZ5ywJlMg5Iy6ZgGBnzskMxrJ0R38 RfSy0fbpnNILRMK5kC9v5JbIWaWtjPfeOtMB8ElKsjqeyaXXTa3rC/LKscMOBMWj80 p8C2f5DrPr1k76GJNuoYOl4s+nPgPZ30ZE14egl7JSfKFImCk71pg5ny0uUIx41FQj xcXfv6V2sgZLlt+rrXRJ0roeynemEaBNXgWaliiutHM5JaeOtl1q0sYJ31EXSU9uHK 11aqOCJFRpY4g== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org A router component can be added as an auxiliary device to the sound card to help with audio routing across multiple components. DPCM dai links use CPU<->Dummy or Dummy<->Codec style of links in simple-card driver and hence do not have required DAI connections by default. Usually machine driver can do the necessary mapping. But if there is a crossbar switch HW which can connect multiple components, it is expected to provide required user space configurability via MUX controls. In such a case the crossbar can be represented as an independent component and can be added as an auxiliary device. The exposed routing interfaces can be used by other components in the system, thus probing it first can avoid probe failures. Signed-off-by: Sameer Pujar --- sound/soc/soc-core.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 8faca60..9041a03 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -1850,19 +1850,19 @@ static int snd_soc_bind_card(struct snd_soc_card *card) if (ret < 0) goto probe_end; - /* probe all components used by DAI links on this card */ - ret = soc_probe_link_components(card); + /* probe auxiliary components */ + ret = soc_probe_aux_devices(card); if (ret < 0) { dev_err(card->dev, - "ASoC: failed to instantiate card %d\n", ret); + "ASoC: failed to probe aux component %d\n", ret); goto probe_end; } - /* probe auxiliary components */ - ret = soc_probe_aux_devices(card); + /* probe all components used by DAI links on this card */ + ret = soc_probe_link_components(card); if (ret < 0) { dev_err(card->dev, - "ASoC: failed to probe aux component %d\n", ret); + "ASoC: failed to instantiate card %d\n", ret); goto probe_end; } -- 2.7.4