ASoC: cdns: Add Cadence I2S-SC and I2S-MC controller support
Subsystems (3)
v5 cover ASoC: cdns: Add Cadence I2S-SC and I2S-MC controller support
From: Joakim Zhang <[email protected]>
This series adds support for the Cadence I2S-SC and I2S-MC controllers integrated in the CIX SKY1 audio subsystem, together with their DT bindings.
I2S-SC provides full-duplex stereo playback and capture in standard I2S, left/right-justified and DSP modes, along with TDM operation supporting up to 16 slots. I2S-MC provides multi-channel playback and capture through a configurable set of its 8 data pins, described by cix,pin-out-num, cix,pin-rx-mask and cix,pin-tx-mask, and exposes a transmit DAI and a receive DAI.
Both drivers register the dmaengine PCM helper, select the audio reference clock parent for the 8 kHz or 11.025 kHz sample rate family and keep the minimum functional-clock to bit-clock ratio required for safe clock domain crossing.
The two binding patches are unchanged since v4 and keep Rob's Reviewed-by tags.
Changes in v5:
- I2S-MC: fix the DSP_A/DSP_B mapping in set_fmt(). The DATA_WS_DEL bit was assigned to the wrong format: per the controller implementation specification, data aligned with the word-select strobe (DSP_B) is DATA_WS_DEL set, and data delayed by one bit clock after the strobe (DSP_A) is DATA_WS_DEL clear. Swap the assignment for both the transmitter and the receiver.
- I2S-MC: return -EBUSY from hw_params() when the sample-rate family of the new stream needs a different i2s clock parent than the one already in use, since the transmit and receive DAIs share the clk_i2s parent mux; the parent is compared with clk_is_match().
- I2S-SC: let set_tdm_slot() switch TDM mode off when called with zero slots, which is how machine drivers return a DAI to standard I2S operation, while still rejecting negative slot counts.
- Both: rework the probe and teardown runtime PM handling. Enable runtime PM only after the IRQ is requested, unwind the clocks and the runtime PM state through a single error path, and gate the clocks in the new remove() callback when the device is still runtime-active; this also covers module removal with CONFIG_PM=n, where nothing else would disable the clocks.
Changes in v4:
- Enforce the dma-names order in the bindings: a single "tx" or "rx" name is still allowed for single-direction instances, but a pair must be "tx", "rx".
- Drop the DMA controller stub node from the binding examples.
- Select REGMAP_MMIO; a COMPILE_TEST build without it would fail to link the regmap MMIO users.
- Include the transmitter and receiver synchronizing-unit reset bits in the masked register write of the I2S-MC DAI probe, so that the write actually programs the state its comment describes.
Changes in v3:
- Add the explicit <linux/bitfield.h> include, which a W=1 build of the FIELD_PREP() sites needs (both drivers).
- Fix the probe error paths: disable the manually enabled clocks and drop the runtime PM usage count on every failure path, unwinding through a single goto label (both drivers).
- Return dev_err_probe() directly instead of logging with it and then returning the error separately (both drivers).
Changes in v2:
- Move the IRQ request after the clocks are enabled and the reset is released, so the handler never runs against unclocked hardware.
- Disable the IRQ before switching the regcache to cache-only mode on suspend, and re-enable it only after the cache is synced on resume; check the status read in the ISR (both drivers).
- Replace the manual runtime PM bookkeeping with devm_pm_runtime_enable() and drop the remove() callbacks (both drivers).
- Switch to RUNTIME_PM_OPS()/SYSTEM_SLEEP_PM_OPS() wrapped in pm_ptr() and drop the __maybe_unused annotations (both drivers).
- Serialize the shared transceiver clock state in prepare() against the trigger() state machine with the existing spinlock (I2S-SC).
- Disable clocks in the reverse order of enablement (both drivers).
- Sort the cdns/ entry into the vendor list in sound/soc/Makefile and switch sound/soc/cdns/Makefile to the '-y' object syntax.
- Clean up the includes and initializer style (both drivers).
- Add a NULL check for the match data in probe (both drivers).
- Factor the MC transmitter and receiver configuration into a shared helper.
- Drop the compatible string from the DMAC stub node in the binding examples.
Joakim Zhang (4):
ASoC: dt-bindings: Add Cadence I2S-SC controller
ASoC: cdns: Add Cadence I2S-SC controller driver
ASoC: dt-bindings: Add Cadence I2S-MC controller
ASoC: cdns: Add Cadence I2S-MC controller driver
.../bindings/sound/cix,sky1-i2s-mc.yaml | 119 ++ .../bindings/sound/cix,sky1-i2s-sc.yaml | 89 ++ sound/soc/Kconfig | 1 + sound/soc/Makefile | 1 + sound/soc/cdns/Kconfig | 23 + sound/soc/cdns/Makefile | 7 + sound/soc/cdns/cdns-i2s-mc.c | 1152 ++++++++++++++++ sound/soc/cdns/cdns-i2s-sc.c | 1171 +++++++++++++++++ 8 files changed, 2563 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/cix,sky1-i2s-mc.yaml create mode 100644 Documentation/devicetree/bindings/sound/cix,sky1-i2s-sc.yaml create mode 100644 sound/soc/cdns/Kconfig create mode 100644 sound/soc/cdns/Makefile create mode 100644 sound/soc/cdns/cdns-i2s-mc.c create mode 100644 sound/soc/cdns/cdns-i2s-sc.c
Signature · 1 line
2.50.1
PATCH v5 1/4 ASoC: dt-bindings: Add Cadence I2S-SC controller
From: Joakim Zhang <[email protected]>
Add the DT binding for the Cadence I2S-SC controller integrated in the CIX SKY1 audio subsystem. I2S-SC is a full-duplex stereo controller supporting standard I2S, left/right-justified and DSP formats, plus TDM operation with up to 16 slots.
--- .../bindings/sound/cix,sky1-i2s-sc.yaml | 89 +++++++++++++++++++ 1 file changed, 89 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/cix,sky1-i2s-sc.yaml
Documentation/devicetree/bindings/sound/cix,sky1-i2s-sc.yaml new file +89 -0
@@ -0,0 +1,89 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/cix,sky1-i2s-sc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Cadence I2S-SC controller + +maintainers: + - Joakim Zhang <[email protected]> + +description: | + The Cadence I2S-SC controller integrated in the CIX SKY1 audio subsystem. + It supports full-duplex stereo playback and capture in standard I2S, + left/right-justified and DSP modes, as well as TDM operation with up to + 16 slots. The transmitter and receiver are started and stopped together + by the controller. + +allOf: + - $ref: dai-common.yaml# + +properties: + compatible: + const: cix,sky1-i2s-sc + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + clocks: + maxItems: 4 + + clock-names: + items: + - const: hst + - const: i2s + - const: audio-clk0 + - const: audio-clk2 + + resets: + maxItems: 1 + + dmas: + minItems: 1 + maxItems: 2 + description: + One DMA channel for instances wired for a single direction, either + "tx" or "rx", or two channels for both transmit and receive. + + dma-names: + minItems: 1 + items: + - enum: [ tx, rx ] + - const: rx + + "#sound-dai-cells": + const: 0 + +required: + - compatible + - reg + - interrupts + - clocks + - clock-names + - resets + - dmas + - dma-names + - "#sound-dai-cells" + +unevaluatedProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/arm-gic.h> + + i2s@7020000 { + compatible = "cix,sky1-i2s-sc"; + reg = <0x7020000 0x10000>; + interrupts = <GIC_SPI 219 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&audss_cru 16>, <&audss_cru 26>, + <&scmi_clk 100>, <&scmi_clk 101>; + clock-names = "hst", "i2s", "audio-clk0", "audio-clk2"; + resets = <&audss_cru 0>; + dmas = <&audss_dmac 0>, <&audss_dmac 1>; + dma-names = "tx", "rx"; + #sound-dai-cells = <0>; + };
Signature · 1 line
2.50.1
PATCH v5 2/4 ASoC: cdns: Add Cadence I2S-SC controller driver
In reply to [email protected]From: Joakim Zhang <[email protected]>
Add support for the Cadence I2S-SC controller found in the CIX SKY1 audio subsystem.
The controller provides full-duplex stereo playback and capture in standard I2S, left/right-justified and DSP modes, with mono operation mapped onto the left audio channel. It also supports TDM operation with up to 16 slots per frame, where the PCM channels map onto the active slots of the stream direction while the bit clock covers the whole frame.
The transmitter and receiver share the transceiver enable sequence, so the start/stop state machine is serialized with a spinlock against independently triggered playback and capture PCMs. The driver registers the dmaengine PCM helper, selects the audio reference clock parent for the 8 kHz or 11.025 kHz sample rate family and keeps the minimum functional-clock to bit-clock ratio required for safe clock domain crossing. Runtime and system suspend/resume restore the registers through the regcache.
--- sound/soc/Kconfig | 1 + sound/soc/Makefile | 1 + sound/soc/cdns/Kconfig | 12 + sound/soc/cdns/Makefile | 4 + sound/soc/cdns/cdns-i2s-sc.c | 1171 ++++++++++++++++++++++++++++++++++ 5 files changed, 1189 insertions(+) create mode 100644 sound/soc/cdns/Kconfig create mode 100644 sound/soc/cdns/Makefile create mode 100644 sound/soc/cdns/cdns-i2s-sc.c
sound/soc/Kconfig +1 -0
@@ -108,6 +108,7 @@ source "sound/soc/apple/Kconfig" source "sound/soc/atmel/Kconfig" source "sound/soc/au1x/Kconfig" source "sound/soc/bcm/Kconfig" +source "sound/soc/cdns/Kconfig" source "sound/soc/cirrus/Kconfig" source "sound/soc/dwc/Kconfig" source "sound/soc/fsl/Kconfig"
sound/soc/Makefile +1 -0
@@ -50,6 +50,7 @@ obj-$(CONFIG_SND_SOC) += amd/ obj-$(CONFIG_SND_SOC) += atmel/ obj-$(CONFIG_SND_SOC) += au1x/ obj-$(CONFIG_SND_SOC) += bcm/ +obj-$(CONFIG_SND_SOC) += cdns/ obj-$(CONFIG_SND_SOC) += cirrus/ obj-$(CONFIG_SND_SOC) += dwc/ obj-$(CONFIG_SND_SOC) += fsl/
sound/soc/cdns/Kconfig new file +12 -0
@@ -0,0 +1,12 @@ +# SPDX-License-Identifier: GPL-2.0 + +config SND_SOC_CDNS_I2S_SC + tristate "Cadence I2S-SC controller support" + depends on ARCH_CIX || COMPILE_TEST + select SND_SOC_GENERIC_DMAENGINE_PCM + select REGMAP_MMIO + help + Say Y or M if you want to add support for the Cadence I2S-SC + controller found in the CIX SKY1 audio subsystem. It provides + full-duplex stereo playback and capture in standard I2S and + TDM modes with up to 16 slots.
sound/soc/cdns/Makefile new file +4 -0
@@ -0,0 +1,4 @@ +# SPDX-License-Identifier: GPL-2.0 + +snd-soc-cdns-i2s-sc-y := cdns-i2s-sc.o +obj-$(CONFIG_SND_SOC_CDNS_I2S_SC) += snd-soc-cdns-i2s-sc.o
sound/soc/cdns/cdns-i2s-sc.c new file +1171 -0
1,171 lines not on this page · raw message
Signature · 1 line
2.50.1
Mark Brown
maintainerRe: [PATCH v5 2/4] ASoC: cdns: Add Cadence I2S-SC controller driver
Quoted 12 lines
Add support for the Cadence I2S-SC controller found in the CIX SKY1 audio subsystem.
sound/soc/cdns/cdns-i2s-sc.c new file +8
-0+static int cdns_i2s_sc_hw_params (struct snd_pcm_substream *substream, +struct snd_pcm_hw_params *params, +struct snd_soc_dai *cpu_dai) +{ + } else { +/* +* I2S mode: mono maps onto the left audio channel, while +* the frame still carries two slots.
sound/soc/cdns/cdns-i2s-sc.c line 658
Quoted 10 lines
sound/soc/cdns/cdns-i2s-sc.c new file +10
-0+*/ +if (slots ==1 ) { + i2s_sc_priv->is_mono_in_i2s_mode = true; + slots =2 ; + }else if (slots ==2 ) { + i2s_sc_priv->is_mono_in_i2s_mode = false; + }else { +dev_warn (i2s_sc_priv->dev, +"I2S mode supports up to two channels\n" ); +return -EOPNOTSUPP ;
You should really set constraints in startup() which limits to two channels if the DAI is configured in I2S mode, that way userspace won't get upset when it tries to do 4 channels..
sound/soc/cdns/cdns-i2s-sc.c line 834
Quoted 12 lines
sound/soc/cdns/cdns-i2s-sc.c new file +12
-0+static struct snd_soc_dai_driver cdns_i2s_sc_dai = { + .name ="i2s-sc-aif" , + .playback = { + .stream_name ="I2S-SC-Playback" , + .channels_min =1 , + .channels_max =16 , + .rates =SNDRV_PCM_RATE_8000_192000 , + .formats = (SNDRV_PCM_FMTBIT_S16_LE | +SNDRV_PCM_FMTBIT_S24_LE | +SNDRV_PCM_FMTBIT_S32_LE ), + }, + .capture = {
The DT binding allows either TX or RX DMA to be omitted, the driver should only register the directions it's got DMA for.
Signature · 1 line
Mark Brown <[email protected]>
PATCH v5 3/4 ASoC: dt-bindings: Add Cadence I2S-MC controller
In reply to [email protected]From: Joakim Zhang <[email protected]>
Add the DT binding for the Cadence I2S-MC multi-channel controller integrated in the CIX SKY1 audio subsystem. The controller exposes a transmit DAI and a receive DAI and moves audio through a configurable set of its 8 data pins. Which pins are wired out and in which direction is fixed by the board design and described by the cix,pin-out-num, cix,pin-rx-mask and cix,pin-tx-mask properties.
--- .../bindings/sound/cix,sky1-i2s-mc.yaml | 119 ++++++++++++++++++ 1 file changed, 119 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/cix,sky1-i2s-mc.yaml
Documentation/devicetree/bindings/sound/cix,sky1-i2s-mc.yaml new file +119 -0
@@ -0,0 +1,119 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/cix,sky1-i2s-mc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Cadence I2S-MC controller + +maintainers: + - Joakim Zhang <[email protected]> + +description: | + The Cadence I2S-MC multi-channel controller integrated in the CIX SKY1 + audio subsystem. It provides up to 8-channel playback and capture through + a configurable number of I2S data pins, and exposes two DAIs: a transmit + DAI and a receive DAI. + +allOf: + - $ref: dai-common.yaml# + +properties: + compatible: + const: cix,sky1-i2s-mc + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + clocks: + maxItems: 4 + + clock-names: + items: + - const: hst + - const: i2s + - const: audio-clk0 + - const: audio-clk2 + + resets: + maxItems: 1 + + dmas: + minItems: 1 + maxItems: 2 + description: + One DMA channel for instances wired for a single direction, either + "tx" or "rx", or two channels for both transmit and receive. + + dma-names: + minItems: 1 + items: + - enum: [ tx, rx ] + - const: rx + + "#sound-dai-cells": + const: 1 + description: + Cell selects the DAI, 0 for the transmit DAI (i2s-mc-aif1) and + 1 for the receive DAI (i2s-mc-aif2). + + cix,pin-out-num: + $ref: /schemas/types.yaml#/definitions/uint8 + minimum: 1 + maximum: 8 + description: + Number of I2S data output pins wired on this instance. Which of + the 8 controller data pins are wired out is fixed by the board + design and can be any subset. + + cix,pin-rx-mask: + $ref: /schemas/types.yaml#/definitions/uint8 + description: + Bit mask of I2S data pins used for capture, bit N selects data + pin N. + + cix,pin-tx-mask: + $ref: /schemas/types.yaml#/definitions/uint8 + description: + Bit mask of I2S data pins used for playback, bit N selects data + pin N. The rx and tx masks must not overlap, and the number of + set bits must not exceed cix,pin-out-num. + +required: + - compatible + - reg + - interrupts + - clocks + - clock-names + - resets + - dmas + - dma-names + - "#sound-dai-cells" + - cix,pin-out-num + - cix,pin-rx-mask + - cix,pin-tx-mask + +unevaluatedProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/arm-gic.h> + + i2s@7050000 { + compatible = "cix,sky1-i2s-mc"; + reg = <0x7050000 0x10000>; + interrupts = <GIC_SPI 222 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&audss_cru 17>, <&audss_cru 27>, + <&scmi_clk 100>, <&scmi_clk 101>; + clock-names = "hst", "i2s", "audio-clk0", "audio-clk2"; + resets = <&audss_cru 1>; + dmas = <&audss_dmac 2>, <&audss_dmac 3>; + dma-names = "tx", "rx"; + #sound-dai-cells = <1>; + cix,pin-out-num = /bits/ 8 <2>; + cix,pin-rx-mask = /bits/ 8 <0x1>; + cix,pin-tx-mask = /bits/ 8 <0x2>; + };
Signature · 1 line
2.50.1
PATCH v5 4/4 ASoC: cdns: Add Cadence I2S-MC controller driver
In reply to [email protected]From: Joakim Zhang <[email protected]>
Add support for the Cadence I2S-MC multi-channel controller found in the CIX SKY1 audio subsystem.
The controller moves up to 16 channels through a configurable set of its 8 data pins, each pin carrying two slots. Wired-out pins may sit at any pin index and are described by cix,pin-out-num, cix,pin-rx-mask and cix,pin-tx-mask. The driver exposes a transmit DAI and a receive DAI which can act as clock provider or consumer independently, and streams with fewer channels than the wired pins narrow the enabled pin mask at runtime.
The driver registers the dmaengine PCM helper, selects the audio reference clock parent for the 8 kHz or 11.025 kHz sample rate family and keeps the minimum functional-clock to bit-clock ratio required for safe clock domain crossing, with an extra margin cycle when the bit clock is sourced externally. Runtime and system suspend/resume restore the registers through the regcache.
--- sound/soc/cdns/Kconfig | 11 + sound/soc/cdns/Makefile | 3 + sound/soc/cdns/cdns-i2s-mc.c | 1152 ++++++++++++++++++++++++++++++++++ 3 files changed, 1166 insertions(+) create mode 100644 sound/soc/cdns/cdns-i2s-mc.c
sound/soc/cdns/Kconfig +11 -0
@@ -10,3 +10,14 @@ config SND_SOC_CDNS_I2S_SC controller found in the CIX SKY1 audio subsystem. It provides full-duplex stereo playback and capture in standard I2S and TDM modes with up to 16 slots. + +config SND_SOC_CDNS_I2S_MC + tristate "Cadence I2S-MC controller support" + depends on ARCH_CIX || COMPILE_TEST + select SND_SOC_GENERIC_DMAENGINE_PCM + select REGMAP_MMIO + help + Say Y or M if you want to add support for the Cadence I2S-MC + multi-channel controller found in the CIX SKY1 audio subsystem. + It provides multi-channel playback and capture through a + configurable number of I2S data pins.
sound/soc/cdns/Makefile +3 -0
@@ -2,3 +2,6 @@ snd-soc-cdns-i2s-sc-y := cdns-i2s-sc.o obj-$(CONFIG_SND_SOC_CDNS_I2S_SC) += snd-soc-cdns-i2s-sc.o + +snd-soc-cdns-i2s-mc-y := cdns-i2s-mc.o +obj-$(CONFIG_SND_SOC_CDNS_I2S_MC) += snd-soc-cdns-i2s-mc.o
sound/soc/cdns/cdns-i2s-mc.c new file +1152 -0
1,152 lines not on this page · raw message
Signature · 1 line
2.50.1
[email protected]
AI reviewRe: [PATCH v5 4/4] ASoC: cdns: Add Cadence I2S-MC controller driver
Thank you for your contribution! Sashiko AI review found 2 potential issues to consider: - [High] ASoC: cdns: premature -EBUSY in cdns_i2s_mc_hw_params() when peer DAI is open - [Low] ASoC: cdns…
Thank you for your contribution! Sashiko AI review found 2 potential issues to consider:
- [High] ASoC: cdns: premature -EBUSY in cdns_i2s_mc_hw_params() when peer DAI is open
- [Low] ASoC: cdns: i2s-mc: un-gated data pin clocks in cdns_i2s_mc_dai_probe()
--
commit 020a5d5318e146daa2dd788c38c07f592ec9d4bb
Author: Joakim Zhang <[email protected]>
ASoC: cdns: Add Cadence I2S-MC controller driver
This commit adds an ASoC driver for the Cadence I2S-MC multi-channel controller in the CIX SKY1 audio subsystem.
Quoted 6 lines
sound/soc/cdns/cdns-i2s-mc.c new file +0
-0@@ -0,0 +1,1152 @@
[ ... ]
Quoted 40 lines
sound/soc/cdns/cdns-i2s-mc.c new file +40
-0+static bool cdns_i2s_mc_other_dai_active (struct snd_soc_dai *cpu_dai) +{ +struct snd_soc_dai *dai; + +for_each_component_dais (cpu_dai->component, dai) { +if (dai == cpu_dai) +continue ; +if (snd_soc_dai_active (dai)) +return true; + } + +return false; +} + +static int cdns_i2s_mc_hw_params (struct snd_pcm_substream *substream, +struct snd_pcm_hw_params *params, +struct snd_soc_dai *cpu_dai) +{ +struct cdns_i2s_mc_priv *i2s_mc_priv =snd_soc_dai_get_drvdata (cpu_dai); +struct device *dev = i2s_mc_priv->dev; +u32 rate, sample_rate =0 ; +u32 slots, slot_width, resolution, ctrl; +unsigned long i2s_clk_rate; +u8 pin_tx_num, pin_rx_num; +struct clk *clk_parent; +bool is_master_mode; +int ret; + + rate =params_rate (params); + slot_width = i2s_mc_priv->devtype_data->data_width; +dev_dbg (dev,"rate = %d, slot_width = %d\n" , rate, slot_width); + +/* switch clk mux to select the appropriate clk parent */ +if (rate %8000 ==0 ) { +/* Sampling rate is a multiple of 8KHz, select "audio-clk0" */ + clk_parent = i2s_mc_priv->clks[AUDIO_CLK0 ]; + }else if (rate %11025 ==0 ) { +/* Sampling rate is a multiple of 11.025KHz, select "audio-clk2" */ + clk_parent = i2s_mc_priv->clks[AUDIO_CLK2 ]; + }else {
sound/soc/cdns/cdns-i2s-mc.c line 608
Quoted 10 lines
sound/soc/cdns/cdns-i2s-mc.c new file +10
-0+dev_err (i2s_mc_priv->dev,"Invalid sample rate\n" ); +return -EINVAL ; + } + +if (cdns_i2s_mc_other_dai_active (cpu_dai) && + !clk_is_match (clk_get_parent (i2s_mc_priv->clk_i2s), clk_parent)) { +dev_err (dev, +"i2s clock parent conflicts with active stream on the other DAI\n" ); +return -EBUSY ; + }
[Severity: High]
Does checking snd_soc_dai_active(dai) here cause cdns_i2s_mc_hw_params() to fail with -EBUSY whenever both playback and capture substreams are opened before hw_params is configured?
__soc_pcm_open() increments the DAI active count via snd_soc_runtime_activate() at open time and keeps it non-zero across soc_pcm_hw_free() until close. When an audio server opens both playback and capture PCM substreams before calling snd_pcm_hw_params() on either, both DAIs are already marked active; if the requested rate requires switching clk_i2s to the other parent clock, cdns_i2s_mc_hw_params() rejects both streams with -EBUSY. Should cdns_i2s_mc_other_dai_active() check whether the peer DAI actually has hardware parameters configured (for example via snd_soc_dai_get_symmetric_rate(dai) or driver state tracked in hw_params and hw_free) instead of snd_soc_dai_active()?
[ ... ]
Quoted 12 lines
sound/soc/cdns/cdns-i2s-mc.c new file +12
-0+static int cdns_i2s_mc_dai_probe (struct snd_soc_dai *cpu_dai) +{ +struct cdns_i2s_mc_priv *i2s_mc_priv =snd_soc_dai_get_drvdata (cpu_dai); +u32 ctrl =0 , cid_ctrl =0 ; + +/* +* Transceiver disable +* Transceiver clock disable +* All interrupts masked +* Reset for transmitter synchronizing unit +* Reset for receiver synchronizing unit +*/
sound/soc/cdns/cdns-i2s-mc.c line 742
Quoted 10 lines
sound/soc/cdns/cdns-i2s-mc.c new file +10
-0+ ctrl |=FIELD_PREP (I2S_CTRL_I2S_EN ,0 ); + ctrl &= ~(I2S_CTRL_TSYNC_RST |I2S_CTRL_RSYNC_RST ); + cid_ctrl |=I2S_CID_CTRL_STROBE_TS |I2S_CID_CTRL_STROBE_RS ; + cid_ctrl &= ~I2S_CID_CTRL_INTREQ_MASK ; + +regmap_update_bits (i2s_mc_priv->regmap,I2S_CTRL , +I2S_CTRL_I2S_EN |I2S_CTRL_TSYNC_RST |I2S_CTRL_RSYNC_RST , ctrl); +regmap_update_bits (i2s_mc_priv->regmap,I2S_CID_CTRL , +I2S_CID_CTRL_STROBE_TS |I2S_CID_CTRL_STROBE_RS | +I2S_CID_CTRL_INTREQ_MASK , cid_ctrl);
[Severity: Low]
Should cdns_i2s_mc_dai_probe() also set I2S_CID_CTRL_I2S_STROBE in I2S_CID_CTRL to gate the per-pin clocks initially?
I2S_CID_CTRL resets to 0x00000000 (all clock strobes enabled), and cdns_i2s_mc_rxtx_config() only clears and sets the I2S_CID_CTRL_I2S_STROBE bits matching pin_tx_mask_adjust or pin_rx_mask_adjust, leaving unwired or unused pins with their clock gates enabled.
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=4
Mark Brown
maintainerQuoted 5 lines
From: Joakim Zhang <[email protected]>
This series adds support for the Cadence I2S-SC and I2S-MC controllers integrated in the CIX SKY1 audio subsystem, together with their DT bindings.
This is basically fine - there are some smaller issues but they can be fixed incrementally.
Signature · 1 line
Mark Brown <[email protected]>
Hello Mark,
Quoted 15 lines
-----Original Message-----
From: Mark Brown <[email protected]>
Sent: Saturday, November 7, 2026 10:46 PM
To: Joakim Zhang (张强庆) <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; cix-kernel-upstream <cix-kernel- [email protected]>; [email protected]; [email protected]; [email protected]; linux-arm- [email protected]
Subject: Re: [PATCH v5 0/4] ASoC: cdns: Add Cadence I2S-SC and I2S-MC controller supportEXTERNAL EMAIL
Quoted 8 lines
Quoted 5 lines
From: Joakim Zhang <[email protected]>
This series adds support for the Cadence I2S-SC and I2S-MC controllers integrated in the CIX SKY1 audio subsystem, together with their DT bindings.
This is basically fine - there are some smaller issues but they can be fixed incrementally.
Yes, this is just the basic version since this IP has also been tested and we have identified several issues. These will be addressed as workarounds in the future. The current version is designed to facilitate review and reflects the original design intention of the IP.
Thanks,
Joakim
Mark Brown
maintainerQuoted 9 lines · On Fri, 06 Nov 2026 18:52:04 +0800, [email protected] wrote:
ASoC: cdns: Add Cadence I2S-SC and I2S-MC controller support
From: Joakim Zhang <[email protected]>
This series adds support for the Cadence I2S-SC and I2S-MC controllers integrated in the CIX SKY1 audio subsystem, together with their DT bindings.
[...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-7.5
Thanks!
[1/4] ASoC: dt-bindings: Add Cadence I2S-SC controller
https://git.kernel.org/broonie/sound/c/5d2a3da8b792 [2/4] ASoC: cdns: Add Cadence I2S-SC controller driver https://git.kernel.org/broonie/sound/c/81bb3e5fda49
[3/4] ASoC: dt-bindings: Add Cadence I2S-MC controller
https://git.kernel.org/broonie/sound/c/fe1cecba2f2a
[4/4] ASoC: cdns: Add Cadence I2S-MC controller driver
https://git.kernel.org/broonie/sound/c/a6feafc3bbed
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark