Change WM8741 volume in software control mode

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
Hi all:

I use the following code to change the wm8741 volume(2-wire control mode):

Code:
    /* get lsb and msb */
    lsb = vol & 0x1f; /* lower 5 bit */
    msb = vol >> 5;   /* higher 5 bit */

    wm8741_mute(1);
    // write to registers.
    wm8741_i2c_write(0x00, lsb);
    wm8741_i2c_write(0x01, msb);
    wm8741_i2c_write(0x02, lsb);
    wm8741_i2c_write(0x03, msb | 0x20); // enable bit 6
    wm8741_mute(0);

However, only 1 channel volume can be changed, the other channel doesn't work, Is there anything wrong?
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.