From patchwork Thu Dec 9 17:53:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 523130 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A2672C433EF for ; Thu, 9 Dec 2021 17:53:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242049AbhLIR5V (ORCPT ); Thu, 9 Dec 2021 12:57:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56448 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242021AbhLIR5V (ORCPT ); Thu, 9 Dec 2021 12:57:21 -0500 Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 432A9C061746 for ; Thu, 9 Dec 2021 09:53:47 -0800 (PST) Received: by mail-wm1-x32a.google.com with SMTP id 133so4899726wme.0 for ; Thu, 09 Dec 2021 09:53:47 -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=GYIcm+On64qCfpZ2eH3+P9ik2NWtxGyTHRmC1bAWfRY=; b=bsYFxvYmSQYm7NeQAO00CN7jlRDtboUWvn5snTdck0i0yjpBCBwT8XgcmojbgqSvmK HnnGeluMgSIPTlfCdiJyf0kScDqqZfpWxZMSYL8sosnerXmXexwDaXAz6+YS9O/dlecC v0ybD6h4ks8/n2N2cf584k3fFoxqQFSiqE6O/GlQ5AE1p0zBltHOVwQ+I8q8RlwwCftU JKK6X3eTpVpSMiCoheQJ6i+Vc7oWLbaM/UXDeqW24gGaOneP8O9GrQ/ZdY5ljS6pJAsC /pvzSP+j11uJsXoe3gJawIACNFHkXzmUs7lbBy9OqanC6UDgQSymAct3hMS6MJ2dSUL1 j1dw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=GYIcm+On64qCfpZ2eH3+P9ik2NWtxGyTHRmC1bAWfRY=; b=02hVOKVrq0Kw5dk2TcTJxwjZQV4/TkwpqMvSwwi+/cJsEPm98Cfgjt51cDp4PWNo5i AE8UJpQMaKiLBmsMbZkNt1svy25BzciDI6XWA8kZ2EZv21R8vK1L2orVOAKRK2zG7m/Q 5/P9Y20zPnSCLeoxbkVNpoH05RzR1h8gQeP+302KQUEK/jzxiMNUt51Y4CVJgIz2MPlQ +T9JRkVkvj05EBREk9T6hD0sNj2OFzgqi90r2m5dntwuRDPYuMT9X92A8WSnn96Xwcoy rFpih/uPsw/v1faP25Eb/rpl9lMLIu3LMcmNR4afrzxs2290NiZxb0KMGaiqYWDhs/87 UUXg== X-Gm-Message-State: AOAM531Xnr8RRGfFguxGZACPmbG4LXkFzGndgA6fHTivvcnlmXASibcx Fh/WJs/fCFLZg6aM4aybyA+6lcCqECfhyA== X-Google-Smtp-Source: ABdhPJzZ0OnJ3/bqMa9Pj95cVSmdT7z8dVLPkkE+VXumh7OJptbj0hDaPn5jf+mDhhtdfPw67wwUOw== X-Received: by 2002:a05:600c:4108:: with SMTP id j8mr8949856wmi.139.1639072425843; Thu, 09 Dec 2021 09:53:45 -0800 (PST) Received: from srini-hackbox.lan (cpc90716-aztw32-2-0-cust825.18-1.cable.virginm.net. [86.26.103.58]) by smtp.gmail.com with ESMTPSA id 21sm427004wmj.18.2021.12.09.09.53.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Dec 2021 09:53:45 -0800 (PST) From: Srinivas Kandagatla To: bjorn.andersson@linaro.org Cc: agross@kernel.org, robh+dt@kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, Srinivas Kandagatla Subject: [PATCH 1/2] arm64: dts: qcom: c630: Fix soundcard setup Date: Thu, 9 Dec 2021 17:53:41 +0000 Message-Id: <20211209175342.20386-2-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20211209175342.20386-1-srinivas.kandagatla@linaro.org> References: <20211209175342.20386-1-srinivas.kandagatla@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Currently Soundcard has 1 rx device for headset and SoundWire Speaker Playback. This setup has issues, ex if we try to play on headset the audio stream is also sent to SoundWire Speakers and we will hear sound in both headsets and speakers. Make a seperate device for Speakers and Headset so that the streams are different and handled properly. Fixes: 45021d35fcb2 ("arm64: dts: qcom: c630: Enable audio support") Signed-off-by: Srinivas Kandagatla --- .../boot/dts/qcom/sdm850-lenovo-yoga-c630.dts | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts b/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts index d6b2ba4396f6..2e882a977e2c 100644 --- a/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts +++ b/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts @@ -523,6 +523,10 @@ dai@1 { reg = <1>; }; + + dai@2 { + reg = <2>; + }; }; &sound { @@ -535,6 +539,7 @@ "SpkrLeft IN", "SPK1 OUT", "SpkrRight IN", "SPK2 OUT", "MM_DL1", "MultiMedia1 Playback", + "MM_DL3", "MultiMedia3 Playback", "MultiMedia2 Capture", "MM_UL2"; mm1-dai-link { @@ -551,6 +556,13 @@ }; }; + mm3-dai-link { + link-name = "MultiMedia3"; + cpu { + sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA3>; + }; + }; + slim-dai-link { link-name = "SLIM Playback"; cpu { @@ -580,6 +592,21 @@ sound-dai = <&wcd9340 1>; }; }; + + slim-wcd-dai-link { + link-name = "SLIM WCD Playback"; + cpu { + sound-dai = <&q6afedai SLIMBUS_1_RX>; + }; + + platform { + sound-dai = <&q6routing>; + }; + + codec { + sound-dai = <&wcd9340 2>; + }; + }; }; &tlmm { From patchwork Thu Dec 9 17:53:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 523129 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CDF18C433FE for ; Thu, 9 Dec 2021 17:53:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242097AbhLIR5W (ORCPT ); Thu, 9 Dec 2021 12:57:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56454 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242021AbhLIR5W (ORCPT ); Thu, 9 Dec 2021 12:57:22 -0500 Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 44D4CC0617A1 for ; Thu, 9 Dec 2021 09:53:48 -0800 (PST) Received: by mail-wr1-x42c.google.com with SMTP id d24so11183958wra.0 for ; Thu, 09 Dec 2021 09:53:48 -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=3EeMUG1qvuM/qX7FAy1NtSSg8Cr0Oe9i2F6xtVsTAsk=; b=NwauIgLhbK6cxKweAx81wNMIr2TyLR6KduThbMS7ZM6lRsa5n8E7hlEBeogyRZoBpI qt08lcWktby/rNs0K9BhnFKNRc4eH6xOycdU8QfUoOPVRF6JuevBk3H5b1xBmgiW3wM7 TSF/9cznTfuGikWkbkzxVPlA3t5ZhKnXYB239odNgApUA2xbrOXNDfVAwWsDofrx6H85 ZPVlx/rEiuf+ccqGhgcayQgKxVEw2LQ20OC+xQoqYBtNVUceCjsqg4m0BrkwGmSytJFO MpD81IRMS5FgNCk1qwwy/F1cGpHmgfGHWWFAvbjLmzN7mYQPqkdGXkY2Ny2vN8BxvXl0 g2jg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=3EeMUG1qvuM/qX7FAy1NtSSg8Cr0Oe9i2F6xtVsTAsk=; b=v4rPlvegKW/da5RUbOo4ykybcGBfhdy7qj6tUV34mQzMiuPaiO5rzHxqRF0HySY25U iQi1JIXISWhmKYl4k6BiQvz0rUtnnyURbZZZ7ctedx+KyPGJi83OqZJNeQt3nGSdfHbD piil1SgldL3eKh3SlayrVadGCHPvuouUQ4mR0KiuRM2vp99OWyU+hTD9xgj6U7w+/2/U dulNjwl+qR6WqOMEvaUalgL06iH/7muK1/+P9W26AKCHiG7p4cV3zo2nNj2Vgb6BbliH QveslRQZ32prjSkp6fVbMuheSGbvXE83NGYOBQq9Mj9D6LmtMvdkZM5xGTe+w32U2fbV iAGA== X-Gm-Message-State: AOAM531Cb+4SST8Lko6wqkBjdN29G3xRT2FFwfq8Y6cKEROgNnIcH6jf d4GjWK4VGERGCjzYRZb4i/4zl0GmfKWZfg== X-Google-Smtp-Source: ABdhPJxdCUCgj3MOtm05/Du3xejIgP7JuYpbhLpHNE2pNdC9MuloUHl7Nc2IN7djm8O/xB3rBNvpew== X-Received: by 2002:adf:a319:: with SMTP id c25mr8155672wrb.629.1639072426823; Thu, 09 Dec 2021 09:53:46 -0800 (PST) Received: from srini-hackbox.lan (cpc90716-aztw32-2-0-cust825.18-1.cable.virginm.net. [86.26.103.58]) by smtp.gmail.com with ESMTPSA id 21sm427004wmj.18.2021.12.09.09.53.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Dec 2021 09:53:46 -0800 (PST) From: Srinivas Kandagatla To: bjorn.andersson@linaro.org Cc: agross@kernel.org, robh+dt@kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, Srinivas Kandagatla Subject: [PATCH 2/2] arm64: dts: qcom: c630: add headset jack and button detection support Date: Thu, 9 Dec 2021 17:53:42 +0000 Message-Id: <20211209175342.20386-3-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20211209175342.20386-1-srinivas.kandagatla@linaro.org> References: <20211209175342.20386-1-srinivas.kandagatla@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add MBHC support available in WCD934X codec. Signed-off-by: Srinivas Kandagatla --- arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts b/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts index 2e882a977e2c..58845a14805f 100644 --- a/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts +++ b/arch/arm64/boot/dts/qcom/sdm850-lenovo-yoga-c630.dts @@ -771,6 +771,9 @@ vdd-tx-supply = <&vreg_s4a_1p8>; vdd-rx-supply = <&vreg_s4a_1p8>; vdd-io-supply = <&vreg_s4a_1p8>; + qcom,mbhc-buttons-vthreshold-microvolt = <75000 150000 237000 500000 500000 500000 500000 500000>; + qcom,mbhc-headset-vthreshold-microvolt = <1700000>; + qcom,mbhc-headphone-vthreshold-microvolt = <50000>; swm: swm@c85 { left_spkr: wsa8810-left{