Browse Source

ALSA: hda - Add position_fix=4 (COMBO) option

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>
Takashi Iwai 13 years ago
parent
commit
a6f2fd557f

+ 7 - 1
Documentation/sound/alsa/ALSA-Configuration.txt

@@ -860,7 +860,8 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
 
 
     [Multiple options for each card instance]
     [Multiple options for each card instance]
     model	- force the model name
     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)
     probe_mask  - Bitmask to probe codecs (default = -1, meaning all slots)
     		  When the bit 8 (0x100) is set, the lower 8 bits are used
     		  When the bit 8 (0x100) is set, the lower 8 bits are used
 		  as the "fixed" codec slots; i.e. the driver probes the
 		  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
 	    (Usually SD_LPIB register is more accurate than the
 	    position buffer.)
 	    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
     NB: If you get many "azx_get_response timeout" messages at
     loading, it's likely a problem of interrupts (e.g. ACPI irq
     loading, it's likely a problem of interrupts (e.g. ACPI irq
     routing).  Try to boot with options like "pci=noacpi".  Also, you
     routing).  Try to boot with options like "pci=noacpi".  Also, you

+ 6 - 1
Documentation/sound/alsa/HD-Audio.txt

@@ -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=1` means to use LPIB method explicitly.
 `position_fix=2` means to use the position-buffer.
 `position_fix=2` means to use the position-buffer.
 `position_fix=3` means to use a combination of both methods, needed
 `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
 controllers, the automatic check and fallback to LPIB as described in
 the above.  If you get a problem of repeated sounds, this option might
 the above.  If you get a problem of repeated sounds, this option might
 help.
 help.

+ 9 - 1
sound/pci/hda/hda_intel.c

@@ -84,7 +84,7 @@ module_param_array(model, charp, NULL, 0444);
 MODULE_PARM_DESC(model, "Use the given board model.");
 MODULE_PARM_DESC(model, "Use the given board model.");
 module_param_array(position_fix, int, NULL, 0444);
 module_param_array(position_fix, int, NULL, 0444);
 MODULE_PARM_DESC(position_fix, "DMA pointer read method."
 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_param_array(bdl_pos_adj, int, NULL, 0644);
 MODULE_PARM_DESC(bdl_pos_adj, "BDL position adjustment offset.");
 MODULE_PARM_DESC(bdl_pos_adj, "BDL position adjustment offset.");
 module_param_array(probe_mask, int, NULL, 0444);
 module_param_array(probe_mask, int, NULL, 0444);
@@ -330,6 +330,7 @@ enum {
 	POS_FIX_LPIB,
 	POS_FIX_LPIB,
 	POS_FIX_POSBUF,
 	POS_FIX_POSBUF,
 	POS_FIX_VIACOMBO,
 	POS_FIX_VIACOMBO,
+	POS_FIX_COMBO,
 };
 };
 
 
 /* Defines for ATI HD Audio support in SB450 south bridge */
 /* 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_LPIB:
 	case POS_FIX_POSBUF:
 	case POS_FIX_POSBUF:
 	case POS_FIX_VIACOMBO:
 	case POS_FIX_VIACOMBO:
+	case POS_FIX_COMBO:
 		return fix;
 		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] =
 	chip->position_fix[0] = chip->position_fix[1] =
 		check_position_fix(chip, position_fix[dev]);
 		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);
 	check_probe_mask(chip, dev);
 
 
 	chip->single_cmd = single_cmd;
 	chip->single_cmd = single_cmd;