Well the possible causes are the sub woofer itself, the circuits between the sub woofer and the amp or the amp. If you don't see any obvious connection, circuit or pin fit issues then I would go into circuit testing such as continuity, short to power, short to ground, shorted together, etc. If no issues are found then it is likely the sub woofer, if all other speakers are working than the amp and powers/grounds to the amp are most likely working correctly.
I think the amp is able to set codes through the APIM or the APIM is able to set codes against the amp.
Sounds like a trip to the dealer wouldn't hurt in this case.