aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2012-09-13 08:59:47 -0400
committerTakashi Iwai <tiwai@suse.de>2012-09-13 09:03:10 -0400
commit1dac6695c683c66d0cff10a84c6ed10dbbaabc18 (patch)
tree63965a27fda538bf24410b8590b7a21beec968dc
parent03efce755cf1b4cf1c14007e118dd1671e39f862 (diff)
ALSA: hda - Allow to pass position_fix=0 explicitly
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>
-rw-r--r--Documentation/sound/alsa/ALSA-Configuration.txt10
-rw-r--r--sound/pci/hda/hda_intel.c5
2 files changed, 11 insertions, 4 deletions
diff --git a/Documentation/sound/alsa/ALSA-Configuration.txt b/Documentation/sound/alsa/ALSA-Configuration.txt
index 4e4d0bc9816f..d90d8ec2853d 100644
--- a/Documentation/sound/alsa/ALSA-Configuration.txt
+++ b/Documentation/sound/alsa/ALSA-Configuration.txt
@@ -860,8 +860,14 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
860 860
861 [Multiple options for each card instance] 861 [Multiple options for each card instance]
862 model - force the model name 862 model - force the model name
863 position_fix - Fix DMA pointer (0 = auto, 1 = use LPIB, 2 = POSBUF, 863 position_fix - Fix DMA pointer
864 3 = VIACOMBO, 4 = COMBO) 864 -1 = system default: choose appropriate one per controller
865 hardware
866 0 = auto: falls back to LPIB when POSBUF doesn't work
867 1 = use LPIB
868 2 = POSBUF: use position buffer
869 3 = VIACOMBO: VIA-specific workaround for capture
870 4 = COMBO: use LPIB for playback, auto for capture stream
865 probe_mask - Bitmask to probe codecs (default = -1, meaning all slots) 871 probe_mask - Bitmask to probe codecs (default = -1, meaning all slots)
866 When the bit 8 (0x100) is set, the lower 8 bits are used 872 When the bit 8 (0x100) is set, the lower 8 bits are used
867 as the "fixed" codec slots; i.e. the driver probes the 873 as the "fixed" codec slots; i.e. the driver probes the
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index e1a12c754de9..195d84726187 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -64,7 +64,7 @@ static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;
64static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; 64static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;
65static bool enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP; 65static bool enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP;
66static char *model[SNDRV_CARDS]; 66static char *model[SNDRV_CARDS];
67static int position_fix[SNDRV_CARDS]; 67static int position_fix[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)] = -1};
68static int bdl_pos_adj[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)] = -1}; 68static int bdl_pos_adj[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)] = -1};
69static int probe_mask[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)] = -1}; 69static int probe_mask[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)] = -1};
70static int probe_only[SNDRV_CARDS]; 70static int probe_only[SNDRV_CARDS];
@@ -88,7 +88,7 @@ module_param_array(model, charp, NULL, 0444);
88MODULE_PARM_DESC(model, "Use the given board model."); 88MODULE_PARM_DESC(model, "Use the given board model.");
89module_param_array(position_fix, int, NULL, 0444); 89module_param_array(position_fix, int, NULL, 0444);
90MODULE_PARM_DESC(position_fix, "DMA pointer read method." 90MODULE_PARM_DESC(position_fix, "DMA pointer read method."
91 "(0 = auto, 1 = LPIB, 2 = POSBUF, 3 = VIACOMBO, 4 = COMBO)."); 91 "(-1 = system default, 0 = auto, 1 = LPIB, 2 = POSBUF, 3 = VIACOMBO, 4 = COMBO).");
92module_param_array(bdl_pos_adj, int, NULL, 0644); 92module_param_array(bdl_pos_adj, int, NULL, 0644);
93MODULE_PARM_DESC(bdl_pos_adj, "BDL position adjustment offset."); 93MODULE_PARM_DESC(bdl_pos_adj, "BDL position adjustment offset.");
94module_param_array(probe_mask, int, NULL, 0444); 94module_param_array(probe_mask, int, NULL, 0444);
@@ -2813,6 +2813,7 @@ static int __devinit check_position_fix(struct azx *chip, int fix)
2813 const struct snd_pci_quirk *q; 2813 const struct snd_pci_quirk *q;
2814 2814
2815 switch (fix) { 2815 switch (fix) {
2816 case POS_FIX_AUTO:
2816 case POS_FIX_LPIB: 2817 case POS_FIX_LPIB:
2817 case POS_FIX_POSBUF: 2818 case POS_FIX_POSBUF:
2818 case POS_FIX_VIACOMBO: 2819 case POS_FIX_VIACOMBO: