From patchwork Wed Oct 9 11:19:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 175617 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp611032ill; Wed, 9 Oct 2019 04:20:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqylFX+NKk7fxgTTk9o9cw1z/9mBw00qD0p77QThRQ1Ui2InPnJeeUB8P3JFbgIggg58aa6g X-Received: by 2002:a05:6402:1359:: with SMTP id y25mr2367895edw.183.1570620013890; Wed, 09 Oct 2019 04:20:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570620013; cv=none; d=google.com; s=arc-20160816; b=z+YPRkLMRQscwjysRi0wkwZuXNf8zJ85hC31+lFCK1vRa2bw3JuYXgJ/6fLO1KyTfA e13Oio+ienjZ8j7msZiRgZWeZSYT/Cwvs+PbkzOU0lyoRUbTWCH9L/MLRJA/blHwQMwj /fyiTv6gLzaSVt03ZdzQGxPUBfH1sMOxhQvBm7mHWZQjm/gnaTBwoe8l78Rn3VyHrCuc nMXgNTtCDwnOvxTSWOqYC7RkBC4krWe8AIDk6osWos73aPeszogl+bMP364v2B9ce5ny 9jjGayVro00AX+UYei1ncshDM/kiLER3i03ccUGOeCfPb5zhqcLjGRuk29vGCntOosYS hl8w== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=NiFi50FuqI1VBpxzFdOXo/50+9I/uAkHDK87JHPscnU=; b=FGdKWAsDs8ceYtU5lvROYXd/TY9vAn86BmVdfnCnQzfhpvzfiK9P807X5N/mw09O6H Lo+GK/nNra9S2GQ125rNvjc5a3R6o/lJN68tZEDXWOhdVjkdJYhkmBMn+EJCKvzyawxB fLwuH53aP5VZOXUAs/y5SWj9RFZBLX8d+7Boc80J3wsjOeJv0ihkrOeQmqEt/qtW3QKJ E5KxDeJI5u+KitFJxVu63d+zrLqYLkPIFJdD+uNkjqfz7kkzTAiF3YITtDufhmkQwQ8T 7ahEcXs+cwm5+YR2RORb/H3Ph2AhAkCaQDQqcmyP6MU/zt9TwwHH0+1E22RtTTJGtgnM J87g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="IYUqb/h3"; 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 b13si1044770edy.320.2019.10.09.04.20.13; Wed, 09 Oct 2019 04:20:13 -0700 (PDT) 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="IYUqb/h3"; 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 S1730692AbfJILUK (ORCPT + 26 others); Wed, 9 Oct 2019 07:20:10 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:38215 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725848AbfJILUK (ORCPT ); Wed, 9 Oct 2019 07:20:10 -0400 Received: by mail-wr1-f66.google.com with SMTP id w12so2411418wro.5 for ; Wed, 09 Oct 2019 04:20:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=NiFi50FuqI1VBpxzFdOXo/50+9I/uAkHDK87JHPscnU=; b=IYUqb/h35TlOVvANFhPXRwdzAJit1HS7e8FL86O0yeE6P8hgNfhos27Ng6uveFyPyw 2mf36pEI87UXaGXeLkOr1yOQe+onbuyQ/DoIL+nFkyGAj+kHFjN+IB4PCfv9KVrqE6aM /kyYvCbklhWGYbmsUeHdoeqo9DmeJslfqOY4o+nqx5s9dYQe4dthhWF4WR/b8KLIPZPo BKUZiaSLr/lOFjOStbueSEKq81bBBjh+TAU3v/QFaHcIkEYyrv3ID0DRMg3suNM2xeMf R36IjldPLxPfA+siJfNs9KxyUMDN/U3ihcuYGO4THYVe2AC94XI26aN2mgrVhRcYhz6z AZhw== 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:mime-version :content-transfer-encoding; bh=NiFi50FuqI1VBpxzFdOXo/50+9I/uAkHDK87JHPscnU=; b=cLfVtnAu8R/R2KfQXqcd1L0r6CsH8d5rpRwLuFeFXCdCizP+7JGsmNZPbQ05Id8P61 UT8nXdI6dAbRtPnkyFX+KlkuAzzYyuvyi+wVssA4UkpJR8DCB0GVf9RFKNlq3B8LZ37S MiJO3bxdH192l8KH5so5erwp3YvTVBn3YdmnUSmizA12yNb9HiLrHX36u1ZKhZ3CKApY 3+Vzl7gDHcJE1QUyKefoyAuygd3jo/8CRRlhqiLZRd+xTg6C7nxKo/I6wk08POnjrzdd uCLRpZK962jX/kELjBZV8QjEckjRclytIy3519gGbdInH1ddTj/mG0v1vHPn4rlkykyy n5eQ== X-Gm-Message-State: APjAAAX3lvBwPMgODp1upKvdcbBmD/Pk/hs4CfuVheLNeCyfDrlyN+zL Ffpqj0wQmv99xwEpBeNWfknqtQ== X-Received: by 2002:adf:fa88:: with SMTP id h8mr2392734wrr.89.1570620008255; Wed, 09 Oct 2019 04:20:08 -0700 (PDT) Received: from srini-hackbox.lan (cpc89974-aztw32-2-0-cust43.18-1.cable.virginm.net. [86.30.250.44]) by smtp.gmail.com with ESMTPSA id q15sm3197470wrg.65.2019.10.09.04.20.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Oct 2019 04:20:07 -0700 (PDT) From: Srinivas Kandagatla To: broonie@kernel.org Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, lgirdwood@gmail.com, Srinivas Kandagatla , Stephan Gerhold Subject: [PATCH] ASoC: msm8916-wcd-digital: add missing MIX2 path for RX1/2 Date: Wed, 9 Oct 2019 12:19:44 +0100 Message-Id: <20191009111944.28069-1-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch adds missing MIX2 path on RX1/2 which take IIR1 and IIR2 as inputs. Without this patch sound card fails to intialize with below warning: ASoC: no sink widget found for RX1 MIX2 INP1 ASoC: Failed to add route IIR1 -> IIR1 -> RX1 MIX2 INP1 ASoC: no sink widget found for RX2 MIX2 INP1 ASoC: Failed to add route IIR1 -> IIR1 -> RX2 MIX2 INP1 ASoC: no sink widget found for RX1 MIX2 INP1 ASoC: Failed to add route IIR2 -> IIR2 -> RX1 MIX2 INP1 ASoC: no sink widget found for RX2 MIX2 INP1 ASoC: Failed to add route IIR2 -> IIR2 -> RX2 MIX2 INP1 Reported-by: Stephan Gerhold Signed-off-by: Srinivas Kandagatla Tested-by: Stephan Gerhold --- sound/soc/codecs/msm8916-wcd-digital.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) -- 2.21.0 diff --git a/sound/soc/codecs/msm8916-wcd-digital.c b/sound/soc/codecs/msm8916-wcd-digital.c index 9fa5d44fdc79..58b2468fb2a7 100644 --- a/sound/soc/codecs/msm8916-wcd-digital.c +++ b/sound/soc/codecs/msm8916-wcd-digital.c @@ -243,6 +243,10 @@ static const char *const rx_mix1_text[] = { "ZERO", "IIR1", "IIR2", "RX1", "RX2", "RX3" }; +static const char * const rx_mix2_text[] = { + "ZERO", "IIR1", "IIR2" +}; + static const char *const dec_mux_text[] = { "ZERO", "ADC1", "ADC2", "ADC3", "DMIC1", "DMIC2" }; @@ -270,6 +274,16 @@ static const struct soc_enum rx3_mix1_inp_enum[] = { SOC_ENUM_SINGLE(LPASS_CDC_CONN_RX3_B2_CTL, 0, 6, rx_mix1_text), }; +/* RX1 MIX2 */ +static const struct soc_enum rx_mix2_inp1_chain_enum = + SOC_ENUM_SINGLE(LPASS_CDC_CONN_RX1_B3_CTL, + 0, 3, rx_mix2_text); + +/* RX2 MIX2 */ +static const struct soc_enum rx2_mix2_inp1_chain_enum = + SOC_ENUM_SINGLE(LPASS_CDC_CONN_RX2_B3_CTL, + 0, 3, rx_mix2_text); + /* DEC */ static const struct soc_enum dec1_mux_enum = SOC_ENUM_SINGLE( LPASS_CDC_CONN_TX_B1_CTL, 0, 6, dec_mux_text); @@ -309,6 +323,10 @@ static const struct snd_kcontrol_new rx3_mix1_inp2_mux = SOC_DAPM_ENUM( "RX3 MIX1 INP2 Mux", rx3_mix1_inp_enum[1]); static const struct snd_kcontrol_new rx3_mix1_inp3_mux = SOC_DAPM_ENUM( "RX3 MIX1 INP3 Mux", rx3_mix1_inp_enum[2]); +static const struct snd_kcontrol_new rx1_mix2_inp1_mux = SOC_DAPM_ENUM( + "RX1 MIX2 INP1 Mux", rx_mix2_inp1_chain_enum); +static const struct snd_kcontrol_new rx2_mix2_inp1_mux = SOC_DAPM_ENUM( + "RX2 MIX2 INP1 Mux", rx2_mix2_inp1_chain_enum); /* Digital Gain control -38.4 dB to +38.4 dB in 0.3 dB steps */ static const DECLARE_TLV_DB_SCALE(digital_gain, -3840, 30, 0); @@ -740,6 +758,10 @@ static const struct snd_soc_dapm_widget msm8916_wcd_digital_dapm_widgets[] = { &rx3_mix1_inp2_mux), SND_SOC_DAPM_MUX("RX3 MIX1 INP3", SND_SOC_NOPM, 0, 0, &rx3_mix1_inp3_mux), + SND_SOC_DAPM_MUX("RX1 MIX2 INP1", SND_SOC_NOPM, 0, 0, + &rx1_mix2_inp1_mux), + SND_SOC_DAPM_MUX("RX2 MIX2 INP1", SND_SOC_NOPM, 0, 0, + &rx2_mix2_inp1_mux), SND_SOC_DAPM_MUX("CIC1 MUX", SND_SOC_NOPM, 0, 0, &cic1_mux), SND_SOC_DAPM_MUX("CIC2 MUX", SND_SOC_NOPM, 0, 0, &cic2_mux),