Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp2803196ybv; Sun, 9 Feb 2020 07:48:58 -0800 (PST) X-Google-Smtp-Source: APXvYqwi7VZAgxJSiU/eYFcajRdqnKgT5oAISf3HxG6XabLxzXrWdNvqDlliwC2VW3Olbj08piAY X-Received: by 2002:a9d:6a4f:: with SMTP id h15mr7231491otn.86.1581263338355; Sun, 09 Feb 2020 07:48:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581263338; cv=none; d=google.com; s=arc-20160816; b=Su92Q7opUnh8uUw7M+PSt27n33SF2uG5oUMtk9nZCvTOLXOkjGjC4v2wjM/8zEvjQi WD74Qm5FfZFHX8rS8QnmATiS9Yur0IDE69kMwaIVbI56Hl5506Smo7FkOYMQ6u1seiHR hfAvtpv/uMAlBso3Xdjlsz2e/l2Cj/0i5Ez90WWde69Ee2cTM4ShO1OgA83d1g6iZQ6g XrMQxYev5wt0kU8xQmJGUjZb8LGiA9BYYQfn8Ko7/g/o/xMjnEZwAXX0NrlPWks5cemJ WPFaoDab/bbCjTar2MYdjpbL05eJMBLTLsNX8QvInC4JD+++jXjShXDL+rCj32xwYs3e /EmQ== 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:dkim-filter; bh=eajbKqGkxZ7eyaNOIY0gFw9T3e78d/CAluEu3zjDsX8=; b=CykBe5xPMNNNN3Ie7O48g2ZWkdTeoBlIuz38ottk17hAoOocDTRoKzTy+9yghj6hdb pJdQJR4C+71gcFV5wFpwnt0ymygWaRr4KKb79ovt87zF1lWbYoFQ4EsJ6TZfnIj1Tocv IobGATbuZj0CPMbRDPCGFfG67SH1KI3FmHOwc38+76f3wdLMcKVUBR3xW4CtNWWQJCdx gcRRFA+7SSFhAGzCdF4IAgNF9/CLEvUAjfE+yvhPn7cD0umZNcufYo9fPL7hU7YkNTpD +HhPFZj/H5WQNUWwLhU4fb+86hK5ZXZ80M4B8TBJiCgvWH9vCGrKXRq4KRPtXUEAMbU/ Co9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@serbinski.com header.s=default header.b=jKbwn2xW; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y19si3355723oto.102.2020.02.09.07.48.31; Sun, 09 Feb 2020 07:48:58 -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=@serbinski.com header.s=default header.b=jKbwn2xW; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727798AbgBIPsT (ORCPT + 99 others); Sun, 9 Feb 2020 10:48:19 -0500 Received: from mail.serbinski.com ([162.218.126.2]:60924 "EHLO mail.serbinski.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727349AbgBIPsT (ORCPT ); Sun, 9 Feb 2020 10:48:19 -0500 Received: from localhost (unknown [127.0.0.1]) by mail.serbinski.com (Postfix) with ESMTP id C2536D00721; Sun, 9 Feb 2020 15:48:17 +0000 (UTC) X-Virus-Scanned: amavisd-new at serbinski.com Received: from mail.serbinski.com ([127.0.0.1]) by localhost (mail.serbinski.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fK_TCpBGIyr1; Sun, 9 Feb 2020 10:48:08 -0500 (EST) Received: from anet (23-233-80-73.cpe.pppoe.ca [23.233.80.73]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.serbinski.com (Postfix) with ESMTPSA id E5ED8D006FC; Sun, 9 Feb 2020 10:48:07 -0500 (EST) DKIM-Filter: OpenDKIM Filter v2.11.0 mail.serbinski.com E5ED8D006FC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=serbinski.com; s=default; t=1581263288; bh=eajbKqGkxZ7eyaNOIY0gFw9T3e78d/CAluEu3zjDsX8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jKbwn2xWq2g+5yFX3dvPgYwsQ/mvKhtGSmB0mPUDOQly9wKZFs+QYjVWB/XzS6IFa NYHUBWDZBoiUmMyLfM9+StZBFy0L1bAfreDDL7Le31eSxqb7LMF74/jfbCTYp6Uh5N UnRSByqKQunKOEYJhTfWYjxeB8NH6ki9XJuAzFUo= From: Adam Serbinski To: Mark Brown , Srini Kandagatla , Rob Herring , Bjorn Andersson Cc: Adam Serbinski , Andy Gross , Mark Rutland , Liam Girdwood , Patrick Lai , Banajit Goswami , Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 4/8] ASoC: qdsp6: q6routing: add pcm port routing Date: Sun, 9 Feb 2020 10:47:44 -0500 Message-Id: <20200209154748.3015-5-adam@serbinski.com> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200209154748.3015-1-adam@serbinski.com> References: <20200207205013.12274-1-adam@serbinski.com> <20200209154748.3015-1-adam@serbinski.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch adds support to PCM_PORT mixers required to select path between ASM stream and AFE ports. Signed-off-by: Adam Serbinski CC: Andy Gross CC: Mark Rutland CC: Liam Girdwood CC: Patrick Lai CC: Banajit Goswami CC: Jaroslav Kysela CC: Takashi Iwai CC: alsa-devel@alsa-project.org CC: linux-arm-msm@vger.kernel.org CC: devicetree@vger.kernel.org CC: linux-kernel@vger.kernel.org --- sound/soc/qcom/qdsp6/q6routing.c | 44 ++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/sound/soc/qcom/qdsp6/q6routing.c b/sound/soc/qcom/qdsp6/q6routing.c index 20724102e85a..3a81d2161707 100644 --- a/sound/soc/qcom/qdsp6/q6routing.c +++ b/sound/soc/qcom/qdsp6/q6routing.c @@ -67,6 +67,10 @@ { mix_name, "SEC_MI2S_TX", "SEC_MI2S_TX" }, \ { mix_name, "QUAT_MI2S_TX", "QUAT_MI2S_TX" }, \ { mix_name, "TERT_MI2S_TX", "TERT_MI2S_TX" }, \ + { mix_name, "PRI_PCM_TX", "PRI_PCM_TX" }, \ + { mix_name, "SEC_PCM_TX", "SEC_PCM_TX" }, \ + { mix_name, "TERT_PCM_TX", "TERT_PCM_TX" }, \ + { mix_name, "QUAT_PCM_TX", "QUAT_PCM_TX" }, \ { mix_name, "SLIMBUS_0_TX", "SLIMBUS_0_TX" }, \ { mix_name, "SLIMBUS_1_TX", "SLIMBUS_1_TX" }, \ { mix_name, "SLIMBUS_2_TX", "SLIMBUS_2_TX" }, \ @@ -128,6 +132,18 @@ SOC_SINGLE_EXT("QUAT_MI2S_TX", QUATERNARY_MI2S_TX, \ id, 1, 0, msm_routing_get_audio_mixer, \ msm_routing_put_audio_mixer), \ + SOC_SINGLE_EXT("PRI_PCM_TX", PRIMARY_PCM_TX, \ + id, 1, 0, msm_routing_get_audio_mixer, \ + msm_routing_put_audio_mixer), \ + SOC_SINGLE_EXT("SEC_PCM_TX", SECONDARY_PCM_TX, \ + id, 1, 0, msm_routing_get_audio_mixer, \ + msm_routing_put_audio_mixer), \ + SOC_SINGLE_EXT("TERT_PCM_TX", TERTIARY_PCM_TX, \ + id, 1, 0, msm_routing_get_audio_mixer, \ + msm_routing_put_audio_mixer), \ + SOC_SINGLE_EXT("QUAT_PCM_TX", QUATERNARY_PCM_TX, \ + id, 1, 0, msm_routing_get_audio_mixer, \ + msm_routing_put_audio_mixer), \ SOC_SINGLE_EXT("SLIMBUS_0_TX", SLIMBUS_0_TX, \ id, 1, 0, msm_routing_get_audio_mixer, \ msm_routing_put_audio_mixer), \ @@ -468,6 +484,18 @@ static const struct snd_kcontrol_new quaternary_mi2s_rx_mixer_controls[] = { static const struct snd_kcontrol_new tertiary_mi2s_rx_mixer_controls[] = { Q6ROUTING_RX_MIXERS(TERTIARY_MI2S_RX) }; +static const struct snd_kcontrol_new primary_pcm_rx_mixer_controls[] = { + Q6ROUTING_RX_MIXERS(PRIMARY_PCM_RX) }; + +static const struct snd_kcontrol_new secondary_pcm_rx_mixer_controls[] = { + Q6ROUTING_RX_MIXERS(SECONDARY_PCM_RX) }; + +static const struct snd_kcontrol_new tertiary_pcm_rx_mixer_controls[] = { + Q6ROUTING_RX_MIXERS(TERTIARY_PCM_RX) }; + +static const struct snd_kcontrol_new quaternary_pcm_rx_mixer_controls[] = { + Q6ROUTING_RX_MIXERS(QUATERNARY_PCM_RX) }; + static const struct snd_kcontrol_new slimbus_rx_mixer_controls[] = { Q6ROUTING_RX_MIXERS(SLIMBUS_0_RX) }; @@ -695,6 +723,18 @@ static const struct snd_soc_dapm_widget msm_qdsp6_widgets[] = { SND_SOC_DAPM_MIXER("TERT_MI2S_RX Audio Mixer", SND_SOC_NOPM, 0, 0, tertiary_mi2s_rx_mixer_controls, ARRAY_SIZE(tertiary_mi2s_rx_mixer_controls)), + SND_SOC_DAPM_MIXER("PRI_PCM_RX Audio Mixer", SND_SOC_NOPM, 0, 0, + primary_pcm_rx_mixer_controls, + ARRAY_SIZE(primary_pcm_rx_mixer_controls)), + SND_SOC_DAPM_MIXER("SEC_PCM_RX Audio Mixer", SND_SOC_NOPM, 0, 0, + secondary_pcm_rx_mixer_controls, + ARRAY_SIZE(secondary_pcm_rx_mixer_controls)), + SND_SOC_DAPM_MIXER("TERT_PCM_RX Audio Mixer", SND_SOC_NOPM, 0, 0, + tertiary_pcm_rx_mixer_controls, + ARRAY_SIZE(tertiary_pcm_rx_mixer_controls)), + SND_SOC_DAPM_MIXER("QUAT_PCM_RX Audio Mixer", SND_SOC_NOPM, 0, 0, + quaternary_pcm_rx_mixer_controls, + ARRAY_SIZE(quaternary_pcm_rx_mixer_controls)), SND_SOC_DAPM_MIXER("PRIMARY_TDM_RX_0 Audio Mixer", SND_SOC_NOPM, 0, 0, pri_tdm_rx_0_mixer_controls, ARRAY_SIZE(pri_tdm_rx_0_mixer_controls)), @@ -853,6 +893,10 @@ static const struct snd_soc_dapm_route intercon[] = { Q6ROUTING_RX_DAPM_ROUTE("TERT_MI2S_RX Audio Mixer", "TERT_MI2S_RX"), Q6ROUTING_RX_DAPM_ROUTE("SEC_MI2S_RX Audio Mixer", "SEC_MI2S_RX"), Q6ROUTING_RX_DAPM_ROUTE("PRI_MI2S_RX Audio Mixer", "PRI_MI2S_RX"), + Q6ROUTING_RX_DAPM_ROUTE("PRI_PCM_RX Audio Mixer", "PRI_PCM_RX"), + Q6ROUTING_RX_DAPM_ROUTE("SEC_PCM_RX Audio Mixer", "SEC_PCM_RX"), + Q6ROUTING_RX_DAPM_ROUTE("TERT_PCM_RX Audio Mixer", "TERT_PCM_RX"), + Q6ROUTING_RX_DAPM_ROUTE("QUAT_PCM_RX Audio Mixer", "QUAT_PCM_RX"), Q6ROUTING_RX_DAPM_ROUTE("PRIMARY_TDM_RX_0 Audio Mixer", "PRIMARY_TDM_RX_0"), Q6ROUTING_RX_DAPM_ROUTE("PRIMARY_TDM_RX_1 Audio Mixer", -- 2.21.1