Page MenuHomeFreeBSD

Fix audio for Allwinner H3/H5
ClosedPublic

Authored by freebsdnewbie_freenet.de on Apr 14 2019, 5:19 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Dec 16, 11:53 PM
Unknown Object (File)
Sun, Dec 15, 7:44 AM
Unknown Object (File)
Thu, Dec 12, 11:16 AM
Unknown Object (File)
Fri, Dec 6, 8:36 PM
Unknown Object (File)
Wed, Dec 4, 8:02 PM
Unknown Object (File)
Wed, Dec 4, 4:13 AM
Unknown Object (File)
Oct 29 2024, 7:30 AM
Unknown Object (File)
Oct 27 2024, 12:18 AM

Details

Summary

Due to three conditions the codec driver for Allwinner A10/A20 and H3/H5 did not work properly here:

  1. Wrong bit position for the analog audio reset
  2. Hardware Reset of codec was not de-asserted correctly
  3. Linux DTS file did not contain the address of the analog register the way as the driver was expecting it.

This patch proposes fixes for those three parts.

Test Plan

The patch was successfully tested on a Allwinner NanoPI NEO2 hardware.

Diff Detail

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

Event Timeline

Move H3/H5 specific setup into its mixer_init function.

sys/arm/allwinner/a10_codec.c
507 ↗(On Diff #56220)

Using reg[0] + reg[1] should work for the end parameter.

740 ↗(On Diff #56220)

What's the reason for this stop here ?

Changed "end"-parameter for resource allocation.

freebsdnewbie_freenet.de marked an inline comment as done and an inline comment as not done.

Move codec_stop call to a different place.

sys/arm/allwinner/a10_codec.c
740 ↗(On Diff #56220)

Sometimes during testing the sound did not start the first time after a cold start/reboot. When i started the player once again, the sound was played correctly. I just wanted to set the peripheral to a known state before starting over. With this stop placed here, i could not reproduce the error during playing a sound the first time after reboot.

This revision was not accepted when it landed; it landed in state Needs Review.Apr 17 2019, 9:45 PM
This revision was automatically updated to reflect the committed changes.