From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 Date: Sat, 23 Aug 2014 02:32:00 -0700 Message-ID: From: Pedro Coutin To: 9fans@9fans.net Content-Type: text/plain; charset=UTF-8 Subject: [9fans] PWM and audio drivers for Raspberry Pi Topicbox-Message-UUID: 120e4b08-ead9-11e9-9d60-3106f5b1d025 Hello everyone, I made a working audio driver for the Raspberry Pi by using the chipset's PWM device directly. The sound quality seems pretty acceptable to me. I managed to play music and the Doom port from 9front with it. Since it uses the PWM device, it only works for the TRS stereo jack. I believe that the most sensible way to make HDMI audio work is to make a VCHI(Q) driver, and then an audio driver that interfaces with that. There's very little, if any, documentation available on this and the Linux kernel code for it is pretty huge. Tarball with changed files: http://acsweb.ucsd.edu/~pcoutin/bcm-audio.tgz Repository: https://bitbucket.com/pcoutin/9pi-audio Man page for PWM device: http://acsweb.ucsd.edu/~pcoutin/bcmpwm.html I guess I could extend the PWM driver so that the two channels can be enabled/disabled separately.