Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
wiki:raspberrypi [2015/04/19 10:03] – [Running JACK] autostatic | wiki:raspberrypi [2020/03/15 17:50] (current) – [On-board audio] autostatic | ||
---|---|---|---|
Line 30: | Line 30: | ||
===== Disabling unneeded services ===== | ===== Disabling unneeded services ===== | ||
- | By default the RPi runs quite some services that are not really needed or even get in the way when setting up a real-time, low-latency environment. One way to disable such services from running and chewing up precious CPU cycles is to write a little script, an example can be found here: https:// | + | By default the RPi runs quite some services that are not really needed or even get in the way when setting up a real-time, low-latency environment. One way to disable such services from running and chewing up precious CPU cycles is to write a little script, an example can be found here: https:// |
Breaking down the script: | Breaking down the script: | ||
Line 97: | Line 97: | ||
===== On-board audio ===== | ===== On-board audio ===== | ||
- | The on-board chipset of the RPi has quite some limitations unfortunately. It only does playback and because of it' | + | The on-board chipset of the RPi has quite some limitations unfortunately. It only does playback and because of its PWM (Pulse Wide Modulation) based design it is not really suited for real-time, low-latency audio processing. It does work with JACK now that it has MMAP support but don't expect it to run without glitches at lower latencies. |
Other drawbacks of the analog audio output: | Other drawbacks of the analog audio output: | ||
Line 107: | Line 107: | ||
http:// | http:// | ||
+ | ===== GPIO (On-board) audio ===== | ||
+ | |||
+ | Various sound card hats and addons are available for high quality audio. These sound cards use the GPIO I2S (and I2C) pins on the GPIO header. Some sound cards have inputs as well as outputs. Sound cards range from 2 channels (in/out) to 8 channels out and 6 channels in. | ||
+ | |||
+ | A short list of GPIO sound cards can be found on eLinux :\\ | ||
+ | http:// | ||
===== On-board MIDI ===== | ===== On-board MIDI ===== | ||
Line 163: | Line 169: | ||
Another option is to comment or remove the kernel module for the onboard soundcard (snd-bcm2835) from ''/ | Another option is to comment or remove the kernel module for the onboard soundcard (snd-bcm2835) from ''/ | ||
- | ===== Audio software repository ===== | ||
- | There' | ||
- | |||
- | ==== Adding the repository ==== | ||
- | |||
- | wget -O - http:// | ||
- | sudo wget -O / | ||
- | sudo apt-get update | ||
===== Using JACK ===== | ===== Using JACK ===== | ||
Line 214: | Line 212: | ||
When using Jack2 you might want to disable dbus dependent code in JACK components if you want to run Jack2 on a headless RPi (so without X). You can do this by building without the '' | When using Jack2 you might want to disable dbus dependent code in JACK components if you want to run Jack2 on a headless RPi (so without X). You can do this by building without the '' | ||
export DBUS_SESSION_BUS_ADDRESS=unix: | export DBUS_SESSION_BUS_ADDRESS=unix: | ||
+ | |||
+ | And then add the following lines to ''/ | ||
+ | <policy user=" | ||
+ | <allow own=" | ||
+ | <allow own=" | ||
+ | </ | ||
+ | | ||
+ | WARNING: In Raspbian Stretch I had to do the following instead of modifying '' | ||
+ | |||
+ | Create a new file ''/ | ||
+ | |||
+ | <?xml version=" | ||
+ | < | ||
+ | " | ||
+ | | ||
+ | < | ||
+ | | ||
+ | <policy context=" | ||
+ | <allow own=" | ||
+ | <allow own=" | ||
+ | </ | ||
+ | | ||
+ | </ | ||
+ | |||
+ | |||
=== Using an external USB audio interface === | === Using an external USB audio interface === | ||
Line 233: | Line 256: | ||
[[http:// | [[http:// | ||
+ | |||
+ | [[https:// | ||
{{tag> | {{tag> |