Thank you for your contribution! Sashiko AI review found 3 potential issues to consider: - [Medium] ARM: dts: omap3pandora: incomplete and unused sound-dai property on sound node - [Medium] ASoC: ti: omap3pandora: built-in driver fails to bind DT McBSP DAIs - [Low] ARM: dts: omap3pandora: redundant clocks properties on mcbsp2 --
commit 51a8d5eee5be53980684a82cdf4795c967918b82 Author: Stefan Leichter <[email protected]> ARM: dts: omap3pandora: Describe sound card This commit adds the OpenPandora sound card node and McBSP2 DAI properties to omap3-pandora-common.dtsi. > diff --git a/arch/arm/boot/dts/ti/omap/omap3-pandora-common.dtsi > b/arch/arm/boot/dts/ti/omap/omap3-pandora-common.dtsi > index 6e349f7ae6936..a5633d93547a3 100644 > --- a/arch/arm/boot/dts/ti/omap/omap3-pandora-common.dtsi > +++ b/arch/arm/boot/dts/ti/omap/omap3-pandora-common.dtsi > @@ -69,6 +69,41 @@ dac: pcm1773-codec { > vcc-supply = <&vsim>; > enable-gpios = <&gpio4 22 GPIO_ACTIVE_HIGH>; /* GPIO 118 */ > status = "okay"; > + #sound-dai-cells = <0>; > + }; > + > + sound: sound { > + compatible = "openpandora,omap3pandora-sound"; > + status = "okay"; > + > + label = "OpenPandora"; > + > + amp-gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>; > + amp-supply = <&aux_5v>; > + > + widgets = > + "Line", "Line Out", > + "Line", "Line In", > + "Headphone", "Headphone Jack", > + "Microphone", "Mic (internal)", > + "Microphone", "Mic (external)"; > + > + routing = > + "DAC1", "APLL Enable", > + "DAC2", "APLL Enable", > + "Headphone Amplifier", "VOUTL", > + "Headphone Amplifier", "VOUTR", > + "Line Out", "VOUTL", > + "Line Out", "VOUTR", > + "Headphone Jack", "Headphone Amplifier", > + "AUXL", "Line In", > + "AUXR", "Line In", > + "MAINMIC", "Mic (internal)", > + "Mic (internal)", "Mic Bias 1", > + "SUBMIC", "Mic (external)", > + "Mic (external)", "Mic Bias 2"; > + > + sound-dai = <&mcbsp2>, <&dac>; [Severity: Medium] Is sound-dai here both incomplete for the capture link and unused by omap3pandora_probe()? The sound card has both a playback link (McBSP2 to PCM1773) and a capture link (McBSP4 to TWL4030), but sound-dai and #sound-dai-cells only cover &mcbsp2 and &dac, omitting &mcbsp4 and the TWL4030 codec. In addition, omap3pandora_probe() in sound/soc/ti/omap3pandora.c only parses label, widgets and routing, and never reads sound-dai to populate the CPU, platform or codec of_node pointers in omap3pandora_dai[]. As a result, component matching still relies on hardcoded device names in omap3pandora_dai[], including the non-generic pcm1773-codec DT node name. [Severity: Medium] Can this sound card probe when CONFIG_SND_SOC_OMAP3_PANDORA=y? Because omap3pandora_probe() does not populate dai_link->cpus->of_node or dai_link->platforms->of_node from sound-dai, ASoC matches the McBSP DAIs using the hardcoded names in omap3pandora_dai[] from commit "ASoC: ti: omap3pandora: Convert sound card to DT": sound/soc/ti/omap3pandora.c: #if IS_BUILTIN(CONFIG_SND_SOC_OMAP3_PANDORA) SND_SOC_DAILINK_DEFS(out, DAILINK_COMP_ARRAY(COMP_CPU("omap-mcbsp.2")), DAILINK_COMP_ARRAY(COMP_CODEC("pcm1773-codec", "pcm1773")), DAILINK_COMP_ARRAY(COMP_PLATFORM("omap-mcbsp.2"))); SND_SOC_DAILINK_DEFS(in, DAILINK_COMP_ARRAY(COMP_CPU("omap-mcbsp.4")), DAILINK_COMP_ARRAY(COMP_CODEC("twl4030-codec", "twl4030-hifi")), DAILINK_COMP_ARRAY(COMP_PLATFORM("omap-mcbsp.4"))); #else /* IS_BUILTIN(CONFIG_SND_SOC_OMAP3_PANDORA) */ On a Device Tree boot, the McBSP devices are always registered as 49022000.mcbsp and 49026000.mcbsp regardless of whether the sound driver is built-in or modular, so a built-in driver will never find omap-mcbsp.2 or omap-mcbsp.4 and card registration will defer indefinitely. [ ... ] > @@ -736,6 +771,9 @@ &mcbsp1 { > /* audio DAC */ > &mcbsp2 { > status = "okay"; > + #sound-dai-cells = <0>; > + clocks = <&mcbsp2_fck>, <&mcbsp2_ick>; > + clock-names = "fck", "ick"; > }; [Severity: Low] This isn't a bug, but clocks and clock-names on &mcbsp2 duplicate the exact same properties already defined in the base mcbsp2 node in arch/arm/boot/dts/ti/omap/omap3.dtsi. -- Sashiko AI review ยท https://sashiko.dev/#/patchset/[email protected]?part=17
