Automotive knock sensors are pure microphones. Discerning noise from knocking noise is done by the 'processing' circuitry in the ECU.
A Hall sensor is yes, another valid way.
While they are a basic 'microphone' they, at least the GM ones they made where I worked, were set to a certain frequency. Below that frequency they were dampened. Weren't supposed to give a signal until that vibration was met. Don't know how other companies do it.
https://www.azosensors.com/Article.aspx?ArticleID=50