Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp5528071ybv; Tue, 11 Feb 2020 17:54:11 -0800 (PST) X-Google-Smtp-Source: APXvYqx9rIc4sflHIgAjMoqhYJR3c2FQaIccwqkqt3JkZ0bw/RvHkaBIxmULjZvrVJzMpow1FEPg X-Received: by 2002:a9d:6b91:: with SMTP id b17mr7079436otq.235.1581472450933; Tue, 11 Feb 2020 17:54:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581472450; cv=none; d=google.com; s=arc-20160816; b=vgqLvY0Zm3ppEEweFcJACFAtZYhwpbQv/59TPDZ0EZnMefBAN+P6MOBl1lNMNmUs6U mVDWMlVSwXtbvcUBS1oldtnAAJGXPrYKlKewJDXgKHykgXfDBXx+cI7Z8/BxB9VvksAD eLvMLrC0bMX6DRGkm4Di+EicXFXgRHNMvQG8RRzSL/j9fmSHSGly+UL65IEIYCuA++NL K5JZa1RlAUmt6NiGDpS6fwt/vSkXAmU9WMF035sV/iP9Vdi39fyhaw0DjmAvhy/6XpMA 1IKdrOw9/WK0ylf3162vi+6UEXH6ZVSuMzfhhR0WbYQMfX4Xk/ZBdWXf8rHtHFijBmQd /bDw== 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=zpX7VwNVHYJZseNqv9ndVo3xelvBQGCv0zntmNzh0+Y=; b=XH8sskCyjhBzyQn/FU0ANjGG3K1k0LAECaustGz9ZidUMLPc3urd0E91BEoQtSENH3 BR0kVLpZCMUBq88H8sSqBEI/zZfohAKJxNSunySdLnRvLvXtghze2nGWgPgSc5tjCQDe ZS4vrbot3zA1DDKaSTPUR0Skrqs1NTnXqSc3HlT4lBzFtHns1WjieOg4UtB6/H5xOuD0 eSwfCSnDa1l+k4w/jXMBSCykUgva7DemBARS8Pczg8YpMb1ezJahCEwxDsub24/MWUI6 gaGcrGOxkRPrV93ACidFF8U2xvNZBrA/aE5F8dlm4UtZVSAAopcP1L/Zxqje24Ao3+o/ Ql1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@serbinski.com header.s=default header.b="JxFMUps/"; 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 g25si2887114otj.198.2020.02.11.17.53.58; Tue, 11 Feb 2020 17:54:10 -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="JxFMUps/"; 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 S1728300AbgBLBxA (ORCPT + 99 others); Tue, 11 Feb 2020 20:53:00 -0500 Received: from mail.serbinski.com ([162.218.126.2]:50420 "EHLO mail.serbinski.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727785AbgBLBw7 (ORCPT ); Tue, 11 Feb 2020 20:52:59 -0500 Received: from localhost (unknown [127.0.0.1]) by mail.serbinski.com (Postfix) with ESMTP id 112FBD006FC; Wed, 12 Feb 2020 01:52:58 +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 Njpaccfg81vZ; Tue, 11 Feb 2020 20:52:47 -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 89284D00700; Tue, 11 Feb 2020 20:52:35 -0500 (EST) DKIM-Filter: OpenDKIM Filter v2.11.0 mail.serbinski.com 89284D00700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=serbinski.com; s=default; t=1581472355; bh=zpX7VwNVHYJZseNqv9ndVo3xelvBQGCv0zntmNzh0+Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JxFMUps/Yr/m0AUxJGNvGTx0MhCa00t5EL9mKvx6UbayG9AmjNUErLMNjMs1mR3DZ nsfcSSNHu5rwlOXNzCM5jdNK6msSWheBfsSTM2/DIdw2nR4Ut0taZNG1GywY+w1psz zrnveFXJKVomZl4FXoGRlk769wZR0guOWZQMbvoU= 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 v3 4/6] ASoC: qdsp6: q6routing: add pcm port routing Date: Tue, 11 Feb 2020 20:52:20 -0500 Message-Id: <20200212015222.8229-5-adam@serbinski.com> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200212015222.8229-1-adam@serbinski.com> References: <20200212015222.8229-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 Reviewed-by: Srinivas Kandagatla 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