Thanks for your responses. I'm slowly getting there but still having a few issues.
1. Can you share your configuration file? I imagine you do not have 4 channels specified under "playback" in your CamillaDSP configuration. Or you are not using the correct S32LE format.
No it
does work when playing to CamillaDSP, but not in
any other ALSA applications! That's why I wonder if it's a channel number issue. Do you know if there is a way to configure the channels for the M4 in /etc/asound.conf as default?
My current working CamillaDSP playback config is attached. I'm still mucking about with sample rates and chunk sizes etc:
2. I mention my rational for running at 96 kHz in the tutorial:
This post ->
https://www.audiosciencereview.com/forum/index.php?threads/minidsp-flex.28660/post-1037905, shows a comparison of high frequency warping for 48 kHz and 96 kHz sample rates. Not a huge difference but given the RPi4 has plenty of power to run at 96 kHz and avoid warping in the audible frequency range, why not? I haven't tested it extensively but all of the CamillaDSP resampling options seem very high quality and will be nowhere close to limiting from an audibility standpoint.
Interesting, thanks. I assume the other advantage of 96KHz over 48KHz would be the steepness of the PCM reconstruction filter in the DAC. I don't think the M4 has a way to set different filters there but Amir's
review shows the default filter is not quite perfect at 44.1KHz:
3. Yes, gadget mode using gaudio_ctl will automatically switch rates. There is a way to switch rates with a loopback as well ->
https://github.com/scripple/alsa_cdsp. I do not use either of these approaches because they make it difficult to modify / change configurations in the GUI. I do not believe there are any concrete plans to change rate changing behavior within CamillaDSP itself but I could be wrong.
What sort of problems do they create for changing the config in the GUI? Is it just the devices config page?
4. No, Henrik has indicated the resampler needs to restart if there are large changes in sample rate. See this post and subsequent discussion for more info ->
https://www.audiosciencereview.com/...s/rpi4-camilladsp-tutorial.29656/post-1195832.
5. I haven't seen anything noticeable, it doesn't affect 1 kHz or multitone test results at the DAC output. I could do some more testing to evaluate but everything I've seen so far indicates that it would be wasted effort to do so. You can read more about the technical aspects of asynchronous sample rate conversion here ->
https://www.diyaudio.com/community/threads/asynchronous-sample-rate-conversion.28814/
Thanks. In that case I agree with your comment there regarding CamillaDSP resampling
from multiple source sample rates
to a constant output sample rate.
9. I don't think it will be audibly any different. The reason I resample in squeezelite to 44.1 kHz is so that I can switch between shairport-sync (which always runs at 44.1 kHz) and squeezelite without changing configurations. If you only use squeezelite I would consider implementing rate switching in CamillaDSP or just resample in squeezelite.
I think rate switching is the better option here to avoid downsampling hi-res content then upsampling it again.
10. By capture device it means ALSA loopback, not the M4. You need rate adjust otherwise you will have buffer over / under runs. The only time rate adjust is not needed is if your capture and playback devices share the same clock.
In this case, the capture device clock being the Pi4 and the playback device clock being the M4?
11. I have not experienced any such issues on my M4 powered directly by my RPi4. Can you increase verbosity of your log (see tutorial) and share it for times of when these drop outs occur?
Yes it's an odd one and very annoying! I've tested with various config settings but none seem to have an affect on it. I am using the headphones output on the M4 to test it.
The output is fine when I connect the M4 to a Windows laptop and use WASAPI exclusive mode to play a track, but playing the same track using Squeezelite & CamillaDSP produces clicks and pops. I am unable to test it outside of CamillaDSP for the reasons above. See logfile and config attached.
Also, for some reason CamillaDSP seems to log in UTC format without respecting the local timezone.