We have customized the sgtl5000 driver by clonning it and doing some modifications to use it as a mic driver.
Now we need to get the proper way to find out how to detect whether the mic jack is plugged or not into the nvidia TX2´s P2 jack slot.
I have found out that there is an API ( ASoC Machine Driver) with some DAPM widgets that could help me doing that but I am not sure how to correctly use it to get the P2 jack status.
Could you please help me to get the proper way to get this P2 mic jack status?
I would like to get that information to show the end user that the mic is plugged off for some reason.
Thanks in advance and best regards,