ALSA: hda/realtek - Avoid setting wrong COEF on ALC269 & co
authorTakashi Iwai <tiwai@suse.de>
Fri, 15 Aug 2014 15:35:00 +0000 (17:35 +0200)
committerZefan Li <lizefan@huawei.com>
Thu, 25 Sep 2014 03:49:11 +0000 (11:49 +0800)
commit483320c2bc1981d960750b02ced9ae4d11fc0e1c
treeced6ea58c9a3aee4c064a2ed778b41cbae5094c7
parentd06e4b08aa764b2999b6a67f1cf2b7794ae5b0e1
ALSA: hda/realtek - Avoid setting wrong COEF on ALC269 & co

commit f3ee07d8b6e061bf34a7167c3f564e8da4360a99 upstream.

ALC269 & co have many vendor-specific setups with COEF verbs.
However, some verbs seem specific to some codec versions and they
result in the codec stalling.  Typically, such a case can be avoided
by checking the return value from reading a COEF.  If the return value
is -1, it implies that the COEF is invalid, thus it shouldn't be
written.

This patch adds the invalid COEF checks in appropriate places
accessing ALC269 and its variants.  The patch actually fixes the
resume problem on Acer AO725 laptop.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=52181
Tested-by: Francesco Muzio <muziofg@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Zefan Li <lizefan@huawei.com>
sound/pci/hda/patch_realtek.c