We establish a precise relation between mixed boundary conditions for scalar fields in asymptotically anti de Sitter spacetimes and the equation of state of the dual fluid. We provide a detailed derivation of the relation in the case of five bulk-dimensions for scalar fields saturating the Breitenlohner-Freedman bound. As a concrete example, we discuss the five dimensional scalar-tensor theories describing a constant speed of sound.