ALSA: hda - Call snd_hda_jack_report_sync() generically in hda_codec.c

Instead of calling the jack sync in the init callback of each codec,
call it generically at initialization and resume.  By calling it at
the last of resume sequence, a possible race between the jack sync and
the unsol event enablement in the current code will be closed, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
ALSA: hda - add runtime PM support

Runtime PM can bring more power saving:
- When the controller is suspended, its parent device will also have a chance
  to suspend.
- PCI subsystem can choose the lowest power state the controller can signal
  wake up from. This state can be D3cold on platforms with ACPI PM support.
And runtime PM can provide a gerneral sysfs interface for a system policy
manager.

Runtime PM support is based on current HDA power saving implementation. The user
can enable runtime PM on platfroms that provide acceptable latency on transition
from D3 to D0.

Details:
- When both power saving and runtime PM are enabled:
  -- If a codec supports 'stop-clock' in D3, it will request suspending the
     controller after it enters D3 and request resuming the controller before
     back to D0. Thus the controller will be suspended only when all codecs are
     suspended and support stop-clock in D3.
  -- User IO operations and HW wakeup signal can resume the controller back to
     D0.
- If runtime PM is disabled, power saving just works as before.
- If power saving is disabled, the controller won't be suspended because the
  power usage counter can never be 0.

More about 'stop-clock' feature:
If a codec can support targeted pass-through operations in D3 state when there
is no BCLK present on the link, it will set CLKSTOP flag in the supported power
states and report PS-ClkStopOk when entering D3 state. Please refer to HDA spec
section 7.3.3.10 Power state and 7.3.4.12 Supported Power State.

[Fixed CONFIG_PM_RUNTIME dependency in hda_intel.c by tiwai]

Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
ALSA: hda - bug fix on references without checking CONFIG_SND_HDA_POWER_SAVE

The patch to support runtime PM introduced a bug:
Module parameter 'power_save_controller', and the codec flag 'd3_stop_clk'
'd3_stop_clk_ok' are defined only when HDA power save is enabled in config. But
there are references to them without checking macro CONFIG_SND_HDA_POWER_SAVE.

This patch is to fix the bug.

Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
ALSA: cmi8328: Fix build error with CONFIG_GAMEPORT=n

  sound/isa/cmi8328.c: In function 'snd_cmi8328_remove':
  sound/isa/cmi8328.c:416:24: error: 'cmi' undeclared (first use in this function)
  sound/isa/cmi8328.c:416:24: note: each undeclared identifier is reported only once for each function it appears in
  make[3]: *** [sound/isa/cmi8328.o] Error 1

Reported-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
ALSA: pcxhr: Add 8 new sound cards

add new sound cards VX442HR VX442e PCX442HR PCX442e VX822HR VX822e PCX822HR and PCX822e

Signed-off-by: Markus Bollinger <bollinger@digigram.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>