ASoC: ux500: Migrate HREF and Samsung audio to audio-graph-card2
Subsystems (7)
Linus Walleij
maintainerv2 cover ASoC: ux500: Migrate HREF and Samsung audio to audio-graph-card2
The Ux500 HREF500 and HREF520 audio support still relies on a MOP500-specific machine driver and ad-hoc text bindings.
Convert the MSP binding to DT schema and make the MSP and AB8500 codec nodes proper sound DAI providers with audio graph ports. Document the sparse TDM slot masks already parsed from audio graph endpoints.
Describe the fixed DSP_A or DSP_B format, codec clock-provider role, TDM frame and active slots through endpoint graphs. Add two-link audio-graph-card2 cards for HREF500, HREF520 and the seven supported Samsung U8500 phones.
Keep the codec-provided bit and frame clocks running continuously on the HREF and Samsung links. This matches the legacy machine driver for HREF and the product kernels for Samsung, and was verified on Skomer.
Remove the MOP500 machine driver after moving its fixed clock and link policy into the device trees.
This intentionally breaks the device tree ABI with older Ux500 HREF device trees. The old binding and driver have been broken for years and need a clean restart.
The series has been tested on HREF500, HREF520 and Samsung phones.
MERGING STRATEGY:
- Get DT bindings ACKed
- Lee merges the MFD binding patch
- Mark merges the ASoC bits including the MOP500 binding removal
- I merge the top commits with DTS changes and defconfig
---
Changes in v2:
- Keep the HREF and Samsung codec clocks running continuously.
- Rework the HREF and Samsung cards around audio-graph-card2.
- Describe the DAI links through provider endpoint graphs.
- Document sparse TDM slot masks on audio graph endpoints.
- Link to v1: https://lore.kernel.org/r/[email protected]
---
Linus Walleij (9):
ASoC: dt-bindings: sound: Prepare Ux500 audio graph links
mfd: dt-bindings: ab8500: Describe codec graph and microphone wiring
ASoC: dt-bindings: ux500: Remove MOP500 sound card binding
ASoC: ab8500: Skip digital microphone support on AB8505
ASoC: ux500: Remove the MOP500 machine driver
ARM: dts: ux500: Add sound DAI provider cells
ARM: dts: ux500: Convert HREF audio to audio-graph-card2
ARM: dts: ux500: Add Samsung phone audio graphs
ARM: config: u8500: Enable audio graph card2
.../devicetree/bindings/mfd/stericsson,ab8500.yaml | 28 ++ .../bindings/sound/audio-graph-port.yaml | 10 +- .../bindings/sound/stericsson,ux500-msp-i2s.yaml | 96 +++++ .../devicetree/bindings/sound/ux500-mop500.txt | 39 -- .../devicetree/bindings/sound/ux500-msp.txt | 42 -- arch/arm/boot/dts/st/ste-ab8500.dtsi | 7 +- arch/arm/boot/dts/st/ste-ab8505.dtsi | 7 +- arch/arm/boot/dts/st/ste-dbx5x0.dtsi | 9 +- arch/arm/boot/dts/st/ste-href-ab8500.dtsi | 104 +++++ arch/arm/boot/dts/st/ste-href-ab8505.dtsi | 118 ++++-- .../boot/dts/st/ste-ux500-samsung-codina-tmo.dts | 1 + arch/arm/boot/dts/st/ste-ux500-samsung-codina.dts | 21 + arch/arm/boot/dts/st/ste-ux500-samsung-gavini.dts | 5 + arch/arm/boot/dts/st/ste-ux500-samsung-golden.dts | 1 + arch/arm/boot/dts/st/ste-ux500-samsung-janice.dts | 1 + arch/arm/boot/dts/st/ste-ux500-samsung-kyle.dts | 1 + arch/arm/boot/dts/st/ste-ux500-samsung-skomer.dts | 1 + arch/arm/boot/dts/st/ste-ux500-samsung.dtsi | 77 ++++ arch/arm/configs/u8500_defconfig | 2 +- sound/soc/codecs/ab8500-codec.c | 144 ++++--- sound/soc/ux500/Kconfig | 23 +- sound/soc/ux500/Makefile | 3 - sound/soc/ux500/mop500.c | 167 -------- sound/soc/ux500/mop500_ab8500.c | 437 --------------------- sound/soc/ux500/mop500_ab8500.h | 17 - 25 files changed, 528 insertions(+), 833 deletions(-)
---
base-commit: f41d0fbffacda2322a25d2918191a462fe79667e
change-id: 20260903-ux500-simple-sound-d077d5486a72
Best regards,
Signature · 1 line
Linus Walleij <[email protected]>
Linus Walleij
maintainerPATCH v2 1/9 ASoC: dt-bindings: sound: Prepare Ux500 audio graph links
Audio graph card drivers parse TDM slot data and continuous clock selection from endpoint nodes. The audio graph endpoint schema describes slot count and width directly but does not cover sparse slot masks or continuous clocking. Reference the common TDM slot schema so TX and RX masks are documented, and add the continuous-clock flag.
Replace the incomplete Ux500 MSP text binding with a DT schema that describes the clocks, reset, DMA channels and power supply consumed by the driver. Define the MSP as a zero-cell sound DAI provider and allow it to expose an audio graph port.
--- .../bindings/sound/audio-graph-port.yaml | 10 +-- .../bindings/sound/stericsson,ux500-msp-i2s.yaml | 96 ++++++++++++++++++++++ .../devicetree/bindings/sound/ux500-msp.txt | 42 ---------- 3 files changed, 100 insertions(+), 48 deletions(-)
Documentation/devicetree/bindings/sound/audio-graph-port.yaml +4 -6
@@ -39,6 +39,7 @@ definitions: allOf: - $ref: /schemas/graph.yaml#/$defs/endpoint-base - $ref: /schemas/sound/dai-params.yaml# + - $ref: /schemas/sound/tdm-slot.yaml# properties: mclk-fs: $ref: simple-card.yaml#/definitions/mclk-fs
@@ -48,6 +49,9 @@ definitions: bitclock-inversion: description: dai-link uses bit clock inversion $ref: /schemas/types.yaml#/definitions/flag + continuous-clock: + description: dai-link bit clock runs continuously rather than gated + $ref: /schemas/types.yaml#/definitions/flag frame-master: description: Indicates dai-link frame master. oneOf:
@@ -82,12 +86,6 @@ definitions: - msb - lsb - dai-tdm-slot-num: - description: Number of slots in use. - $ref: /schemas/types.yaml#/definitions/uint32 - dai-tdm-slot-width: - description: Width in bits for each slot. - $ref: /schemas/types.yaml#/definitions/uint32 dai-tdm-slot-width-map: description: Mapping of sample widths to slot widths. For hardware that cannot support a fixed slot width or a slot width always
Documentation/devicetree/bindings/sound/stericsson,ux500-msp-i2s.yaml new file +96 -0
96 lines not on this page · raw message
Documentation/devicetree/bindings/sound/ux500-msp.txt deleted +0 -42
42 lines not on this page · raw message
Signature · 1 line
2.55.0
[email protected]
AI reviewRe: [PATCH v2 1/9] ASoC: dt-bindings: sound: Prepare Ux500 audio graph links
Sashiko has reviewed this patch and found no issues. It looks great!
Quoted 6 lines
Audio graph card drivers parse TDM slot data and continuous clock selection from endpoint nodes. The audio graph endpoint schema describes slot count and width directly but does not cover sparse slot masks or continuous clocking. Reference the common TDM slot schema so TX and RX masks are documented, and add the continuous-clock flag.
Quoted 7 lines
Replace the incomplete Ux500 MSP text binding with a DT schema that describes the clocks, reset, DMA channels and power supply consumed by the driver. Define the MSP as a zero-cell sound DAI provider and allow it to expose an audio graph port.
Assisted-by LLMSigned-off-by Linus Walleij <[email protected]>
Sashiko has reviewed this patch and found no issues. It looks great!
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
Linus Walleij
maintainerPATCH v2 2/9 mfd: dt-bindings: ab8500: Describe codec graph and microphone wiring
In reply to Linus WalleijThe AB8500 and AB8505 codec block exposes two digital audio interfaces. Define the codec as a one-cell sound DAI provider and allow it to expose both interfaces as audio graph ports.
The codec binding conversion also omitted the analog microphone type and bias-routing properties supported by the driver and documented by the old text binding. Restore them so boards can describe the codec wiring without schema warnings.
---
Lee: just merge this separately when reviewed for DT and you think it looks good.
--- .../devicetree/bindings/mfd/stericsson,ab8500.yaml | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+)
Documentation/devicetree/bindings/mfd/stericsson,ab8500.yaml +28 -0
@@ -312,6 +312,33 @@ properties: items: - const: audioclk + '#sound-dai-cells': + description: Selects one of the two digital audio interfaces + const: 1 + + ports: + $ref: /schemas/sound/audio-graph-port.yaml#/definitions/ports + + stericsson,amic1-type-single-ended: + description: Configure analog microphone 1 as single-ended + type: boolean + + stericsson,amic2-type-single-ended: + description: Configure analog microphone 2 as single-ended + type: boolean + + stericsson,amic1a-bias-vamic2: + description: Supply analog microphone 1A from VAMIC2 instead of VAMIC1 + type: boolean + + stericsson,amic1b-bias-vamic2: + description: Supply analog microphone 1B from VAMIC2 instead of VAMIC1 + type: boolean + + stericsson,amic2-bias-vamic1: + description: Supply analog microphone 2 from VAMIC1 instead of VAMIC2 + type: boolean + stericsson,earpeice-cmv: description: Earpiece voltage $ref: /schemas/types.yaml#/definitions/uint32
@@ -319,6 +346,7 @@ properties: required: - compatible + - '#sound-dai-cells' additionalProperties: false
Signature · 1 line
2.55.0
[email protected]
AI reviewRe: [PATCH v2 2/9] mfd: dt-bindings: ab8500: Describe codec graph and microphone wiring
Sashiko has reviewed this patch and found no issues. It looks great!
Quoted 11 lines
The AB8500 and AB8505 codec block exposes two digital audio interfaces. Define the codec as a one-cell sound DAI provider and allow it to expose both interfaces as audio graph ports.
The codec binding conversion also omitted the analog microphone type and bias-routing properties supported by the driver and documented by the old text binding. Restore them so boards can describe the codec wiring without schema warnings.
Assisted-by LLMSigned-off-by Linus Walleij <[email protected]>
Sashiko has reviewed this patch and found no issues. It looks great!
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=2
Re: (subset) [PATCH v2 2/9] mfd: dt-bindings: ab8500: Describe codec graph and microphone wiring
In reply to Linus WalleijQuoted 10 lines · Linus Walleij
The AB8500 and AB8505 codec block exposes two digital audio interfaces. Define the codec as a one-cell sound DAI provider and allow it to expose both interfaces as audio graph ports.
The codec binding conversion also omitted the analog microphone type and bias-routing properties supported by the driver and documented by the old text binding. Restore them so boards can describe the codec wiring without schema warnings.
[...]
Applied, thanks!
[2/9] mfd: dt-bindings: ab8500: Describe codec graph and microphone wiring
commit: 43be6abd6775820fdac3729962f7e7b841104fda
--
Lee Jones [李琼斯]
Linus Walleij
maintainerPATCH v2 3/9 ASoC: dt-bindings: ux500: Remove MOP500 sound card binding
In reply to Linus WalleijThe Ux500 device trees now use audio-graph-card2 and no longer contain the MOP500-specific compatible or properties. Remove the obsolete text binding rather than retaining an unused legacy ABI.
--- .../devicetree/bindings/sound/ux500-mop500.txt | 39 ---------------------- 1 file changed, 39 deletions(-)
Documentation/devicetree/bindings/sound/ux500-mop500.txt deleted +0 -39
@@ -1,39 +0,0 @@ -* MOP500 Audio Machine Driver - -This node is responsible for linking together all ux500 Audio Driver components. - -Required properties: - - compatible : "stericsson,snd-soc-mop500" - -Non-standard properties: - - stericsson,cpu-dai : Phandle to the CPU-side DAI - - stericsson,audio-codec : Phandle to the Audio CODEC - - stericsson,card-name : Over-ride default card name - -Example: - - sound { - compatible = "stericsson,snd-soc-mop500"; - - stericsson,cpu-dai = <&msp1 &msp3>; - stericsson,audio-codec = <&codec>; - }; - - msp1: msp@80124000 { - compatible = "stericsson,ux500-msp-i2s"; - reg = <0x80124000 0x1000>; - interrupts = <0 62 0x4>; - v-ape-supply = <&db8500_vape_reg>; - }; - - msp3: msp@80125000 { - compatible = "stericsson,ux500-msp-i2s"; - reg = <0x80125000 0x1000>; - interrupts = <0 62 0x4>; - v-ape-supply = <&db8500_vape_reg>; - }; - - codec: ab8500-codec { - compatible = "stericsson,ab8500-codec"; - stericsson,earpeice-cmv = <950>; /* Units in mV. */ - };
Signature · 1 line
2.55.0
[email protected]
AI reviewRe: [PATCH v2 3/9] ASoC: dt-bindings: ux500: Remove MOP500 sound card binding
Sashiko has reviewed this patch and found no issues. It looks great!
Quoted 6 lines
The Ux500 device trees now use audio-graph-card2 and no longer contain the MOP500-specific compatible or properties. Remove the obsolete text binding rather than retaining an unused legacy ABI.
Assisted-by LLMSigned-off-by Linus Walleij <[email protected]>
Sashiko has reviewed this patch and found no issues. It looks great!
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=3
Linus Walleij
maintainerPATCH v2 4/9 ASoC: ab8500: Skip digital microphone support on AB8505
In reply to Linus WalleijThe AB8505 does not have the digital microphone interface, its six input pins or the VDMIC regulator found in AB8500. The shared codec driver nevertheless creates the entire AB8500 DMIC DAPM graph. When an AB8505 sound card binds, the regulator widget requests the nonexistent V-DMIC supply and falls back to a dummy regulator.
Split the digital microphone widgets and routes from the common codec graph and add them only when the parent MFD is an actual AB8500. This also removes the DMIC4-only AD_OUT4 path from AB8505.
--- sound/soc/codecs/ab8500-codec.c | 144 +++++++++++++++++++++++----------------- 1 file changed, 82 insertions(+), 62 deletions(-)
sound/soc/codecs/ab8500-codec.c +82 -62
@@ -299,7 +299,6 @@ static const struct snd_soc_dapm_widget ab8500_dapm_widgets[] = {SND_SOC_DAPM_REGULATOR_SUPPLY ("V-AUD" ,0 ,0 ),SND_SOC_DAPM_REGULATOR_SUPPLY ("V-AMIC1" ,0 ,0 ),SND_SOC_DAPM_REGULATOR_SUPPLY ("V-AMIC2" ,0 ,0 ), -SND_SOC_DAPM_REGULATOR_SUPPLY ("V-DMIC" ,0 ,0 ),/* Power */ SND_SOC_DAPM_SUPPLY("Audio Power",
@@ -324,7 +323,6 @@ static const struct snd_soc_dapm_widget ab8500_dapm_widgets[] = {SND_SOC_DAPM_AIF_OUT ("AD_OUT1" ,NULL ,0 ,SND_SOC_NOPM ,0 ,0 ),SND_SOC_DAPM_AIF_OUT ("AD_OUT2" ,NULL ,0 ,SND_SOC_NOPM ,0 ,0 ),SND_SOC_DAPM_AIF_OUT ("AD_OUT3" ,NULL ,0 ,SND_SOC_NOPM ,0 ,0 ), -SND_SOC_DAPM_AIF_OUT ("AD_OUT4" ,NULL ,0 ,SND_SOC_NOPM ,0 ,0 ),SND_SOC_DAPM_AIF_OUT ("AD_OUT57" ,NULL ,0 ,SND_SOC_NOPM ,0 ,0 ), SND_SOC_DAPM_AIF_OUT("AD_OUT68", NULL, 0, SND_SOC_NOPM, 0, 0),
@@ -584,36 +582,6 @@ static const struct snd_soc_dapm_widget ab8500_dapm_widgets[] = {SND_SOC_DAPM_SUPPLY ("AD5768 Enable" ,AB8500_ADPATHENA ,AB8500_ADPATHENA_ENAD5768 ,0 ,NULL ,0 ), -/* Digital Microphone path */ - -SND_SOC_DAPM_INPUT ("DMic 1" ), -SND_SOC_DAPM_INPUT ("DMic 2" ), -SND_SOC_DAPM_INPUT ("DMic 3" ), -SND_SOC_DAPM_INPUT ("DMic 4" ), -SND_SOC_DAPM_INPUT ("DMic 5" ), -SND_SOC_DAPM_INPUT ("DMic 6" ), - -SND_SOC_DAPM_MIXER ("DMIC1" , -AB8500_DIGMICCONF ,AB8500_DIGMICCONF_ENDMIC1 ,0 , -NULL ,0 ), -SND_SOC_DAPM_MIXER ("DMIC2" , -AB8500_DIGMICCONF ,AB8500_DIGMICCONF_ENDMIC2 ,0 , -NULL ,0 ), -SND_SOC_DAPM_MIXER ("DMIC3" , -AB8500_DIGMICCONF ,AB8500_DIGMICCONF_ENDMIC3 ,0 , -NULL ,0 ), -SND_SOC_DAPM_MIXER ("DMIC4" , -AB8500_DIGMICCONF ,AB8500_DIGMICCONF_ENDMIC4 ,0 , -NULL ,0 ), -SND_SOC_DAPM_MIXER ("DMIC5" , -AB8500_DIGMICCONF ,AB8500_DIGMICCONF_ENDMIC5 ,0 , -NULL ,0 ), -SND_SOC_DAPM_MIXER ("DMIC6" , -AB8500_DIGMICCONF ,AB8500_DIGMICCONF_ENDMIC6 ,0 , -NULL ,0 ), -SND_SOC_DAPM_MIXER ("AD4 Channel Volume" , -SND_SOC_NOPM ,0 ,0 , -NULL ,0 ),/* Acoustical Noise Cancellation path */ SND_SOC_DAPM_MUX("ANC Source",
@@ -648,6 +616,40 @@ static const struct snd_soc_dapm_widget ab8500_dapm_widgets[] = { NULL, 0), }; +static const struct snd_soc_dapm_widget ab8500_dmic_dapm_widgets[] = { +SND_SOC_DAPM_REGULATOR_SUPPLY ("V-DMIC" ,0 ,0 ), +SND_SOC_DAPM_AIF_OUT ("AD_OUT4" ,NULL ,0 ,SND_SOC_NOPM ,0 ,0 ), + +SND_SOC_DAPM_INPUT ("DMic 1" ), +SND_SOC_DAPM_INPUT ("DMic 2" ), +SND_SOC_DAPM_INPUT ("DMic 3" ), +SND_SOC_DAPM_INPUT ("DMic 4" ), +SND_SOC_DAPM_INPUT ("DMic 5" ), +SND_SOC_DAPM_INPUT ("DMic 6" ), + +SND_SOC_DAPM_MIXER ("DMIC1" , +AB8500_DIGMICCONF ,AB8500_DIGMICCONF_ENDMIC1 ,0 , +NULL ,0 ), +SND_SOC_DAPM_MIXER ("DMIC2" , +AB8500_DIGMICCONF ,AB8500_DIGMICCONF_ENDMIC2 ,0 , +NULL ,0 ), +SND_SOC_DAPM_MIXER ("DMIC3" , +AB8500_DIGMICCONF ,AB8500_DIGMICCONF_ENDMIC3 ,0 , +NULL ,0 ), +SND_SOC_DAPM_MIXER ("DMIC4" , +AB8500_DIGMICCONF ,AB8500_DIGMICCONF_ENDMIC4 ,0 , +NULL ,0 ), +SND_SOC_DAPM_MIXER ("DMIC5" , +AB8500_DIGMICCONF ,AB8500_DIGMICCONF_ENDMIC5 ,0 , +NULL ,0 ), +SND_SOC_DAPM_MIXER ("DMIC6" , +AB8500_DIGMICCONF ,AB8500_DIGMICCONF_ENDMIC6 ,0 , +NULL ,0 ), +SND_SOC_DAPM_MIXER ("AD4 Channel Volume" , +SND_SOC_NOPM ,0 ,0 , +NULL ,0 ), +}; +/* * DAPM-routes */
@@ -853,35 +855,6 @@ static const struct snd_soc_dapm_route ab8500_dapm_routes[] = { {"AD_OUT68", NULL, "Main Supply"}, {"AD_OUT68", NULL, "AD6 Channel Volume"}, -/* Digital Microphone path */ - - {"DMic 1", NULL, "V-DMIC"}, - {"DMic 2", NULL, "V-DMIC"}, - {"DMic 3", NULL, "V-DMIC"}, - {"DMic 4", NULL, "V-DMIC"}, - {"DMic 5", NULL, "V-DMIC"}, - {"DMic 6", NULL, "V-DMIC"}, - - {"DMIC1", NULL, "DMic 1"}, - {"DMIC2", NULL, "DMic 2"}, - {"DMIC3", NULL, "DMic 3"}, - {"DMIC4", NULL, "DMic 4"}, - {"DMIC5", NULL, "DMic 5"}, - {"DMIC6", NULL, "DMic 6"}, - - {"AD1 Source Select", "DMic 1", "DMIC1"}, - {"AD2 Source Select", "DMic 2", "DMIC2"}, - {"AD3 Source Select", "DMic 3", "DMIC3"}, - {"AD5 Source Select", "DMic 5", "DMIC5"}, - {"AD6 Source Select", "DMic 6", "DMIC6"}, - - {"AD4 Channel Volume", NULL, "DMIC4"}, - {"AD4 Channel Volume", NULL, "AD34 Enable"}, - - {"ab8500_0c", NULL, "AD_OUT4"}, - {"AD_OUT4", NULL, "Main Supply"}, - {"AD_OUT4", NULL, "AD4 Channel Volume"}, -/* LineIn Bypass path */ {"LINL to HSL Volume", NULL, "LINL Enable"},
@@ -911,7 +884,6 @@ static const struct snd_soc_dapm_route ab8500_dapm_routes[] = { {"Sidetone Left Source", "Headset Left", "DA_IN1"}, {"Sidetone Right Source", "LineIn Right", "AD2 Channel Volume"}, {"Sidetone Right Source", "Mic 1", "AD3 Channel Volume"}, - {"Sidetone Right Source", "DMic 4", "AD4 Channel Volume"}, {"Sidetone Right Source", "Headset Right", "DA_IN2"}, {"STFIR1 Control", NULL, "Sidetone Left Source"},
@@ -924,6 +896,37 @@ static const struct snd_soc_dapm_route ab8500_dapm_routes[] = { {"DA2 Enable", NULL, "STFIR2 Volume"}, }; +static const struct snd_soc_dapm_route ab8500_dmic_dapm_routes[] = { + {"DMic 1" ,NULL ,"V-DMIC" }, + {"DMic 2" ,NULL ,"V-DMIC" }, + {"DMic 3" ,NULL ,"V-DMIC" }, + {"DMic 4" ,NULL ,"V-DMIC" }, + {"DMic 5" ,NULL ,"V-DMIC" }, + {"DMic 6" ,NULL ,"V-DMIC" }, + + {"DMIC1" ,NULL ,"DMic 1" }, + {"DMIC2" ,NULL ,"DMic 2" }, + {"DMIC3" ,NULL ,"DMic 3" }, + {"DMIC4" ,NULL ,"DMic 4" }, + {"DMIC5" ,NULL ,"DMic 5" }, + {"DMIC6" ,NULL ,"DMic 6" }, + + {"AD1 Source Select" ,"DMic 1" ,"DMIC1" }, + {"AD2 Source Select" ,"DMic 2" ,"DMIC2" }, + {"AD3 Source Select" ,"DMic 3" ,"DMIC3" }, + {"AD5 Source Select" ,"DMic 5" ,"DMIC5" }, + {"AD6 Source Select" ,"DMic 6" ,"DMIC6" }, + + {"AD4 Channel Volume" ,NULL ,"DMIC4" }, + {"AD4 Channel Volume" ,NULL ,"AD34 Enable" }, + + {"ab8500_0c" ,NULL ,"AD_OUT4" }, + {"AD_OUT4" ,NULL ,"Main Supply" }, + {"AD_OUT4" ,NULL ,"AD4 Channel Volume" }, + + {"Sidetone Right Source" ,"DMic 4" ,"AD4 Channel Volume" }, +}; +static const struct snd_soc_dapm_route ab8500_dapm_routes_mic1a_vamicx[] = { {"MIC1A V-AMICx Enable" ,NULL ,"V-AMIC1" }, {"MIC1A V-AMICx Enable", NULL, "V-AMIC2"},
@@ -2043,13 +2046,30 @@ static int ab8500_codec_probe(struct snd_soc_component *component) {struct device *dev = component->dev;struct device_node *np = dev->of_node; +struct ab8500 *ab8500 =dev_get_drvdata (dev->parent);struct ab8500_codec_platform_data codec_pdata; +struct snd_soc_dapm_context *dapm;int status;dev_dbg (dev,"%s: Enter.\n" , __func__);ab8500_codec_of_probe (dev, np, &codec_pdata); +if (is_ab8500 (ab8500)) { + dapm =snd_soc_component_to_dapm (component); + status =snd_soc_dapm_new_controls (dapm, + ab8500_dmic_dapm_widgets, +ARRAY_SIZE (ab8500_dmic_dapm_widgets)); +if (status) +return status; + + status =snd_soc_dapm_add_routes (dapm, + ab8500_dmic_dapm_routes, +ARRAY_SIZE (ab8500_dmic_dapm_routes)); +if (status) +return status; + } + status =ab8500_audio_init_audioblock (component);if (status <0 ) { dev_err(dev, "%s: failed to init audio-block (%d)!\n",
Signature · 1 line
2.55.0
[email protected]
AI reviewRe: [PATCH v2 4/9] ASoC: ab8500: Skip digital microphone support on AB8505
Sashiko has reviewed this patch and found no issues. It looks great!
Quoted 6 lines
The AB8505 does not have the digital microphone interface, its six input pins or the VDMIC regulator found in AB8500. The shared codec driver nevertheless creates the entire AB8500 DMIC DAPM graph. When an AB8505 sound card binds, the regulator widget requests the nonexistent V-DMIC supply and falls back to a dummy regulator.
Quoted 7 lines
Split the digital microphone widgets and routes from the common codec graph and add them only when the parent MFD is an actual AB8500. This also removes the DMIC4-only
AD_OUT4path from AB8505.Fixes 679d7abdc754 ("ASoC: codecs: Add AB8500 codec-driver")Assisted-by LLMSigned-off-by Linus Walleij <[email protected]>
Sashiko has reviewed this patch and found no issues. It looks great!
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=4
Linus Walleij
maintainerPATCH v2 5/9 ASoC: ux500: Remove the MOP500 machine driver
In reply to Linus WalleijThe Ux500 boards now use audio-graph-card2, so remove the machine driver and its obsolete binding. The generic card obtains the DAI format, clock roles, TDM layout and board routing from the device tree graphs.
Make the codec, MSP and DMA platform components part of the Ux500 ASoC selection. These providers were previously selected indirectly by the machine driver.
--- sound/soc/ux500/Kconfig | 23 +-- sound/soc/ux500/Makefile | 3 - sound/soc/ux500/mop500.c | 167 --------------- sound/soc/ux500/mop500_ab8500.c | 437 ---------------------------------------- sound/soc/ux500/mop500_ab8500.h | 17 -- 5 files changed, 7 insertions(+), 640 deletions(-)
sound/soc/ux500/Kconfig +7 -16
@@ -6,28 +6,19 @@ menuconfig SND_SOC_UX500 tristate "Ux500" depends on SND_SOC depends on MFD_DB8500_PRCMU + depends on AB8500_CORE && AB8500_GPADC + select SND_SOC_AB8500_CODEC + select SND_SOC_UX500_PLAT_MSP_I2S + select SND_SOC_UX500_PLAT_DMA help - Say Y if you want to enable ASoC-support for - any of the Ux500 platforms (e.g. U8500). + Say Y if you want to enable ASoC support for Ux500 platforms + using the AB8500 or AB8505 codec. config SND_SOC_UX500_PLAT_MSP_I2S tristate depends on SND_SOC_UX500 config SND_SOC_UX500_PLAT_DMA - tristate "Platform - DB8500 (DMA)" + tristate depends on SND_SOC_UX500 select SND_SOC_GENERIC_DMAENGINE_PCM - help - Say Y if you want to enable the Ux500 platform-driver. - -config SND_SOC_UX500_MACH_MOP500 - tristate "Machine - MOP500 (Ux500 + AB8500)" - depends on AB8500_CORE && AB8500_GPADC && SND_SOC_UX500 - select SND_SOC_AB8500_CODEC - select SND_SOC_UX500_PLAT_MSP_I2S - select SND_SOC_UX500_PLAT_DMA - help - Select this to enable the MOP500 machine-driver. - This will enable platform-drivers for: Ux500 - This will enable codec-drivers for: AB8500
sound/soc/ux500/Makefile +0 -3
@@ -6,6 +6,3 @@ obj-$(CONFIG_SND_SOC_UX500_PLAT_MSP_I2S) += snd-soc-ux500-plat-msp-i2s.o snd-soc-ux500-plat-dma-y := ux500_pcm.o obj-$(CONFIG_SND_SOC_UX500_PLAT_DMA) += snd-soc-ux500-plat-dma.o - -snd-soc-ux500-mach-mop500-y := mop500.o mop500_ab8500.o -obj-$(CONFIG_SND_SOC_UX500_MACH_MOP500) += snd-soc-ux500-mach-mop500.o
sound/soc/ux500/mop500.c deleted +0 -167
167 lines not on this page · raw message
sound/soc/ux500/mop500_ab8500.c deleted +0 -437
437 lines not on this page · raw message
sound/soc/ux500/mop500_ab8500.h deleted +0 -17
@@ -1,17 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ -/* -* Copyright (C) ST-Ericsson SA 2012 -* -* Author: Ola Lilja <[email protected]> -* for ST-Ericsson. -*/ - -#ifndef MOP500_AB8500_H -#define MOP500_AB8500_H - -extern const struct snd_soc_ops mop500_ab8500_ops[]; - -int mop500_ab8500_machine_init (struct snd_soc_pcm_runtime *rtd); -void mop500_ab8500_remove (struct snd_soc_card *card); - -#endif
Signature · 1 line
2.55.0
[email protected]
AI reviewRe: [PATCH v2 5/9] ASoC: ux500: Remove the MOP500 machine driver
Thank you for your contribution! Sashiko AI review found 4 potential issue(s) to consider: - [High] ALSA: devicetree ABI breakage due to removal of stericsson,snd-soc-mop500 - [High] ALSA: ux500…
Thank you for your contribution! Sashiko AI review found 4 potential issue(s) to consider:
- [High] ALSA: devicetree ABI breakage due to removal of stericsson,snd-soc-mop500
- [High] ALSA: ux500: mono streams fail with -EINVAL due to rigid static TDM slot masks
- [Medium] ALSA: silent loss of audio on kernel upgrade due to missing SND_AUDIO_GRAPH_CARD2 selection
- [Medium] ALSA: ux500: loss of cross-DAI synchronization allows conflicting hardware parameters --
commit 310750ed2beb07b175f87e9079b77587ed249ddd
Author: Linus Walleij <[email protected]>
ASoC: ux500: Remove the MOP500 machine driver
This patch removes the MOP500 machine driver and its obsolete binding, replacing it with audio-graph-card2. It updates the ux500 ASoC Kconfig to directly select the codec, MSP, and DMA platform components previously selected by the machine driver.
sound/soc/ux500/Kconfig menuconfig SND_SOC_UX500 · line 12
Quoted 12 lines
sound/soc/ux500/Kconfig +4
-0@@ -6,28 +6,19 @@ menuconfig SND_SOC_UX500 tristate "Ux500" depends on SND_SOC depends on MFD_DB8500_PRCMU + depends on AB8500_CORE && AB8500_GPADC + select SND_SOC_AB8500_CODEC + select SND_SOC_UX500_PLAT_MSP_I2S + select SND_SOC_UX500_PLAT_DMA
[Severity: Medium]
Will this lead to a silent loss of audio on kernel upgrade?
When upgrading a kernel config where CONFIG_SND_SOC_UX500_MACH_MOP500 was set, the old config is dropped. Since the required replacement CONFIG_SND_AUDIO_GRAPH_CARD2 is neither selected nor implied by SND_SOC_UX500, users upgrading their kernel using make oldconfig might lose audio support.
[ ... ]
Quoted 5 lines
sound/soc/ux500/mop500.c deleted +0
-0
[ ... ]
sound/soc/ux500/mop500.c line 151
Quoted 4 lines
sound/soc/ux500/mop500.c deleted +0
-4-static const struct of_device_id snd_soc_mop500_match[] = { - { .compatible ="stericsson,snd-soc-mop500" , }, - {}, -};
[Severity: High]
Does removing this compatible string break devicetree backward compatibility?
Without a backward-compatibility binding provided in the generic driver, audio will fail to probe on systems booting with existing or older devicetrees that contain the stericsson,snd-soc-mop500 compatible string.
[ ... ]
Quoted 5 lines
sound/soc/ux500/mop500_ab8500.c deleted +0
-0
[ ... ]
Quoted 3 lines
sound/soc/ux500/mop500_ab8500.c deleted +0
-3-static int mop500_ab8500_hw_params (struct snd_pcm_substream *substream, -struct snd_pcm_hw_params *params) -{
[ ... ]
sound/soc/ux500/mop500_ab8500.c line 248
Quoted 13 lines
sound/soc/ux500/mop500_ab8500.c deleted +0
-13-/* Ensure configuration consistency between DAIs */ - scoped_guard(mutex, &mop500_ab8500_params_lock) { -if (mop500_ab8500_usage) { -if (mop500_ab8500_rate !=params_rate (params) || - mop500_ab8500_channels !=params_channels (params)) { -return -EBUSY ; - } - }else { - mop500_ab8500_rate =params_rate (params); - mop500_ab8500_channels =params_channels (params); - } -__set_bit (cpu_dai->id, &mop500_ab8500_usage); - }
[Severity: Medium]
Will the removal of these consistency checks allow conflicting hardware parameters?
When two applications open concurrent streams on the separate DAIs exposed by the AB8500 codec, requesting different sample rates or channel counts, the hardware might receive conflicting configuration requests. Since this lock is removed and neither the generic audio-graph-card2 nor the codec driver enforces cross-DAI consistency, can this cause synchronization regressions?
[ ... ]
sound/soc/ux500/mop500_ab8500.c line 300
Quoted 8 lines
sound/soc/ux500/mop500_ab8500.c deleted +0
-8- is_playback = (substream->stream ==SNDRV_PCM_STREAM_PLAYBACK ); -switch (channels) { -case 1 : - slots =16 ; - tx_slots = (is_playback) ?TX_SLOT_MONO :0 ; - rx_slots = (is_playback) ?0 :RX_SLOT_MONO ; -break ; -case 2 :
[Severity: High]
Does removing this dynamic TDM slot configuration cause mono streams to fail?
Without this dynamic update, the CPU DAI falls back to enforcing the static devicetree mask. The ALSA core will call ux500_msp_dai_hw_params(), which validates the channel count against the static TDM mask.
Because the devicetree statically sets a stereo TDM mask (slots_active = 2), a mono playback request evaluates params_channels() != slots_active as true and returns -EINVAL. Can this prevent users or applications from requesting mono playback?
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=5
Linus Walleij
maintainerRe: [PATCH v2 5/9] ASoC: ux500: Remove the MOP500 machine driver
Hi Sashiko,
Quoted 5 lines · On Fri, Sep 18, 2026 at 1:03 AM <[email protected]> wrote:
Thank you for your contribution! Sashiko AI review found 4 potential issue(s) to consider:
- [High] ALSA: devicetree ABI breakage due to removal of stericsson,snd-soc-mop500
- [High] ALSA: ux500: mono streams fail with-EINVALdue to rigid static TDM slot masks
- [Medium] ALSA: silent loss of audio on kernel upgrade due to missingSND_AUDIO_GRAPH_CARD2selection
- [Medium] ALSA: ux500: loss of cross-DAI synchronization allows conflicting hardware parameters
No-one cares about this. The old code wasn't working either.
Yours,
Linus Walleij
Linus Walleij
maintainerPATCH v2 6/9 ARM: dts: ux500: Add sound DAI provider cells
In reply to Linus WalleijDescribe each MSP as a single-DAI provider and the AB8500 codec as a two-DAI provider. This lets audio graph endpoints resolve the MSP DAI and select the codec playback or capture interface by port number.
--- arch/arm/boot/dts/st/ste-ab8500.dtsi | 1 + arch/arm/boot/dts/st/ste-ab8505.dtsi | 1 + arch/arm/boot/dts/st/ste-dbx5x0.dtsi | 4 ++++ 3 files changed, 6 insertions(+)
arch/arm/boot/dts/st/ste-ab8500.dtsi +1 -0
@@ -272,6 +272,7 @@ pwm@3 { codec: codec { compatible = "stericsson,ab8500-codec"; + #sound-dai-cells = <1>; V-AUD-supply = <&ab8500_ldo_audio_reg>; V-AMIC1-supply = <&ab8500_ldo_anamic1_reg>;
arch/arm/boot/dts/st/ste-ab8505.dtsi +1 -0
@@ -224,6 +224,7 @@ pwm@1 { codec: codec { compatible = "stericsson,ab8500-codec"; + #sound-dai-cells = <1>; V-AUD-supply = <&ab8500_ldo_audio_reg>; V-AMIC1-supply = <&ab8500_ldo_anamic1_reg>;
arch/arm/boot/dts/st/ste-dbx5x0.dtsi +4 -0
@@ -1078,6 +1078,7 @@ sound { msp0: msp@80123000 { compatible = "stericsson,ux500-msp-i2s"; + #sound-dai-cells = <0>; reg = <0x80123000 0x1000>; interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>; v-ape-supply = <&db8500_vape_reg>;
@@ -1095,6 +1096,7 @@ msp0: msp@80123000 { msp1: msp@80124000 { compatible = "stericsson,ux500-msp-i2s"; + #sound-dai-cells = <0>; reg = <0x80124000 0x1000>; interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>; v-ape-supply = <&db8500_vape_reg>;
@@ -1113,6 +1115,7 @@ msp1: msp@80124000 { // HDMI sound msp2: msp@80117000 { compatible = "stericsson,ux500-msp-i2s"; + #sound-dai-cells = <0>; reg = <0x80117000 0x1000>; interrupts = <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>; v-ape-supply = <&db8500_vape_reg>;
@@ -1131,6 +1134,7 @@ HighPrio - Fixed */ msp3: msp@80125000 { compatible = "stericsson,ux500-msp-i2s"; + #sound-dai-cells = <0>; reg = <0x80125000 0x1000>; interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>; v-ape-supply = <&db8500_vape_reg>;
Signature · 1 line
2.55.0
[email protected]
AI reviewRe: [PATCH v2 6/9] ARM: dts: ux500: Add sound DAI provider cells
Sashiko has reviewed this patch and found no issues. It looks great!
Quoted 6 lines
Describe each MSP as a single-DAI provider and the AB8500 codec as a two-DAI provider. This lets audio graph endpoints resolve the MSP DAI and select the codec playback or capture interface by port number.
Assisted-by LLMSigned-off-by Linus Walleij <[email protected]>
Sashiko has reviewed this patch and found no issues. It looks great!
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=6
Linus Walleij
maintainerRe: [PATCH v2 6/9] ARM: dts: ux500: Add sound DAI provider cells
In reply to Linus WalleijQuoted 6 lines · Linus Walleij
Describe each MSP as a single-DAI provider and the AB8500 codec as a two-DAI provider. This lets audio graph endpoints resolve the MSP DAI and select the codec playback or capture interface by port number.
Assisted-by LLMSigned-off-by Linus Walleij <[email protected]>
Assuming Lee will apply the ACKed binding patch so I applied this and the rest of the DTS patches to the ux500 DTS branch for v7.4.
Yours,
Linus Walleij
Lee Jones
maintainerRe: [PATCH v2 6/9] ARM: dts: ux500: Add sound DAI provider cells
Quoted 11 lines · Linus Walleij
Quoted 6 lines · Linus Walleij
Describe each MSP as a single-DAI provider and the AB8500 codec as a two-DAI provider. This lets audio graph endpoints resolve the MSP DAI and select the codec playback or capture interface by port number.
Assisted-by LLMSigned-off-by Linus Walleij <[email protected]>Assuming Lee will apply the ACKed binding patch so I applied this and the rest of the DTS patches to the ux500 DTS branch for v7.4.
Right, but it's not Acked yet, is it? Or did I miss something?
Signature · 1 line
Lee Jones
Linus Walleij
maintainerRe: [PATCH v2 6/9] ARM: dts: ux500: Add sound DAI provider cells
Quoted 7 lines · Lee Jones
Quoted 6 lines · Linus Walleij
Quoted 4 lines · Linus Walleij
Describe each MSP as a single-DAI provider and the AB8500 codec as a two-DAI provider. This lets audio graph endpoints resolve the MSP DAI and select the codec playback or capture interface by port number.
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
Assisted-by LLMSigned-off-by Linus Walleij <[email protected]>Assuming Lee will apply the ACKed binding patch so I applied this and the rest of the DTS patches to the ux500 DTS branch for v7.4.
Right, but it's not Acked yet, is it? Or did I miss something?
It was ACKed under a different Subject: so I resent the patch for clarity, sorry for the mess.
Yours,
Linus Walleij
Lee Jones
maintainerRe: [PATCH v2 6/9] ARM: dts: ux500: Add sound DAI provider cells
Quoted 12 lines · Linus Walleij
Quoted 10 lines · Lee Jones
Quoted 9 lines · Linus Walleij
Quoted 6 lines · Linus Walleij
Describe each MSP as a single-DAI provider and the AB8500 codec as a two-DAI provider. This lets audio graph endpoints resolve the MSP DAI and select the codec playback or capture interface by port number.
Assisted-by LLMSigned-off-by Linus Walleij <[email protected]>
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
Assuming Lee will apply the ACKed binding patch so I applied this and the rest of the DTS patches to the ux500 DTS branch for v7.4.
Right, but it's not Acked yet, is it? Or did I miss something?
It was ACKed under a different Subject: so I resent the patch for clarity, sorry for the mess.
Are you going to tell me what that subject was? =;-)
Signature · 1 line
Lee Jones
Linus Walleij
maintainerRe: [PATCH v2 6/9] ARM: dts: ux500: Add sound DAI provider cells
Quoted 6 lines · Lee Jones
Quoted 5 lines · Linus Walleij
Quoted 3 lines · Lee Jones
Quoted 2 lines
Assuming Lee will apply the ACKed binding patch so I applied this and the rest of the DTS patches to the ux500 DTS branch for v7.4.
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
Right, but it's not Acked yet, is it? Or did I miss something?
It was ACKed under a different Subject: so I resent the patch for clarity, sorry for the mess.
Are you going to tell me what that subject was? =;-)
Sorry!
"[PATCH v3] mfd: dt-bindings: ab8500: Describe codec graph and microphone wiring"
https://lore.kernel.org/mfd/[email protected]/
Yours,
Linus Walleij
Lee Jones
maintainerRe: [PATCH v2 6/9] ARM: dts: ux500: Add sound DAI provider cells
Quoted 12 lines · Linus Walleij
Quoted 11 lines · Lee Jones
Quoted 9 lines · Linus Walleij
Quoted 4 lines · Lee Jones
Quoted 2 lines
Assuming Lee will apply the ACKed binding patch so I applied this and the rest of the DTS patches to the ux500 DTS branch for v7.4.
Right, but it's not Acked yet, is it? Or did I miss something?
It was ACKed under a different Subject: so I resent the patch for clarity, sorry for the mess.
Quoted 6 lines
Quoted 1 line
Are you going to tell me what that subject was? =;-)
Sorry!
"[PATCH v3] mfd: dt-bindings: ab8500: Describe codec graph and microphone wiring"
https://lore.kernel.org/mfd/[email protected]/
Already merged.
Signature · 1 line
Lee Jones
Linus Walleij
maintainerPATCH v2 7/9 ARM: dts: ux500: Convert HREF audio to audio-graph-card2
In reply to Linus WalleijDescribe the HREF500 and HREF520 sound hardware with two-link audio graph cards in their PMIC-specific HREF DTSIs, and name the card HREF-500. Connect MSP1 to codec DAI 0 for playback and MSP3 to codec DAI 1 for capture.
Describe the DSP_A format, codec-provided bit and frame clocks, 16-by-16-bit TDM frame and active slots on the graph endpoints. Keep the clocks running continuously, matching the legacy machine driver's normal one- and two-channel mode.
Keep each complete card, including its endpoint graph, connector widgets and routes, in the existing PMIC-specific HREF DTSI. The AB8500 variant exposes six digital microphone endpoints. AB8505 has neither the digital microphone interface nor its VDMIC regulator, so leave these endpoints out of HREF520 and remove its stale regulator and pin configuration nodes.
Select ULPCLK as the fixed parent of the codec audio clock in the HREF-specific codec DTSIs. This replaces the machine driver clock control with declarative board policy.
--- arch/arm/boot/dts/st/ste-ab8500.dtsi | 6 -- arch/arm/boot/dts/st/ste-ab8505.dtsi | 6 -- arch/arm/boot/dts/st/ste-dbx5x0.dtsi | 5 -- arch/arm/boot/dts/st/ste-href-ab8500.dtsi | 104 ++++++++++++++++++++++++++ arch/arm/boot/dts/st/ste-href-ab8505.dtsi | 118 +++++++++++++++++++++++------- 5 files changed, 196 insertions(+), 43 deletions(-)
arch/arm/boot/dts/st/ste-ab8500.dtsi +0 -6
@@ -365,12 +365,6 @@ ab8500_ldo_ana_reg: ab8500_ldo_ana { }; }; - sound { - stericsson,audio-codec = <&codec>; - clocks = <&prcmu_clk PRCMU_SYSCLK>, <&ab8500_clock AB8500_SYSCLK_ULP>, <&ab8500_clock AB8500_SYSCLK_INT>; - clock-names = "sysclk", "ulpclk", "intclk"; - }; - mcde@a0350000 { vana-supply = <&ab8500_ldo_ana_reg>;
arch/arm/boot/dts/st/ste-ab8505.dtsi +0 -6
@@ -302,12 +302,6 @@ ab8500_ldo_ana_reg: ab8500_ldo_ana { }; }; - sound { - stericsson,audio-codec = <&codec>; - clocks = <&prcmu_clk PRCMU_SYSCLK>, <&ab8500_clock AB8500_SYSCLK_ULP>, <&ab8500_clock AB8500_SYSCLK_INT>; - clock-names = "sysclk", "ulpclk", "intclk"; - }; - mcde@a0350000 { vana-supply = <&ab8500_ldo_ana_reg>;
arch/arm/boot/dts/st/ste-dbx5x0.dtsi +0 -5
@@ -1071,11 +1071,6 @@ mmc@80008000 { status = "disabled"; }; - sound { - compatible = "stericsson,snd-soc-mop500"; - stericsson,cpu-dai = <&msp1 &msp3>; - }; - msp0: msp@80123000 { compatible = "stericsson,ux500-msp-i2s"; #sound-dai-cells = <0>;
arch/arm/boot/dts/st/ste-href-ab8500.dtsi +104 -0
113 lines not on this page · raw message
arch/arm/boot/dts/st/ste-href-ab8505.dtsi +92 -26
145 lines not on this page · raw message
Signature · 1 line
2.55.0
[email protected]
AI reviewRe: [PATCH v2 7/9] ARM: dts: ux500: Convert HREF audio to audio-graph-card2
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider: - [High] sound: ux500: hardcoded TDM slots break dynamic channel support - [High] sound: ux500: ABI…
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [High] sound: ux500: hardcoded TDM slots break dynamic channel support
- [High] sound: ux500: ABI regression causing loss of DAPM pin switches
--
commit 3bce354bbefb3531701f651af445996e9f8ba398
Author: Linus Walleij <[email protected]>
ARM: dts: ux500: Convert HREF audio to audio-graph-card2
This commit converts the HREF500 and HREF520 sound hardware to use audio-graph-card2 in their device trees, replacing the legacy machine driver. It establishes links between MSP1/MSP3 and the audio codec, along with defining the TDM frame properties and endpoints.
arch/arm/boot/dts/st/ste-href-ab8500.dtsi line 10
Quoted 10 lines
arch/arm/boot/dts/st/ste-href-ab8500.dtsi +2
-0@@ -6,6 +6,48 @@ #include "ste-ab8500.dtsi" / { + href_sound: sound { + compatible = "audio-graph-card2";
[Severity: High]
Does this transition to audio-graph-card2 omit the creation of DAPM pin switches that were explicitly created by the legacy machine driver?
The audio-graph-card2 driver fundamentally lacks support for generating these switches because it does not parse a 'pin-switches' DT property (unlike simple-audio-card), nor are they specified in the DT.
Could this lead to the loss of 20 userspace ALSA mixer controls (such as 'Headset Left Switch' and 'Mic 1 Switch'), breaking ALSA UCM profiles, PulseAudio, and scripts that attempt to route audio or toggle endpoints?
Quoted 2 lines
arch/arm/boot/dts/st/ste-href-ab8500.dtsi +2
-0+ label = "HREF-500"; + widgets =
[ ... ]
Quoted 8 lines
+&codec {
arch/arm/boot/dts/st/ste-href-ab8500.dtsi +7
-0+ assigned-clocks = <&ab8500_clock AB8500_SYSCLK_INT>; + assigned-clock-parents = <&ab8500_clock AB8500_SYSCLK_ULP>; + + ports { + #address-cells = <1>; + #size-cells = <0>; +
arch/arm/boot/dts/st/ste-href-ab8500.dtsi ab8500_chargalg { · line 551
Quoted 10 lines
arch/arm/boot/dts/st/ste-href-ab8500.dtsi +10
-0+ port@0 { + reg = <0>; + + href_codec_playback: endpoint { + remote-endpoint = <&href_msp1_endpoint>; + bitclock-master; + frame-master; + dai-tdm-slot-num = <16>; + dai-tdm-slot-width = <16>; + dai-tdm-slot-tx-mask = <0 1 0 1>;
[Severity: High]
Can statically setting dai-tdm-slot-tx-mask limit playback to exactly 2 channels (bits 1 and 3), permanently forcing stereo playback and breaking previously supported mono playback?
Looking at ux500_msp_dai_hw_params(), the backend CPU DAI driver rigidly enforces that the runtime ALSA channel count matches the active slots defined statically in the DT:
sound/soc/ux500/ux500_msp_dai.c:ux500_msp_dai_hw_params() {
...
if (!slots_active || params_channels(params) != slots_active)
return -EINVAL;
...
}Will userspace audio applications playing mono or capturing stereo directly via
hw: fail with -EINVAL, causing a functional regression from the legacy machine driver?
Quoted 17 lines
arch/arm/boot/dts/st/ste-href-ab8500.dtsi +17
-0+ }; + }; + + port@1 { + reg = <1>; + + href_codec_capture: endpoint { + remote-endpoint = <&href_msp3_endpoint>; + bitclock-master; + frame-master; + dai-tdm-slot-num = <16>; + dai-tdm-slot-width = <16>; + dai-tdm-slot-rx-mask = <1>; + }; + }; + }; +};
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=7
Linus Walleij
maintainerRe: [PATCH v2 7/9] ARM: dts: ux500: Convert HREF audio to audio-graph-card2
Quoted 3 lines · On Fri, Sep 18, 2026 at 1:06 AM <[email protected]> wrote:
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [High] sound: ux500: hardcoded TDM slots break dynamic channel support
- [High] sound: ux500: ABI regression causing loss of DAPM pin switches
Nobody cares.
The old code was not working.
Yours,
Linus Walleij
Linus Walleij
maintainerPATCH v2 8/9 ARM: dts: ux500: Add Samsung phone audio graphs
In reply to Linus WalleijThe released Samsung product kernels all connect codec DAI 0 to MSP1 for playback and codec DAI 1 to MSP3 for capture. The codec provides the bit and frame clocks, while ULPCLK is the machine driver's default audio clock parent. Keep the codec-provided clocks continuous as in the product kernels.
Add a common two-link audio graph card and include it from Codina, Codina-TMO, Gavini, Skomer, Kyle, Golden and Janice. Use the generic card name "Samsung". The later product kernels use DSP_A with an 8-by-16-bit TDM frame, playback slots 0 and 1 and capture slot 0.
Codina and HD Codina retain their older DSP_B configuration with a 16-by-16-bit frame and playback slots 1 and 3. Preserve Gavini's AMIC1A-to-VAMIC2 bias routing. Golden and Janice use the configuration from the newest Codina-TMO product source; their board files are byte-for-byte identical across the available later product releases.
Kyle's audio I2C bus contains only a disabled placeholder, so AB8505 remains its sole active codec.
--- .../boot/dts/st/ste-ux500-samsung-codina-tmo.dts | 1 + arch/arm/boot/dts/st/ste-ux500-samsung-codina.dts | 21 ++++++ arch/arm/boot/dts/st/ste-ux500-samsung-gavini.dts | 5 ++ arch/arm/boot/dts/st/ste-ux500-samsung-golden.dts | 1 + arch/arm/boot/dts/st/ste-ux500-samsung-janice.dts | 1 + arch/arm/boot/dts/st/ste-ux500-samsung-kyle.dts | 1 + arch/arm/boot/dts/st/ste-ux500-samsung-skomer.dts | 1 + arch/arm/boot/dts/st/ste-ux500-samsung.dtsi | 77 ++++++++++++++++++++++ 8 files changed, 108 insertions(+)
arch/arm/boot/dts/st/ste-ux500-samsung-codina-tmo.dts +1 -0
@@ -21,6 +21,7 @@ #include "ste-db8500.dtsi" #include "ste-ab8505.dtsi" #include "ste-dbx5x0-pinctrl.dtsi" +#include "ste-ux500-samsung.dtsi" #include <dt-bindings/gpio/gpio.h> #include <dt-bindings/leds/common.h> #include <dt-bindings/input/input.h>
arch/arm/boot/dts/st/ste-ux500-samsung-codina.dts +21 -0
@@ -22,6 +22,7 @@ #include "ste-db8500.dtsi" #include "ste-ab8500.dtsi" #include "ste-dbx5x0-pinctrl.dtsi" +#include "ste-ux500-samsung.dtsi" #include <dt-bindings/gpio/gpio.h> #include <dt-bindings/leds/common.h> #include <dt-bindings/input/input.h>
@@ -667,6 +668,26 @@ display_out: endpoint { }; }; +&samsung_playback_cpu { + dai-format = "dsp_b"; + dai-tdm-slot-num = <16>; + dai-tdm-slot-tx-mask = <0 1 0 1>; +}; + +&samsung_codec_playback { + dai-tdm-slot-num = <16>; + dai-tdm-slot-tx-mask = <0 1 0 1>; +}; + +&samsung_capture_cpu { + dai-format = "dsp_b"; + dai-tdm-slot-num = <16>; +}; + +&samsung_codec_capture { + dai-tdm-slot-num = <16>; +}; + &pinctrl { /* * This extends the MC0_A_2 default config to include
arch/arm/boot/dts/st/ste-ux500-samsung-gavini.dts +5 -0
@@ -7,6 +7,7 @@ #include "ste-db8500.dtsi" #include "ste-ab8500.dtsi" #include "ste-dbx5x0-pinctrl.dtsi" +#include "ste-ux500-samsung.dtsi" #include <dt-bindings/gpio/gpio.h> #include <dt-bindings/leds/common.h> #include <dt-bindings/input/input.h>
@@ -604,6 +605,10 @@ display_out: endpoint { }; }; +&codec { + stericsson,amic1a-bias-vamic2; +}; + &pinctrl { /* * This extends the MC0_A_2 default config to include
arch/arm/boot/dts/st/ste-ux500-samsung-golden.dts +1 -0
@@ -4,6 +4,7 @@ #include "ste-db8500.dtsi" #include "ste-ab8505.dtsi" #include "ste-dbx5x0-pinctrl.dtsi" +#include "ste-ux500-samsung.dtsi" #include <dt-bindings/gpio/gpio.h> #include <dt-bindings/leds/common.h> #include <dt-bindings/input/input.h>
arch/arm/boot/dts/st/ste-ux500-samsung-janice.dts +1 -0
@@ -7,6 +7,7 @@ #include "ste-db8500.dtsi" #include "ste-ab8500.dtsi" #include "ste-dbx5x0-pinctrl.dtsi" +#include "ste-ux500-samsung.dtsi" #include <dt-bindings/gpio/gpio.h> #include <dt-bindings/leds/common.h> #include <dt-bindings/input/input.h>
arch/arm/boot/dts/st/ste-ux500-samsung-kyle.dts +1 -0
@@ -11,6 +11,7 @@ #include "ste-db8500.dtsi" #include "ste-ab8505.dtsi" #include "ste-dbx5x0-pinctrl.dtsi" +#include "ste-ux500-samsung.dtsi" #include <dt-bindings/gpio/gpio.h> #include <dt-bindings/leds/common.h> #include <dt-bindings/input/input.h>
arch/arm/boot/dts/st/ste-ux500-samsung-skomer.dts +1 -0
@@ -7,6 +7,7 @@ #include "ste-db8500.dtsi" #include "ste-ab8505.dtsi" #include "ste-dbx5x0-pinctrl.dtsi" +#include "ste-ux500-samsung.dtsi" #include <dt-bindings/gpio/gpio.h> #include <dt-bindings/leds/common.h> #include <dt-bindings/input/input.h>
arch/arm/boot/dts/st/ste-ux500-samsung.dtsi new file +77 -0
77 lines not on this page · raw message
Signature · 1 line
2.55.0
[email protected]
AI reviewRe: [PATCH v2 8/9] ARM: dts: ux500: Add Samsung phone audio graphs
Sashiko has reviewed this patch and found no issues. It looks great!
Quoted 17 lines
The released Samsung product kernels all connect codec DAI 0 to MSP1 for playback and codec DAI 1 to MSP3 for capture. The codec provides the bit and frame clocks, while ULPCLK is the machine driver's default audio clock parent. Keep the codec-provided clocks continuous as in the product kernels.
Add a common two-link audio graph card and include it from Codina, Codina-TMO, Gavini, Skomer, Kyle, Golden and Janice. Use the generic card name "Samsung". The later product kernels use
DSP_Awith an 8-by-16-bit TDM frame, playback slots 0 and 1 and capture slot 0.Codina and HD Codina retain their older
DSP_Bconfiguration with a 16-by-16-bit frame and playback slots 1 and 3. Preserve Gavini's AMIC1A-to-VAMIC2 bias routing. Golden and Janice use the configuration from the newest Codina-TMO product source; their board files are byte-for-byte identical across the available later product releases.
Quoted 5 lines
Kyle's audio I2C bus contains only a disabled placeholder, so AB8505 remains its sole active codec.
Assisted-by LLMSigned-off-by Linus Walleij <[email protected]>
Sashiko has reviewed this patch and found no issues. It looks great!
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=8
Linus Walleij
maintainerPATCH v2 9/9 ARM: config: u8500: Enable audio graph card2
In reply to Linus WalleijReplace the removed MOP500 machine-driver option with the generic audio graph card2 used by the new Ux500 device tree descriptions.
--- arch/arm/configs/u8500_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/configs/u8500_defconfig +1 -1
@@ -122,7 +122,7 @@ CONFIG_SOUND=y CONFIG_SND=y CONFIG_SND_SOC=y CONFIG_SND_SOC_UX500=y -CONFIG_SND_SOC_UX500_MACH_MOP500=y +CONFIG_SND_AUDIO_GRAPH_CARD2=y CONFIG_USB_MUSB_HDRC=y CONFIG_USB_MUSB_UX500=y CONFIG_MUSB_PIO_ONLY=y
Signature · 1 line
2.55.0
[email protected]
AI reviewRe: [PATCH v2 9/9] ARM: config: u8500: Enable audio graph card2
Sashiko has reviewed this patch and found no issues. It looks great!
Quoted 5 lines
Replace the removed MOP500 machine-driver option with the generic audio graph card2 used by the new Ux500 device tree descriptions.
Assisted-by LLMSigned-off-by Linus Walleij <[email protected]>
Sashiko has reviewed this patch and found no issues. It looks great!
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=9
Mark Brown
maintainerRe: (subset) [PATCH v2 0/9] ASoC: ux500: Migrate HREF and Samsung audio to audio-graph-card2
In reply to Linus WalleijQuoted 10 lines · Linus Walleij
ASoC: ux500: Migrate HREF and Samsung audio to audio-graph-card2
The Ux500 HREF500 and HREF520 audio support still relies on a MOP500-specific machine driver and ad-hoc text bindings.
Convert the MSP binding to DT schema and make the MSP and AB8500 codec nodes proper sound DAI providers with audio graph ports. Document the sparse TDM slot masks already parsed from audio graph endpoints.
[...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-7.4
Thanks!
[1/9] ASoC: dt-bindings: sound: Prepare Ux500 audio graph links
https://git.kernel.org/broonie/sound/c/cc47a544d4f7 [3/9] ASoC: dt-bindings: ux500: Remove MOP500 sound card binding https://git.kernel.org/broonie/sound/c/661b5aa81093 [4/9] ASoC: ab8500: Skip digital microphone support on AB8505 https://git.kernel.org/broonie/sound/c/0d46182a1be7 [5/9] ASoC: ux500: Remove the MOP500 machine driver https://git.kernel.org/broonie/sound/c/f25d142baa23
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