From patchwork Thu Dec 5 02:33:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Klimov X-Patchwork-Id: 13894675 Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 15C5178C91 for ; Thu, 5 Dec 2024 02:33:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733366031; cv=none; b=fi4stmGGlzQVBsnVjvy8H8/PKzUC7SwaTbRSJjsPP8rnMq2zxjiZCk+tqYS8Hv4lhAUm3tU25KeYfseLStHtx1xfcj8jfNFZ6142RIJBdfsICFU3F0Y7FGWTgoAmz3E+87rdpaw5PECuINdgGwg3CVpYLeiN00rjU4FrFbnMxeE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733366031; c=relaxed/simple; bh=xhvG2NwxZkcFR2qB1vfTSDmCdapS/aAksbx9vqP5zRI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=CLVnkOgqst0hhFbfmUn/r/raXzHyL/0+EfhRIt7U3R66jH1oAgTejzR15ng0B3v5ZoRvZ/aojkx6wnrt/mHn6LzV8tl27szQ4TZuqs2YzHMW80/9JtZ0u/PsWMbHixqW57SJq1x8JZs7jSaDZnDwyRk9qC5T77AMG14ZpOOlpfY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=HVtsZenq; arc=none smtp.client-ip=209.85.128.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="HVtsZenq" Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-4349e1467fbso2647315e9.1 for ; Wed, 04 Dec 2024 18:33:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1733366028; x=1733970828; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Tw/euE+jaRn8KaVOalk6xiOyoDYKCjli0xV5JRXUqKk=; b=HVtsZenqqmf2GIaHaHwMI4CQeBSGrP2f4KYceQoyYlX5igziiZQIR1068CCGOJxWrJ 8cVYj9tRpbE2d6FNWADYkwUf/mPkTTbs4SMVab4CoNYBaaJRu7Tp/w/ZWCXZSisFLJGI yMfZP7szpmPqZ6qP08h9EMDa62W3Sh6/Q7iTwnzVBARES622ltZnwfWm9VzsomO89EWE rT/2uI+phns73rwwUEGI5+HUI6f69uUd/kPZD/Bpzh4nNFK5DsYV0gpMnZKTyiiWBCLY NuM/xw60tWyrpfns5WAyp9PY+WftTEcFiFso0I3ndYl0S4LwQuci5OgE0/8o+IcMj66f 2ctQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733366028; x=1733970828; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Tw/euE+jaRn8KaVOalk6xiOyoDYKCjli0xV5JRXUqKk=; b=jCCcFWIBmJga7Kc7f5UcUA2v1oqfomJFsQMT8BH/4sDj+RW1KcGQL9pLIUKaEeANww wWWJr0dC4+4sEnxX6um4Q1o+X9nIG613RN3C90Qu0H69Aa8a4yQWbIYpcVGTEU8fcY3K Oul+0HIM3zkTXejh2x0OMeKNg3CcsKtl9VN1t22o7HLCgAOsffc9tDzqE/SIw/H+UP25 ti7rHi4+81pZjeneAkz6Z7hKLWgRCRU+W9S9hmBsk5sR99vJ8MR9MopNCS8XfZQDdivt RX+bWpcQa6veLynWxShgOP0NIO4mZ6HHer764G3vaWbZ2+JP3U70ZAgRAKfiTMlUCMTC /g5g== X-Forwarded-Encrypted: i=1; AJvYcCV4MVv2ZdS5nNlUcOi+Q3Vokxrh2utO6IuM/I5K0xwq+USAlXkDQf9erH1bAx+xgnp3gqI1qbVsvrTh+g==@vger.kernel.org X-Gm-Message-State: AOJu0YxMneyj/6Hci0P+Gtnfc7SFAtlUenwRCCcJoT125cvZXoifbseb HwYst3HuefwbcblQXK1q1GZaswylWJ2oaS7+ZrbeDHTDb/anpzF73cn5FiMDUsM= X-Gm-Gg: ASbGncvWDtOKT6OAXv4r+JvulNTAUhQlYl+uQTdpViKFKb/KDHOK8gT3yWz6ZE2l6Wp CQX50JdcmdvZqKOZ2SevVQUNAFCjl5UjuxGWI3dMvgw1qxPBN8QSt1ATElba4fWR+0+/M7FT6OC oGsPRobfxR1H943wOPijPvVrhNb7obq4NvGdtD7E2aLEr35wuQe9BCwBBEurfwqSnfQNHf2vYcl 0RWSWZgzfTVHTASzVJmgdQcB5W4x63txp/C7Tb3HMBxiS+CqB9Mu6KIYFlpCF7gnsBQ X-Google-Smtp-Source: AGHT+IGRZIMmR1wcEX/dxzQ8T/nOq0eVnMC5OkJbJ1F2kUPg8auZ3LPl2T+hZ3Yyor0+FmhMD22q3A== X-Received: by 2002:a05:600c:1388:b0:434:a04f:2557 with SMTP id 5b1f17b1804b1-434d09b1575mr75575205e9.4.1733366028411; Wed, 04 Dec 2024 18:33:48 -0800 (PST) Received: from localhost.localdomain ([2.222.231.247]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-434d5273440sm44444325e9.18.2024.12.04.18.33.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Dec 2024 18:33:47 -0800 (PST) From: Alexey Klimov To: broonie@kernel.org, konradybcio@kernel.org, andersson@kernel.org, srinivas.kandagatla@linaro.org Cc: tiwai@suse.com, lgirdwood@gmail.com, perex@perex.cz, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, dmitry.baryshkov@linaro.org, linux-sound@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v1 1/3] ASoC: qcom: common: set codecless link to be a backend Date: Thu, 5 Dec 2024 02:33:42 +0000 Message-ID: <20241205023344.2232529-2-alexey.klimov@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241205023344.2232529-1-alexey.klimov@linaro.org> References: <20241205023344.2232529-1-alexey.klimov@linaro.org> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 When codec subnode is missing in DAI link description in DT the DAI link codec will be set to a dummy codec and link will be recognised as front end. Any playback attempt will fail since it will not be able to install hardware parameters. Fix this by setting codecless link to be a back end. Signed-off-by: Alexey Klimov --- sound/soc/qcom/common.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sound/soc/qcom/common.c b/sound/soc/qcom/common.c index 928cf5cb5999..e8ae15fcb1a3 100644 --- a/sound/soc/qcom/common.c +++ b/sound/soc/qcom/common.c @@ -159,6 +159,10 @@ int qcom_snd_parse_of(struct snd_soc_card *card) link->nonatomic = 1; } + /* set codecless link with dummy codec to be a backend */ + if (platform && !codec && link->codecs == &snd_soc_dummy_dlc) + link->no_pcm = 1; + link->stream_name = link->name; link++; From patchwork Thu Dec 5 02:33:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Klimov X-Patchwork-Id: 13894676 Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9989B187876 for ; Thu, 5 Dec 2024 02:33:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.50 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733366033; cv=none; b=BkrWdp1QUkY6DL9h1FHwpAVUiIqygxQ/fieXcK/i3Op9v7rkyYZ0KnE4fJCc0LxzO1qHcWcO29PtbuDA+G8d0i5u3u9Kv0/suz8FyW2gF9HzDSg5aW0ogos+exiAjieqAjUBbWNvY3iCj5rpyxn8onhjIKoIO3d31rKQAyN5vTE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733366033; c=relaxed/simple; bh=Isf6HQyXFroCVtEkXPHNWq7TOYXp0bv2O62+fk4lkgI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Wo9TgQcjgGKAU5iEW+ZSj90Iua+YEIE8HUZ0g7WmY2YIWGt2f93LbwPtOcJrBadz1nNCIhoerjCOWtlofcusE7FAxHtmJ/TtnFDS/CLl/XlZ60qEkLgzX3HOha0nmlStyNqv7JBIRhtMRiSikDFwv+LJ+H9cWO0uHHwtkt6zVj0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=IT6g/kwR; arc=none smtp.client-ip=209.85.128.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="IT6g/kwR" Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-434a852bb6eso3982855e9.3 for ; Wed, 04 Dec 2024 18:33:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1733366030; x=1733970830; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=K0WueZqrue3ZzQaNIzfW+kCCT49wLDNKQcnxj9X3ods=; b=IT6g/kwRqP8YJTaqgoS/xqV+pFTufJ4suwULhsgu5kmLHpXvx4/pCncg9A1h0Aatgr TdBXCIAsNZf1CwWvAz1OXICZAr490IMPwcAYoVQCNrAiB7GGIedRT8AQ+3k0YxpyNADY HUbM0S23CtHstNqZtaQ0h10kVFYaxzabhX14ZF2KpDz+r3mZy+nLU937T0jnKbE2xieo F6N1tVNJMAoulZTyyxJmaHBIRmxMvt++RBRB9vHpb+1lXJOyc8UNAxDfefssa3buAXvr 9G7BXK1NV+2EgaPZ2UM33wILfMynJXMrqcoFlA1WYjrtY9KwJSVfjgbFS/esF+VFXQTw jjww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733366030; x=1733970830; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=K0WueZqrue3ZzQaNIzfW+kCCT49wLDNKQcnxj9X3ods=; b=kZN3uCcEL2RNRe6eorbIUKLrlP/GKkEpBrLUbWqTyebAqeMfUd1FKo+8gsRzVPQXIw m91+qJhql8V5Ep/P9DkZmTjMh+oH4tqgVA2aaRtRT33AFWv9LxrR7zQvywqMh1QK0YUk NeelotQV7q675poZOPFjOFKcx8yaDNryH8L7HBjLokjjBN+j5pGH/+vAbmTqgy7lAXPg 3nus2/O2gDZiIQNKm+bNnk3Wlwz5XrFvcoNMQizI35ZARrTnRV+8sL3EXuZPhyS7Wwxx mSh2yFiWvDfl3GP0kbtS+OlI3ZHaBkL9SQz1sEwM4az5exONGiTEJdGYSqZWkfHuFMQ+ OMaQ== X-Forwarded-Encrypted: i=1; AJvYcCVqUbFqoMmpSp6sv4G84XMDUGaC1Ea7s0r+t+T8RwHSEhIPrMMh+zrqbka6y/8vsWIPLAke/ot5mThTVQ==@vger.kernel.org X-Gm-Message-State: AOJu0Yz91ysxyrYN+FWIEGC1juubheYKTBi5w3Lxwi7xPY1yoFnvrhxZ srmlE5ize7GIEs77C0SRKxJXlX8cAeazQSoj9lZX9d0SrOTNRLhnD52sYzryKg0= X-Gm-Gg: ASbGncsfPPNnMSD/ayRRxV9NRGUI7Ro3wJwRE5mRbPcT4+AqLnBUedynBmNH/pjCWi6 jT7hsrq5uKIGNIAkMl+V6IZao0vF0heyNJVIuhT5ZL/1LfdWX/pRPHcvBTHAIxFUyBB2k2ITMgK +xTBep4BfMb6ZPoPZoTVOgZmGyxT3nPAfGYCRuT2Uuq4hwtrHNatUSPAUxXgcm5W9rEwcNnwOBj r1PWZCEieMIiK0I/b3UA9F3R1MGNyy+K30x8698Q68ZfMEMv26cfmPw5S8sodmk1Ixv X-Google-Smtp-Source: AGHT+IFy7VrnCoXus3t9ExkXEj7SDNYfG18p3P3BcNevba3EvsBVM2z1mEoPokrxMXPtnVvCqvzv1w== X-Received: by 2002:a05:600c:34c4:b0:434:a8ef:442f with SMTP id 5b1f17b1804b1-434d0a23e6emr68510235e9.32.1733366029773; Wed, 04 Dec 2024 18:33:49 -0800 (PST) Received: from localhost.localdomain ([2.222.231.247]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-434d5273440sm44444325e9.18.2024.12.04.18.33.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Dec 2024 18:33:49 -0800 (PST) From: Alexey Klimov To: broonie@kernel.org, konradybcio@kernel.org, andersson@kernel.org, srinivas.kandagatla@linaro.org Cc: tiwai@suse.com, lgirdwood@gmail.com, perex@perex.cz, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, dmitry.baryshkov@linaro.org, linux-sound@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v1 2/3] ASoC: qcom: sdm845: add handling of secondary MI2S clock Date: Thu, 5 Dec 2024 02:33:43 +0000 Message-ID: <20241205023344.2232529-3-alexey.klimov@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241205023344.2232529-1-alexey.klimov@linaro.org> References: <20241205023344.2232529-1-alexey.klimov@linaro.org> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Add handling of clock related to secondary MI2S_RX in startup, shutdown and hw params routines. The handing of MI2S_TX and SEC_MI2S clock is already there so this requires only placing SECONDARY_MI2S_RX in the correct switch-case choices. Signed-off-by: Alexey Klimov --- sound/soc/qcom/sdm845.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sound/soc/qcom/sdm845.c b/sound/soc/qcom/sdm845.c index a479d7e5b7fb..fcc7df75346f 100644 --- a/sound/soc/qcom/sdm845.c +++ b/sound/soc/qcom/sdm845.c @@ -215,6 +215,7 @@ static int sdm845_snd_hw_params(struct snd_pcm_substream *substream, ret = sdm845_slim_snd_hw_params(substream, params); break; case QUATERNARY_MI2S_RX: + case SECONDARY_MI2S_RX: break; default: pr_err("%s: invalid dai id 0x%x\n", __func__, cpu_dai->id); @@ -356,6 +357,7 @@ static int sdm845_snd_startup(struct snd_pcm_substream *substream) snd_soc_dai_set_fmt(codec_dai, codec_dai_fmt); break; + case SECONDARY_MI2S_RX: case SECONDARY_MI2S_TX: codec_dai_fmt |= SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_I2S; if (++(data->sec_mi2s_clk_count) == 1) { @@ -371,8 +373,6 @@ static int sdm845_snd_startup(struct snd_pcm_substream *substream) Q6AFE_LPASS_CLK_ID_QUAD_MI2S_IBIT, MI2S_BCLK_RATE, SNDRV_PCM_STREAM_PLAYBACK); snd_soc_dai_set_fmt(cpu_dai, fmt); - - break; case QUATERNARY_TDM_RX_0: @@ -441,6 +441,7 @@ static void sdm845_snd_shutdown(struct snd_pcm_substream *substream) } break; + case SECONDARY_MI2S_RX: case SECONDARY_MI2S_TX: if (--(data->sec_mi2s_clk_count) == 0) { snd_soc_dai_set_sysclk(cpu_dai, From patchwork Thu Dec 5 02:33:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Klimov X-Patchwork-Id: 13894677 Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7671D18FDAA for ; Thu, 5 Dec 2024 02:33:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733366035; cv=none; b=J61x+IMhHWNADFLBXS1EAAmE8qCKFpDNebVe9tQ7DcWpOpZisGpUGCnwd1jOQP1QYxwmJ5sCVDgMotHjHoXVAE6WKFBdtuiMbxL9xmXDD8nbJ1c7RK8eLXIzBrmNoD2VGZ21UblChXTOPaRa3riZzsjhWuV7qV7FviU8/vd9Qf4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733366035; c=relaxed/simple; bh=YRQBf0W9frh8FEHOrg3W9F5a40CVpeTKHJworaSbgRI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=eqZig5YvIMG+QopY+9K+ctA/kpaG+uBMYS6imI0F5VtlPK75Xvp8/Xv6QJjcbWq0roDi+X+V4bo40Dc+jyqKonIQHCJtxUYNQ9REYw7b/LotQ1z9OcJhgiHRduSBknKU13Ed/+Bjp68AA87yE1gMdXLpGoZMxXLYXA+GoC7ocK0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=TnnrcNqs; arc=none smtp.client-ip=209.85.128.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="TnnrcNqs" Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-434a9f2da82so2586705e9.2 for ; Wed, 04 Dec 2024 18:33:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1733366032; x=1733970832; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=pbQg49fwfqiAPqum0vO3xu6S8El0T9nuKTumPVo3HTs=; b=TnnrcNqsn93sKAISSgUaYd0yus1Q+fHfc2Mh40HZJOsOGHITxzmlaAJ0i2eg8ek2Hs CCGcAy5ZHIHbZKxYpc+66mcBuNzh5so3b6a+pPyl5w4L/LciqjXBbdC44NvO0FUToNWm 4DJYDI5A39PfSIAsjWe27tnK6xNiOrnmCSGZJufq1TRab5It0k8h2eytrAsH8oz+OOJJ wgxzHqUOZgZSQrprjAsOYojxw9encbZJfq3dFFYHosqwmMBL2TnE6WMOSpicKyssauQx Kr1tYeEA5uGrPDIBzj0Yn+ypDUv/V41DQBOkAWus7CZQBXHoV3pd9UuwU74NwUGYoxb7 z9HQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733366032; x=1733970832; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pbQg49fwfqiAPqum0vO3xu6S8El0T9nuKTumPVo3HTs=; b=HGwYCjHbzOJ1OeQK0+vTVkHzG9NgOEBA9SVHHUQ1gP85djzH0Wcma835ovwRnd8+Mh SAqh/6AEokAiW1/sfVSw3dGKcBgY0+69DpkFu1ik2j2c7RVWp2GRuNf68F6NLL0QzAWk 3+1saC+gFweXDlB6kCKXowmljOcNSEwaJ+FbThOsRHooF/5NQPXPbwaOsIhkOD05Nw9C oIPNcPYKy879abUutrljXMj42bcF1+I++z5oANh3xLWY0cUrVHAn69s37MfsdOgfsViP UCK5tQ3e8SRBpEm/UFqMtFs+tKNsh60oHjLi23Awi8/otDPZ/jk+2m13qJSTU3PL3Udp p72A== X-Forwarded-Encrypted: i=1; AJvYcCVWzSG2h4ZRqfJEWugAHFN7nX9TubnIAgn4PYf9SqPB+5LvF4PyonHhy4S/730MvOHG2afIkS8CGFHAXw==@vger.kernel.org X-Gm-Message-State: AOJu0YwhsXTkMiFafhywV3mefrCrCVgJw/f3keevBjTBzH+YmH72yysa NJsJbmbZsVs8UR8OsKTvkv2ZRLWPQOxxIYNtMCn0iQx0888LMsJgBAXlucD5uXo= X-Gm-Gg: ASbGnctyOoS1Jyfrl7CADJ+EGW+mBA4DaZ5Bia+6JeMzosoSeBe8vhUFOSqrFOEYRDe 8cTrVQ4v3aH/Z3xWBW2VOYf9MnFHMivAq/XgIU/HN7qkG+a++3gMpCbXD8iANG0FOVQRggNnEiN gayjhBNizy0wITc08IuYHKAxNFoWVnVkIf+2RwFuPW+tE0OyanT59ngGMo7zJVIDomTM8ERNnBu rEgCu1Uyh7aU0Mgo3U2/sxPuqtn5lwJ+tVz/Upg5hMTPKByLv5KChGbr+bxVt5tkm+4 X-Google-Smtp-Source: AGHT+IEr04HIyGIAbnMgCxehAiEsQghxVfR78l+LYpgdbWvEFCUYjvf5mRhaEkf1BZj3PO52s5tGig== X-Received: by 2002:a05:600c:46ca:b0:432:d82d:6a6c with SMTP id 5b1f17b1804b1-434d0a1db91mr81932695e9.30.1733366031850; Wed, 04 Dec 2024 18:33:51 -0800 (PST) Received: from localhost.localdomain ([2.222.231.247]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-434d5273440sm44444325e9.18.2024.12.04.18.33.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Dec 2024 18:33:50 -0800 (PST) From: Alexey Klimov To: broonie@kernel.org, konradybcio@kernel.org, andersson@kernel.org, srinivas.kandagatla@linaro.org Cc: tiwai@suse.com, lgirdwood@gmail.com, perex@perex.cz, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, dmitry.baryshkov@linaro.org, linux-sound@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v1 3/3] arm64: dts: qcom: sdm845-db845c: add i2s playback support via LS1 connector Date: Thu, 5 Dec 2024 02:33:44 +0000 Message-ID: <20241205023344.2232529-4-alexey.klimov@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241205023344.2232529-1-alexey.klimov@linaro.org> References: <20241205023344.2232529-1-alexey.klimov@linaro.org> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 DB845c board (RB3 board) has i2s signals exported via the first low-speed connector and this is also required by 96boards specification. Enable playback support via this connector. Since this is specific only to DB845c board the pins configuration is also in this board-specific file only. This playback output is fixed to 16bit, i2s format and 48 kHz and works with simple DACs. It was verified with the following commands: amixer -c0 cset iface=MIXER,name='SEC_MI2S_RX Audio Mixer MultiMedia3' 1 SDL_AUDIODRIVER="alsa" AUDIODEV="hw:0,2" ffplay -autoexit test.mp3 Signed-off-by: Alexey Klimov Reviewed-by: Konrad Dybcio --- arch/arm64/boot/dts/qcom/sdm845-db845c.dts | 43 +++++++++++++++++++++- 1 file changed, 41 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/sdm845-db845c.dts b/arch/arm64/boot/dts/qcom/sdm845-db845c.dts index 1cc0f571e1f7..6ca719281788 100644 --- a/arch/arm64/boot/dts/qcom/sdm845-db845c.dts +++ b/arch/arm64/boot/dts/qcom/sdm845-db845c.dts @@ -707,12 +707,21 @@ led@5 { }; }; -/* QUAT I2S Uses 4 I2S SD Lines for audio on LT9611 HDMI Bridge */ &q6afedai { + /* QUAT I2S Uses 4 I2S SD Lines for audio on LT9611 HDMI Bridge */ dai@22 { reg = ; qcom,sd-lines = <0 1 2 3>; }; + + /* + * Secondary I2S uses 1 I2S SD Line for audio playback on + * LT9611 HDMI Bridge + */ + dai@18 { + reg = ; + qcom,sd-lines = <0>; + }; }; &q6asmdai { @@ -762,7 +771,8 @@ &sound { &quat_mi2s_sd0_active &quat_mi2s_sd1_active &quat_mi2s_sd2_active - &quat_mi2s_sd3_active>; + &quat_mi2s_sd3_active + &sec_mi2s_active>; pinctrl-names = "default"; model = "DB845c"; audio-routing = @@ -852,6 +862,17 @@ codec { sound-dai = <&wcd9340 1>; }; }; + + i2s-sec-dai-link { + link-name = "I2S LS1 Playback"; + cpu { + sound-dai = <&q6afedai SECONDARY_MI2S_RX>; + }; + + platform { + sound-dai = <&q6routing>; + }; + }; }; &spi0 { @@ -994,6 +1015,24 @@ reset-n-pins { }; }; + sec_mi2s_active: sec-mi2s-active { + clk-pins { + /* sclk and ws */ + pins = "gpio80", "gpio81"; + function = "sec_mi2s"; + drive-strength = <8>; + bias-disable; + output-high; + }; + + data-pins { + pins = "gpio82", "gpio83"; + function = "sec_mi2s"; + drive-strength = <8>; + bias-disable; + }; + }; + sdc2_default_state: sdc2-default-state { clk-pins { pins = "sdc2_clk";