From patchwork Tue Nov 6 11:38:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 150261 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp3778225ljp; Tue, 6 Nov 2018 03:41:07 -0800 (PST) X-Google-Smtp-Source: AJdET5dIsNBkXRi/Kk4/ksGMK1plz5OU9lnQ8zn7fbEbXfSXARit1piFGu5uZfNBWmS00yQQjT4p X-Received: by 2002:a63:c00b:: with SMTP id h11mr20520421pgg.429.1541504467147; Tue, 06 Nov 2018 03:41:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541504467; cv=none; d=google.com; s=arc-20160816; b=OA+9SShCqX5/hW4a+i+qTmRh29Fg5I9UtoXcQbZtfwURia1+rkTPSi6Mj7FXUW5e81 9VAakWRmgE8qRgygadNEYofQ43h2rFziomPbBKlAUijB2zLSqJCNcwPS/8X45B7ds/Dq 0VwYZFBapeXCWBGl6XiWsyVTelM/xcR8ho6ts+vutYpNdwThX6jI7Go6CdLbVt6tTv6B ooLRWCzvL/Y4p9YT0qMdDZZCMWiGgzrXkg73NJ7W5Yb/eEz3CZG+ZwUDm9Rj0GFdtWaj lKD6ar7G5LgXs8VpbpcO60YqjOTbSq3ZGemq2hnT2yx8+K7FXsGtHYf6sfFiw/sZiHY8 Ca5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=/lsk1upCs1OyAE2EgU4g575DScGKAGYgfvHwM4h+f/g=; b=U/7szHIUJC0Aocs3V6Lv3dBn5ILtL7QP/F03LvaY1bYKHeXG9kAWYPvA3+7h564CxH B7S7i869JyOApv9Plm/W6OXS7SwNH3psvcWEdxXF7KKDuBUXQ1IQ75rR1UYynOqeKzAK QoucGzY3iY/y7YtH1EdJSqQg8sIu5wCp5LJ/6HfbvlTtPJxVsGvZnoIHgtiXgFaZtreW caxmfwVYKT4alDJ7qm++nazyYFS5687P5vaHnacFb2X8HF0vGITJPoZUwePUCZFr+82o VGen0muy9gEOKXg3x2f1TYoaK0XHjr9xmRdmN+mXAA3JKM+JKasSsa4F/DYe+ouiWnzl aT2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TJQ5pWvJ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l63-v6si37809085plb.385.2018.11.06.03.41.06; Tue, 06 Nov 2018 03:41:07 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TJQ5pWvJ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730616AbeKFVFw (ORCPT + 32 others); Tue, 6 Nov 2018 16:05:52 -0500 Received: from mail-wr1-f66.google.com ([209.85.221.66]:38028 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730519AbeKFVFv (ORCPT ); Tue, 6 Nov 2018 16:05:51 -0500 Received: by mail-wr1-f66.google.com with SMTP id d10-v6so13109818wrs.5 for ; Tue, 06 Nov 2018 03:41:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=/lsk1upCs1OyAE2EgU4g575DScGKAGYgfvHwM4h+f/g=; b=TJQ5pWvJUkbFBt7A5tRbFNfw5r0VIwJdiXtmjFHBgnBUmgzeh4XGSA7aUoXjlAOKbV k/ZoBVgw0ayDOg6RqXXjMyfuSigO91va4V9dWbh8iEzNt9zFvuNYqgO7fiITcUXw6JWv WgWvAD4Jf1j11exceSea4RIJi063+7JWz1/2s= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=/lsk1upCs1OyAE2EgU4g575DScGKAGYgfvHwM4h+f/g=; b=G02zhenFCv4ST0T4k8hr/TcBXy95HKeszggKrGxzEheXQrpg95HmPe2cPnNqZbrVA2 n2JFQdXSuHNLs7niVhjiCDyXoo2UiYgFiOzaX+69fOkyYUqQOO8+TGSHD2iGhzyuCm59 eYebD2k03QT4gOOOtIihCuhqRcd7PLnsQ8DgzhgiSyT2P3RzOAgXkaaJGftdJoY5MElM FimZIRvS84pC2Xc9qdlzIEha8I9KceTISy9ERK3quPlZ6ALAPhxWC7glNzYv5Jo1MMdY MMW+6C/hLGkiJT2//mlGgOl4S42+S22rN9QUArosSBL+CtxjtFYoEBVslcbum0UE8JzN tfxw== X-Gm-Message-State: AGRZ1gK9MAGN2XFm+M+nMk/urx0Ldm48t1Jcsx5BT5pM3RVYEOZ4cXr9 f576oZBcTVcqm4yGNcLuzNDirQ== X-Received: by 2002:adf:90af:: with SMTP id i44-v6mr21594130wri.77.1541504461969; Tue, 06 Nov 2018 03:41:01 -0800 (PST) Received: from localhost.localdomain (cpc90716-aztw32-2-0-cust92.18-1.cable.virginm.net. [86.26.100.93]) by smtp.gmail.com with ESMTPSA id b5-v6sm1990114wma.17.2018.11.06.03.41.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 06 Nov 2018 03:41:01 -0800 (PST) From: Srinivas Kandagatla To: broonie@kernel.org, alsa-devel@alsa-project.org Cc: bgoswami@codeaurora.org, linux-kernel@vger.kernel.org, perex@perex.cz, tiwai@suse.com, lgirdwood@gmail.com, rohitkr@codeaurora.org, Srinivas Kandagatla Subject: [PATCH 1/2] ASoC: qdsp6: q6asm-dai: Only add routing once. Date: Tue, 6 Nov 2018 11:38:56 +0000 Message-Id: <20181106113857.19737-2-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181106113857.19737-1-srinivas.kandagatla@linaro.org> References: <20181106113857.19737-1-srinivas.kandagatla@linaro.org> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org q6asm routing gets added multiple times as part of dai probe. Move this to q6routing routes which has those widgets defined, this also fixes the issue where these are added each time at dai probe. Signed-off-by: Srinivas Kandagatla --- sound/soc/qcom/qdsp6/q6asm-dai.c | 33 -------------------------------- sound/soc/qcom/qdsp6/q6routing.c | 19 ++++++++++++++++++ 2 files changed, 19 insertions(+), 33 deletions(-) -- 2.19.1 diff --git a/sound/soc/qcom/qdsp6/q6asm-dai.c b/sound/soc/qcom/qdsp6/q6asm-dai.c index a16c71c03058..86115de5c1b2 100644 --- a/sound/soc/qcom/qdsp6/q6asm-dai.c +++ b/sound/soc/qcom/qdsp6/q6asm-dai.c @@ -122,7 +122,6 @@ static struct snd_pcm_hardware q6asm_dai_hardware_playback = { .rate_max = 48000, \ }, \ .name = "MultiMedia"#num, \ - .probe = fe_dai_probe, \ .id = MSM_FRONTEND_DAI_MULTIMEDIA##num, \ } @@ -511,38 +510,6 @@ static void q6asm_dai_pcm_free(struct snd_pcm *pcm) } } -static const struct snd_soc_dapm_route afe_pcm_routes[] = { - {"MM_DL1", NULL, "MultiMedia1 Playback" }, - {"MM_DL2", NULL, "MultiMedia2 Playback" }, - {"MM_DL3", NULL, "MultiMedia3 Playback" }, - {"MM_DL4", NULL, "MultiMedia4 Playback" }, - {"MM_DL5", NULL, "MultiMedia5 Playback" }, - {"MM_DL6", NULL, "MultiMedia6 Playback" }, - {"MM_DL7", NULL, "MultiMedia7 Playback" }, - {"MM_DL7", NULL, "MultiMedia8 Playback" }, - {"MultiMedia1 Capture", NULL, "MM_UL1"}, - {"MultiMedia2 Capture", NULL, "MM_UL2"}, - {"MultiMedia3 Capture", NULL, "MM_UL3"}, - {"MultiMedia4 Capture", NULL, "MM_UL4"}, - {"MultiMedia5 Capture", NULL, "MM_UL5"}, - {"MultiMedia6 Capture", NULL, "MM_UL6"}, - {"MultiMedia7 Capture", NULL, "MM_UL7"}, - {"MultiMedia8 Capture", NULL, "MM_UL8"}, - -}; - -static int fe_dai_probe(struct snd_soc_dai *dai) -{ - struct snd_soc_dapm_context *dapm; - - dapm = snd_soc_component_get_dapm(dai->component); - snd_soc_dapm_add_routes(dapm, afe_pcm_routes, - ARRAY_SIZE(afe_pcm_routes)); - - return 0; -} - - static const struct snd_soc_component_driver q6asm_fe_dai_component = { .name = DRV_NAME, .ops = &q6asm_dai_ops, diff --git a/sound/soc/qcom/qdsp6/q6routing.c b/sound/soc/qcom/qdsp6/q6routing.c index c6b51571be94..d61b8404f7da 100644 --- a/sound/soc/qcom/qdsp6/q6routing.c +++ b/sound/soc/qcom/qdsp6/q6routing.c @@ -909,6 +909,25 @@ static const struct snd_soc_dapm_route intercon[] = { {"MM_UL6", NULL, "MultiMedia6 Mixer"}, {"MM_UL7", NULL, "MultiMedia7 Mixer"}, {"MM_UL8", NULL, "MultiMedia8 Mixer"}, + + {"MM_DL1", NULL, "MultiMedia1 Playback" }, + {"MM_DL2", NULL, "MultiMedia2 Playback" }, + {"MM_DL3", NULL, "MultiMedia3 Playback" }, + {"MM_DL4", NULL, "MultiMedia4 Playback" }, + {"MM_DL5", NULL, "MultiMedia5 Playback" }, + {"MM_DL6", NULL, "MultiMedia6 Playback" }, + {"MM_DL7", NULL, "MultiMedia7 Playback" }, + {"MM_DL8", NULL, "MultiMedia8 Playback" }, + + {"MultiMedia1 Capture", NULL, "MM_UL1"}, + {"MultiMedia2 Capture", NULL, "MM_UL2"}, + {"MultiMedia3 Capture", NULL, "MM_UL3"}, + {"MultiMedia4 Capture", NULL, "MM_UL4"}, + {"MultiMedia5 Capture", NULL, "MM_UL5"}, + {"MultiMedia6 Capture", NULL, "MM_UL6"}, + {"MultiMedia7 Capture", NULL, "MM_UL7"}, + {"MultiMedia8 Capture", NULL, "MM_UL8"}, + }; static int routing_hw_params(struct snd_pcm_substream *substream,