[alsa-devel] [PATCH] ALSA: hda - using POS_FIX_LPIB on Broadwell HDMI Audio

Takashi Iwai tiwai at suse.de
Thu May 8 08:19:58 CEST 2014


At Thu, 8 May 2014 06:13:31 +0000,
Yang, Libin wrote:
> 
> Hi Takashi,
> 
> > -----Original Message-----
> > From: Takashi Iwai [mailto:tiwai at suse.de]
> > Sent: Thursday, May 8, 2014 1:51 PM
> > To: Yang, Libin
> > Cc: alsa-devel at alsa-project.org; Lin, Mengdong; Pierre-Louis Bossart
> > Subject: Re: [PATCH] ALSA: hda - using POS_FIX_LPIB on Broadwell HDMI
> > Audio
> > 
> > At Thu, 8 May 2014 05:48:04 +0000,
> > Yang, Libin wrote:
> > >
> > > Hi Takashi,
> > >
> > > I checked the wallclock counter. The counter is OK. But it failed to correct
> > the position.
> > 
> > So, how wrong the position buffer is?  Is the problem intermittent?
> > Please elaborate more.
> 
> The issue is the position is almost always inaccurate. You will hear there is intermittent noise in the sound. And the sound is played faster than it should be.
> 
> The following message is what I got from dmesg:
> 
> [ 73.278117] snd_hda_intel 0000:00:03.0: IRQ timing workaround is activated for card #0. Suggest a bigger bdl_pos_adj.
> [ 73.528575] snd_hda_intel 0000:00:03.0: Unstable LPIB (26240 >= 24064); disabling LPIB delay counting
> 
> Do you think the print of wallclk and position information in the function azx_position_ok() is useful to you? If yes, I will add debug code to print the info.

It'd better to have the raw values of posbuf, lpib and wallclock for
further analysis, yes.

BTW, did you try non-snoop mode via snoop=0 option?


Takashi


> 
> > 
> > 
> > Takashi
> > 
> > > This issue happens when we play sound on HDMI audio. We have tried
> > with aplay and paplay.
> > >
> > > I have tried the buffer size of 16384, 8192 and 4096 and with the sample
> > rate of 48KHz and 44.1KHz.
> > >
> > > Regards,
> > > Libin
> > >
> > > > -----Original Message-----
> > > > From: Takashi Iwai [mailto:tiwai at suse.de]
> > > > Sent: Thursday, May 8, 2014 1:09 PM
> > > > To: Yang, Libin
> > > > Cc: alsa-devel at alsa-project.org; Lin, Mengdong; Pierre-Louis Bossart
> > > > Subject: Re: [PATCH] ALSA: hda - using POS_FIX_LPIB on Broadwell
> > > > HDMI Audio
> > > >
> > > > At Thu,  8 May 2014 02:03:24 +0800,
> > > > libin.yang at intel.com wrote:
> > > > >
> > > > > From: Libin Yang <libin.yang at intel.com>
> > > > >
> > > > > Audio stream is not continuous if using position buffer on
> > > > > Broadwell HDMI audio. Sound is clipped.
> > > > > Fix this issue by using POS_FIX_LPIB.
> > > >
> > > > That's odd.  The recent Intel hardware has a wallclock support, so
> > > > the position should be corrected by that.
> > > >
> > > > In which situation did the problem happen?  Did it happen with every
> > > > application and any period/buffer setup?
> > > >
> > > >
> > > > Takashi
> > > >
> > > > >
> > > > > Signed-off-by: Libin Yang <libin.yang at intel.com>
> > > > > ---
> > > > >  sound/pci/hda/hda_intel.c | 1 +
> > > > >  1 file changed, 1 insertion(+)
> > > > >
> > > > > diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
> > > > > index b540ad7..9cd40c6 100644
> > > > > --- a/sound/pci/hda/hda_intel.c
> > > > > +++ b/sound/pci/hda/hda_intel.c
> > > > > @@ -993,6 +993,7 @@ static struct snd_pci_quirk position_fix_list[] = {
> > > > >  	SND_PCI_QUIRK(0x1565, 0x8218, "Biostar Microtech", POS_FIX_LPIB),
> > > > >  	SND_PCI_QUIRK(0x1849, 0x0888, "775Dual-VSTA", POS_FIX_LPIB),
> > > > >  	SND_PCI_QUIRK(0x8086, 0x2503, "DG965OT AAD63733-203",
> > > > POS_FIX_LPIB),
> > > > > +	SND_PCI_QUIRK(0x8086, 0x2010, "Broadwell HDMI audio",
> > > > POS_FIX_LPIB),
> > > > >  	{}
> > > > >  };
> > > > >
> > > > > --
> > > > > 1.8.3.2
> > > > >
> > >
> 
> 
> Regards,
> Libin
> 


More information about the Alsa-devel mailing list