  We study the endomorphism algebras attached to Bernstein components of
reductive $p$-adic groups and construct a local Langlands correspondence with
the appropriate set of enhanced $L$-parameters, using certain "desiderata"
properties for the LLC for supercuspidal representations of proper Levi
subgroups. We give several applications of our LLC to various reductive groups
with Bernstein blocks cuspidally supported on general linear groups.
  In particular, for Levi subgroups of maximal parabolic of the split
exceptional group $G_2$, we compute the explicit weight functions for the
corresponding Hecke algebras, and show that they satisfy a conjecture of
Lusztig's. Some results from $\S 4$ are used by the same authors to construct a
full local Langlands correspondence in \cite{AX-LLC}. Moreover, we also prove a
reduction to depth zero case result for the Bernstein components attached to
regular supercuspidal representations of Levi subgroups.
