Let $f(x) \in \mathbb{Z}[x]$ be an irreducible quadratic polynomial, and let $0 \leq \alpha \leq \beta \leq 1$ be real numbers. Put
$$\displaystyle S_f(\alpha, \beta; d) = |\{v \in \{1, \cdots, d\} : f(v) \equiv 0 \pmod{d}, \alpha d \leq v \leq \beta d \}|.$$
Then it is known that
(1) $$\displaystyle \sum_{d \leq D} S_f(\alpha, \beta; d) \sim (\beta - \alpha) \sum_{d \leq D} S_f(0,1; d).$$
The proof of this follows from Weyl's criterion, and from the estimate
(2) $$\displaystyle \sum_{d \leq D} \sum_{f(v) \equiv 0 \pmod{d}} \exp \left(\frac{2\pi i hv}{d}\right) \ll_h D^{2/3} (\log D)^2$$
for all $h \ne 0$.
However, in all of the papers I've seen this I have not seen an explicit estimate for the error term in (1). Can one extract a power-saving error term for (1) from (2)? If so, what is the dependence on the polynomial $f$?