* [PATCH] ALSA: hda - Add position_fix=4 (COMBO) option
@ 2012-02-28 11:37 Takashi Iwai
2012-02-28 18:02 ` David Henningsson
0 siblings, 1 reply; 3+ messages in thread
From: Takashi Iwai @ 2012-02-28 11:37 UTC (permalink / raw)
To: Heasley, Seth; +Cc: alsa-devel
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>
---
Seth, this is the patch to add the mode you mentioned.
It'll be queued for 3.4 kernel. This mode isn't chosen as default yet,
but if this is confirmed to work more reliably on Intel controllers,
we can set these as default for them.
Documentation/sound/alsa/ALSA-Configuration.txt | 8 +++++++-
Documentation/sound/alsa/HD-Audio.txt | 7 ++++++-
sound/pci/hda/hda_intel.c | 10 +++++++++-
3 files changed, 22 insertions(+), 3 deletions(-)
diff --git a/Documentation/sound/alsa/ALSA-Configuration.txt b/Documentation/sound/alsa/ALSA-Configuration.txt
index 936699e..9af64c5 100644
--- a/Documentation/sound/alsa/ALSA-Configuration.txt
+++ b/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]
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
diff --git a/Documentation/sound/alsa/HD-Audio.txt b/Documentation/sound/alsa/HD-Audio.txt
index 91fee3b..7813c06 100644
--- a/Documentation/sound/alsa/HD-Audio.txt
+++ b/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=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.
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index e354c16..6e958bf 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/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_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;
--
1.7.9
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ALSA: hda - Add position_fix=4 (COMBO) option
2012-02-28 11:37 [PATCH] ALSA: hda - Add position_fix=4 (COMBO) option Takashi Iwai
@ 2012-02-28 18:02 ` David Henningsson
2012-02-28 19:32 ` Takashi Iwai
0 siblings, 1 reply; 3+ messages in thread
From: David Henningsson @ 2012-02-28 18:02 UTC (permalink / raw)
To: Takashi Iwai; +Cc: alsa-devel, Heasley, Seth
On 02/28/2012 12:37 PM, Takashi Iwai wrote:
> 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.
Interesting. More specifically, for what chips were this mode
recommended? There were none added with the patch.
--
David Henningsson, Canonical Ltd.
http://launchpad.net/~diwic
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ALSA: hda - Add position_fix=4 (COMBO) option
2012-02-28 18:02 ` David Henningsson
@ 2012-02-28 19:32 ` Takashi Iwai
0 siblings, 0 replies; 3+ messages in thread
From: Takashi Iwai @ 2012-02-28 19:32 UTC (permalink / raw)
To: David Henningsson; +Cc: alsa-devel, Heasley, Seth
At Tue, 28 Feb 2012 19:02:04 +0100,
David Henningsson wrote:
>
> On 02/28/2012 12:37 PM, Takashi Iwai wrote:
> > 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.
>
> Interesting. More specifically, for what chips were this mode
> recommended? There were none added with the patch.
I forward this question to Seth.
The patch didn't enable this mode as default simply because it wasn't
tested throughly, and I also don't know which should be set.
If we get more information from Intel h/w guys, and after confirming
it actually works (doesn't regress, at least), we can change the
default...
thanks,
Takashi
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-02-28 19:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-28 11:37 [PATCH] ALSA: hda - Add position_fix=4 (COMBO) option Takashi Iwai
2012-02-28 18:02 ` David Henningsson
2012-02-28 19:32 ` Takashi Iwai
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.