![]() Your target for the input clock frequency to the SAI peripheral looks okay. I'm not familiar with the iMX8, but I have used the iMX6. A nicely formatted version is here: The Common Clk Framework - The Linux Kernel documentation Depending on your kernel version it's at Documentation/clk.txt or Documentation/driver-api/clk.rst. You'll have to spend a lot of time with the clock chapters of the iMX8 reference manual and the clk framework documentation. Try to work backwards through the whole chain. The Linux clk driver framework tries to automatically derive the hardware PLL and divider settings, but it often does the wrong thing until you specify the right settings in the device tree. That's a quick way to make sure that the clock chain from the master oscillator down to the SAI peripheral is correct at run time. What's the output of this command? cat /sys/kernel/debug/clk/clk_summary T12:39:49.526003+00:00 localhost kernel: 001: fsl-sai 30010000.sai: ASoC: can't set 30010000.sai hw params: -110Ĭan you please tell me that how were the clock arrangements in you device tree when you made it work with simple audio card T12:39:49.516036+00:00 localhost kernel: 001: fsl-sai 30010000.sai: ratio 64 for freq 768000Hz based on clock 49152001Hz -> mclk2 -> AUDIO_PLL1 -> it is configured to run at a desirable rate, but fails when the driver tries to prepare and enable the clock. Following the code snippet of that function with my addition logging. (sound/soc/fsl/fsl_sai.c :: fsl_sai_set_bclk), the m_clck provided to the driver does not match the requirement of the sample rate of the audio being played. When the sai driver tries to set the bitclock for i2s. This configuration is not fails when I am trying to playback an audio wav file. On upstream, they provide the bus clock and only one master clock (mclk1). This is based on what is used on upstream (5.2.x) and NXP maintained 4.19.y for i.MX8mq branch. The device tree specifically the clocks for sai. Assign AUDIO_PLL1 to the desired frequency. ![]() Simple-audio-card,name = "pcm3060-audio" - we need a patched imx-smda.c unless we're using Linux 5.1 or newerĬlock-names = "bus", "mclk1", "mclk2", "mclk3" - our transfer sizes aren't big enough to justify DMA As per the IMX8MDQLQRM applications processors reference manual PDF Here is the snapshot of my dts for simple audio card I am working on getting simple_audio_card work for imx8mq and pcm3060 codec, I am on kernel version 5.05 and it appears both the the platform driver (fsl_sai) and the codec driver (pcm3060) support the ASOC design and the simple audio card. I have got a sound card through the simple-audio-card, but when I try to play back a WAV file using aplay, it fails in hw_params check inside fsl_sai driver. Using imx8mq and ti, pcm3060, specially from the clocks perspective. I want to know a working example of DTS for sai, codec and simple-audio-card in kernel 5.0.5
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |