FPGA, SoC, And CPLD Boards And Kits
FPGA Evaluation and Development Kits
5921 Discussions

Line out volume adjustment in Wolfson WM8731 audio codec

Altera_Forum
Honored Contributor II
1,856 Views

Hello all, 

 

I have a design which successfully programs the WM8731 codec on my DE2-70 board via the 2-wire I2C interface. I am using pure HDL to configure the codec, no NIOS or software or anything like that. My design currently only outputs a single tone (just for testing purposes) to the codec using its digital audio interface. 

 

During the initial programming sequence I set the headphone volume to 7'h5F (i.e. ~70% of max volume). This has worked well and I have tried various values all the way from the minimum of 7'h2F to the max of 7'h7F and they all work as expected (i.e. 2F = mute to 7F = very loud). 

 

However, no matter what I try I absolutely cannot find a way to adjust the volume once it has been set during the initial configuration. I have two push buttons on the board which indicate whether an increase/decrease in volume is requested. I use the exact same device/register addresses as I do for the initial volume setting but the volume neither increases or decreases - ever! For example, the initial volume is set to 7'h5F, then I write a value of 7'h3F to the same register and the volume just remains the same. 

 

I can't find anything in the datasheet at all that says I'm doing something wrong. I have been trying to get this working for the last 2 days and nothing I try works. Has anyone ever tried to adjust the wm8731 volume in realtime? Does anyone have any ideas what the problem might be? I am totally out of ideas. :-/ 

 

Thanks, 

 

Jonathon
0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
610 Views

Hello, 

I had a similar problem with the DE1 board. 

In the end I traced the 'lineout' skt back to the chip and it turned out it was  

connected to LHPOUT and RHPOUT (pins 13 and 14). 

(viz the headphone outputs). 

The lineout's were actually unconnected ! 

 

I re-programmed for headphone outputs and attached a headphone to the skt 

and it worked correctly. 

 

John (jt2) 

Manchester
0 Kudos
Altera_Forum
Honored Contributor II
610 Views

Thanks, but I just used the wrong terminology. I meant to say "headphone volume", not line out volume. I know that the line out signals are unconnected and, in fact, the line out volume cannot even be altered (only muted or unmuted). I have fixed my original post. 

 

I am actually using the headphone out signal and attempting to write to register# 2 (a.k.a. R2 or 0x02) in the codec. And it appears that the volume can only be set one time upon initial programming and then never again...
0 Kudos
Altera_Forum
Honored Contributor II
610 Views

 

--- Quote Start ---  

Thanks, but I just used the wrong terminology. I meant to say "headphone volume", not line out volume. I know that the line out signals are unconnected and, in fact, the line out volume cannot even be altered (only muted or unmuted). I have fixed my original post. 

 

I am actually using the headphone out signal and attempting to write to register# 2 (a.k.a. R2 or 0x02) in the codec. And it appears that the volume can only be set one time upon initial programming and then never again... 

--- Quote End ---  

 

 

Did you ever determine what the issue was? I'm having the same problem.
0 Kudos
Reply