- gauravmjoshi
- Posts: 11
- Joined: Thu Mar 28, 2024 3:22 pm
Audio Output CM5
Hello All,
We wish to understand what sort of Audio Output is currently supported by CM5.
If we are required to use Audio Codec IC then is ES8388 supported ?
Otherwise if we are to use Audio_OUT_L and Audio_OUT_R, then how do we interface it with a headphone jack ?
We wish to understand what sort of Audio Output is currently supported by CM5.
If we are required to use Audio Codec IC then is ES8388 supported ?
Otherwise if we are to use Audio_OUT_L and Audio_OUT_R, then how do we interface it with a headphone jack ?
Re: Audio Output CM5
First:
Your Codec chip needs the correct interfaces. You need I2S for the audio data and I2C for setting up the chip itself (internal registers).
Second:
You need a suitable Linux driver for the codec chip and you need to write a device tree overlay that matches your specific hardware. It's all in the Linux kernel. You need to have good knowledge of kernel programming for this. Otherwise you are going to fail.
Shortcut:
Search for a suitable Pi soundcard, look what codec is used there and work out the connections from the codec chip to the 40 pin header. Get the Device Tree Overlay source and use this as a foundation of your work.
Recommendation: TI PCM5122 seems to be well supported and is used on many Pi soundcards.
Your Codec chip needs the correct interfaces. You need I2S for the audio data and I2C for setting up the chip itself (internal registers).
Second:
You need a suitable Linux driver for the codec chip and you need to write a device tree overlay that matches your specific hardware. It's all in the Linux kernel. You need to have good knowledge of kernel programming for this. Otherwise you are going to fail.
Shortcut:
Search for a suitable Pi soundcard, look what codec is used there and work out the connections from the codec chip to the 40 pin header. Get the Device Tree Overlay source and use this as a foundation of your work.
Recommendation: TI PCM5122 seems to be well supported and is used on many Pi soundcards.
- gauravmjoshi
- Posts: 11
- Joined: Thu Mar 28, 2024 3:22 pm
Re: Audio Output CM5
Would it work if I use the Audio_Out_L and Audio_Out_R pins from CM5 GPIO and connect them to the headphone jack through a series resistor and a capacitor to ground, instead of using the Audio Codec IC.
Re: Audio Output CM5
Should work as well, but with less quality. A dedicated codec chip has better audio quality.
Look for the Raspberry Pi4 Reduced schematics for the Audio filtering circuit.
6 resistors, 5 capacitors, and an 74LVC2G17 buffer chip.
Look for the Raspberry Pi4 Reduced schematics for the Audio filtering circuit.
6 resistors, 5 capacitors, and an 74LVC2G17 buffer chip.
- njh
- Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator - Posts: 600
- Joined: Wed Aug 09, 2017 2:07 pm
Re: Audio Output CM5
ES8388 does have a Linux driver, so it should work. You could be the first person to test it on a CM5...
AUDIO_OUT_[LR] is available (GPIO pins 12, 13), but quality is a little lower (not quite Hi-Fi). See this reference design.
That filter circuit is not really a headphone driver, though it will work with higher-impedance headphones. For a stronger signal into low-impedance headphones, you'll need an amplifier. It depends on your application.
AUDIO_OUT_[LR] is available (GPIO pins 12, 13), but quality is a little lower (not quite Hi-Fi). See this reference design.
That filter circuit is not really a headphone driver, though it will work with higher-impedance headphones. For a stronger signal into low-impedance headphones, you'll need an amplifier. It depends on your application.
Jump to
- Community
- General discussion
- Announcements
- Other languages
- Deutsch
- Español
- Français
- Italiano
- Nederlands
- 日本語
- Polski
- Português
- Русский
- Türkçe
- User groups and events
- Raspberry Pi Official Magazine
- Using the Raspberry Pi
- Beginners
- Troubleshooting
- Advanced users
- Assistive technology and accessibility
- Education
- Picademy
- Teaching and learning resources
- Staffroom, classroom and projects
- Astro Pi
- Mathematica
- High Altitude Balloon
- Weather station
- Programming
- C/C++
- Java
- Python
- Scratch
- Other programming languages
- Windows 10 for IoT
- Wolfram Language
- Bare metal, Assembly language
- Graphics programming
- OpenGLES
- OpenVG
- OpenMAX
- General programming discussion
- Projects
- Networking and servers
- Automation, sensing and robotics
- Graphics, sound and multimedia
- Other projects
- Media centres
- Gaming
- AIY Projects
- Hardware and peripherals
- Camera board
- Compute Module
- Official Display
- HATs and other add-ons
- Device Tree
- Interfacing (DSI, CSI, I2C, etc.)
- Keyboard computers (400, 500, 500+)
- Raspberry Pi Pico
- General
- SDK
- MicroPython
- Other RP2040 boards
- Zephyr
- Rust
- AI Accelerator
- AI Camera - IMX500
- Hailo
- Software
- Raspberry Pi OS
- Raspberry Pi Connect
- Raspberry Pi Desktop for PC and Mac
- Beta testing
- Other
- Android
- Debian
- FreeBSD
- Gentoo
- Linux Kernel
- NetBSD
- openSUSE
- Plan 9
- Puppy
- Arch
- Pidora / Fedora
- RISCOS
- Ubuntu
- Ye Olde Pi Shoppe
- For sale
- Wanted
- Off topic
- Off topic discussion