am f6a22ada: Add auto-detection of payload type

* commit 'f6a22ada816ae4f63576679f03472b0a984e82be':
  Add auto-detection of payload type