Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e8a7f136f5edb6ae83b14faaa0da2a3c4558f431
Commit:     e8a7f136f5edb6ae83b14faaa0da2a3c4558f431
Parent:     768d8c7df886fc5cc9d6057cc987ef8e52d197b5
Author:     Danny Tholen <[EMAIL PROTECTED]>
AuthorDate: Tue Sep 11 21:41:56 2007 +0200
Committer:  Jaroslav Kysela <[EMAIL PROTECTED]>
CommitDate: Tue Oct 16 16:50:20 2007 +0200

    [ALSA] hda-intel - Improve HD-audio codec probing robustness
    
    When modem is disabled in the BIOS, detection of the number of codecs
    always fails after booting if STATESTS is not cleared first.
    This patch fixes this problem and also adds an error check in a place
    where a read error would lead to a very large number of pointless loops.
    
    Signed-off-by: Danny Tholen <[EMAIL PROTECTED]>
    Signed-off-by: Takashi Iwai <[EMAIL PROTECTED]>
    Signed-off-by: Jaroslav Kysela <[EMAIL PROTECTED]>
---
 sound/pci/hda/hda_codec.c |    2 ++
 sound/pci/hda/hda_intel.c |    3 +++
 2 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index e594de0..535bcb7 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -155,6 +155,8 @@ int snd_hda_get_sub_nodes(struct hda_codec *codec, 
hda_nid_t nid,
        unsigned int parm;
 
        parm = snd_hda_param_read(codec, nid, AC_PAR_NODE_COUNT);
+       if (parm == -1)
+               return 0;
        *start_id = (parm >> 16) & 0x7fff;
        return (int)(parm & 0x7fff);
 }
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index 72fd345..68dc9a2 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -687,6 +687,9 @@ static int azx_reset(struct azx *chip)
 {
        int count;
 
+       /* clear STATESTS */
+       azx_writeb(chip, STATESTS, STATESTS_INT_MASK);
+
        /* reset controller */
        azx_writel(chip, GCTL, azx_readl(chip, GCTL) & ~ICH6_GCTL_RESET);
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to