Biquad high-pass filter not working as expected
There is (at least) one error in your routine. It concerns the definition of alpha. The correct formula is

$$\alpha=\frac{\sin(\omega_0)}{2Q}$$

However, you implemented

$$\alpha=\frac{\sin(\omega_0)\cdot Q}{2}$$

But that shouldn't influence the function of the filter as a high pass filter; it just implements the inverse of the given $Q$ value.

Other than that, it's of course important that the variables x1, x2, y1, and y2 retain their value between function calls. I'm not sure if and where you take care of that.

As a final remark, you might want to think about if it's really necessary to recompute the filter coefficients each time a new sample arrives.