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)
Feb 25 2024, 5:02 AM
Unknown Object (File)
Feb 24 2024, 10:40 PM
Unknown Object (File)
Feb 15 2024, 6:39 AM
Unknown Object (File)
Feb 11 2024, 8:27 PM
Unknown Object (File)
Feb 11 2024, 8:32 AM
Unknown Object (File)
Feb 8 2024, 12:44 AM
Unknown Object (File)
Feb 5 2024, 3:43 AM
Unknown Object (File)
Jan 16 2024, 6:51 PM

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 Skipped
Unit
Tests Skipped

Event Timeline

Move H3/H5 specific setup into its mixer_init function.

sys/arm/allwinner/a10_codec.c
507

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

740

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

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.