]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
ALSA: hda - Add position_fix=4 (COMBO) option
authorTakashi Iwai <tiwai@suse.de>
Tue, 28 Feb 2012 10:58:40 +0000 (11:58 +0100)
committerTakashi Iwai <tiwai@suse.de>
Tue, 28 Feb 2012 11:18:15 +0000 (12:18 +0100)
This patch adds a new position_fix option value, 4, as a combo mode
to use LPIB for playbacks and POSBUF for captures.  It's the way
recommended by Intel hardware guys.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Documentation/sound/alsa/ALSA-Configuration.txt
Documentation/sound/alsa/HD-Audio.txt
sound/pci/hda/hda_intel.c

index 936699e4f04b0abdf74788b66ace8ab1a16f66ff..9af64c508ab44d87601ad4dae3db17e597ac7fc9 100644 (file)
@@ -860,7 +860,8 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
 
     [Multiple options for each card instance]
     model      - force the model name
-    position_fix - Fix DMA pointer (0 = auto, 1 = use LPIB, 2 = POSBUF)
+    position_fix - Fix DMA pointer (0 = auto, 1 = use LPIB, 2 = POSBUF,
+                  3 = VIACOMBO, 4 = COMBO)
     probe_mask  - Bitmask to probe codecs (default = -1, meaning all slots)
                  When the bit 8 (0x100) is set, the lower 8 bits are used
                  as the "fixed" codec slots; i.e. the driver probes the
@@ -925,6 +926,11 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
            (Usually SD_LPIB register is more accurate than the
            position buffer.)
 
+           position_fix=3 is specific to VIA devices.  The position
+           of the capture stream is checked from both LPIB and POSBUF
+           values.  position_fix=4 is a combination mode, using LPIB
+           for playback and POSBUF for capture.
+
     NB: If you get many "azx_get_response timeout" messages at
     loading, it's likely a problem of interrupts (e.g. ACPI irq
     routing).  Try to boot with options like "pci=noacpi".  Also, you
index 91fee3b45fb80f75ac406dfbba093f1f49a418c1..7813c06a5c71d70a353862a6fec6713d3d73da3b 100644 (file)
@@ -59,7 +59,12 @@ a case, you can change the default method via `position_fix` option.
 `position_fix=1` means to use LPIB method explicitly.
 `position_fix=2` means to use the position-buffer.
 `position_fix=3` means to use a combination of both methods, needed
-for some VIA and ATI controllers.  0 is the default value for all other
+for some VIA controllers.  The capture stream position is corrected
+by comparing both LPIB and position-buffer values.
+`position_fix=4` is another combination available for all controllers,
+and uses LPIB for the playback and the position-buffer for the capture
+streams.
+0 is the default value for all other
 controllers, the automatic check and fallback to LPIB as described in
 the above.  If you get a problem of repeated sounds, this option might
 help.
index e354c16165417e9908bbafc39d636138c12ca8cf..6e958bf941915f3c2b8cb744e12a74a47896cfdf 100644 (file)
@@ -84,7 +84,7 @@ module_param_array(model, charp, NULL, 0444);
 MODULE_PARM_DESC(model, "Use the given board model.");
 module_param_array(position_fix, int, NULL, 0444);
 MODULE_PARM_DESC(position_fix, "DMA pointer read method."
-                "(0 = auto, 1 = LPIB, 2 = POSBUF, 3 = VIACOMBO).");
+                "(0 = auto, 1 = LPIB, 2 = POSBUF, 3 = VIACOMBO, 4 = COMBO).");
 module_param_array(bdl_pos_adj, int, NULL, 0644);
 MODULE_PARM_DESC(bdl_pos_adj, "BDL position adjustment offset.");
 module_param_array(probe_mask, int, NULL, 0444);
@@ -330,6 +330,7 @@ enum {
        POS_FIX_LPIB,
        POS_FIX_POSBUF,
        POS_FIX_VIACOMBO,
+       POS_FIX_COMBO,
 };
 
 /* Defines for ATI HD Audio support in SB450 south bridge */
@@ -2520,6 +2521,7 @@ static int __devinit check_position_fix(struct azx *chip, int fix)
        case POS_FIX_LPIB:
        case POS_FIX_POSBUF:
        case POS_FIX_VIACOMBO:
+       case POS_FIX_COMBO:
                return fix;
        }
 
@@ -2699,6 +2701,12 @@ static int __devinit azx_create(struct snd_card *card, struct pci_dev *pci,
 
        chip->position_fix[0] = chip->position_fix[1] =
                check_position_fix(chip, position_fix[dev]);
+       /* combo mode uses LPIB for playback */
+       if (chip->position_fix[0] == POS_FIX_COMBO) {
+               chip->position_fix[0] = POS_FIX_LPIB;
+               chip->position_fix[1] = POS_FIX_AUTO;
+       }
+
        check_probe_mask(chip, dev);
 
        chip->single_cmd = single_cmd;