Page MenuHomeFreeBSD

Allwinner A10/A20 audio codec driver
ClosedPublic

Authored by jmcneill_invisible.ca on Feb 5 2016, 1:16 PM.
Tags
Referenced Files
Unknown Object (File)
Mar 22 2024, 12:30 AM
Unknown Object (File)
Mar 6 2024, 1:08 AM
Unknown Object (File)
Mar 6 2024, 1:08 AM
Unknown Object (File)
Mar 6 2024, 1:08 AM
Unknown Object (File)
Mar 6 2024, 1:08 AM
Unknown Object (File)
Feb 14 2024, 11:31 AM
Unknown Object (File)
Feb 3 2024, 1:55 AM
Unknown Object (File)
Jan 23 2024, 5:21 AM

Details

Summary

This is an analog audio driver for the audio codec found on the Allwinner A10/A20 SoC. Based loosely on my NetBSD driver, tested on Cubieboard 2. Playback and capture are supported.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jmcneill_invisible.ca retitled this revision from to Allwinner A10/A20 audio codec driver.
jmcneill_invisible.ca updated this object.
jmcneill_invisible.ca edited the test plan for this revision. (Show Details)
jmcneill_invisible.ca added a reviewer: ARM.
jmcneill_invisible.ca set the repository for this revision to rS FreeBSD src repository - subversion.
jmcneill_invisible.ca added a project: ARM.

Rename "pamute-gpios" property to "allwinner,pa-gpios" to match Linux mainline.
PA mute GPIO not required for Cubieboard2.

sys/arm/allwinner/a10_codec.c
780 ↗(On Diff #13060)

24.576MHz?

sys/arm/allwinner/a10_codec.c
780 ↗(On Diff #13060)

A20 datasheet says audio_clk can be either 24.576 or 22.5792 MHz. Most audio sampling rates are supported with audio_pll at 24.576, with the exception of 44.1kHz/22.05kHz/11.025kHz. Since both input and output use the same clock source and we want to support full duplex operation, the driver always sets audio_pll to 24.576 and doesn't support the 44.1kHz/22.05kHz/11.025kHz sampling rates natively.

sys/arm/allwinner/a10_codec.c
780 ↗(On Diff #13060)

Ok, it would be useful to add this information to a comment.

sys/arm/allwinner/a10_codec.c
780 ↗(On Diff #13060)

There's a note about the supported audio pll rates in a10_clk.c and the decision to use only 24.576MHz on line 607. No harm in adding a summary here though, I'll update the patch.

Add comment explaining 24.576MHz audio source clock.

andrew added a reviewer: andrew.
This revision is now accepted and ready to land.Feb 15 2016, 7:54 PM
sys/boot/fdt/dts/arm/cubieboard2.dts
77–80 ↗(On Diff #13270)

I'm getting a conflict here, can you update for the new dts.

jmcneill_invisible.ca edited edge metadata.
  • Fix cubieboard2.dts merge issue (codec is now enabled in sun7i-a20-cubieboard.dts)
  • include <arm/allwinner/a10_clk.h> instead of "a10_clk.h"
  • Add DRQ types for A10 (same as A20)
This revision now requires review to proceed.Feb 15 2016, 10:50 PM
This revision was automatically updated to reflect the committed changes.