A method for compensating common mode and differential mode mismatches of differential input nodes for an analog-to-digital converter, ADC, comprising: receiving, with a controller, digital common mode, CM, data and differential mode, DM, data; wherein the common mode, CM, data comprises a DC average voltage level between the differential input nodes (1002, 1004) of the analog-to-digital converter, ADC, and wherein the differential mode, DM, data comprises a difference between said differential input nodes; and the method comprises: determining based, at least in part, on the CM data and the DM data, a coupling configuration of a microphone coupled to the differential input nodes of the analog-to-digital converter, ADC; by determining whether the DM data comprises a DC shift and whether the CM data comprises an AC term; determining any common mode mismatch between the CM data and an internal common mode voltage reference and any differential mode mismatch between the differential input nodes based on whether the DM data comprises a DC shift and whether the CM data comprises an AC term; and generating a control signal for output to a digital-to-analog converter, DAC,, to control an output of the digital-to-analog converter, DAC, which is applied to an input of the analog-to-digital converter, ADC, wherein the control signal is generated based on the determined configuration of the microphone and the determined common mode and differential mode mismatches such that the digital-to-analog converter, DAC, provides compensation in the analog-to-digital converter, ADC, for least one of the determined common mode and differential mode mismatches, wherein the compensation comprises a component proportional to the amount of any determined DC shift in the DM data and a component proportional to the amount of any determined AC term in the CM data. receiving, with a controller, digital common mode, CM, data and differential mode, DM, data; wherein the common mode, CM, data comprises a DC average voltage level between the differential input nodes (1002, 1004) of the analog-to-digital converter, ADC, and wherein the differential mode, DM, data comprises a difference between said differential input nodes; and the method comprises: determining based, at least in part, on the CM data and the DM data, a coupling configuration of a microphone coupled to the differential input nodes of the analog-to-digital converter, ADC; by determining whether the DM data comprises a DC shift and whether the CM data comprises an AC term; determining any common mode mismatch between the CM data and an internal common mode voltage reference and any differential mode mismatch between the differential input nodes based on whether the DM data comprises a DC shift and whether the CM data comprises an AC term; and generating a control signal for output to a digital-to-analog converter, DAC,, to control an output of the digital-to-analog converter, DAC, which is applied to an input of the analog-to-digital converter, ADC, wherein the control signal is generated based on the determined configuration of the microphone and the determined common mode and differential mode mismatches such that the digital-to-analog converter, DAC, provides compensation in the analog-to-digital converter, ADC, for least one of the determined common mode and differential mode mismatches, wherein the compensation comprises a component proportional to the amount of any determined DC shift in the DM data and a component proportional to the amount of any determined AC term in the CM data. determining based, at least in part, on the CM data and the DM data, a coupling configuration of a microphone coupled to the differential input nodes of the analog-to-digital converter, ADC; by determining whether the DM data comprises a DC shift and whether the CM data comprises an AC term; determining any common mode mismatch between the CM data and an internal common mode voltage reference and any differential mode mismatch between the differential input nodes based on whether the DM data comprises a DC shift and whether the CM data comprises an AC term; and generating a control signal for output to a digital-to-analog converter, DAC,, to control an output of the digital-to-analog converter, DAC, which is applied to an input of the analog-to-digital converter, ADC, wherein the control signal is generated based on the determined configuration of the microphone and the determined common mode and differential mode mismatches such that the digital-to-analog converter, DAC, provides compensation in the analog-to-digital converter, ADC, for least one of the determined common mode and differential mode mismatches, wherein the compensation comprises a component proportional to the amount of any determined DC shift in the DM data and a component proportional to the amount of any determined AC term in the CM data.