  It is well-known that affine Hecke algebras are very useful to describe the
smooth representations of any connected reductive p-adic group G, in terms of
the supercuspidal representations of its Levi subgroups. The goal of this paper
is to create a similar role for affine Hecke algebras on the Galois side of the
local Langlands correspondence.
  To every Bernstein component of enhanced Langlands parameters for G we
canonically associate an affine Hecke algebra (possibly extended with a finite
R-group). We prove that the irreducible representations of this algebra are
naturally in bijection with the members of the Bernstein component, and that
the set of central characters of the algebra is naturally in bijection with the
collection of cuspidal supports of these enhanced Langlands parameters. These
bijections send tempered or (essentially) square-integrable representations to
the expected kind of Langlands parameters.
  Furthermore we check that for many reductive p-adic groups, if a Bernstein
component B for G corresponds to a Bernstein component B^\vee of enhanced
Langlands parameters via the local Langlands correspondence, then the affine
Hecke algebra that we associate to B^\vee is Morita equivalent with the Hecke
algebra associated to B. This constitutes a generalization of Lusztig's work on
unipotent representations. It might be useful to establish a local Langlands
correspondence for more classes of irreducible smooth representations.
