The esp-idf expects duty values for the the sigma delta modulator in the range of -128 to 127 The arduino framework is supposed to use the range 0-255 thus the offset caclulation was wrong.
Change is to not be mistaken with SD Card