srcversion defined by scripts/mod/modpost . I do not know the exact parameters that you need to provide modpost so that it displays this field. It should be something like scripts/mod/modpost -a -m vmlinux you_module.o (you can see scripts/Makefile.modpost for exact options). The output is then available in drivers/path/to/your_module.mod.c
I recommend that you set config MODULE_SRCVERSION_ALL to y (available in the Enable loadable module support submenu) so that srcversion is automatically created for all modules in your assembly. Then you can switch between the source options, rebuild your kernel with the new source version (only after you built the module only after it was built), and then directly look in the MODULE_INFO(srcversion, "<hash>"); field MODULE_INFO(srcversion, "<hash>"); at the end of your drivers/path/to/your_module.mod.c to search for the requested information.
Longfield
source share