2023-01-03 02:45 AM
Tested both on provided example and using BSP drivers. When I connect 4R speaker to headphones output I get very loud sound, so it seems like OK.
IDK, I tested it a lot (like over 2 weeks) by having an oscilloscope connected to the SPK output, but I had capacitors (2u2) in series. Just to protect from shorting the chip to the ground by the oscilloscope that is connected to my PC, so it has ground potential on it's ground input terminal.
I'm not sure if I haven't fried the speaker amplifier, however, I have 2 boards (unfortunately both were tested with oscilloscope) and both give sound from the headphone output, but no sound from the speaker output.
Of course I tried all those output settings:
AUDIO_OUT_DEVICE_HEADPHONE
AUDIO_OUT_DEVICE_SPEAKER
AUDIO_OUT_DEVICE_SPK_HP
Doesn't work. Any clues?
2023-01-05 05:47 AM
Hello,
I don't know what you've tried, but there is another board that makes use of the WM8994 chip with SPK out, the F723 discovery board, and I remember that I have seen it working.
So if you can download the F7 software package, you can compare your code to the F723 disco BSP and that might lead you to some solution.
You have to activate the right slots as well (stm32h745i_discovery_audio.h):
/* To have an audio stream in headphone only SAI Slot 0 and Slot 2 must be activated */
#define CODEC_AUDIOFRAME_SLOT_02 SAI_SLOTACTIVE_0 | SAI_SLOTACTIVE_2
/* To have an audio stream in speaker only SAI Slot 1 and Slot 3 must be activated */
#define CODEC_AUDIOFRAME_SLOT_13 SAI_SLOTACTIVE_1 | SAI_SLOTACTIVE_3
good luck !