On Thu, 2021-07-08 at 08:44 +0900, Kuninori Morimoto wrote:
Hi Robert
I think you're probably right - I made a change to basically ignore a failure of snd_soc_of_get_dai_name in the platform case and the driver seems to probe OK. Possibly it should just skip the call entirely and not even try to populate the name for platform if it's never needed?
I have some other issues to work through to try and get a working setup, but once I get things working in my test setup I can put a patch together.
Great ! Nice to know.
Thank you for your help !!
So the next issue I'm now facing is that the MCLK to SCLK divider is not being set properly in either the Audio Formatter (MM2S Fs Multiplier register) or in the I2S Transmitter (I2S Timing Control register). The xlnx_i2s driver has a set_clkdiv function defined in its snd_soc_dai_ops structure, however that doesn't appear to be getting called. And the xlnx_formatter_pcm driver doesn't seem to have any code to set XLNX_AUD_FS_MULTIPLIER at all.
In this case I have a sample rate to MCLK divider of 256, so it looks like I should add mclk-fs = <256> into the dai-link nodes in the device tree, but there will need to be some code added to the xlnx_formatter_pcm to do something with that information? And then should that driver have code to trigger the call to set_clkdiv on the CPU DAI as well?
These drivers originated in the Xilinx kernel tree ( https://github.com/Xilinx/linux-xlnx/tree/master/sound/soc/xilinx) and in that tree they've got a top-level xlnx_pl_snd_card.c driver which is defining the MCLK divider and instantiating the other components, however that driver is not in mainline and seems like it is kind of a hack. It seems like this SCLK divider setting is the main thing that is still needed to getting the Xilinx audio cores working in mainline using simple-sound-card..