It's similar but handles the inactive state differently. For the gadget, rate goes to 0 when inactive. For the loopback the rate stays at the previous value, and active/inactive is given by a separate boolean control.There is a possibility of that control working like the ‘Capture Rate’ control of the USB gadget, but I have not done any tests on it.
Sorry, I didn't mean to come across as complaining! And of course, you're right in the intended use case the instructions are clear. I'm aware I'm trying to do something for which it's not intended as I mentioned in my first post, and merely meant my incompetence were not for lack of reading the instructions.It is impossible to provide detailed instructions for each device. Sorry. But actually camilladsp-setrate is intended for the usb gadget, for which I have provided an example.
Thanks again. I did as instructed and it yielded some progress.There is a possibility of that control working like the ‘Capture Rate’ control of the USB gadget, but I have not done any tests on it.
Don't forget to replace the control name in the file setrate.h (the first "#define" line) and rebuild the executable.
If I start setrate, and try to play it now sends the following error message:
Code:
xxx@xxx:~/camilladsp-setrate $ camilladsp-setrate --device hw:Loopback
send_set_config CONFIG_RECEIVED_OK Error in the preparation of the command SetConfig. ret=-1
The error message appears simultaneously, as the speakers make the "pop" noise and CamillaDSP stalls, as described earlier.
If the speakers are already turned on, it just remains without prompt.
Anyway, I don't want to become bothering. This was not the purpose it was developed for is understandable. We gave it a shot, and I thank for all the help in trying.
Sorry about the delay in responding, I just saw your post. I have not been in here much lately.How did you switch to USB Gadget mode and enable loopback? It seems a bit that my issue to get camilladsp-setrate to work properly is centered around these settings. Could you please do me the favour and send me a few screenshots of your camillaDSP devices settings? Especially also from the Capture Device and Playback Device drop down menus, to see which device you've selected. Attached you'll see what I mean, I've highlighted with the mouse curser the device from the drop down menu that plays audio in my setup currently. Thank you!
To implement USB Gadget mode and enable loopback, I followed step 8 in this tutorial: https://github.com/mdsimon2/RPi-CamillaDSP
Below is a screenshot of my "Devices" tab. I'm not sure what other settings you need.
Just a note - no need for async resampler when using the gadget as the feedback rate control is used. IIRC it's also reported by CDSP in the logs.
Terry, thank you so much! Pointing out the step 8 in the tutorial link, was exactly what I was missing to finally get this hw:UAC2Gadget,0,0 working as capture device! So I'm finally one step closer. Unfortunately camilladsp-setrate is still not working properly for me. Looks like I need to investigate further. So far I have used this code to enable USB gadget:Sorry about the delay in responding, I just saw your post. I have not been in here much lately.
To implement USB Gadget mode and enable loopback, I followed step 8 in this tutorial: https://github.com/mdsimon2/RPi-CamillaDSP
Below is a screenshot of my "Devices" tab. I'm not sure what other settings you need.
Code:
echo 'dtoverlay=dwc2' | sudo tee -a /boot/firmware/config.txt > /dev/null
echo -e 'dwc2\ng_audio' | sudo tee -a /etc/modules > /dev/null
echo 'options g_audio c_srate=48000 c_ssize=4 c_chmask=3 p_chmask=0' | sudo tee -a /etc/modprobe.d/usb_g_audio.conf > /dev/null
Also @phofman:
Is my understanding correct, that I need to include the other sample frequencies as well, when enabling or setting up the USB gadget?
One time I tried:
Code:
echo 'dtoverlay=dwc2' | sudo tee -a /boot/firmware/config.txt > /dev/null
echo -e 'dwc2\ng_audio' | sudo tee -a /etc/modules > /dev/null
echo 'options g_audio c_srate=44100,48000,88200,96000 c_ssize=4 c_chmask=3 p_chmask=0' | sudo tee -a /etc/modprobe.d/usb_g_audio.conf > /dev/null
As a result, I had a bit of a strange behaviour...the sample rate switched sometimes, but to 22000 Hz for example. Then, I reverted back to the above code with 48000 Hz - this works static for now. Somehow managing to get camilladsp-setrate to work, would still be very desirable for me.
Any Idea, how to carry on from here?
Attachments
Hi @mevang, I just tried your command from above. Here is the result:The output of that command shows that the camilladsp-setrate service exits with error.
Try removing the 'ExercStartPre' line from the unit file (.service file).
Please also post your camilladsp-setrate.service file.
Finally, please use the '--syslog' command flag, set logging level to '--loglevel=notice' and then check the logfile produced by camilladsp-setrate:
sudo journalctl | grep camilladsp-setrate
Code:
airharder@raspberrypi:~ $ sudo journalctl | grep camilladsp-setrate
Oct 19 13:17:04 raspberrypi (udev-worker)[342]: usb5: Process '/usr/bin/pkill -f -SIGHUP camilladsp-setrate' terminated by signal HUP.
Oct 19 13:17:04 raspberrypi (udev-worker)[342]: usb5: Failed to wait for spawned command '/usr/bin/pkill -f -SIGHUP camilladsp-setrate': Input/output error
Oct 19 13:17:04 raspberrypi (udev-worker)[342]: usb5: Failed to execute '/usr/bin/pkill -f -SIGHUP camilladsp-setrate', ignoring: Input/output error
Oct 19 13:17:04 raspberrypi (udev-worker)[337]: usb1: Process '/usr/bin/pkill -f -SIGHUP camilladsp-setrate' terminated by signal HUP.
Oct 19 13:17:04 raspberrypi (udev-worker)[337]: usb1: Failed to wait for spawned command '/usr/bin/pkill -f -SIGHUP camilladsp-setrate': Input/output error
Oct 19 13:17:04 raspberrypi (udev-worker)[337]: usb1: Failed to execute '/usr/bin/pkill -f -SIGHUP camilladsp-setrate', ignoring: Input/output error
Oct 19 15:17:05 raspberrypi (udev-worker)[540]: usb3: Process '/usr/bin/pkill -f -SIGHUP camilladsp-setrate' terminated by signal HUP.
Oct 19 15:17:05 raspberrypi (udev-worker)[540]: usb3: Failed to wait for spawned command '/usr/bin/pkill -f -SIGHUP camilladsp-setrate': Input/output error
Oct 19 15:17:05 raspberrypi (udev-worker)[540]: usb3: Failed to execute '/usr/bin/pkill -f -SIGHUP camilladsp-setrate', ignoring: Input/output error
Oct 19 15:17:05 raspberrypi (udev-worker)[544]: usb5: Process '/usr/bin/pkill -f -SIGHUP camilladsp-setrate' terminated by signal HUP.
Oct 19 15:17:05 raspberrypi (udev-worker)[544]: usb5: Failed to wait for spawned command '/usr/bin/pkill -f -SIGHUP camilladsp-setrate': Input/output error
Oct 19 15:17:05 raspberrypi (udev-worker)[544]: usb5: Failed to execute '/usr/bin/pkill -f -SIGHUP camilladsp-setrate', ignoring: Input/output error
Oct 20 14:17:05 raspberrypi (udev-worker)[557]: usb1: Process '/usr/bin/pkill -f -SIGHUP camilladsp-setrate' terminated by signal HUP.
Oct 20 14:17:05 raspberrypi (udev-worker)[554]: usb3: Process '/usr/bin/pkill -f -SIGHUP camilladsp-setrate' terminated by signal HUP.
Oct 20 14:17:05 raspberrypi (udev-worker)[557]: usb1: Failed to wait for spawned command '/usr/bin/pkill -f -SIGHUP camilladsp-setrate': Input/output error
Oct 20 14:17:05 raspberrypi (udev-worker)[554]: usb3: Failed to wait for spawned command '/usr/bin/pkill -f -SIGHUP camilladsp-setrate': Input/output error
Oct 20 14:17:05 raspberrypi (udev-worker)[557]: usb1: Failed to execute '/usr/bin/pkill -f -SIGHUP camilladsp-setrate', ignoring: Input/output error
Oct 20 14:17:05 raspberrypi (udev-worker)[554]: usb3: Failed to execute '/usr/bin/pkill -f -SIGHUP camilladsp-setrate', ignoring: Input/output error
Oct 20 14:17:05 raspberrypi (udev-worker)[539]: usb5: Process '/usr/bin/pkill -f -SIGHUP camilladsp-setrate' terminated by signal HUP.
Oct 20 14:17:05 raspberrypi (udev-worker)[539]: usb5: Failed to wait for spawned command '/usr/bin/pkill -f -SIGHUP camilladsp-setrate': Input/output error
Oct 20 14:17:05 raspberrypi (udev-worker)[539]: usb5: Failed to execute '/usr/bin/pkill -f -SIGHUP camilladsp-setrate', ignoring: Input/output error
Oct 20 19:17:04 raspberrypi (udev-worker)[359]: usb1: Process '/usr/bin/pkill -f -SIGHUP camilladsp-setrate' terminated by signal HUP.
Oct 20 19:17:04 raspberrypi (udev-worker)[355]: usb5: Process '/usr/bin/pkill -f -SIGHUP camilladsp-setrate' terminated by signal HUP.
Oct 20 19:17:04 raspberrypi (udev-worker)[355]: usb5: Failed to wait for spawned command '/usr/bin/pkill -f -SIGHUP camilladsp-setrate': Input/output error
Oct 20 19:17:04 raspberrypi (udev-worker)[359]: usb1: Failed to wait for spawned command '/usr/bin/pkill -f -SIGHUP camilladsp-setrate': Input/output error
Oct 20 19:17:04 raspberrypi (udev-worker)[355]: usb5: Failed to execute '/usr/bin/pkill -f -SIGHUP camilladsp-setrate', ignoring: Input/output error
Oct 20 19:17:04 raspberrypi (udev-worker)[359]: usb1: Failed to execute '/usr/bin/pkill -f -SIGHUP camilladsp-setrate', ignoring: Input/output error
Oct 20 23:17:04 raspberrypi (udev-worker)[547]: usb3: Process '/usr/bin/pkill -f -SIGHUP camilladsp-setrate' terminated by signal HUP.
Oct 20 23:17:04 raspberrypi (udev-worker)[547]: usb3: Failed to wait for spawned command '/usr/bin/pkill -f -SIGHUP camilladsp-setrate': Input/output error
Oct 20 23:17:04 raspberrypi (udev-worker)[547]: usb3: Failed to execute '/usr/bin/pkill -f -SIGHUP camilladsp-setrate', ignoring: Input/output error
Oct 20 23:17:04 raspberrypi (udev-worker)[561]: usb5: Process '/usr/bin/pkill -f -SIGHUP camilladsp-setrate' terminated by signal HUP.
Oct 20 23:17:04 raspberrypi (udev-worker)[561]: usb5: Failed to wait for spawned command '/usr/bin/pkill -f -SIGHUP camilladsp-setrate': Input/output error
Oct 20 23:17:04 raspberrypi (udev-worker)[561]: usb5: Failed to execute '/usr/bin/pkill -f -SIGHUP camilladsp-setrate', ignoring: Input/output error
Oct 21 21:17:03 raspberrypi (udev-worker)[356]: usb1: Process '/usr/bin/pkill -f -SIGHUP camilladsp-setrate' terminated by signal HUP.
Oct 21 21:17:03 raspberrypi (udev-worker)[360]: usb3: Process '/usr/bin/pkill -f -SIGHUP camilladsp-setrate' terminated by signal HUP.
Oct 21 21:17:03 raspberrypi (udev-worker)[360]: usb3: Failed to wait for spawned command '/usr/bin/pkill -f -SIGHUP camilladsp-setrate': Input/output error
Oct 21 21:17:03 raspberrypi (udev-worker)[356]: usb1: Failed to wait for spawned command '/usr/bin/pkill -f -SIGHUP camilladsp-setrate': Input/output error
Oct 21 21:17:03 raspberrypi (udev-worker)[360]: usb3: Failed to execute '/usr/bin/pkill -f -SIGHUP camilladsp-setrate', ignoring: Input/output error
Oct 21 21:17:03 raspberrypi (udev-worker)[356]: usb1: Failed to execute '/usr/bin/pkill -f -SIGHUP camilladsp-setrate', ignoring: Input/output error
Oct 22 00:17:05 raspberrypi (udev-worker)[554]: usb3: Process '/usr/bin/pkill -f -SIGHUP camilladsp-setrate' terminated by signal HUP.
Oct 22 00:17:05 raspberrypi (udev-worker)[554]: usb3: Failed to wait for spawned command '/usr/bin/pkill -f -SIGHUP camilladsp-setrate': Input/output error
Oct 22 00:17:05 raspberrypi (udev-worker)[554]: usb3: Failed to execute '/usr/bin/pkill -f -SIGHUP camilladsp-setrate', ignoring: Input/output error
Oct 22 00:17:05 raspberrypi (udev-worker)[557]: usb5: Process '/usr/bin/pkill -f -SIGHUP camilladsp-setrate' terminated by signal HUP.
Oct 22 00:17:05 raspberrypi (udev-worker)[557]: usb5: Failed to wait for spawned command '/usr/bin/pkill -f -SIGHUP camilladsp-setrate': Input/output error
Oct 22 00:17:05 raspberrypi (udev-worker)[557]: usb5: Failed to execute '/usr/bin/pkill -f -SIGHUP camilladsp-setrate', ignoring: Input/output error
Oct 22 00:17:03 raspberrypi (udev-worker)[339]: usb1: Process '/usr/bin/pkill -f -SIGHUP camilladsp-setrate' terminated by signal HUP.
Oct 22 00:17:03 raspberrypi (udev-worker)[337]: usb3: Process '/usr/bin/pkill -f -SIGHUP camilladsp-setrate' terminated by signal HUP.
Oct 22 00:17:03 raspberrypi (udev-worker)[339]: usb1: Failed to wait for spawned command '/usr/bin/pkill -f -SIGHUP camilladsp-setrate': Input/output error
Oct 22 00:17:03 raspberrypi (udev-worker)[337]: usb3: Failed to wait for spawned command '/usr/bin/pkill -f -SIGHUP camilladsp-setrate': Input/output error
Oct 22 00:17:03 raspberrypi (udev-worker)[339]: usb1: Failed to execute '/usr/bin/pkill -f -SIGHUP camilladsp-setrate', ignoring: Input/output error
Oct 22 00:17:03 raspberrypi (udev-worker)[337]: usb3: Failed to execute '/usr/bin/pkill -f -SIGHUP camilladsp-setrate', ignoring: Input/output error
Oct 22 00:17:05 raspberrypi (udev-worker)[615]: usb5: Process '/usr/bin/pkill -f -SIGHUP camilladsp-setrate' failed with exit code 1.
Oct 22 00:17:04 raspberrypi (udev-worker)[341]: usb1: Process '/usr/bin/pkill -f -SIGHUP camilladsp-setrate' terminated by signal HUP.
Oct 22 00:17:04 raspberrypi (udev-worker)[341]: usb1: Failed to wait for spawned command '/usr/bin/pkill -f -SIGHUP camilladsp-setrate': Input/output error
Oct 22 00:17:04 raspberrypi (udev-worker)[341]: usb1: Failed to execute '/usr/bin/pkill -f -SIGHUP camilladsp-setrate', ignoring: Input/output error
Oct 22 00:17:04 raspberrypi (udev-worker)[355]: usb3: Process '/usr/bin/pkill -f -SIGHUP camilladsp-setrate' terminated by signal HUP.
Oct 22 00:17:04 raspberrypi (udev-worker)[355]: usb3: Failed to wait for spawned command '/usr/bin/pkill -f -SIGHUP camilladsp-setrate': Input/output error
Oct 22 00:17:04 raspberrypi (udev-worker)[355]: usb3: Failed to execute '/usr/bin/pkill -f -SIGHUP camilladsp-setrate', ignoring: Input/output error
Oct 23 00:17:03 raspberrypi (udev-worker)[345]: usb3: Process '/usr/bin/pkill -f -SIGHUP camilladsp-setrate' terminated by signal HUP.
Oct 23 00:17:03 raspberrypi (udev-worker)[352]: usb1: Process '/usr/bin/pkill -f -SIGHUP camilladsp-setrate' terminated by signal HUP.
Oct 23 00:17:03 raspberrypi (udev-worker)[345]: usb3: Failed to wait for spawned command '/usr/bin/pkill -f -SIGHUP camilladsp-setrate': Input/output error
Oct 23 00:17:03 raspberrypi (udev-worker)[345]: usb3: Failed to execute '/usr/bin/pkill -f -SIGHUP camilladsp-setrate', ignoring: Input/output error
Oct 23 00:17:03 raspberrypi (udev-worker)[352]: usb1: Failed to wait for spawned command '/usr/bin/pkill -f -SIGHUP camilladsp-setrate': Input/output error
Oct 23 00:17:03 raspberrypi (udev-worker)[352]: usb1: Failed to execute '/usr/bin/pkill -f -SIGHUP camilladsp-setrate', ignoring: Input/output error
Oct 24 00:17:33 raspberrypi (udev-worker)[359]: usb5: Process '/usr/bin/pkill -f -SIGHUP camilladsp-setrate' terminated by signal HUP.
Oct 24 00:17:33 raspberrypi (udev-worker)[357]: usb3: Process '/usr/bin/pkill -f -SIGHUP camilladsp-setrate' terminated by signal HUP.
Oct 24 00:17:33 raspberrypi (udev-worker)[357]: usb3: Failed to wait for spawned command '/usr/bin/pkill -f -SIGHUP camilladsp-setrate': Input/output error
Oct 24 00:17:33 raspberrypi (udev-worker)[359]: usb5: Failed to wait for spawned command '/usr/bin/pkill -f -SIGHUP camilladsp-setrate': Input/output error
Oct 24 00:17:33 raspberrypi (udev-worker)[359]: usb5: Failed to execute '/usr/bin/pkill -f -SIGHUP camilladsp-setrate', ignoring: Input/output error
Oct 24 00:17:33 raspberrypi (udev-worker)[357]: usb3: Failed to execute '/usr/bin/pkill -f -SIGHUP camilladsp-setrate', ignoring: Input/output error
Oct 24 13:02:19 raspberrypi (udev-worker)[347]: usb3: Process '/usr/bin/pkill -f -SIGHUP camilladsp-setrate' terminated by signal HUP.
Oct 24 13:02:19 raspberrypi (udev-worker)[347]: usb3: Failed to wait for spawned command '/usr/bin/pkill -f -SIGHUP camilladsp-setrate': Input/output error
Oct 24 13:02:19 raspberrypi (udev-worker)[347]: usb3: Failed to execute '/usr/bin/pkill -f -SIGHUP camilladsp-setrate', ignoring: Input/output error
Oct 24 13:02:19 raspberrypi (udev-worker)[353]: usb5: Process '/usr/bin/pkill -f -SIGHUP camilladsp-setrate' terminated by signal HUP.
Oct 24 13:02:19 raspberrypi (udev-worker)[353]: usb5: Failed to wait for spawned command '/usr/bin/pkill -f -SIGHUP camilladsp-setrate': Input/output error
Oct 24 13:02:19 raspberrypi (udev-worker)[353]: usb5: Failed to execute '/usr/bin/pkill -f -SIGHUP camilladsp-setrate', ignoring: Input/output error
Oct 24 18:17:05 raspberrypi (udev-worker)[540]: usb5: Process '/usr/bin/pkill -f -SIGHUP camilladsp-setrate' terminated by signal HUP.
Oct 24 18:17:05 raspberrypi (udev-worker)[540]: usb5: Failed to wait for spawned command '/usr/bin/pkill -f -SIGHUP camilladsp-setrate': Input/output error
Oct 24 18:17:05 raspberrypi (udev-worker)[540]: usb5: Failed to execute '/usr/bin/pkill -f -SIGHUP camilladsp-setrate', ignoring: Input/output error
Oct 24 18:17:05 raspberrypi (udev-worker)[558]: usb3: Process '/usr/bin/pkill -f -SIGHUP camilladsp-setrate' terminated by signal HUP.
Oct 24 18:17:05 raspberrypi (udev-worker)[558]: usb3: Failed to wait for spawned command '/usr/bin/pkill -f -SIGHUP camilladsp-setrate': Input/output error
Oct 24 18:17:05 raspberrypi (udev-worker)[558]: usb3: Failed to execute '/usr/bin/pkill -f -SIGHUP camilladsp-setrate', ignoring: Input/output error
Oct 25 00:17:03 raspberrypi (udev-worker)[347]: usb1: Process '/usr/bin/pkill -f -SIGHUP camilladsp-setrate' terminated by signal HUP.
Oct 25 00:17:03 raspberrypi (udev-worker)[344]: usb5: Process '/usr/bin/pkill -f -SIGHUP camilladsp-setrate' terminated by signal HUP.
Oct 25 00:17:03 raspberrypi (udev-worker)[344]: usb5: Failed to wait for spawned command '/usr/bin/pkill -f -SIGHUP camilladsp-setrate': Input/output error
Oct 25 00:17:03 raspberrypi (udev-worker)[347]: usb1: Failed to wait for spawned command '/usr/bin/pkill -f -SIGHUP camilladsp-setrate': Input/output error
Oct 25 00:17:03 raspberrypi (udev-worker)[347]: usb1: Failed to execute '/usr/bin/pkill -f -SIGHUP camilladsp-setrate', ignoring: Input/output error
Oct 25 00:17:03 raspberrypi (udev-worker)[344]: usb5: Failed to execute '/usr/bin/pkill -f -SIGHUP camilladsp-setrate', ignoring: Input/output error
Oct 25 11:17:03 raspberrypi (udev-worker)[352]: usb1: Process '/usr/bin/pkill -f -SIGHUP camilladsp-setrate' terminated by signal HUP.
Oct 25 11:17:03 raspberrypi (udev-worker)[352]: usb1: Failed to wait for spawned command '/usr/bin/pkill -f -SIGHUP camilladsp-setrate': Input/output error
Oct 25 11:17:03 raspberrypi (udev-worker)[352]: usb1: Failed to execute '/usr/bin/pkill -f -SIGHUP camilladsp-setrate', ignoring: Input/output error
Oct 25 11:17:03 raspberrypi (udev-worker)[358]: usb5: Process '/usr/bin/pkill -f -SIGHUP camilladsp-setrate' terminated by signal HUP.
Oct 25 11:17:03 raspberrypi (udev-worker)[358]: usb5: Failed to wait for spawned command '/usr/bin/pkill -f -SIGHUP camilladsp-setrate': Input/output error
Oct 25 11:17:03 raspberrypi (udev-worker)[358]: usb5: Failed to execute '/usr/bin/pkill -f -SIGHUP camilladsp-setrate', ignoring: Input/output error
Oct 26 00:17:02 raspberrypi (udev-worker)[356]: usb1: Process '/usr/bin/pkill -f -SIGHUP camilladsp-setrate' terminated by signal HUP.
Oct 26 00:17:02 raspberrypi (udev-worker)[346]: usb3: Process '/usr/bin/pkill -f -SIGHUP camilladsp-setrate' terminated by signal HUP.
Oct 26 00:17:02 raspberrypi (udev-worker)[356]: usb1: Failed to wait for spawned command '/usr/bin/pkill -f -SIGHUP camilladsp-setrate': Input/output error
Oct 26 00:17:02 raspberrypi (udev-worker)[346]: usb3: Failed to wait for spawned command '/usr/bin/pkill -f -SIGHUP camilladsp-setrate': Input/output error
Oct 26 00:17:02 raspberrypi (udev-worker)[356]: usb1: Failed to execute '/usr/bin/pkill -f -SIGHUP camilladsp-setrate', ignoring: Input/output error
Oct 26 00:17:02 raspberrypi (udev-worker)[346]: usb3: Failed to execute '/usr/bin/pkill -f -SIGHUP camilladsp-setrate', ignoring: Input/output error
Oct 26 00:17:02 raspberrypi (udev-worker)[355]: usb5: Process '/usr/bin/pkill -f -SIGHUP camilladsp-setrate' terminated by signal HUP.
Oct 26 00:17:02 raspberrypi (udev-worker)[355]: usb5: Failed to wait for spawned command '/usr/bin/pkill -f -SIGHUP camilladsp-setrate': Input/output error
Oct 26 00:17:02 raspberrypi (udev-worker)[355]: usb5: Failed to execute '/usr/bin/pkill -f -SIGHUP camilladsp-setrate', ignoring: Input/output error
Oct 26 13:17:03 raspberrypi (udev-worker)[350]: usb3: Process '/usr/bin/pkill -f -SIGHUP camilladsp-setrate' terminated by signal HUP.
Oct 26 13:17:03 raspberrypi (udev-worker)[350]: usb3: Failed to wait for spawned command '/usr/bin/pkill -f -SIGHUP camilladsp-setrate': Input/output error
Oct 26 13:17:03 raspberrypi (udev-worker)[350]: usb3: Failed to execute '/usr/bin/pkill -f -SIGHUP camilladsp-setrate', ignoring: Input/output error
Oct 26 13:17:06 raspberrypi (udev-worker)[615]: usb5: Process '/usr/bin/pkill -f -SIGHUP camilladsp-setrate' failed with exit code 1.
Oct 26 16:17:04 raspberrypi (udev-worker)[551]: usb1: Process '/usr/bin/pkill -f -SIGHUP camilladsp-setrate' terminated by signal HUP.
Oct 26 16:17:04 raspberrypi (udev-worker)[551]: usb1: Failed to wait for spawned command '/usr/bin/pkill -f -SIGHUP camilladsp-setrate': Input/output error
Oct 26 16:17:04 raspberrypi (udev-worker)[551]: usb1: Failed to execute '/usr/bin/pkill -f -SIGHUP camilladsp-setrate', ignoring: Input/output error
Oct 26 16:17:04 raspberrypi (udev-worker)[556]: usb3: Process '/usr/bin/pkill -f -SIGHUP camilladsp-setrate' terminated by signal HUP.
Oct 26 16:17:04 raspberrypi (udev-worker)[556]: usb3: Failed to wait for spawned command '/usr/bin/pkill -f -SIGHUP camilladsp-setrate': Input/output error
Oct 26 16:17:04 raspberrypi (udev-worker)[556]: usb3: Failed to execute '/usr/bin/pkill -f -SIGHUP camilladsp-setrate', ignoring: Input/output error
Oct 27 01:17:03 raspberrypi (udev-worker)[347]: usb1: Process '/usr/bin/pkill -f -SIGHUP camilladsp-setrate' terminated by signal HUP.
Oct 27 01:17:03 raspberrypi (udev-worker)[344]: usb3: Process '/usr/bin/pkill -f -SIGHUP camilladsp-setrate' terminated by signal HUP.
Oct 27 01:17:03 raspberrypi (udev-worker)[337]: usb5: Process '/usr/bin/pkill -f -SIGHUP camilladsp-setrate' terminated by signal HUP.
Oct 27 01:17:03 raspberrypi (udev-worker)[337]: usb5: Failed to wait for spawned command '/usr/bin/pkill -f -SIGHUP camilladsp-setrate': Input/output error
Any idea what's still stopping the camilladsp-setrate from working properly?
I made sure that hw:UAC2Gadget is the camilladsp-setrate device:@Airharder
I recommed you to do what @phofman suggested in post #174:
First check that camilladsp-setrate works as expected. To this end please open a terminal session and run camilladsp-setrate manually with the following command:
/usr/local/bin/camilladsp-setrate --loglevel=notice
The output of this command should indicate that the process initialization completed with success. After that the process will wait for a sample rate change.
Any changes in the sample rate and actions resulting therefrom should be notified in the output, as well as possible errors and warnings.
Once you got a fully working camilladsp-setrate process, come back to this thread and together we will fix possible issues with services.
IMPORTANT NOTE:
If you do not specify the capture device on the command line, it defaults to "hw:UAC2Gadget". If you do want to use the "plughw" device type, you must add the device specification on the command line as follows:
/usr/local/bin/camilladsp-setrate --loglevel=notice --device=plughw:UAC2Gadget
Please see the logs below. It works only with 48000 Hz, which is what I've specified in the USB Gadget. Specifying multiple sample frequencies in the USB Gadget didn't work for me so far - guess this is where the issue is now.
Code:
airharder@raspberrypi:~ $ /usr/local/bin/camilladsp-setrate --loglevel=notice --device=hw:UAC2Gadget
main INIT ================================================
main INIT camilladsp-setrate v2.2.1
main INIT An automatic sample rate switcher for CamillaDSP
main INIT ================================================
fsm_init INIT Finite-state machine initialised
LWS: 4.1.6-, loglevel 1031
NET CLI SRV H1 H2 WS IPV6-on
websocket_init START Websocket environment initialised
alsa_init START Alsa initialised for the device hw:UAC2Gadget
websocket_callback START Connected to websocket server at localhost:1234
fsm_transit START Event : CONNECT
fsm_transit START Action : NULL
fsm_transit START Next State: WAIT_RATE_CHANGE
alsa_callback WAIT_RATE_CHANGE BEGIN : Incoming Sample Rate = 48000 Hz
fsm_transit WAIT_RATE_CHANGE Event : RATE_CHANGE
fsm_transit WAIT_RATE_CHANGE Action : callback_on_writeable
fsm_transit WAIT_RATE_CHANGE Next State: RATE_CHANGED
fsm_transit RATE_CHANGED Event : WRITEABLE
fsm_transit RATE_CHANGED Action : send_get_config
fsm_transit RATE_CHANGED Next State: WAIT_CONFIG
fsm_transit WAIT_CONFIG Event : CONFIG_OK
fsm_transit WAIT_CONFIG Action : callback_on_writeable
fsm_transit WAIT_CONFIG Next State: CONFIG_RECEIVED_OK
fsm_transit CONFIG_RECEIVED_OK Event : WRITEABLE
fsm_transit CONFIG_RECEIVED_OK Action : send_set_config
fsm_transit CONFIG_RECEIVED_OK Next State: WAIT_RESPONSE
fsm_transit WAIT_RESPONSE Event : RESPONSE_KO
fsm_transit WAIT_RESPONSE Action : notify_failure
fsm_transit WAIT_RESPONSE Next State: WAIT_RATE_CHANGE
notify_failure WAIT_RESPONSE END : Configuration update abort
Please help. With trying to get camilladsp-setrate to work, I've managed to completely kill the USB Gadget - my Wiim Ultra DAC, does not recognise the Raspberry as a Linux DAC anymore!Exactly how far have you come?
1) Check that the camilladsp-setrate service is active:
sudo systemctl status camilladsp-setrate
2) Check that the USB Gadget is up and running as a capture device:
arecord -l
3) Check that your DAC is available as a valid playback device:
aplay -l
4) Check that the camilladsp configuration file specifies the USB Gadget as capture device and your DAC as playback device.
I use this small splitter board:
https://it.aliexpress.com/item/1005...t_main.25.32d236967iCMsr&gatewayAdapt=glo2ita
What I did is the following:
Code:
echo 'dtoverlay=dwc2' | sudo tee -a /boot/firmware/config.txt > /dev/null
echo -e 'dwc2\ng_audio' | sudo tee -a /etc/modules > /dev/null
echo 'options g_audio c_srate=44100, 48000 c_ssize=4 c_chmask=3 p_chmask=0' | sudo tee -a /etc/modprobe.d/usb_g_audio.conf > /dev/null
The issue seems to have started here: c_srate=44100, 48000
I've tried several combinations, with more than one sample rate and none worked. Since using the comma as a separator without a blank space between the sample rates didn't work, I tried with a blank space. After rebooting, I lost the ability that the Wiim Ultra would recognise the Raspi as a Linux DAC.
Tried a few times the code below with just 48000, which used to work before, but now it won't.
Code:
echo 'dtoverlay=dwc2' | sudo tee -a /boot/firmware/config.txt > /dev/null
echo -e 'dwc2\ng_audio' | sudo tee -a /etc/modules > /dev/null
echo 'options g_audio c_srate=48000 c_ssize=4 c_chmask=3 p_chmask=0' | sudo tee -a /etc/modprobe.d/usb_g_audio.conf > /dev/null
Damn...now I really got me into something stupid.
Here are some diagnose commands I tried:
Code:
airharder@raspberrypi:~ $ arecord -l
**** List of CAPTURE Hardware Devices ****
card 2: Loopback [Loopback], device 0: Loopback PCM [Loopback PCM]
Subdevices: 8/8
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Subdevice #2: subdevice #2
Subdevice #3: subdevice #3
Subdevice #4: subdevice #4
Subdevice #5: subdevice #5
Subdevice #6: subdevice #6
Subdevice #7: subdevice #7
card 2: Loopback [Loopback], device 1: Loopback PCM [Loopback PCM]
Subdevices: 8/8
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Subdevice #2: subdevice #2
Subdevice #3: subdevice #3
Subdevice #4: subdevice #4
Subdevice #5: subdevice #5
Subdevice #6: subdevice #6
Subdevice #7: subdevice #7
No more hw:UAC2Gadget visible, which was there before and working.
And then this:
Code:
airharder@raspberrypi:~ $ /usr/local/bin/camilladsp-setrate --loglevel=notice
main INIT ================================================
main INIT camilladsp-setrate v2.2.1
main INIT An automatic sample rate switcher for CamillaDSP
main INIT ================================================
fsm_init INIT Finite-state machine initialised
LWS: 4.1.6-, loglevel 1031
NET CLI SRV H1 H2 WS IPV6-on
websocket_init START Websocket environment initialised
ALSA lib confmisc.c:165:(snd_config_get_card) Cannot get card index for UAC2Gadget
alsa_init START Fatal error: Cannot open alsa controls for the device hw:UAC2Gadget: No such device
If anyone could please help me out, I'd very much appreciate.
There is no point in using camilladsp-setrate if the capture device only supports the 48000 Hz sampling rate. Please solve the problem with the USB Gadget first before attempting to make camilladsp-setrate work properly.It works only with 48000 Hz
Those log lines indicate that the camilladsp-setrate process was terminated by a SIGHUP signal. This signal is triggered due to the udev rule defined by the file /etc/udev/rules.d/85-DAC.rules. And this happens before camilladsp-setrate reassigns the SIGHUP handler.airharder@raspberrypi:~ $ sudo journalctl | grep camilladsp-setrate Oct 19 13:17:04 raspberrypi (udev-worker)[342]: usb5: Process '/usr/bin/pkill -f -SIGHUP camilladsp-setrate' terminated by signal HUP. Oct 19 13:17:04 raspberrypi (udev-worker)[342]: usb5: Failed to wait for spawned command '/usr/bin/pkill -f -SIGHUP camilladsp-setrate': Input/output error
I recommend, for the moment, to remove the file /etc/udev/rules.d/85-DAC.rules and investigate this problem only after all other issues have been resolved.
These log lines indicate that camilladsp replied with an error message to the configuration update command sent by camilladsp-setrate. The camilladsp log might provide useful information in this regard. Please also ensure that you set the log level for camilladsp-setrate to ‘notice’. Furthermore, to get more information from the camilladsp-setrate log, please add the following line to the setrate.h file and rebuild the executable:fsm_transit CONFIG_RECEIVED_OK Action : send_set_config fsm_transit CONFIG_RECEIVED_OK Next State: WAIT_RESPONSE fsm_transit WAIT_RESPONSE Event : RESPONSE_KO
#define DEBUG 1
I would also need to have a look at your camilladsp configuration file.
Thank you Henrik! Can you maybe be a bit more specific, about which config file to check and where it's located? I guess this one is the most relevant one: /boot/firmware/config.txtI would suggest opening the config files in some editor instead of editing using echo. There is probably something wrong in at least one of them, and I would bet the problem is obvious once you look at the content.
How can I get to this folder and file, I don't see it in the root directory. I see only this:
Code:
airharder@raspberrypi:~ $ dir
Bookshelf camilladsp-setrate Documents Music Public Videos
camilladsp Desktop Downloads Pictures Templates
@mevang thanks for your reply! Unfortunately, currently I've thrown my system backwards...Please look at my post #229, my Wiim Ultra is currently not recognising my Raspberry as a Linux USB DAC anymore. Seems like the USB Gadget is "broken" and I can't get it back up anymore with this command:
Code:
echo 'dtoverlay=dwc2' | sudo tee -a /boot/firmware/config.txt > /dev/null<br>echo -e 'dwc2\ng_audio' | sudo tee -a /etc/modules > /dev/null<br>echo 'options g_audio c_srate=48000 c_ssize=4 c_chmask=3 p_chmask=0' | sudo tee -a /etc/modprobe.d/usb_g_audio.conf > /dev/null
Thanks Henrik! As I'm new to Linux I haven't figured out how to get to these:
/boot/firmware/config.txt
/etc/modules
/etc/modprobe.d/usb_g_audio.conf
I only see this:
With cd /root permission is denied. What am I doing wrong here - how can I access the above files?
/boot/firmware/config.txt
/etc/modules
/etc/modprobe.d/usb_g_audio.conf
I only see this:
Code:
airharder@raspberrypi:~ $ dir
Bookshelf camilladsp-setrate Documents Music Public Videos
camilladsp Desktop Downloads Pictures Templates
airharder@raspberrypi:~ $ cd /root
-bash: cd: /root: Permission denied
With cd /root permission is denied. What am I doing wrong here - how can I access the above files?
Start by looking at the files with the "less" command, for example:
Other useful commands are "ls" (instead of "dir") for listing files. Add "-l" to get more details, "ls -l". And "pwd" tells you the current path.
And use "nano" to edit. You will need superuser access to edit theses system files so you will need to do "sudo nano":less boot/firmware/config.txt
sudo nano boot/firmware/config.txt
Other useful commands are "ls" (instead of "dir") for listing files. Add "-l" to get more details, "ls -l". And "pwd" tells you the current path.
Thank you Henrik! I've tried these commands, looks like the boot/firmware/config.txt is completely missing (see screenshots).
How can I recreate this?
The ls -l command gave me this:
Also less etc/modules doesn't look good
Same for less etc/modprobe.d/usb_g_audio.conf - seems they're all gone
Really don't understand how and what happened.
Is there any chance to recreate all of these?
How can I recreate this?
The ls -l command gave me this:
Code:
airharder@raspberrypi:~ $ ls -l
total 44
drwxr-xr-x 2 airharder airharder 4096 Mar 15 2024 Bookshelf
drwxr-xr-x 5 airharder airharder 4096 Nov 14 21:13 camilladsp
drwxr-xr-x 5 airharder airharder 4096 Oct 18 20:11 camilladsp-setrate
drwxr-xr-x 2 airharder airharder 4096 Mar 15 2024 Desktop
drwxr-xr-x 2 airharder airharder 4096 Mar 15 2024 Documents
drwxr-xr-x 2 airharder airharder 4096 Mar 15 2024 Downloads
drwxr-xr-x 2 airharder airharder 4096 Mar 15 2024 Music
drwxr-xr-x 2 airharder airharder 4096 Mar 15 2024 Pictures
drwxr-xr-x 2 airharder airharder 4096 Mar 15 2024 Public
drwxr-xr-x 2 airharder airharder 4096 Mar 15 2024 Templates
drwxr-xr-x 2 airharder airharder 4096 Mar 15 2024 Videos
Code:
airharder@raspberrypi:~ $ less etc/modules
etc/modules: No such file or directory
Code:
airharder@raspberrypi:~ $ less etc/modprobe.d/usb_g_audio.conf
etc/modprobe.d/usb_g_audio.conf: No such file or directory
Really don't understand how and what happened.
Is there any chance to recreate all of these?
Attachments
Oh sorry the leading slash disappeared, try for example
less /boot/firmware/config.txt
@Airharder
Please find attached a guide to setup the USB gadget using a different method.
Use this guide only if you do not succeed with the method you are currently using.
Before proceeding, restore your initial system configuration.
Please find attached a guide to setup the USB gadget using a different method.
Use this guide only if you do not succeed with the method you are currently using.
Before proceeding, restore your initial system configuration.
Attachments
- Home
- Source & Line
- PC Based
- Sample rate switcher for CamillaDSP