MEGA65 / mega65-core

MEGA65 FPGA core
Other
245 stars 88 forks source link

Activate Internal speaker port on MEGA65 R2 PCB #171

Closed gardners closed 3 years ago

gardners commented 4 years ago

This will use the same audio port as bluetooth_left on the MEGAphoneR1, as we have only 8 audio output channels, and they are already all allocated, and we want headphones, HDMI audio and internal speaker to all be independently controllable.

gardners commented 4 years ago

Well, it looks like it CAN work, but for some reason the audio isn't being plumbed through. So the last commit above tries to plumb one of the other audio channels through to it. If that works, then we know the bt_audio_l generation is wrong. If it doesn't, then we suspect it is a plumbing problem in the heirarchy.

gardners commented 4 years ago

so switching to the regular audio stream has it working. I also just realised what I had messed up when trying to feed the BT audio output channels :/ Commit coming ...

gardners commented 4 years ago

We will need to have an option in the BIOS and AUDIOMIX to select default audio profile: speaker ( / BT ) audio output enabled or not. Also, the audio level is very low on the nice 2W speakers, or suffers considerable background noise (including when silent) when the volume level is ramped up. This was using PWM. Try PDM instead, to see if that is any better (it probably should be).

gardners commented 4 years ago

PDM indeed has much better signal to noise ratio in the form of reduced background noise. Confirmed working.

All that remains now is to modify HYPPO to configure this audio channel on boot -- but only for MEGA65R2 PCB, as it will be bluetooth on the MEGAphone boards, so we need a target check. That will be a separate issue.

@frehwagen this one is ready for you to merge in now. To test, you will need an 8Ohm speaker on J19, and to go into audio mixer and under the BTL column, set SIDL, SIDR, DIGIL, DIGIR and MASTER there to F0F0 (press F7 once on each).