Currently, I am using I2S to control ADI chip. This chip requires two pins, BCLK and FSYNC, to input a continuous signal.
By configuring /sys/devices/platform/bus@0/bus@0:aconnect@9000000/9630000.ahub/9290000.i2s/power/control, a signal can be output after the system starts.
Is there any way to make this configuration take effect in the device tree or the driver? Because I need the BCLK+FSYNC continuous signal to take effect before the chip driver is loaded.
Do you mean BCLK+FSYNC should be present before the actual kernel boot happens(before I2S driver load)?. Note: unless we program the I2S configs and enable the I2S controller BCLK+FSYNC won’t be available. The only possible way to do this is through I2S driver for now after loading the driver.
Current driver doesn’t support enabling the I2S by default, it would be enabled only during active usecase. If you need BCLK+FSYNC during driver load, we could try something if this satisfy your requirement. Let us know your thoughts.
Just start the I2S continuous signal before loading the ADI chip driver.
This is my current timing diagram. I want the I2S continuous signal to occur before writing to the I2C register.
Got it, Is it acceptable to enable clocks after kernel boot, may be post init process as this is the time I2S driver gets loaded?. If so, we can provide a reference patch to enable I2S clock during loading.
How is the progress of the patch package?
A new issue occurred. After I conducted the recording test, the FSYNC signal disappeared, and the dmesg command reported an error:
▒▒[ 53.595224] tegra210-i2s 9290000.i2s: timeout: previous I2S capture is still active
[ 53.595304] tegra210-i2s 9290000.i2s: ASoC: PRE_PMU: I2S2 TX event failed: -110
Could you run the below commands and attach the log files to analyse. Make sure target is not opening the pcm device either from GUI usually happens when sound setting is opened.
run “cat /sys/kernel/debug/regmap/.i2s/registers > ~/reg_dump.txt” replace addr with 9290000 before running the arecord to check if I2S is enabled or not
However, if I remove this line, after executing ‘echo on > /sys/devices/platform/bus@0/bus@0:aconnect@9000000/9630000.ahub/9290000.i2s/power/control’, FSYNC does not output anything; only BCLK continues to output.
Please find the reference patch for supporting always on I2S functionality, you can refer the patch and make change according to your needs on formats or i2s instances. This should enable the I2S FS, BCLK during i2s driver probe.