Request for help: Outputting audio as an I2S stream

Summary: My goal is to output audio to an ADAU1467 via I2S on Linux 6.6. I tried and then abandoned using a custom, device-specific driver. Now trying to use built-in simple-sound-card. But, driver does not initialize (probe). Don't know how to debug/fix the issue.
I've been working with chapgpt extensively since I have found no other source of information on how to setup linux to output an I2S audio stream. In fact, I posted a question to a linux maillist about an issue a couple weeks ago and the reply from Lars Clausen showed output from chatgpt. In the old days folks would joke about googling something for someone. Today, I guess we can do the same WRT chatgpt.
But, that question was about updating a driver. Chatgpt tells me that I shouldn't need a device-specific driver since the device is configured and controlled elsewhere. I just need to pump an audio stream into it. So, I started over with my solution; no longer working on a custom driver. Apparently, I can use the simple-sound-card and a dummy codec. But, it does not work. Maybe chatgpt is wrong and I need a device-specific driver. Or maybe my setup is wrong. I have worked with chatgpt to resolve my issues, but have hit a wall. Hoping to get help from humans now. 😊
The boot-time log (attached) shows nothing about my audio setup until the last line: platform sound-i2s: deferred probe pending
I think that ‘deferred probe’ means that an initial probe failed. How can I tell what failed? What prevented it from succeeding? Would be nice if the driver told me what failed. But, there’s no error message, just an info msg that probe is pending.
Here's the device tree setup that I added (based on input from chatgpt):
/ {   // Compton audio output can be accomplished via a built-in driver -- simple-audio-card   sound_i2s: sound-i2s {     // specify the built-in simple sound card     compatible = "simple-audio-card";         // seems to be a descriptive name that shows in userland; i.e. via 'aplay -l'     simple-audio-card,name = "imx8mn-adauslave";         // might specify I2S (as opposed to descriptive text)     simple-audio-card,format = "i2s";         // defines CPU as master for bit-clock     simple-audio-card,bitclock-master = <&sound_i2s_cpu>;         // defines CPU as master for frame-clock     simple-audio-card,frame-master = <&sound_i2s_cpu>;
sound_i2s_cpu: simple-audio-card,cpu { Â Â Â Â Â Â sound-dai = <&sai3>; Â Â Â Â Â Â dai-tdm-slot-num = <2>; Â /* stereo */ Â Â Â Â Â Â dai-tdm-slot-width = <32>; /* bits per slot */ Â Â Â Â };
simple-audio-card,codec { Â Â Â Â Â Â sound-dai = <&dummy_codec>; Â Â Â Â }; Â Â };
// Compton audio output does not require a device-specific codec; the built-in, dummy driver is sufficient   dummy_codec: dummy-codec {     compatible = "linux,snd-soc-dummy";     #sound-dai-cells = <0>;   };
Here's the device tree config that comes with the NXP IMX8M build for nano:
pinctrl_sai3: sai3grp { fsl,pins = < MX8MN_IOMUXC_SAI3_TXFS_SAI3_TX_SYNC 0xd6 MX8MN_IOMUXC_SAI3_TXC_SAI3_TX_BCLK 0xd6 MX8MN_IOMUXC_SAI3_MCLK_SAI3_MCLK 0xd6 MX8MN_IOMUXC_SAI3_TXD_SAI3_TX_DATA0 0xd6 >; };
sai3: sai@30030000 { compatible = "fsl,imx8mn-sai", "fsl,imx8mq-sai"; reg = <0x30030000 0x10000>; #sound-dai-cells = <0>; interrupts = <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>; clocks = <&clk IMX8MN_CLK_SAI3_IPG>, <&clk IMX8MN_CLK_DUMMY>, <&clk IMX8MN_CLK_SAI3_ROOT>, <&clk IMX8MN_CLK_DUMMY>, <&clk IMX8MN_CLK_DUMMY>; clock-names = "bus", "mclk0", "mclk1", "mclk2", "mclk3"; dmas = <&sdma2 4 2 0>, <&sdma2 5 2 0>; dma-names = "rx", "tx"; status = "disabled"; }; &sai3 { #sound-dai-cells = <0>; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_sai3>; assigned-clocks = <&clk IMX8MN_CLK_SAI3>; assigned-clock-parents = <&clk IMX8MN_AUDIO_PLL1_OUT>; assigned-clock-rates = <24576000>; fsl,sai-mclk-direction-output; status = "okay"; };
In summary, how do I further debug this? In general, and if you know, how does one output an audio stream as I2S?
Steve Broshar Palmer Wireless Medtech
participants (1)
-
Steve Broshar