Bug #6
closedHDMI audio poor quality
0%
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
Updated by foft over 7 years ago
- Related to Bug #31: HDMI Audio generate high pitch noise (Core 8) added
Updated by foft over 6 years ago
- Is the time between this always the same? If so can dIs the sound quality poor because I removed the divide?
- If so, does the divide happen at a consistent period? If so I can scale/multiply then divide by power of two.
- 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...
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.
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.
Updated by foft over 6 years ago
- File filter_performance.png filter_performance.png added
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.
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!
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.
Updated by foft over 6 years ago
- Related to Bug #69: Some TVs confused by hdmi audio added