Linux Sound subsystem development
 help / color / mirror / Atom feed
From: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
To: Daniel Baluta <daniel.baluta@gmail.com>
Cc: Mark Brown <broonie@kernel.org>,
	linux-sound@vger.kernel.org, Liam Girdwood <lgirdwood@gmail.com>
Subject: Re: Debugging CPU-side DAI hardware with a dummy codec
Date: Thu, 10 Apr 2025 14:02:54 +0200	[thread overview]
Message-ID: <2703798.PYKUYFuaPT@workhorse> (raw)
In-Reply-To: <5347100.LvFx2qVVIh@workhorse>

On Thursday, 10 April 2025 13:23:21 Central European Summer Time Nicolas Frattaroli wrote:
> On Thursday, 10 April 2025 12:54:16 Central European Summer Time Daniel Baluta wrote:
> > > > I hope someone can shed some light on this, as it seems like something audio
> > > > controller developers would be doing all the time.
> > >
> > > I suspect most people test with an actual system.  A bunch of things get
> > > easier if you can actually play and record sound.
> > 
> > Mark, that's true in most of the cases. But for silicon IP
> > pre-validation using emulation
> > environments most of the SoC creators use a synthetic codec so things like being
> > able to probe a dummy-codec does make some sense.
> > 
> > Nicolas,
> > 
> > Can you please paste your patches (dts and the rest)?
> > 
> > thanks,
> > Daniel.
> > 
> 
> Hi Daniel,
> 
> I'll send the test-component changes in a proper patch submission later.
> 
> The DTS in my case looks like this though. `sai0` here is the SoC-side
> audio interface. Don't worry about the pinctrl/dma overriding, that's
> me disabling capture.
> 
> ---
> diff --git a/arch/arm64/boot/dts/rockchip/rk3576-armsom-sige5.dts b/arch/arm64/boot/dts/rockchip/rk3576-armsom-sige5.dts
> index de63b053a06c..6e78713b1a99 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3576-armsom-sige5.dts
> +++ b/arch/arm64/boot/dts/rockchip/rk3576-armsom-sige5.dts
> @@ -84,6 +84,25 @@ simple-audio-card,codec {
>  		};
>  	};
>  
> +	dummy_codec: dummy-codec {
> +		compatible = "test-codec-verbose";
> +		dai-tdm-slot-num = <8>;
> +		dai-tdm-slot-width = <16>;
> +		#sound-dai-cells = <0>;
> +
> +		port {
> +			codec_endpoint: endpoint {
> +				remote-endpoint = <&sai0_endpoint>;
> +			};
> +		};
> +	};

Gah, major blunder from my side, the dai-tdm-slot-* properties should be
inside the endpoint node of the codec here like this:

	dummy_codec: dummy-codec {
		compatible = "test-codec-verbose";
		#sound-dai-cells = <0>;

		port {
			codec_endpoint: endpoint {
				dai-tdm-slot-num = <8>;
				dai-tdm-slot-width = <16>;
				remote-endpoint = <&sai0_endpoint>;
			};
		};
	};

Sorry about the confusion.

Cheers,
Nicolas Frattaroli

> [...]
> 
> Cheers,
> Nicolas Frattaroli





      reply	other threads:[~2025-04-10 12:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-08 19:58 Debugging CPU-side DAI hardware with a dummy codec Nicolas Frattaroli
2025-04-09 15:01 ` 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 [this message]

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=2703798.PYKUYFuaPT@workhorse \
    --to=nicolas.frattaroli@collabora.com \
    --cc=broonie@kernel.org \
    --cc=daniel.baluta@gmail.com \
    --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