Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Richard Acayan <mailingradian@gmail.com>
Cc: Srinivas Kandagatla <srini@kernel.org>,
	 Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>, Rob Herring <robh@kernel.org>,
	 Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	 Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	 Konrad Dybcio <konradybcio@kernel.org>,
	linux-arm-msm@vger.kernel.org, linux-sound@vger.kernel.org,
	 devicetree@vger.kernel.org,
	Nickolay Goppen <setotau@mainlining.org>,
	 Wesley Cheng <quic_wcheng@quicinc.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	 Johan Hovold <johan@kernel.org>, Kees Cook <kees@kernel.org>,
	 Charles Keepax <ckeepax@opensource.cirrus.com>,
	Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Subject: Re: [PATCH v2 10/11] ASoC: qcom: add sdm660 sound card support
Date: Thu, 5 Mar 2026 08:51:55 +0100	[thread overview]
Message-ID: <20260305-industrious-sheep-from-eldorado-4413a5@quoll> (raw)
In-Reply-To: <20260304195815.52347-11-mailingradian@gmail.com>

On Wed, Mar 04, 2026 at 02:58:14PM -0500, Richard Acayan wrote:
> The Snapdragon 670 and Snapdragon 660 share the sound card, which can
> have digital/analog WCD, WCD9335, WCD934X, or board-specific sound
> codecs. Add support for the sound card.
> 
> Signed-off-by: Richard Acayan <mailingradian@gmail.com>
> ---
>  sound/soc/qcom/Kconfig  |  12 +++
>  sound/soc/qcom/Makefile |   2 +
>  sound/soc/qcom/sdm660.c | 192 ++++++++++++++++++++++++++++++++++++++++
>  3 files changed, 206 insertions(+)
>  create mode 100644 sound/soc/qcom/sdm660.c
> 
> diff --git a/sound/soc/qcom/Kconfig b/sound/soc/qcom/Kconfig
> index e6e24f3b9922..2ef4c436e534 100644
> --- a/sound/soc/qcom/Kconfig
> +++ b/sound/soc/qcom/Kconfig
> @@ -167,6 +167,18 @@ config SND_SOC_MSM8996
>  	  APQ8096 SoC-based systems.
>  	  Say Y if you want to use audio device on this SoCs
>  
> +config SND_SOC_SDM660
> +	tristate "SoC Machine driver for SDM660 and SDM670 boards"
> +	depends on QCOM_APR
> +	depends on OF
> +	depends on PM
> +	select SND_SOC_QDSP6
> +	select SND_SOC_QCOM_COMMON
> +	help
> +	  This adds support for audio on Qualcomm Technologies Inc.
> +	  SDM660 and SDM670 SoC-based systems.
> +	  Say Y if you want to use audio devices on these SoCs.
> +
>  config SND_SOC_SDM845
>  	tristate "SoC Machine driver for SDM845 boards"
>  	depends on QCOM_APR && I2C && SOUNDWIRE
> diff --git a/sound/soc/qcom/Makefile b/sound/soc/qcom/Makefile
> index 985ce2ae286b..8b6bdc19e780 100644
> --- a/sound/soc/qcom/Makefile
> +++ b/sound/soc/qcom/Makefile
> @@ -24,6 +24,7 @@ snd-soc-apq8016-sbc-y := apq8016_sbc.o
>  snd-soc-apq8096-y := apq8096.o
>  snd-soc-sc7180-y := sc7180.o
>  snd-soc-sc7280-y := sc7280.o
> +snd-soc-sdm660-y := sdm660.o
>  snd-soc-sdm845-y := sdm845.o
>  snd-soc-sm8250-y := sm8250.o
>  snd-soc-sc8280xp-y := sc8280xp.o
> @@ -38,6 +39,7 @@ obj-$(CONFIG_SND_SOC_MSM8996) += snd-soc-apq8096.o
>  obj-$(CONFIG_SND_SOC_SC7180) += snd-soc-sc7180.o
>  obj-$(CONFIG_SND_SOC_SC7280) += snd-soc-sc7280.o
>  obj-$(CONFIG_SND_SOC_SC8280XP) += snd-soc-sc8280xp.o
> +obj-$(CONFIG_SND_SOC_SDM660) += snd-soc-sdm660.o
>  obj-$(CONFIG_SND_SOC_SDM845) += snd-soc-sdm845.o
>  obj-$(CONFIG_SND_SOC_SM8250) += snd-soc-sm8250.o
>  obj-$(CONFIG_SND_SOC_QCOM_COMMON) += snd-soc-qcom-common.o
> diff --git a/sound/soc/qcom/sdm660.c b/sound/soc/qcom/sdm660.c
> new file mode 100644
> index 000000000000..8dae01b733dd
> --- /dev/null
> +++ b/sound/soc/qcom/sdm660.c
> @@ -0,0 +1,192 @@
> +// SPDX-License-Identifier: GPL-2.0-only
> +/*
> + * Copyright (c) 2015-2020, The Linux Foundation. All rights reserved.

Don't upstream 10 year old code, but take newest drivers and change them
to match your needs. Look here:

...

> +static int snd_sdm660_probe(struct platform_device *pdev)
> +{
> +	struct snd_soc_card *card;
> +	struct sdm660_snd_data *data;
> +	struct device *dev = &pdev->dev;
> +	int ret;
> +
> +	card = devm_kzalloc(dev, sizeof(struct snd_soc_card), GFP_KERNEL);
> +	if (!card)
> +		return -ENOMEM;
> +
> +	data = devm_kzalloc(dev, sizeof(struct sdm660_snd_data), GFP_KERNEL);

This is not the syntax we have. For like 10 years.

It is always sizeof(*).

Best regards,
Krzysztof


  reply	other threads:[~2026-03-05  7:51 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-04 19:58 [PATCH v2 00/11] SDM660 sound card and internal MI2S support Richard Acayan
2026-03-04 19:58 ` [PATCH v2 01/11] ASoC: dt-bindings: qcom,sm8250: add compatible for sdm660 Richard Acayan
2026-03-05  7:52   ` Krzysztof Kozlowski
2026-03-04 19:58 ` [PATCH v2 02/11] ASoC: dt-bindings: qcom: q6dsp: add internal mi2s support Richard Acayan
2026-03-05  7:57   ` Krzysztof Kozlowski
2026-03-04 19:58 ` [PATCH v2 03/11] ASoC: dt-bindings: pm8916-analog-codec: Add PM660L compatible Richard Acayan
2026-03-04 19:58 ` [PATCH v2 04/11] ASoC: dt-bindings: msm8916-digital-codec: Add SDM660 compatible Richard Acayan
2026-03-04 19:58 ` [PATCH v2 05/11] ASoC: qdsp6: q6dsp-lpass-ports: add internal mi2s support Richard Acayan
2026-03-05  7:59   ` Krzysztof Kozlowski
2026-03-04 19:58 ` [PATCH v2 06/11] ASoC: qdsp6: q6afe: " Richard Acayan
2026-03-04 19:58 ` [PATCH v2 07/11] ASoC: qdsp6: q6afe-dai: " Richard Acayan
2026-03-04 19:58 ` [PATCH v2 08/11] ASoC: qdsp6: q6routing: " Richard Acayan
2026-03-04 19:58 ` [PATCH v2 09/11] ASoC: qdsp6: common: support headphone jacks connected to internal mi2s Richard Acayan
2026-03-04 19:58 ` [PATCH v2 10/11] ASoC: qcom: add sdm660 sound card support Richard Acayan
2026-03-05  7:51   ` Krzysztof Kozlowski [this message]
2026-03-04 19:58 ` [PATCH v2 11/11] ASoC: msm8916-wcd-analog: add quirk for cajon 2.0 Richard Acayan
2026-03-05 10:07   ` Stephan Gerhold
2026-03-30 17:15     ` Richard Acayan
2026-03-30 17:22       ` Mark Brown
2026-03-30 19:47         ` Richard Acayan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260305-industrious-sheep-from-eldorado-4413a5@quoll \
    --to=krzk@kernel.org \
    --cc=broonie@kernel.org \
    --cc=ckeepax@opensource.cirrus.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=johan@kernel.org \
    --cc=kees@kernel.org \
    --cc=konradybcio@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=mailingradian@gmail.com \
    --cc=perex@perex.cz \
    --cc=quic_wcheng@quicinc.com \
    --cc=robh@kernel.org \
    --cc=setotau@mainlining.org \
    --cc=srini@kernel.org \
    --cc=tiwai@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox