![]() |
USB Audio Gadget (Raspberry as USB DSP/DAC) - Printable Version +- Moode Forum (https://moodeaudio.org/forum) +-- Forum: moOde audio player (https://moodeaudio.org/forum/forumdisplay.php?fid=3) +--- Forum: Feature requests (https://moodeaudio.org/forum/forumdisplay.php?fid=8) +--- Thread: USB Audio Gadget (Raspberry as USB DSP/DAC) (/showthread.php?tid=5672) |
USB Audio Gadget (Raspberry as USB DSP/DAC) - challenge - 07-02-2023 Hello, I know it's possible to use the raspberry pi 4 as USB audio input. This is usually referred as USB Audio Gadget mode (dtoverlay=dwc2). This allows the raspberry to be seen as a soundcard via usb connector, aka you get audio input via the usb socket without adding another HAT. It was a cumbersome procedure years ago as it was not supported in kernel and there wasn't camilladsp around at the time... but then it got full support in 5.18 kernel and we also have camilladsp in moode. It seems it works both over ethernet and USB. (I'd prefer leaving the ethernet untouched and just use the usb...) rpi4 and rpi0 have the usb host capability, older raspberries not? A few lines and it will show up as new alsa capture device, then one could enable within the moode or camilladsp gui. Has anyone here tried it with moode? I plan to do some tests soon. Could it be included into moode somehow? thank you. instructions on how to enable it on rpi4 (ignore the hw requirements and kernel mods sections): https://www.audiosciencereview.com/forum/index.php?threads/using-a-raspberry-pi-as-equaliser-in-between-an-usb-source-ipad-and-usb-dac.25414/post-1180356 the main discussion (long) on diyaudio: https://www.diyaudio.com/community/threads/linux-usb-audio-gadget-rpi4-otg.342070/ the older discussion (too old): https://www.diyaudio.com/community/threads/using-a-raspberry-pi-4-as-a-usb-dsp-dac.341590/ Quote:quote from CharlieLaub RE: USB Audio Gadget (Raspberry as USB DSP/DAC) - Tim Curtis - 07-02-2023 I'm not exactly sure what OTG mode requires as far configurations and UI but eventually it will be integrated into moOde. The challenge is that the work effort is not trivial and would need the expertise of @bitlab to help define the requirements and test cases. RE: USB Audio Gadget (Raspberry as USB DSP/DAC) - Nutul - 07-02-2023 I still don't understand what this might be useful for... RE: USB Audio Gadget (Raspberry as USB DSP/DAC) - bitlab - 07-02-2023 @Nutul You can use your Pi as USB device for your computer/tablet/other streamer or whatever device that support USB UAC audio devices. In combination with CamillaDSP that is very a very flexible DSP solution. Reason for enough people to use usb device 'input device > camilladsp > output' as a standalone solution. @challenge I have a very restricted version setup of the usb gadget working. My personal use case is running REW from laptop directly on Pi based I2S dac. For music streaming I use the moode core functionality :-) For configuration of the usb gadget I use [url= https://github.com/linux-usb-gadgets/gt]gt[/url] in combination with libusbg: Code: # personal build from libusgbx and gt as pacakge: An example scheme for an UAC USB gadget configuration: Code: attrs : Found using the usb gadget as an MPD input to slow and has a few other quirks. But in case of the usb gadget is more desirable, when usb gadget activity is detected, to start the camilladsp systemd service instead. Required, over-simplified, steps: * setup usb gadget mode support * gt/libusbg multiple sample rate support for generating gadget configs * detect gadget use * when active use it to change the default camilladsp config start the camilladsp service * and when stop reverse it again * and some gui support for it to RE: USB Audio Gadget (Raspberry as USB DSP/DAC) - TheOldPresbyope - 07-02-2023 This capability would definitely lift moOde into the prosumer category. I easily could have used it in the audio reinforcement system for the high school theater I was supporting technically during my grandkids’ years there. Wish I were 60 years younger. Back when I was getting started, stereo was still in its infancy, audio gear was all vacuum tubes, noisy pots, and patch cords, and audio filters were black magic. What we have at our fingertips now is truly amazing (and amazingly cheap). And I still hope to grok the innards of ALSA before I die! Regards, Kent RE: USB Audio Gadget (Raspberry as USB DSP/DAC) - challenge - 07-05-2023 @bitlab thank you for the guide. Yeah you got it, would be really nice to be able to use REW to correct your room/position calibration by just hooking usb cable and load a REW generated EQ'd camilladsp curve. :-) I think many could use it, even on desk to fix their frequency response. Even on cheap speakers is quite an upgrade... Well, I play with diy speakers and multi-channel active Xover too (I saw your website ![]() @TheOldPresbyope true. I am much younger than you and hear that everyday from older folks. There's a lot of knowledge these days available for free and there are no excuses/low barriers to thinker/learn how stuff works these day. @Tim Curtis as I said, not urgent, but was just to write it here otherwise I would've forgotten about it. Just posted to see if there is any need for this. Aside us RoomEqWizard nerds, using moode/Camilla (with a DAC) as a usb DAC/soundcard pretty much it kinda gives it new meaning. I read there are issues to an automatic sampling rates switching, but don't think it's really a deal breaker. Can't code enough for this kind of stuff, but will be available to test if needed. |