The gemara makes a distinction between stam and mefaresh. If one simply stipulates that there shouldn't be ona'ah in the sale, we pasken like rav that there is still ona'ah. However, if the seller explicitly states that the item is worth $100 but he is selling it for $200 and stipulates "on the condition that there should not be ona'ah", it is permitted to overcharge. Rashi explains that this only works because we follow R' Yehuda who says that one can make a monetary stipulation, just that we are concerned that if the price is not explicitly stated the buyer will be misled into thinking that there isn't any ona'ah when in fact there is - therefore it is necessary to state the exact price. But, being that it is based on the opinion of R' Yehuda that one may make a condition to avoid an obligation when it comes to monetary matters, it seems clear that even if the buyer is aware of the price there would still be an issur of ona'ah. Therefore, it is necessary for the seller to make a condition stipulating that there shouldn't be any ona'ah, which works according to R' Yehuda.
Although the din of R' Yehuda that one may stipulate on monetary matters is based on the notion that one can be mochel there rights, it seems that in order to invoke the mechila of the buyer the seller is required to stipulate the condition AND notify the buyer of the actual price. The Shluchan Aruch (C.M. 227:21) writes this halacha as it appears in the braisa without clearly stating whether or not it is necessary to reveal the actual price and stipulate the condition of there not being ona'ah. Aside from the buyer being notified that there is ona'ah in this transaction the sm"a (39) explains that the implication of the braisa and the shulchan aruch is that the buyer must be aware of the exact actual price and it is not sufficient for the seller to just simply say that he is being overcharged. The rationale is that the buyer will not be mochel unless he is aware of the true amount that he is overpaying. However, the Taz seems to disagree and hold that as long as the buyer truly realizes that he is being over charged, it isn't necessary that he realize the exact price of the item.
Based on this, in order to avoid ona'ah the seller must make the buyer aware that he is being charged above market value (taz), and perhaps even tell him the actual price (sm"a). In addition to this, the seller must use a t'nai by saying that he is selling "on the condition that there shouldn't be on him ona'ah). This implies that the issur ona'ah cannot be simply avoided by the buyer being aware of the price, but rather the seller must explicitly stipulate that the buyer should be mochel the ona'ah.