2017-05-17 01:32 AM
Hello everybody,
I am currently working on a STM324x9I-EVAL board. I ran the next project:STM32Cube_FW_F4_V1.16.0\Projects\STM324x9I_EVAL\Applications\Audio\Audio_playback_and_record.The application is set to be used in stereo (SPKMODE connected to Gnd), so I have connected a headset to CN23 and 2 loudspeakers on CN24 (8ohm each).
Audio is working well on HPOUT1 (CN23) but not on SPKOUT (CN24).
I checked the source code and tried to change the parameters �OutputDevice� of the next function:BSP_AUDIO_OUT_Init(uint16_t OutputDevice, uint8_t Volume, uint32_t AudioFreq);To OUTPUT_DEVICE_SPEAKER: No sound came from my loudspeakerTo OUTPUT_DEVICE_BOTH: Sound came from my headset connected to CN23 but no sound from my loudspeakers on CN24.Someone was able to used the speakers (CN24) output?
If you have any clue that could help me, don�t hesitate to answer to my post.
Thanks in advance for your help
Best regardsFabien#wm8994 #stm324x9i-eval #speakerSolved! Go to Solution.
2017-08-21 05:56 AM
Please find the final answer from ST support
-----------------------------------------
I received developer answer and for them my patch is not correct.
If you remove it.
And do this modification, in file waveplayer.c : you will have sound on the speaker.
static uint8_t PlayerInit(uint32_t AudioFreq)
{
/* Initialize the Audio codec and all related peripherals (I2S, I2C, IOExpander, IOs...) */
if(BSP_AUDIO_OUT_Init(OUTPUT_DEVICE_BOTH, uwVolume, AudioFreq) != 0)
{
return 1;
}
else
{
BSP_AUDIO_OUT_SetAudioFrameSlot(CODEC_AUDIOFRAME_SLOT_13);
return 0;
}
}
-----------------------------------------
I checked and speaker are working well on my side. Thanks a lot to ST support
2017-07-06 06:44 AM
Hello, man!
Today I have the same problem with f746 discovery: reCompile with OUTPUT_DEVICE_SPEAKER / OUTPUT_DEVICE_BOTH... - and nothing. With HEADPHONES - OK
I think they (ST MCD Application Team) don't checked codec driver wm8994.c with this settings. My version of this file:
* @version V2.1.0
* @date 22-February-2016In datasheet of codec wolfson 'Loudspeaker' B1-A2, B3-C3 is the same that in sheme of my disco board.
Do you solve the problem?
2017-07-06 09:05 AM
Hello,
I am currently in touch with T.O.M.A.S. team from ST.
They find a solution to be able to use loudspeaker. Please find the solution they provide me:
---------------------------
I was able to have speaker working with this configuration OUTPUT_DEVICE_BOTH :
waveplayer.c
...
if(BSP_AUDIO_OUT_Init(OUTPUT_DEVICE_BOTH, uwVolume, I2S_AUDIOFREQ_48K) == 0 )
....
if(BSP_AUDIO_OUT_Init(OUTPUT_DEVICE_BOTH, uwVolume, AudioFreq) != 0)
And a patch in the file STM32Cube_FW_F4_V1.16.0\Drivers\BSP\Components\wm8994\wm8994.c
in the function
uint32_t wm8994_Init(uint16_t DeviceAddr, uint16_t OutputInputDevice, uint8_t Volume, uint32_t AudioFreq)
.....
/* Unmute DAC2 (Left) to Left Speaker Mixer (SPKMIXL) path,
Unmute DAC2 (Right) to Right Speaker Mixer (SPKMIXR) path */
/* counter += CODEC_IO_Write(DeviceAddr, 0x36, 0x0300);*/
counter += CODEC_IO_Write(DeviceAddr, 0x36, 0x0303);
---------------------------
On my board, loudspeaker are working very well with this solution.
There are still issues with '
OUTPUT_DEVICE_SPEAKER
' but there are working on it and will provide me an solution.Best regards
Fabien
2017-07-07 10:25 AM
Hi
Blanchet.Fabien
,Thank you for your reported issue.
I would inform you that your reported issue is raised internally and is under investigation.
Best Regards
Imen
2017-08-21 05:56 AM
Please find the final answer from ST support
-----------------------------------------
I received developer answer and for them my patch is not correct.
If you remove it.
And do this modification, in file waveplayer.c : you will have sound on the speaker.
static uint8_t PlayerInit(uint32_t AudioFreq)
{
/* Initialize the Audio codec and all related peripherals (I2S, I2C, IOExpander, IOs...) */
if(BSP_AUDIO_OUT_Init(OUTPUT_DEVICE_BOTH, uwVolume, AudioFreq) != 0)
{
return 1;
}
else
{
BSP_AUDIO_OUT_SetAudioFrameSlot(CODEC_AUDIOFRAME_SLOT_13);
return 0;
}
}
-----------------------------------------
I checked and speaker are working well on my side. Thanks a lot to ST support