summaryrefslogtreecommitdiff
path: root/sound/pci/hda/hda_codec.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2006-02-16 17:17:58 (GMT)
committerJaroslav Kysela <perex@suse.cz>2006-03-22 09:29:53 (GMT)
commit111d3af5f5fbf0e28570f1c01e83444d73c68a25 (patch)
tree4679b8c2336c475016cd19c81263df0347741684 /sound/pci/hda/hda_codec.c
parent353b9e667042d6faa15a41df022bf38c949a7b2f (diff)
downloadlinux-fsl-qoriq-111d3af5f5fbf0e28570f1c01e83444d73c68a25.tar.xz
[ALSA] hda-intel - Automatic correction to single_cmd mode
Modules: HDA Codec driver,HDA Intel driver Switch to single_cmd mode automatically as a fallback when CORB/RIRB communication doesn't work well. It may make the driver working on some devices with broken BIOS/ACPI support. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_codec.c')
-rw-r--r--sound/pci/hda/hda_codec.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index 208a334..0d1566a 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -531,6 +531,12 @@ int snd_hda_codec_new(struct hda_bus *bus, unsigned int codec_addr,
bus->caddr_tbl[codec_addr] = codec;
codec->vendor_id = snd_hda_param_read(codec, AC_NODE_ROOT, AC_PAR_VENDOR_ID);
+ if (codec->vendor_id == -1)
+ /* read again, hopefully the access method was corrected
+ * in the last read...
+ */
+ codec->vendor_id = snd_hda_param_read(codec, AC_NODE_ROOT,
+ AC_PAR_VENDOR_ID);
codec->subsystem_id = snd_hda_param_read(codec, AC_NODE_ROOT, AC_PAR_SUBSYSTEM_ID);
codec->revision_id = snd_hda_param_read(codec, AC_NODE_ROOT, AC_PAR_REV_ID);