From nobody Thu Dec 18 08:12:13 2025 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 0D365383A5 for ; Thu, 5 Dec 2024 02:33:49 +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=1733366031; cv=none; b=Cj8EfRNX/QUq3AIcHbh6Vfi6bQXosO52Xzp6KmQaazQpPMPCNVhNbIGEU6oIzzUOW9pmgUAE+9z7utd8VCuVGyXuQr39uh4DXxaJoXIp0RyMZJOLNpIwg7WBfGXsekejiWjbmiieSjIS61PNPKx/hc7kqr1aYxXIV4jM2E3iaWk= 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.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="HVtsZenq" Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-4349e1467fbso2647305e9.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=nCJDHLgxHUlh5dHI/tKK+NPHcnWljkyJlINsAF7ihYskCK1zxe9yE5hTxnwIOyuO9k 1K8sc+5mMXY0nty17n4hg7hRc7OsQeo86XCCHJvE42w+2bezPEhkAJ4+4h+BP6IJ8Org 71ZnZaZK4Sw81uLeQCqeOoBBlerPpZ+VoSzLrZ1AsZ745p21e+CADZmFreqsfKmLYHc1 GTRFZEk/9/Pvi9GSBI7tH9HrfFQpNQ0KOxHpryCoSxmyVjEmpDekfALmlv0dG+GsM95O 9hWAj2UMU5ETbahCIO5DGlzaizBGUO68nYzFjCmpwTmy+Q0h72WV49DtnZg8Y/GnQnmK cTsQ== X-Forwarded-Encrypted: i=1; AJvYcCXXCIsRNh7Vr1Dok9nmSz1sVCnkCvsUO9VmM0xm3MyskxycDhnQ5Y7mBOvNZ8i7G8hyJhQzsWB72M8zpnk=@vger.kernel.org X-Gm-Message-State: AOJu0YyPqWOQyO+cDzlupyJJAa9kFtGHLlkGJ3jgI8tn+9+e6CjxRMid 0PoBsAncDUQLHij1Rb31kg/eABgeGwz4Ldy6lcMnOQaF/zWN8tBK/8LdGFkUkMI= X-Gm-Gg: ASbGncsXiXrUu3HgkzeOF24g6wIfGt3O6/nVF0onou2VxGHq/VNTB4Yvww8brPfJ4m9 rkhHRAnlryDtqw7DFFKO5QpDXkTK3pziZ08q83YuzZ+3uRcm+3jzS5qvsWByBMLk+9VslxgRI/+ SGO3UAsUJmVZjTwl368T1ZukSkY5nNmr28NQKD0oSifmbfsot6ZrMiSWjUZeQ1bAFXRgkVjwSGg zxVFNLGoEKI+dlYg7k/y8mWKzB4W1s6sL6aMV6ZT/D8xIIzYlRmS2IljIgbmfGyvSvN 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-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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 =3D 1; } =20 + /* set codecless link with dummy codec to be a backend */ + if (platform && !codec && link->codecs =3D=3D &snd_soc_dummy_dlc) + link->no_pcm =3D 1; + link->stream_name =3D link->name; link++; =20 --=20 2.45.2 From nobody Thu Dec 18 08:12:13 2025 Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) (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 80EC917E015 for ; Thu, 5 Dec 2024 02:33:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.45 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733366033; cv=none; b=Qmer6sgEigfA9vJPjBhbkxcaFekkntIM87oI4fyhhedEjWTPVG7RZM7EiIYy3euc4E42iW+XbQXnKQGPkoYBFE+zild/FMsYOVuHcTPfPk2vyGibvD5zaSwPq4KTZUokcqCyJj7rY0mqptGk4uh94Lj57jdjhj2iQ5R8fp0lfDo= 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.45 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-f45.google.com with SMTP id 5b1f17b1804b1-434a766b475so4085255e9.1 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=H7/kq1Qoo2J1Xg2QEO6ksAACzb4H+QIgB8FmgrC4Csc5xpwLEusZnpjDjY1XBUS9Vo DDhwthMDuANWq5F9u159m+olgV/KqVMZX55j6sfBLnTy4D6A88fDkHGw88LfDXZQdPAZ rwcfMRjs2UU9h+X939+CdyNndzZwY1WzAppmj72raTT6OVe03ofsCOgFTn5UF5upeLF4 EKLVjWO18gOCg/92ZzeSVijWtelMWGrzDudOT2pf2lHJ/LphquXbsL/VAa20V+6fmIAT PwKb1ySgvUcalFVC5qaTIFopz8+2tzi2EGEZUNTZkHw53WWUwzZ8PI7UE9SfXXga7xZX kTCQ== X-Forwarded-Encrypted: i=1; AJvYcCWyCPWxjsT52qwQyyAq7v8xhKk0ITUkYuAXVUtsNpQ1ULwNpIpUhsk9dedAoUegtSEK1BdQbTz7sqR4Y3Q=@vger.kernel.org X-Gm-Message-State: AOJu0YzOdqhUEyXMt+/06BSXtFxZgpR7oa1hm7jFS+9EyddUf7yBO5zj t4w6oz1AmMPjMOVxxpPtmrI8eJShER0jaUFbXvOz0Fth8DxheQC7aUz7JqWZ0kA= X-Gm-Gg: ASbGncsFB7D9uFo5BeDalU+Tb424hF9DGdVv7Rwo6bXbpuTwPOamLaecOY57B+j+AB/ iUFJ8PkNMkGLtX2UllDfFBXopxZO/BbSJq8xJqRGf/O0lcT3qngD9xsRzXmP1QoPmWxi1YxVpN2 zhfOZhhax6jQzchsCq0zp+GIYnIkBML4amJhVwPcDY8TlPUh/LaqwdmxBj5z6DPaje3T6YRE2mR /CAawDmLFi5SwRGRJhG5PqSzcQwQGFYjSBbvU/T1qFJqMpKdCDhmU8Jz404klqaSWzs 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-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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_substrea= m *substream, ret =3D 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; =20 + case SECONDARY_MI2S_RX: case SECONDARY_MI2S_TX: codec_dai_fmt |=3D SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_I2S; if (++(data->sec_mi2s_clk_count) =3D=3D 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; =20 case QUATERNARY_TDM_RX_0: @@ -441,6 +441,7 @@ static void sdm845_snd_shutdown(struct snd_pcm_substre= am *substream) } break; =20 + case SECONDARY_MI2S_RX: case SECONDARY_MI2S_TX: if (--(data->sec_mi2s_clk_count) =3D=3D 0) { snd_soc_dai_set_sysclk(cpu_dai, --=20 2.45.2 From nobody Thu Dec 18 08:12:13 2025 Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) (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 7D04B18FDC5 for ; Thu, 5 Dec 2024 02:33:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733366035; cv=none; b=hVE6YwKKx31O2haNSYtHCqFjEgn6/PW2fllsBgs/r1sUJfSA51elg0ExgmEIu7xSn3IDdpeqjdgT++kDiriGURqN+3lCsS3220CmrOvNCG0rCzqAPCRkqsH+eRVme7vovXj7ykYf7+qcIRkjNgTV3s5+w3aE3HEqiq3JPi8tA50= 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.46 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-f46.google.com with SMTP id 5b1f17b1804b1-434a83c6b01so2734695e9.0 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=psgomMW/RdjI6Nli6hAxHE+EdBwuF8en/zQnbf6uvetDlwRnaBTx1ZRhpaGhj5bFgH Cr/ZOlIxvF23Ti57gMPoYwkb91pvIvIA5gx/BClB+mpmrAVXDmONlkVQWFlaMzRXZCmm XUxZWzgwwypuA1b1Pe5s0H+EtVZX+PQesvA34hHm0GuB6G9gXdUwZV1G0Bb231OjTTah mARKPwc59YJ4KFhZazPYSSs121t2KspkIoMF6onOhxPsdhYJuk6cvwzvojUdJ/NUN4bT JyDEMUHst11/MWkyiop0xCYb4g4e/CGGGnHmzgQ7dfZ7PMUVCJn2H/bRaBL47PMpbQsN 0ggg== X-Forwarded-Encrypted: i=1; AJvYcCU42MmztvE0buuFxi9VQZK4LmB/A31+R6sFxYRt9RW5O0zfbMqTzCOXxFGT9joOB6NZSGbYOEuRaN81LFA=@vger.kernel.org X-Gm-Message-State: AOJu0YxaO2FdTTLbeogJbR8vES89uGnHNNO/Wd9dgGwugwPJXWUyDoop duykXO+MjYzMnzixiVpN4vBxscV/DnyH255oI0Tsc7XEvifGhEjh+RcAwTzRTEQ= X-Gm-Gg: ASbGncs8pLxvqq/gVBNFy3NfjbhnCkpXog9CFww5iygp3hFkDY9S4FuCXl2fYmAE3e8 YErDRIgYwJNQkQ8RfqyDEouGnYLmRCRku2z8B3arKiumMb8aIqHY0bgAyrx/k2OGTWSjBU4OJ3q boDpe4s7WQ5LVFEntqi/qGGkanLbltWw1a5IRegspueHmWYPs3FKnFnN+8r5uPEtRQHj6lSQ0KR JE+wbqrJp1E48iT3oOjA2DPX9C1o0LpP55mopFubvVSdXydxSEtiYZLKE5qy3S7Rwkl 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-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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=3DMIXER,name=3D'SEC_MI2S_RX Audio Mixer MultiMedia3' 1 SDL_AUDIODRIVER=3D"alsa" AUDIODEV=3D"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/d= ts/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 { }; }; =20 -/* 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 =3D ; qcom,sd-lines =3D <0 1 2 3>; }; + + /* + * Secondary I2S uses 1 I2S SD Line for audio playback on + * LT9611 HDMI Bridge + */ + dai@18 { + reg =3D ; + qcom,sd-lines =3D <0>; + }; }; =20 &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 =3D "default"; model =3D "DB845c"; audio-routing =3D @@ -852,6 +862,17 @@ codec { sound-dai =3D <&wcd9340 1>; }; }; + + i2s-sec-dai-link { + link-name =3D "I2S LS1 Playback"; + cpu { + sound-dai =3D <&q6afedai SECONDARY_MI2S_RX>; + }; + + platform { + sound-dai =3D <&q6routing>; + }; + }; }; =20 &spi0 { @@ -994,6 +1015,24 @@ reset-n-pins { }; }; =20 + sec_mi2s_active: sec-mi2s-active { + clk-pins { + /* sclk and ws */ + pins =3D "gpio80", "gpio81"; + function =3D "sec_mi2s"; + drive-strength =3D <8>; + bias-disable; + output-high; + }; + + data-pins { + pins =3D "gpio82", "gpio83"; + function =3D "sec_mi2s"; + drive-strength =3D <8>; + bias-disable; + }; + }; + sdc2_default_state: sdc2-default-state { clk-pins { pins =3D "sdc2_clk"; --=20 2.45.2