• WANTED: Happy members who like to discuss audio and other topics related to our interest. Desire to learn and share knowledge of science required as is 20 years of participation in forums (not all true). There are daily reviews of audio hardware and expert members to help answer your questions. Click here to have your audio equipment measured for free!

Using a Raspberry Pi as equaliser in between an USB source (iPad) and USB DAC

Red@

Active Member
Joined
Mar 20, 2021
Messages
140
Likes
77
I provide below the starter for the gaudio_ctl daemon required to launch the script mentioned in my previous post (file set_samplerate.service under /usr/lib/systemd/system):
Code:
[Unit]
Description=Sample Rate Changer Daemon
After=multi-user.target

[Service]
ExecStart=gaudio_ctl --gadget-name "UAC2Gadget" --ccmd  "/usr/bin/python3 /home/pi/set_samplerate.py {R}"
Restart=always
RestartSec=1
StandardOutput=journal
StandardError=journal
SyslogIdentifier=set_samplerate
CPUSchedulingPolicy=fifo
CPUSchedulingPriority=10
User=pi
Group=pi

[Install]
WantedBy=usb-gadget.target multi-user.target

Note the "WantedBy" option in the [Install] section ensuring that the sample rate change daemon is started when the usb-gadget.target is reached, indicating the aviailability of a usb gadget device (this was suggested by @phofman elsewhere).
Hello @stemag,
I am not a dev per say, and would like to use this solution. since the infomation is quite scattered between posts, I am a little at lost.
Would it be possible for you to describe the steps including you're latest additions ?
It would he very much appreciate, thank you very much in advance
 

stemag

Member
Joined
Nov 1, 2022
Messages
32
Likes
23
Hello @stemag,
I am not a dev per say, and would like to use this solution. since the infomation is quite scattered between posts, I am a little at lost.
Would it be possible for you to describe the steps including you're latest additions ?
It would he very much appreciate, thank you very much in advance
I had the same difficulty in putting all the information together. Now everything is working as expected.
I will try to write a small guide. Please allow me a few days.
 

stemag

Member
Joined
Nov 1, 2022
Messages
32
Likes
23
Please find attached a small guide to set up a DSP box based on Raspberry Pi 4 hardware and CamillaDSP software.
I am not a native English speaker, so I apologise for any imperfect use of the English language.
Please inform me of any errors or omissions.
 

Attachments

  • HowToSetupCamillaDSPBox.pdf
    95.8 KB · Views: 119

melomane13

Member
Joined
Jul 24, 2023
Messages
16
Likes
12
Location
France
is this adapter ok for gadget?

Convertisseur-de-Type-C-OTG-adaptateur-de-c-ble-de-Charge-rapide-USB-C-USB-3.jpg_.webp


 

phofman

Senior Member
Joined
Apr 13, 2021
Messages
381
Likes
245
That USB3 (i.e. data) connector is female (i.e. host side). You need a device side connector, to be plugged into a host.
 

melomane13

Member
Joined
Jul 24, 2023
Messages
16
Likes
12
Location
France
That USB3 (i.e. data) connector is female (i.e. host side). You need a device side connector, to be plugged into a host.

Do you want to go deeper? I'm not sure I understand
 

phofman

Senior Member
Joined
Apr 13, 2021
Messages
381
Likes
245
IIUC you are looking for a splitter to power your RPi while using the USB-C as a gadget (that's the subject of this topic). If so, the splitter would have to present the device side of the USB connection.
 

Music1969

Major Contributor
Joined
Feb 19, 2018
Messages
4,432
Likes
2,659
Hi @phofman , so do you have automatic sample rate switching working with your Pi4?

So if Apple Music Hi-Res changes sample rates, you can feed it bitperfectly into Pi4, without any manual changing of sample rate?

What are the key code lines required for this to work ?

Or is it now part of some mainline kernel for RPi4?
 

phofman

Senior Member
Joined
Apr 13, 2021
Messages
381
Likes
245
Thanks! Looking at the thread, seems only the OP was able to get it to work, and nobody else.
IIUC there was only one follower who really tried and did not know how to compile C code in linux. Another guy did not use the USB gaget device.

I have not tested the project but it looks nice and the author is clearly very competent.
 
Top Bottom