Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=df802952b723cdb08f2f8a3cba396c357290850b
Commit:     df802952b723cdb08f2f8a3cba396c357290850b
Parent:     d10ad1a26da03fe089c02846a95fa5938c3ca3ce
Author:     Takashi Iwai <[EMAIL PROTECTED]>
AuthorDate: Mon Jul 2 19:18:00 2007 +0200
Committer:  Jaroslav Kysela <[EMAIL PROTECTED]>
CommitDate: Fri Jul 20 11:11:39 2007 +0200

    [ALSA] hda-codec - Fix the error in DAC assignment of STAC codec
    
    The STAC codec support code has the automatic recognition of
    additional side-output pins, and this may result in an error when
    the assigned pin has no corresponding DAC connection.
    The patch fixes the problem -- it corrects the line_outs again
    without such additional pins.
    
    Signed-off-by: Takashi Iwai <[EMAIL PROTECTED]>
    Signed-off-by: Jaroslav Kysela <[EMAIL PROTECTED]>
---
 sound/pci/hda/patch_sigmatel.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index 270539a..e89180c 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -1228,7 +1228,7 @@ static int is_in_dac_nids(struct sigmatel_spec *spec, 
hda_nid_t nid)
  * and 9202/925x. For those, dac_nids[] must be hard-coded.
  */
 static int stac92xx_auto_fill_dac_nids(struct hda_codec *codec,
-                                      const struct auto_pin_cfg *cfg)
+                                      struct auto_pin_cfg *cfg)
 {
        struct sigmatel_spec *spec = codec->spec;
        int i, j, conn_len = 0; 
@@ -1253,6 +1253,13 @@ static int stac92xx_auto_fill_dac_nids(struct hda_codec 
*codec,
                }
 
                if (j == conn_len) {
+                       if (spec->multiout.num_dacs > 0) {
+                               /* we have already working output pins,
+                                * so let's drop the broken ones again
+                                */
+                               cfg->line_outs = spec->multiout.num_dacs;
+                               break;
+                       }
                        /* error out, no available DAC found */
                        snd_printk(KERN_ERR
                                   "%s: No available DAC for pin 0x%x\n",
-
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