I've seen previous answers on how to calculate the dB SPL based on my I2S readings but I can't come up with a formula to calculate it.
I use the MSM261S4030H0 I2S microphone with sensitivity of -26 dB FS and the bit resolution I am using with the I2S protocol is 16-bit. Based on previous answers when an input of 1 kHz and 1 Pa is applied to the microphone diaphragm the digital positive peak value of the output with 16-bit resolution will be 32767 * 0.0501 = 1641.
So then can I use a simple method for calculating the dB SPL in my code like if the reading of positive value is 1000 then the dB SPL will be dBSPL = 94*1000 / 1641 = 57.28?