/* param handle WM8904 handle structure. param reg register address. oaram mask register bits mask. param value value to write. return kStatus_Success, else failed.  */
status_t WM8904_ModifyRegister(wm8904_handle_t *handle, uint8_t reg, uint16_t mask, uint16_t value)
/* param handle WM8904 handle structure. param reg register address. oaram mask register bits mask. param value value to write. return kStatus_Success, else failed.  */
status_t WM8904_ModifyRegister(wm8904_handle_t *handle, uint8_t reg, uint16_t mask, uint16_t value)
{
    status_t result = kStatus_Success;
    uint16_t regValue;
    result = WM8904_ReadRegister(handle, reg, &regValue);
    if (result != kStatus_WM8904_Success)
    {
        return result;
    }
    regValue &= (uint16_t)~mask;
    regValue |= value;
    return WM8904_WriteRegister(handle, reg, regValue);
}