At least at this moment, the issue is not the limited RPi performance, or lack of external precise clock source. The issue is that the driver ignores the sample_rate parameter.
I tried parameter = 44100, but I2S still outputting 48000.
So my main question is: how to change the frequency?
I'm initialising I2S using this:I can share all the code, if necessary.
I tried parameter = 44100, but I2S still outputting 48000.
So my main question is: how to change the frequency?
I'm initialising I2S using this:
Code:
#define SAMPLE_RATE 44100#define CHANNELS 2 // Allocate hardware parameters snd_pcm_hw_params_alloca(¶ms); snd_pcm_hw_params_any(handle, params); snd_pcm_hw_params_set_access(handle, params, SND_PCM_ACCESS_RW_INTERLEAVED); snd_pcm_hw_params_set_format(handle, params, SND_PCM_FORMAT_S32_LE); snd_pcm_hw_params_set_channels(handle, params, CHANNELS); unsigned int rate = SAMPLE_RATE; snd_pcm_hw_params_set_rate_near(handle, params, &rate, 0); snd_pcm_hw_params(handle, params);Statistics: Posted by everito — Wed Feb 05, 2025 10:11 am