ASoC: add Senary SN624x SoundWire SDCA support
Subsystems (3)
v4 cover ASoC: add Senary SN624x SoundWire SDCA support
This series adds SoundWire SDCA support for Senary SN624x multi-function codecs (jack, speaker amp, DMIC) on Intel ARL, LNL, MTL, and PTL.
v3 was dropped due to a CI build break against current SDCA helpers, so this is a full resend with those fixes folded in (not an incremental on top of v3).
Changes since v3:
- Enable runtime PM from io_init() on first ATTACHED, matching the rt722 pattern, instead of enabling it from probe after register_component().
- Update sdca_asoc_pde_poll_actual_ps() / sdca_parse_function() call sites to the current prototypes (drop unused device and SoundWire slave arguments) so the driver builds on for-next.
Changes since v2:
- Propagate io_init Function Status / defaults failures instead of skipping init and still returning success.
- Zero-initialize sdw stream/port configs and use snd_sdw_params_to_config().
- Program jack SampleFreqIndex only for the configured stream direction (avoid forcing symmetric rates).
- Mark regmap cache dirty on suspend and on re-io_init after re-attach so regcache_sync restores state after power loss/reset.
- Hold a long-lived runtime PM get while jack detect is enabled via set_jack / remove (drop poll mark_last_busy refresh).
- Use sdw_slave_wait_for_init() on resume when unattach_request is set.
Patch summary:
1/3 codec driver + MAINTAINERS 2/3 sdw_utils helpers and codec_info 3/3 Intel ARL/LNL/MTL/PTL ACPI match + SOF mach select
Validated on LG Wildcat Lake / PTL with part_id 0x6247 (MODALIAS sdw:m0496p6247v03c01).
Qianghua Wang (3):
ASoC: codecs: add SN624x SDCA SoundWire driver
ASoC: sdw_utils: add Senary SN624x helpers and codec_info
ASoC: Intel: soc-acpi: add SN624x entries for ARL/LNL/MTL/PTL
MAINTAINERS | 3 + include/sound/soc_sdw_utils.h | 20 + sound/soc/codecs/Kconfig | 13 + sound/soc/codecs/Makefile | 2 + sound/soc/codecs/sn624x-sdca-sdw.c | 1888 +++++++++++++++++ sound/soc/codecs/sn624x-sdca.h | 152 ++ sound/soc/intel/boards/Kconfig | 1 + .../intel/common/soc-acpi-intel-arl-match.c | 71 + .../intel/common/soc-acpi-intel-lnl-match.c | 71 + .../intel/common/soc-acpi-intel-mtl-match.c | 71 + .../intel/common/soc-acpi-intel-ptl-match.c | 82 + sound/soc/sdw_utils/Makefile | 4 +- sound/soc/sdw_utils/soc_sdw_senary_amp.c | 80 + sound/soc/sdw_utils/soc_sdw_senary_dmic.c | 49 + sound/soc/sdw_utils/soc_sdw_senary_sdca.c | 63 + .../soc_sdw_senary_sdca_jack_common.c | 197 ++ sound/soc/sdw_utils/soc_sdw_utils.c | 166 ++ 17 files changed, 2932 insertions(+), 1 deletion(-) create mode 100644 sound/soc/codecs/sn624x-sdca-sdw.c create mode 100644 sound/soc/codecs/sn624x-sdca.h create mode 100644 sound/soc/sdw_utils/soc_sdw_senary_amp.c create mode 100644 sound/soc/sdw_utils/soc_sdw_senary_dmic.c create mode 100644 sound/soc/sdw_utils/soc_sdw_senary_sdca.c create mode 100644 sound/soc/sdw_utils/soc_sdw_senary_sdca_jack_common.c
Signature · 1 line
2.47.3
PATCH v4 2/3 ASoC: sdw_utils: add Senary SN624x helpers and codec_info
Add sof_sdw helpers for SN624x jack, amp, and DMIC, and register the codec_info entries used by the Intel SOF SoundWire machine driver. Use name_prefix "sn624x" to match UCM and DAI widget naming.
--- include/sound/soc_sdw_utils.h | 20 ++ sound/soc/sdw_utils/Makefile | 4 +- sound/soc/sdw_utils/soc_sdw_senary_amp.c | 80 +++++++ sound/soc/sdw_utils/soc_sdw_senary_dmic.c | 49 +++++ sound/soc/sdw_utils/soc_sdw_senary_sdca.c | 63 ++++++ .../soc_sdw_senary_sdca_jack_common.c | 197 ++++++++++++++++++ sound/soc/sdw_utils/soc_sdw_utils.c | 166 +++++++++++++++ 7 files changed, 578 insertions(+), 1 deletion(-) create mode 100644 sound/soc/sdw_utils/soc_sdw_senary_amp.c create mode 100644 sound/soc/sdw_utils/soc_sdw_senary_dmic.c create mode 100644 sound/soc/sdw_utils/soc_sdw_senary_sdca.c create mode 100644 sound/soc/sdw_utils/soc_sdw_senary_sdca_jack_common.c
include/sound/soc_sdw_utils.h +20 -0
@@ -293,4 +293,24 @@ int asoc_sdw_es9356_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_soc_daiint asoc_sdw_es9356_spk_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai);int asoc_sdw_es9356_dmic_rtd_init (struct snd_soc_pcm_runtime *rtd,struct snd_soc_dai *dai); +/* Senary SN624x SDCA */ +int asoc_sdw_senary_sdca_jack_init (struct snd_soc_card *card, +struct snd_soc_dai_link *dai_links, +struct asoc_sdw_codec_info *info, +bool playback); +int asoc_sdw_senary_sdca_jack_exit (struct snd_soc_card *card, +struct snd_soc_dai_link *dai_link); +int asoc_sdw_senary_sdca_jack_rtd_init (struct snd_soc_pcm_runtime *rtd, +struct snd_soc_dai *dai); +int asoc_sdw_senary_amp_init (struct snd_soc_card *card, +struct snd_soc_dai_link *dai_links, +struct asoc_sdw_codec_info *info, +bool playback); +int asoc_sdw_senary_amp_exit (struct snd_soc_card *card, +struct snd_soc_dai_link *dai_link); +int asoc_sdw_senary_sdca_spk_rtd_init (struct snd_soc_pcm_runtime *rtd, +struct snd_soc_dai *dai); +int asoc_sdw_senary_dmic_rtd_init (struct snd_soc_pcm_runtime *rtd, +struct snd_soc_dai *dai); +#endif
sound/soc/sdw_utils/Makefile +3 -1
@@ -10,5 +10,7 @@ snd-soc-sdw-utils-y := soc_sdw_utils.o soc_sdw_dmic.o soc_sdw_rt_dmic.o \ soc_sdw_cs_amp.o \ soc_sdw_es9356.o \ soc_sdw_maxim.o \ - soc_sdw_ti_amp.o + soc_sdw_ti_amp.o \ + soc_sdw_senary_sdca.o soc_sdw_senary_sdca_jack_common.o \ + soc_sdw_senary_amp.o soc_sdw_senary_dmic.o obj-$(CONFIG_SND_SOC_SDW_UTILS) += snd-soc-sdw-utils.o
sound/soc/sdw_utils/soc_sdw_senary_amp.c new file +80 -0
80 lines not on this page · raw message
sound/soc/sdw_utils/soc_sdw_senary_dmic.c new file +49 -0
49 lines not on this page · raw message
sound/soc/sdw_utils/soc_sdw_senary_sdca.c new file +63 -0
63 lines not on this page · raw message
sound/soc/sdw_utils/soc_sdw_senary_sdca_jack_common.c new file +197 -0
197 lines not on this page · raw message
sound/soc/sdw_utils/soc_sdw_utils.c +166 -0
178 lines not on this page · raw message
Signature · 1 line
2.47.3
PATCH v4 3/3 ASoC: Intel: soc-acpi: add SN624x entries for ARL/LNL/MTL/PTL
In reply to Qianghua WangAdd SoundWire machine match entries for Senary SN624x on Arrow Lake, Lunar Lake, Meteor Lake, and Panther Lake, and select the SN624x SDCA codec from the SOF SoundWire machine Kconfig. Each part ID uses a separate mach entry; name_prefix is "sn624x".
--- sound/soc/intel/boards/Kconfig | 1 + .../intel/common/soc-acpi-intel-arl-match.c | 71 ++++++++++++++++ .../intel/common/soc-acpi-intel-lnl-match.c | 71 ++++++++++++++++ .../intel/common/soc-acpi-intel-mtl-match.c | 71 ++++++++++++++++ .../intel/common/soc-acpi-intel-ptl-match.c | 82 +++++++++++++++++++ 5 files changed, 296 insertions(+)
sound/soc/intel/boards/Kconfig +1 -0
@@ -535,6 +535,7 @@ config SND_SOC_INTEL_SOUNDWIRE_SOF_MACH select SND_SOC_ES9356 select SND_SOC_DMIC select SND_SOC_INTEL_HDA_DSP_COMMON + select SND_SOC_SN624X_SDCA_SDW imply SND_SOC_SDW_MOCKUP help Add support for Intel SoundWire-based platforms connected to
sound/soc/intel/common/soc-acpi-intel-arl-match.c +71 -0
83 lines not on this page · raw message
sound/soc/intel/common/soc-acpi-intel-lnl-match.c +71 -0
83 lines not on this page · raw message
sound/soc/intel/common/soc-acpi-intel-mtl-match.c +71 -0
83 lines not on this page · raw message
sound/soc/intel/common/soc-acpi-intel-ptl-match.c +82 -0
94 lines not on this page · raw message
Signature · 1 line
2.47.3
PATCH v4 1/3 ASoC: codecs: add SN624x SDCA SoundWire driver
In reply to Qianghua WangAdd a SoundWire SDCA driver for Senary SN624x multi-function codecs (jack, speaker amp, and DMIC). Program SDCA SampleFreqIndex in hw_params, keep SDCA jack IRQs masked with poll-based detection, and extend the Senary MAINTAINERS entry for the new codec files only.
--- MAINTAINERS | 3 + sound/soc/codecs/Kconfig | 13 + sound/soc/codecs/Makefile | 2 + sound/soc/codecs/sn624x-sdca-sdw.c | 1888 ++++++++++++++++++++++++++++ sound/soc/codecs/sn624x-sdca.h | 152 +++ 5 files changed, 2058 insertions(+) create mode 100644 sound/soc/codecs/sn624x-sdca-sdw.c create mode 100644 sound/soc/codecs/sn624x-sdca.h
MAINTAINERS +3 -0
@@ -29832,9 +29832,12 @@ F: tools/testing/selftests/cgroup/test_zswap.c SENARYTECH AUDIO CODEC DRIVER M: bo liu <[email protected]> +M: qianghua.wang <[email protected]> S: Maintained T: git git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git F: sound/hda/codecs/senarytech.c +F: sound/soc/codecs/sn624x* +F: sound/soc/sdw_utils/soc_sdw_senary* THE REST M: Linus Torvalds <[email protected]>
sound/soc/codecs/Kconfig +13 -0
@@ -254,6 +254,7 @@ config SND_SOC_ALL_CODECS imply SND_SOC_SIMPLE_MUX imply SND_SOC_SMA1303 imply SND_SOC_SMA1307 + imply SND_SOC_SN624X_SDCA_SDW imply SND_SOC_SPDIF imply SND_SOC_SRC4XXX_I2C imply SND_SOC_SSM2305
@@ -2087,6 +2088,18 @@ config SND_SOC_SMA1307 If you are using a system with an SMA1307 amplifier connected via I2C, enable this option. +config SND_SOC_SN624X_SDCA_SDW + tristate "Senary SN624x SDCA Codec - SDW" + depends on SND_SOC_SDCA + depends on SOUNDWIRE + select REGMAP_SOUNDWIRE + select REGMAP_SOUNDWIRE_MBQ + help + Enable support for Senary SN624x SDCA SoundWire codecs. + These multi-function devices provide headset jack, speaker + amplifier, and digital microphone endpoints on the SoundWire + bus. + config SND_SOC_SPDIF tristate "S/PDIF CODEC"
sound/soc/codecs/Makefile +2 -0
@@ -300,6 +300,7 @@ snd-soc-sigmadsp-regmap-y := sigmadsp-regmap.o snd-soc-si476x-y := si476x.o snd-soc-sma1303-y := sma1303.o snd-soc-sma1307-y := sma1307.o +snd-soc-sn624x-sdca-y := sn624x-sdca-sdw.o snd-soc-spdif-tx-y := spdif_transmitter.o snd-soc-spdif-rx-y := spdif_receiver.o snd-soc-src4xxx-y := src4xxx.o
@@ -739,6 +740,7 @@ obj-$(CONFIG_SND_SOC_SIGMADSP_REGMAP) += snd-soc-sigmadsp-regmap.o obj-$(CONFIG_SND_SOC_SI476X) += snd-soc-si476x.o obj-$(CONFIG_SND_SOC_SMA1303) += snd-soc-sma1303.o obj-$(CONFIG_SND_SOC_SMA1307) += snd-soc-sma1307.o +obj-$(CONFIG_SND_SOC_SN624X_SDCA_SDW) += snd-soc-sn624x-sdca.o obj-$(CONFIG_SND_SOC_SPDIF) += snd-soc-spdif-rx.o snd-soc-spdif-tx.o obj-$(CONFIG_SND_SOC_SRC4XXX) += snd-soc-src4xxx.o obj-$(CONFIG_SND_SOC_SRC4XXX_I2C) += snd-soc-src4xxx-i2c.o
sound/soc/codecs/sn624x-sdca-sdw.c new file +1888 -0
1,888 lines not on this page · raw message
sound/soc/codecs/sn624x-sdca.h new file +152 -0
152 lines not on this page · raw message
Signature · 1 line
2.47.3
v4 cover ASoC: add Senary SN624x SoundWire SDCA support
In reply to Qianghua WangHi Mark, Charles,
Just a gentle ping on the SN624x v4 series. v3 was dropped due to
the CI build break; v4 is a full resend with those fixes folded into patch 1/3 (runtime PM enabled on first ATTACHED, and SDCA helper call sites updated to the current prototypes).
Please let me know if anything else is needed, or if I should rebase onto a newer tip.
Thanks,
Qianghua Wang
Quoted 2 lines
Quoted 2 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
[PATCH v4 0/3] ASoC: add Senary SN624x SoundWire SDCA support
This series adds SoundWire SDCA support for Senary SN624x multi-function codecs (jack, speaker amp, DMIC) on Intel ARL, LNL, MTL, and PTL.
v3 was dropped due to a CI build break against current SDCA helpers, so this is a full resend with those fixes folded in (not an incremental on top of v3).
Changes since v3:
- Enable runtime PM from io_init() on first ATTACHED, matching the rt722 pattern, instead of enabling it from probe after register_component().
- Update sdca_asoc_pde_poll_actual_ps() / sdca_parse_function() call sites to the current prototypes (drop unused device and SoundWire slave arguments) so the driver builds on for-next.
Changes since v2:
- Propagate io_init Function Status / defaults failures instead of skipping init and still returning success.
- Zero-initialize sdw stream/port configs and use snd_sdw_params_to_config().
- Program jack SampleFreqIndex only for the configured stream direction (avoid forcing symmetric rates).
- Mark regmap cache dirty on suspend and on re-io_init after re-attach so regcache_sync restores state after power loss/reset.
- Hold a long-lived runtime PM get while jack detect is enabled via set_jack / remove (drop poll mark_last_busy refresh).
- Use sdw_slave_wait_for_init() on resume when unattach_request is set.
Patch summary:
1/3 codec driver + MAINTAINERS 2/3 sdw_utils helpers and codec_info 3/3 Intel ARL/LNL/MTL/PTL ACPI match + SOF mach select
Validated on LG Wildcat Lake / PTL with part_id 0x6247 (MODALIAS sdw:m0496p6247v03c01).
Qianghua Wang (3):
ASoC: codecs: add SN624x SDCA SoundWire driver
ASoC: sdw_utils: add Senary SN624x helpers and codec_info
ASoC: Intel: soc-acpi: add SN624x entries for ARL/LNL/MTL/PTL
MAINTAINERS | 3 + include/sound/soc_sdw_utils.h | 20 + sound/soc/codecs/Kconfig | 13 + sound/soc/codecs/Makefile | 2 + sound/soc/codecs/sn624x-sdca-sdw.c | 1888 +++++++++++++++++ sound/soc/codecs/sn624x-sdca.h | 152 ++ sound/soc/intel/boards/Kconfig | 1 + .../intel/common/soc-acpi-intel-arl-match.c | 71 + .../intel/common/soc-acpi-intel-lnl-match.c | 71 + .../intel/common/soc-acpi-intel-mtl-match.c | 71 + .../intel/common/soc-acpi-intel-ptl-match.c | 82 + sound/soc/sdw_utils/Makefile | 4 +- sound/soc/sdw_utils/soc_sdw_senary_amp.c | 80 + sound/soc/sdw_utils/soc_sdw_senary_dmic.c | 49 + sound/soc/sdw_utils/soc_sdw_senary_sdca.c | 63 + .../soc_sdw_senary_sdca_jack_common.c | 197 ++ sound/soc/sdw_utils/soc_sdw_utils.c | 166 ++ 17 files changed, 2932 insertions(+), 1 deletion(-) create mode 100644 sound/soc/codecs/sn624x-sdca-sdw.c create mode 100644 sound/soc/codecs/sn624x-sdca.h create mode 100644 sound/soc/sdw_utils/soc_sdw_senary_amp.c create mode 100644 sound/soc/sdw_utils/soc_sdw_senary_dmic.c create mode 100644 sound/soc/sdw_utils/soc_sdw_senary_sdca.c create mode 100644 sound/soc/sdw_utils/soc_sdw_senary_sdca_jack_common.c
--
2.47.3
Mark Brown
maintainerQuoted 3 lines · Qianghua Wang
This series adds SoundWire SDCA support for Senary SN624x multi-function codecs (jack, speaker amp, DMIC) on Intel ARL, LNL, MTL, and PTL.
This doesn't apply against current code, please check and resend.
Reply [PATCH v4 0/3] ASoC: add Senary SN624x SoundWire SDCA support
Thanks Mark - v4 was against an older baseline and no longer applies on current for-next. I'll resend as v5 rebased on current code shortly.
Thanks,
Qianghua Wang
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Re: [PATCH v4 0/3] ASoC: add Senary SN624x SoundWire SDCA support
Quoted 3 lines · Qianghua Wang
This series adds SoundWire SDCA support for Senary SN624x multi-function codecs (jack, speaker amp, DMIC) on Intel ARL, LNL, MTL, and PTL.
This doesn't apply against current code, please check and resend.