Altera_Forum
Honored Contributor
14 years agoLine out volume adjustment in Wolfson WM8731 audio codec
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