From: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
To: linux-sound@vger.kernel.org
Cc: Mark Brown <broonie@kernel.org>, Liam Girdwood <lgirdwood@gmail.com>
Subject: Debugging CPU-side DAI hardware with a dummy codec
Date: Tue, 08 Apr 2025 21:58:07 +0200 [thread overview]
Message-ID: <4927043.LvFx2qVVIh@workhorse> (raw)
Hello,
I'm currently working on a CPU-side audio controller. In the process of that,
I'd like to probe the actual I2S/TDM signal coming out of the thing with a logic
analyzer, with no codec connected at all.
So I add a codec to my device tree:
dummy_codec: dummy-codec {
compatible = "please-replace-me";
/* these might not get picked up, whatever, bear with me */
assigned-clocks = <&cru CLK_SAI0_MCLKOUT_TO_IO>;
assigned-clock-rates = <12288000>;
#sound-dai-cells = <0>;
};
and reference it in a simple-audio-card:
dummy_thicc_sound: dummy-thicc-sound {
compatible = "simple-audio-card";
simple-audio-card,name = "Dumdum";
simple-audio-card,format = "i2s";
simple-audio-card,mclk-fs = <256>;
simple-audio-card,cpu {
sound-dai = <&sai0>;
dai-tdm-slot-num = <4>;
dai-tdm-slot-width = <16>;
};
simple-audio-card,codec {
sound-dai = <&dummy_codec>;
};
};
The thought here is to let the probe defer, and just manually bind the driver.
So I set a driver override on my dummy-codec node:
# echo "snd-soc-dummy" > /sys/bus/platform/devices/dummy-codec/driver_override
And hope to now be able to bind the snd-soc-dummy driver on the faux bus to it:
# echo "dummy-codec" > /sys/bus/faux/drivers/faux_driver/snd-soc-dummy/driver/bind
-bash: echo: write error: No such device
Clearly, that doesn't work.
I know there's no DT compatible because it'd be abused by lazy vendors to avoid
writing proper codec drivers, but I'm really genuinely trying to just look at
the signals of the DAI here and there is no codec whatsoever.
Apparently I'm the first to ever try and do this because both my mailing list
searches and documentation greps came up empty.
I hope someone can shed some light on this, as it seems like something audio
controller developers would be doing all the time.
Kind regards,
Nicolas Frattaroli
next reply other threads:[~2025-04-08 19:58 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-08 19:58 Nicolas Frattaroli [this message]
2025-04-09 15:01 ` Debugging CPU-side DAI hardware with a dummy codec Mark Brown
2025-04-09 19:56 ` Nicolas Frattaroli
2025-04-09 20:06 ` Mark Brown
2025-04-10 10:54 ` Daniel Baluta
2025-04-10 11:23 ` Nicolas Frattaroli
2025-04-10 12:02 ` Nicolas Frattaroli
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4927043.LvFx2qVVIh@workhorse \
--to=nicolas.frattaroli@collabora.com \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-sound@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox