Hi,
Using the iMX8MM-EVK I can play 48K based audio rates (96K, 192K etc) no problem using the built in WM8524 driver and on board codec but after much effort I still cannot play any 44100 based samples (88200, 176400 etc). By what I understand the dai_sysclk used in the function wm8523_set_dai_sysclk() gets it's clock value from the sai1{} in the device tree -> assigned-clock-rates = <24576000>; Once it has the clock it works out all the divisible rates.
Providng this dtb assigned-clock-rate is divisible by 48000 it works fine. If I try an assigned-clock-rate divisible by 44100 the driver fails and the dai_sysclk value in wm8523_set_dai_sysclk() turns into some wierd value.
How is it possible to get 44100 based rates working with this driver or through a SAI port in general? Then the second question would be how to achieve both 44K1 and 48K rates like in a normal audio card?
Thanks.
Hi b45499,
Thanks for your reply. That is what we have referred too (please check original post)! We have managed to get 44100 based rates out of the card using the clock configuration below using PLL2 as other forums suggested.
// 44Ki based rates
// assigned-clock-parents = <&clk IMX8MM_AUDIO_PLL2_OUT>;
// assigned-clock-rates = <22579200>;
48K based rates
assigned-clock-parents = <&clk IMX8MM_AUDIO_PLL1_OUT>;
assigned-clock-rates = <24576000>;
However, this product is going to a high-end audio streamer so both 48K and 44K1 rates up are required, how can I get both clocks into our driver? It looks like the iMX8 cannot do this.. This is the most important question to answer now.
Thanks.
Hi b45499,
We're using Yocto Honister 5.15.5. Examining the driver code my concern is the driver only excepts one parent clock from the device tree, then using that clock it checks the possible divisions for the audio rates (see wm8524_set_dai_sysclk()). Our product must render native rates without dmix, plughw or any other rate converters. When the PCM is feed 44100, 48000, 176400 or 192000 it must play these rates with no conversion. So, we are halfway there, we can play 44100, 88200, 176400 using PLL2 (SAI1) in the device tree or 44000, 96000, 192000 using PLL1 (SAI1) but never all the rates without changes..
Thanks.
Hi b45499,
Yes agree, but we need both audio rates so the codec will render everything; our customers are wanting to play any rate they desire.. Are there any modifications that can be done to the driver to take both PLL1 and PLL2 clocks? If this is not possible then we may have to reconsider the entire SPDIF side of the project.
Thanks.
Hi,