From 111d3af5f5fbf0e28570f1c01e83444d73c68a25 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Thu, 16 Feb 2006 18:17:58 +0100 Subject: [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 --- sound/pci/hda/hda_codec.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'sound/pci/hda/hda_codec.c') diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index 208a3341ec20..0d1566a39965 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); -- cgit v1.2.3