Commit a6f2fd557f993aecc93d51afd9e339524107937f
1 parent
5556e14708
Exists in
master
and in
20 other branches
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>
Showing 3 changed files with 22 additions and 3 deletions Side-by-side Diff
Documentation/sound/alsa/ALSA-Configuration.txt
... | ... | @@ -860,7 +860,8 @@ |
860 | 860 | |
861 | 861 | [Multiple options for each card instance] |
862 | 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 (0 = auto, 1 = use LPIB, 2 = POSBUF, | |
864 | + 3 = VIACOMBO, 4 = COMBO) | |
864 | 865 | probe_mask - Bitmask to probe codecs (default = -1, meaning all slots) |
865 | 866 | When the bit 8 (0x100) is set, the lower 8 bits are used |
866 | 867 | as the "fixed" codec slots; i.e. the driver probes the |
... | ... | @@ -924,6 +925,11 @@ |
924 | 925 | the position buffer instead of reading SD_LPIB register. |
925 | 926 | (Usually SD_LPIB register is more accurate than the |
926 | 927 | position buffer.) |
928 | + | |
929 | + position_fix=3 is specific to VIA devices. The position | |
930 | + of the capture stream is checked from both LPIB and POSBUF | |
931 | + values. position_fix=4 is a combination mode, using LPIB | |
932 | + for playback and POSBUF for capture. | |
927 | 933 | |
928 | 934 | NB: If you get many "azx_get_response timeout" messages at |
929 | 935 | loading, it's likely a problem of interrupts (e.g. ACPI irq |
Documentation/sound/alsa/HD-Audio.txt
... | ... | @@ -59,7 +59,12 @@ |
59 | 59 | `position_fix=1` means to use LPIB method explicitly. |
60 | 60 | `position_fix=2` means to use the position-buffer. |
61 | 61 | `position_fix=3` means to use a combination of both methods, needed |
62 | -for some VIA and ATI controllers. 0 is the default value for all other | |
62 | +for some VIA controllers. The capture stream position is corrected | |
63 | +by comparing both LPIB and position-buffer values. | |
64 | +`position_fix=4` is another combination available for all controllers, | |
65 | +and uses LPIB for the playback and the position-buffer for the capture | |
66 | +streams. | |
67 | +0 is the default value for all other | |
63 | 68 | controllers, the automatic check and fallback to LPIB as described in |
64 | 69 | the above. If you get a problem of repeated sounds, this option might |
65 | 70 | help. |
sound/pci/hda/hda_intel.c
... | ... | @@ -84,7 +84,7 @@ |
84 | 84 | MODULE_PARM_DESC(model, "Use the given board model."); |
85 | 85 | module_param_array(position_fix, int, NULL, 0444); |
86 | 86 | MODULE_PARM_DESC(position_fix, "DMA pointer read method." |
87 | - "(0 = auto, 1 = LPIB, 2 = POSBUF, 3 = VIACOMBO)."); | |
87 | + "(0 = auto, 1 = LPIB, 2 = POSBUF, 3 = VIACOMBO, 4 = COMBO)."); | |
88 | 88 | module_param_array(bdl_pos_adj, int, NULL, 0644); |
89 | 89 | MODULE_PARM_DESC(bdl_pos_adj, "BDL position adjustment offset."); |
90 | 90 | module_param_array(probe_mask, int, NULL, 0444); |
... | ... | @@ -330,6 +330,7 @@ |
330 | 330 | POS_FIX_LPIB, |
331 | 331 | POS_FIX_POSBUF, |
332 | 332 | POS_FIX_VIACOMBO, |
333 | + POS_FIX_COMBO, | |
333 | 334 | }; |
334 | 335 | |
335 | 336 | /* Defines for ATI HD Audio support in SB450 south bridge */ |
... | ... | @@ -2520,6 +2521,7 @@ |
2520 | 2521 | case POS_FIX_LPIB: |
2521 | 2522 | case POS_FIX_POSBUF: |
2522 | 2523 | case POS_FIX_VIACOMBO: |
2524 | + case POS_FIX_COMBO: | |
2523 | 2525 | return fix; |
2524 | 2526 | } |
2525 | 2527 | |
... | ... | @@ -2699,6 +2701,12 @@ |
2699 | 2701 | |
2700 | 2702 | chip->position_fix[0] = chip->position_fix[1] = |
2701 | 2703 | check_position_fix(chip, position_fix[dev]); |
2704 | + /* combo mode uses LPIB for playback */ | |
2705 | + if (chip->position_fix[0] == POS_FIX_COMBO) { | |
2706 | + chip->position_fix[0] = POS_FIX_LPIB; | |
2707 | + chip->position_fix[1] = POS_FIX_AUTO; | |
2708 | + } | |
2709 | + | |
2702 | 2710 | check_probe_mask(chip, dev); |
2703 | 2711 | |
2704 | 2712 | chip->single_cmd = single_cmd; |