cancel
Showing results for 
Search instead for 
Did you mean: 

audio clarity issues while using the WM8904 audio codec

Tharun123
Associate

Hello everyone,

I am currently using the WM8904 audio codec in my project. The audio is stored in external flash memory, and I am reading it in chunks of 1024 bytes at a time. The audio format is 16-bit WAV with an 8000 Hz sample rate.

For playback, we are using a mono speaker. I have attached the schematic of our codec for reference.

Issue: The audio output is not clear. I have verified the data being read from the flash, and it matches the stored data.

I would like to know:

  1. What audio formats (sample rate, bit width, clock configuration, etc.) are supported by the WM8904 codec?
  2. How can I ensure proper reading and playback of audio from the flash memory?
4 REPLIES 4
LCE
Principal

1. read the datasheet of WM8904, which is not a product from ST

2. working source code... you're not telling us which STM32 you are using and how it is connected to the DAC

As @LCE said, you need to provide more details - please see the Posting Tips:

https://community.st.com/t5/community-guidelines/how-to-write-your-question-to-maximize-your-chances-to-find-a/ta-p/575228

 


@Tharun123 wrote:

I have attached the schematic of our codec for reference.


I think you forgot that?

 


@Tharun123 wrote:

Issue: The audio output is not clear.


What, exactly, do you mean by that?

  • Too quiet?
  • Distorted? give details
  • other?

Have you viewed the output on an oscilloscope?

 


@Tharun123 wrote:
  1. What audio formats (sample rate, bit width, clock configuration, etc.) are supported by the WM8904 codec?

It's not an ST Product - you need to consult the manufacturer's specifications & other supporting documentation for that:

https://www.cirrus.com/products/wm8904/

https://www.cirrus.com/products/wm8904/#supportRequest=true&formType=design&supportProduct=wm8904

 

 

 

sorry for missing details, we are using stm32f407G evaluation board in that there is on board audio codec which is cs43l22 we are storing the audio data in internal buffer which is of 12 kb just for testing purpose.

in stm32 I2S function expects 16 bit data 

HAL_StatusTypeDef HAL_I2S_Transmit(I2S_HandleTypeDef *hi2s, uint16_t *pData, uint16_t Size, uint32_t Timeout)

 

can you have any suggestions how we can store and how we can send the data or is there any library

of audio codec like nxp controllers?

 


@Tharun123 wrote:

 we are using stm32f407G evaluation board


This: https://www.st.com/en/evaluation-tools/stm3240g-eval.html ?

 


@Tharun123 wrote:

in that there is on board audio codec which is cs43l22


So are there not examples which illustrate the use of it?