Project

General

Profile

Actions

Bug #6

closed

HDMI audio poor quality

Added by admin over 7 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Start date:
04/04/2017
Due date:
% Done:

0%

Estimated time:

Description

I removed a low division in the audio output to meet timing. I suspect this should be replaced with a proper low pass filter.


Files

filter_performance.png (180 KB) filter_performance.png foft, 06/04/2018 09:44 PM

Related issues 2 (1 open1 closed)

Related to Bug #31: HDMI Audio generate high pitch noise (Core 8)Closed06/01/2017

Actions
Related to Bug #69: Some TVs confused by hdmi audioNew06/07/2018

Actions
Actions #1

Updated by foft over 7 years ago

  • Related to Bug #31: HDMI Audio generate high pitch noise (Core 8) added
Actions #2

Updated by foft over 6 years ago

  1. Is the time between this always the same? If so can dIs the sound quality poor because I removed the divide?
  2. If so, does the divide happen at a consistent period? If so I can scale/multiply then divide by power of two.
  3. Or is the sound quality poor because I just got signed/unsigned wrong?

I guess I can simply generate/feed in a signed/unsigned sine wave and see what comes out to start with...

Actions #3

Updated by foft over 6 years ago

The biggest issue with this appears to be that I need to send signed samples. Changed that and its sounding much better.

Actions #4

Updated by foft over 6 years ago

Investigating resampling high frequencies to 48KHz with some plots in Octave. The average that I removed wasn't a bad simple low pass filter (though didn't meet timing...). The way I did it (just sample) sucks, quite frankly. Any high frequency noise is aliased down to a nice squeal. Investigating some simple 'fpga-friendly' options in Octave.

Actions #5

Updated by foft over 6 years ago

Trying out various options in Octave.

sample = current method (just take the current value), flat line at top!
mean = mean of last n samples (which did not meet timing due to expensive division)
meanfpga = mean of last 32 samples (easy division)
diff3 = at 1.79MHz apply: out = out + (in-out)*3/(48000/1790000)
difffpga = at 1.79MHz apply: out = out + (in-out)/16 (i.e. like 1st order RC filter)
difffpga2 = at 1.79MHz apply: out = out + (in-out)/16, then out = out + (in-out)/8 (i.e. like 2nd order RC filter)

Planning to use difffpga2, just a subtract and addition and bit shift or two.

Actions #6

Updated by foft over 6 years ago

Could look into FIR and IIR filters, but to be honest this seems very lightweight and to work well. Will implement and see what it sounds like!

Actions #7

Updated by foft over 6 years ago

Wired this up and sounding much better.

Unfortunately @Farb seems to have completely different symptoms! https://photos.app.goo.gl/c3VMPp0XY7nIaJBG3. Here jumpman is sounding good, even before the filter.

Actions #8

Updated by foft over 6 years ago

  • Status changed from New to Closed
Actions #9

Updated by foft over 6 years ago

  • Related to Bug #69: Some TVs confused by hdmi audio added
Actions

Also available in: Atom PDF