ALSA: hda - Clean up async codec PM using standard async infrastructure

This simplifies lots of codes indeed.

Tested-by: Mengdong Lin <mengdong.lin@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
ALSA: hda - Remove quirk for Dell Vostro 131

I've tested the old Dell Vostro 131 with the latest generic parser
and it works just fine, and as a bonus we get better jack detection
features in userspace. Therefore this quirk can be removed.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
ALSA: hda - skip depop delay before D3 for Haswell and Valleyview2 display codec

This patch skips the default depop delay before D3 for Haswell (10 ms) and
Valleyview2 (100 ms) display codec, to reduce codec suspend time.

The analog part of display audio is implemented in the external display. Some
displays have weak pop noise while others not when suspending, no matter there
is the default delay or not.

Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Merge branch 'for-linus'
Merge branch 'for-next'
ALSA: hda - Allow capture-only configuration

We have blindly assumed that all valid configurations should have
either analog or digital playback, but there can be capture-only
configurations.  The parser shouldn't escape in such a case.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Merge branch 'for-next'
ALSA: hda - Add missing initialization of aamix paths

The loopback mixing paths aren't initialized correctly at init
callback.  Mostly this is harmless as codecs usually set the mute
state as default, but we still should make sure.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Merge branch 'for-next'
ALSA: hda - Ignore small negative LPIB delay correction

Sometimes the hardware reports LPIB being advanced than POSBUF.
When this happens, the driver adjusts to a positive value by adding
the buffer size.  Then the driver detects it as an error (greater than
the period size), and stops the LPIB delay account from this point
on.

When I took a close look at these conditions, the values shown are all
very small numbers, and it'd be better to just ignore these values
instead of discontinuing the LPIB delay correction.

In this patch, the driver checks a negative delay value and ignores if
it's a significantly small error.  Currently the threshold is set to
64 frames, but could be smaller.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Merge branch 'for-next'
ALSA: hda - Enable stereo mix as default for AD and VIA codecs

AD and VIA codecs had stereo mixer input enabled as default before
moving to the generic parser, and people think the lack of such a
regression.  In this patch, the stereo mixer input is added back to
the input selection if no auto-mic is available, and if it's not
disabled explicitly via hint.  This should satisfy most of demands,
i.e. stereo mix on desktop machines like what it worked before, and it
still keeps the new auto-mic feature on laptops.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
ALSA: hda - Split verb definitions into sound/hda_verbs.h

Since there are more HD-audio compatible codecs, move the definitions
of HD-audio verbs into common header location, include/sound, so that
it can be included cleanly from other drivers than HD-audio driver.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Merge branch 'for-next'
ALSA: hda - A Dell headset detection quirk

On the Dell Optiplex 3030 machine (codec Subsystem Id: 0x10280623),
no external microphone can be detected when plugging a 3-ring
headset. If we add "model=dell-headset-multi" for the
snd-hda-intel.ko, the problem will disappear.

BugLink: https://bugs.launchpad.net/hwe-somerville/+bug/1259435
CC: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
ALSA: hda - Another Dell headset detection quirk

On the Dell Inspiron 3045 machine (codec Subsystem Id: 0x10280628),
no external microphone can be detected when plugging a 3-ring
headset. If we add "model=dell-headset-multi" for the
snd-hda-intel.ko, the problem will disappear.

BugLink: https://bugs.launchpad.net/hwe-somerville/+bug/1259437
CC: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Merge branch 'for-linus'