Set correct number of channels in GDM loader

GDM can have events in disabled channels, so checking if a channel is
enabled isn't a reliable method to determine the number of channels
actually used in the module. To solve this problem, pre-scan patterns
to determine the number of channels.

This is the same method used in the IT loader.

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
Pre-scan MED4 patterns to get number of channels

The number of MED4 channels can be different in each pattern, so pre-scan
patterns to find the number of channels we want to allocate.

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
Fix MED4 sample loop setting

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
Update changelog

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>