rpi4-osdev/part9-sound
2021-02-17 23:40:03 +00:00
..
audio.bin First commit of part9-sound code 2021-02-17 10:32:35 +00:00
audio.wav First commit of part9-sound code 2021-02-17 10:32:35 +00:00
boot.S First commit of part9-sound code 2021-02-17 10:32:35 +00:00
fb.c First commit of part9-sound code 2021-02-17 10:32:35 +00:00
fb.h First commit of part9-sound code 2021-02-17 10:32:35 +00:00
io.c First commit of part9-sound code 2021-02-17 10:32:35 +00:00
io.h PWM audio now works using either CPU or DMA in part9-sound demo 2021-02-17 23:40:03 +00:00
kernel.c PWM audio now works using either CPU or DMA in part9-sound demo 2021-02-17 23:40:03 +00:00
link.ld First commit of part9-sound code 2021-02-17 10:32:35 +00:00
Makefile First commit of part9-sound code 2021-02-17 10:32:35 +00:00
mb.c First commit of part9-sound code 2021-02-17 10:32:35 +00:00
mb.h First commit of part9-sound code 2021-02-17 10:32:35 +00:00
README.md PWM audio now works using either CPU or DMA in part9-sound demo 2021-02-17 23:40:03 +00:00
terminal.h First commit of part9-sound code 2021-02-17 10:32:35 +00:00

Writing a "bare metal" operating system for Raspberry Pi 4 (Part 9)

Playing sound from the audio jack

One thing our game is missing is the excitement of sound! Some beeps and squeaks would be a wonderful addition to make the gameplay more compelling. Let's work to do just that!

This code was derived from Peter Lemon's work, for which I am very grateful. It's been ported to C with some modifications to work on the Raspberry Pi 4 hardware.

Todo

  • Write-up the CPU-driven playaudio_cpu() code, explaining clocks/PWM etc.
  • Write-up the DMA version playaudio_dma() version, which doesn't tie up the CPU but still plays sound!
  • Add a Makefile.gcc (I'm using LLVM Clang these days, so not a priority)