sparkfun / SparkFun_WM8960_Arduino_Library

I2C control of WM8960 Stereo Codec with 1W Class-D Speaker Drivers and Headphone Drivers by Wolfson Microelectronics
Other
12 stars 1 forks source link

Enable VMID not setting correct voltage divider #1

Open schwghrt opened 4 months ago

schwghrt commented 4 months ago

In order to enable VMID for playback/recording using the 2x 50k ohm voltage divider 8:7 should be 01 not 11. That is the 5k divider for 'fast start', (whatever that is.)

image

`// Enables VMID in the WM8960_REG_PWR_MGMT_2 register, and set's it to

// playback/record settings of 2*50Kohm.

boolean WM8960::enableVMID()

{

WM8960::_writeRegisterBit(WM8960_REG_PWR_MGMT_1, 8, 1);

return WM8960::_writeRegisterBit(WM8960_REG_PWR_MGMT_1, 7, 1);

}`

lewispg228 commented 4 months ago

Hi @schwghrt , Thank you for bringing this to our attention. You are correct, and the comment does not match the actual setting. We will work to get this updated and a new release out asap.

I'm curious, is your interest in this setting for the power savings? Wondering if you and/or most users were prefer the default to stay where it is, or move to the 2x50K setting?

'fast start', (whatever that is.)

I'm not entirely sure at this point, but I would guess that having lower resistor values would allow this VMID to energize/stabilize faster at startup. It looks like VMID is used a quite a few places, but if your system involves microphones using MICBIAS, then this could possibly effect how quickly your mics turn on.

image

Thanks again, Pete

schwghrt commented 4 months ago

My interest is really to make it work. One offered fast start, and the other one offered "playback/recording". It wasn't clear from the datasheet whether "fast start" was actually ok for "playback/recording". What else is there? I expect I'll be interested in power as the project gets farther down the road.

I realize this is the wrong thread, but I also split the L/R headphone gains. I want to use them as line out instead of headphones, and so I need split volume control. Easy change, but if you are making changes, it's a nice feature to have....

schwghrt commented 4 months ago

BTW, thank you for putting this library together. It simplified my project by orders of magnitude!!!