mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [GIT PULL] sound fix for 3.1
@ 2011-10-02 14:12 Takashi Iwai
  2011-10-25  7:02 ` Andres Freund
  0 siblings, 1 reply; 4+ messages in thread
From: Takashi Iwai @ 2011-10-02 14:12 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-kernel

Linus,

please pull a sound fix for v3.1 from:

  git://github.com/tiwai/sound.git for-linus

The only commit to pull is 798cb7e897210dbf827f69a302c0967e0380ebac,
a fix for a regression introduced in 3.1-rc.


Thanks!

Takashi

===

Takashi Iwai (1):
      ALSA: hda - Fix a regression of the position-buffer check

---
 sound/pci/hda/hda_intel.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index be69822..e9a2a87 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -1924,7 +1924,8 @@ static unsigned int azx_via_get_position(struct azx *chip,
 }
 
 static unsigned int azx_get_position(struct azx *chip,
-				     struct azx_dev *azx_dev)
+				     struct azx_dev *azx_dev,
+				     bool with_check)
 {
 	unsigned int pos;
 	int stream = azx_dev->substream->stream;
@@ -1940,7 +1941,7 @@ static unsigned int azx_get_position(struct azx *chip,
 	default:
 		/* use the position buffer */
 		pos = le32_to_cpu(*azx_dev->posbuf);
-		if (chip->position_fix[stream] == POS_FIX_AUTO) {
+		if (with_check && chip->position_fix[stream] == POS_FIX_AUTO) {
 			if (!pos || pos == (u32)-1) {
 				printk(KERN_WARNING
 				       "hda-intel: Invalid position buffer, "
@@ -1964,7 +1965,7 @@ static snd_pcm_uframes_t azx_pcm_pointer(struct snd_pcm_substream *substream)
 	struct azx *chip = apcm->chip;
 	struct azx_dev *azx_dev = get_azx_dev(substream);
 	return bytes_to_frames(substream->runtime,
-			       azx_get_position(chip, azx_dev));
+			       azx_get_position(chip, azx_dev, false));
 }
 
 /*
@@ -1987,7 +1988,7 @@ static int azx_position_ok(struct azx *chip, struct azx_dev *azx_dev)
 		return -1;	/* bogus (too early) interrupt */
 
 	stream = azx_dev->substream->stream;
-	pos = azx_get_position(chip, azx_dev);
+	pos = azx_get_position(chip, azx_dev, true);
 
 	if (WARN_ONCE(!azx_dev->period_bytes,
 		      "hda-intel: zero azx_dev->period_bytes"))

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [GIT PULL] sound fix for 3.1
  2011-10-02 14:12 [GIT PULL] sound fix for 3.1 Takashi Iwai
@ 2011-10-25  7:02 ` Andres Freund
  2011-10-25  8:30   ` Takashi Iwai
  0 siblings, 1 reply; 4+ messages in thread
From: Andres Freund @ 2011-10-25  7:02 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: Linus Torvalds, linux-kernel

Hi,

On Sunday, October 02, 2011 04:12:23 PM Takashi Iwai wrote:
> The only commit to pull is 798cb7e897210dbf827f69a302c0967e0380ebac,
> a fix for a regression introduced in 3.1-rc.
Unfortunately that fix causes problems in audio playback for me. The audio 
seems to play faster and have rather large skips.

Reverting that commit ontop of v3.1-rc10-2-gfb630b9 fixes that problem for me.

05:00.0 Audio device: Creative Labs [SB X-Fi Xtreme Audio] CA0110-IBG
        Subsystem: Creative Labs SB1040
        Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- 
Stepping- SERR- FastB2B- DisINTx-
        Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- 
<TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 64 (500ns min, 5000ns max)
        Interrupt: pin A routed to IRQ 16
        Region 0: Memory at fb9fc000 (32-bit, non-prefetchable) [size=16K]
        Capabilities: [dc] Power Management version 3
                Flags: PMEClk- DSI+ D1+ D2+ AuxCurrent=0mA 
PME(D0-,D1-,D2-,D3hot-,D3cold-)
                Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
        Kernel driver in use: snd_hda_intel

Anything more you need?

Greetings, 

Andres

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [GIT PULL] sound fix for 3.1
  2011-10-25  7:02 ` Andres Freund
@ 2011-10-25  8:30   ` Takashi Iwai
  2011-10-25  9:16     ` Andres Freund
  0 siblings, 1 reply; 4+ messages in thread
From: Takashi Iwai @ 2011-10-25  8:30 UTC (permalink / raw)
  To: Andres Freund; +Cc: Linus Torvalds, linux-kernel

