ALSA: hda - Allow to pass position_fix=0 explicitly
authorTakashi Iwai <tiwai@suse.de>
Thu, 13 Sep 2012 12:59:47 +0000 (14:59 +0200)
committerTakashi Iwai <tiwai@suse.de>
Thu, 13 Sep 2012 13:03:10 +0000 (15:03 +0200)
Set the default value of position_fix -1, and allow user passing
position_fix=0 explicitly to set the "auto" position-fix mode.
Otherwise the auto mode may be switched to others like COMBO of
VIACOMBO when the controller prefers it, thus user can't set the auto
mode any longer.

Also updated the documentation appropriately, too.

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

index 4e4d0bc9816f9d25f1c185d795f98b476bb50a2c..d90d8ec2853df3e49e18edefc1bffd8995826403 100644 (file)
@@ -860,8 +860,14 @@ 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,
-                  3 = VIACOMBO, 4 = COMBO)
+    position_fix - Fix DMA pointer
+                 -1 = system default: choose appropriate one per controller
+                       hardware
+                 0 = auto: falls back to LPIB when POSBUF doesn't work
+                 1 = use LPIB
+                 2 = POSBUF: use position buffer
+                 3 = VIACOMBO: VIA-specific workaround for capture
+                 4 = COMBO: use LPIB for playback, auto for capture stream
     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
index e1a12c754de98b63d0b4cd1f85494e3a6ee1fd64..195d847261873be24e9297e9e2ab5b77a876eef9 100644 (file)
@@ -64,7 +64,7 @@ static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;
 static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;
 static bool enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP;
 static char *model[SNDRV_CARDS];
-static int position_fix[SNDRV_CARDS];
+static int position_fix[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)] = -1};
 static int bdl_pos_adj[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)] = -1};
 static int probe_mask[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)] = -1};
 static int probe_only[SNDRV_CARDS];
@@ -88,7 +88,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, 4 = COMBO).");
+                "(-1 = system default, 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);
@@ -2813,6 +2813,7 @@ static int __devinit check_position_fix(struct azx *chip, int fix)
        const struct snd_pci_quirk *q;
 
        switch (fix) {
+       case POS_FIX_AUTO:
        case POS_FIX_LPIB:
        case POS_FIX_POSBUF:
        case POS_FIX_VIACOMBO: