Reference to The Compass and Jack Sparrow's Compass
Did Dalma give the compass to Jack's former captain and eventually it reached Jack?
Yes.
The origin of this unique compass is shrouded in mystery.
Around the time of Jack Sparrow's quest for the Sword of Cortés, the compass would be in the possession of Laura Smith`, the captain of the infamous pirate ship La Fleur de la Mort. When she and the crew of the fishing boat Barnacle, led by Jack Sparrow, escaped from the Pirate Guard in New Orleans, Laura used the compass to find her ship, which was invisible at that time because its magical sails were unfurled. Sometime afterward, the compass would end up in the possession of the mystic Tia Dalma through mysterious circumstances.
At some point, Jack Sparrow would barter the compass from Tia Dalma years prior to his search for the treasure of Isla de Muerta.
It is unknown what Jack gave to Tia Dalma in exchange for the compass.
However, the compass somehow found its way into the hands of Morgan, the pirate captain of the Wicked Wench, under whom Jack was serving at the time. When Morgan was mortally wounded during the battle off the coast of the mysterious Devil's Triangle, he gave the compass to Jack, telling him with his last breath never to betray the compass.
We saw in Dead Men Tell No Tales, that Jack Sparrow holds the compass desiring something that would help him save the Wench and her crew from their attacker, the notorious Spanish pirate hunter Armando Salazar and his dreaded warship the Silent Mary, Jack took command of the Wench, steering her toward the Triangle. At the last moment, Jack tricked Salazar into sailing into the Triangle where all the Spaniards were killed in the explosion of gunpowder when the Silent Mary hit the reefs.