  For $G$ a symplectic or orthogonal $p$-adic group (not necessarily split), or
an inner form of a general linear $p$-adic group, we compute the endomorphism
algebras of some induced projective generators \`a la Bernstein of the category
of smooth representations of $G$ and show that these algebras are isomorphic to
the semi-direct product of a Hecke algebra with parameters by a finite group
algebra. Our strategy and parts of our intermediate results apply to a general
reductive connected $p$-adic group.