At Tue, 25 Oct 2011 09:02:46 +0200,
Andres Freund wrote:
> 
> Hi,
> 
> On Sunday, October 02, 2011 04:12:23 PM Takashi Iwai wrote:
> > The only commit to pull is 798cb7e897210dbf827f69a302c0967e0380ebac,
> > a fix for a regression introduced in 3.1-rc.
> Unfortunately that fix causes problems in audio playback for me. The audio 
> seems to play faster and have rather large skips.
> 
> Reverting that commit ontop of v3.1-rc10-2-gfb630b9 fixes that problem for me.
> 
> 05:00.0 Audio device: Creative Labs [SB X-Fi Xtreme Audio] CA0110-IBG
>         Subsystem: Creative Labs SB1040
>         Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- 
> Stepping- SERR- FastB2B- DisINTx-
>         Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- 
> <TAbort- <MAbort- >SERR- <PERR- INTx-
>         Latency: 64 (500ns min, 5000ns max)
>         Interrupt: pin A routed to IRQ 16
>         Region 0: Memory at fb9fc000 (32-bit, non-prefetchable) [size=16K]
>         Capabilities: [dc] Power Management version 3
>                 Flags: PMEClk- DSI+ D1+ D2+ AuxCurrent=0mA 
> PME(D0-,D1-,D2-,D3hot-,D3cold-)
>                 Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
>         Kernel driver in use: snd_hda_intel
> 
> Anything more you need?

Grrr, I hate this endless madness with the DMA position...

Could you try position_fix=1 or position_fix=2 option whether it
fixes the problem?  If position_fix=1 works, try the patch below
without the option.


thanks,

Takashi

---
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index bd7fc99..096507d 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -3063,12 +3063,12 @@ static DEFINE_PCI_DEVICE_TABLE(azx_ids) = {
 	  .class = PCI_CLASS_MULTIMEDIA_HD_AUDIO << 8,
 	  .class_mask = 0xffffff,
 	  .driver_data = AZX_DRIVER_CTX | AZX_DCAPS_CTX_WORKAROUND |
-	  AZX_DCAPS_RIRB_PRE_DELAY },
+	  AZX_DCAPS_RIRB_PRE_DELAY | AZX_DCAPS_POSFIX_LPIB },
 #else
 	/* this entry seems still valid -- i.e. without emu20kx chip */
 	{ PCI_DEVICE(0x1102, 0x0009),
 	  .driver_data = AZX_DRIVER_CTX | AZX_DCAPS_CTX_WORKAROUND |
-	  AZX_DCAPS_RIRB_PRE_DELAY },
+	  AZX_DCAPS_RIRB_PRE_DELAY | AZX_DCAPS_POSFIX_LPIB },
 #endif
 	/* Vortex86MX */
 	{ PCI_DEVICE(0x17f3, 0x3010), .driver_data = AZX_DRIVER_GENERIC },

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [GIT PULL] sound fix for 3.1
  2011-10-25  8:30   ` Takashi Iwai
@ 2011-10-25  9:16     ` Andres Freund
  0 siblings, 0 replies; 4+ messages in thread
From: Andres Freund @ 2011-10-25  9:16 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: linux-kernel

Hi,

On Tuesday 25 Oct 2011 10:30:20 Takashi Iwai wrote:
> > On Sunday, October 02, 2011 04:12:23 PM Takashi Iwai wrote:
> > > The only commit to pull is 798cb7e897210dbf827f69a302c0967e0380ebac,
> > > a fix for a regression introduced in 3.1-rc.
> > 
> > Unfortunately that fix causes problems in audio playback for me. The
> > audio seems to play faster and have rather large skips.
> > 
> > Reverting that commit ontop of v3.1-rc10-2-gfb630b9 fixes that problem
> > for me.
> > 
> > 05:00.0 Audio device: Creative Labs [SB X-Fi Xtreme Audio] CA0110-IBG
> > 
> >         Subsystem: Creative Labs SB1040
> >         Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop-
> >         ParErr-
> > 
> > Stepping- SERR- FastB2B- DisINTx-
> > 
> >         Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort-
> > 
> > <TAbort- <MAbort- >SERR- <PERR- INTx-
> > 
> >         Latency: 64 (500ns min, 5000ns max)
> >         Interrupt: pin A routed to IRQ 16
> >         Region 0: Memory at fb9fc000 (32-bit, non-prefetchable)
> >         [size=16K] Capabilities: [dc] Power Management version 3
> >         
> >                 Flags: PMEClk- DSI+ D1+ D2+ AuxCurrent=0mA
> > 
> > PME(D0-,D1-,D2-,D3hot-,D3cold-)
> > 
> >                 Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
> >         
> >         Kernel driver in use: snd_hda_intel
> > 
> > Anything more you need?
> 
> Grrr, I hate this endless madness with the DMA position...
> 
> Could you try position_fix=1 or position_fix=2 option whether it
> fixes the problem?  If position_fix=1 works, try the patch below
> without the option.
Will do as soon as I am home again (~7 hours from now).

Andres

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-10-25  9:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-02 14:12 [GIT PULL] sound fix for 3.1 Takashi Iwai
2011-10-25  7:02 ` Andres Freund
2011-10-25  8:30   ` Takashi Iwai
2011-10-25  9:16     ` Andres Freund

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome