7809 center pin (ground) goes to decoder ground, input pin to decoder + (22 volts).
So regulator has input pin and ground pin tied to decoder.
Smoke unit has one wire to a function (F6) and the other wire to regulator plus output.
If using the LGB smoke unit, 7809 needs for you to modify cv 137, 138, 139 for different smoke loads and cv 132 (if using F6) to 72 for steam or 80 for diesel.
Just remember the higher the number the higher the voltage to the smoke unit. I like small smoke at standing, medium for running and lots for accelerating.