By the end of the Livonian War (1558–1583) the Baltic provinces had been split between the PLC (Lithuania) and Sweden. Sweden got Estonia while the PLC got Latvia (directly and the vassal states).
When Sigismund III was kicked out of Sweden he "generously" promised Estonia to the PLC (almost like in "The Deluge": "And I'm granting his Swedish Majesty the Netherlands!"

). Series of Swedish-Polish wars followed (1600 - 1629) with the resulting complete loss of Livonia by the PLC.
Armies of the PLC had been routinely winning the field battles but were ill-structured for siege warfare and as soon as the Swedes had been capturing a fortified city, squeezing them out was almost impossible. However, the early brilliant victories of the PLC's cavalry and unwillingness of the Sejm to spend money on these wars prevented the Commonwealth from a proper modernization of its armies and the rest is history.
Now, let's assume that the common sense prevailed, the army is properly modernized (BTW, by the time of the Smolensk War of 1632–1634 the PLC had a reasonably good infantry and artillery so the task was not impossible) and the PLC retains the area.
What are consequences?
1st, Sweden is not getting the custom dues from Riga and other Livonian ports through which Lithuanian grain was exported (even when the war was going on). Hence, less money to build and maintain an army.
2nd, GA, after being defeated in Livonia, may not have enough reputation to get French subsidies so, in the best case scenario, the Swedes are not even appearing in the 30YW.
3rd, in a long term there is no reason for the GNW: Riga and most of Livonia already are in the Polish hands and Peter would be reluctant to start war against Sweden without the allies. As a result, Russian Baltic adventure either does not happen or happens noticeably later and scope of the initial conquests would be different: either Latvia with Riga if the war is against the PLC or Ingria and perhaps Estonia if it is against Sweden. It is unlikely that there will be a war against both simultaneously (actually, this was a case during the reign of Tsar Alexey but it was a byproduct of the diplomatic misunderstanding: Tsardom started war with Sweden not knowing that a peace treaty with the PLC must be ratified by the Sejm).
Opinions?