All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Henningsson <david.henningsson@canonical.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: ALSA Development Mailing List <alsa-devel@alsa-project.org>,
	"Xu, Andiry" <Andiry.Xu@amd.com>,
	741825@bugs.launchpad.net
Subject: Re: Should we really use POS_FIX_VIACOMBO for AMD/ATI chipsets?
Date: Fri, 20 May 2011 16:51:13 +0200	[thread overview]
Message-ID: <4DD67FE1.7010106@canonical.com> (raw)
In-Reply-To: <s5hhb8pscw2.wl%tiwai@suse.de>

On 2011-05-20 15:46, Takashi Iwai wrote:
> At Fri, 20 May 2011 15:33:56 +0200,
> David Henningsson wrote:
>>
>> I'm far from sure, but I could be on to something...
>>
>> Looking at the code for azx_via_get_position, it seems that for
>> recording streams, it accesses a register at position
>> VIA_IN_STREAM0_FIFO_SIZE_OFFSET = 0x90. Looking at the datasheet for
>> SB700, that register is not even present. This does not seem right to me.
>>
>> Could it be that we should use POS_FIX_LPIB by default for AMD/ATI
>> chipsets instead? It seems more reasonable to me.
>> In addition, I looked through some of the commits for quirking to
>> POS_FIX_LPIB and the four I checked were all ATI chipsets.
>>
>> So; I've tried adding:
>> options snd-hda-intel position_fix=1
>> to /etc/modprobe.d/alsa-base.conf
>>
>> ...to my machine with the infamous [1002:4383] controller (and
>> rebooted), and the few times I've tested, recording worked successfully
>> with pulseaudio. So could you please follow this up with testing on your
>> machines to see if we have actually managed to solve this long-standing bug?
>>
>> The only annoying thing is that I didn't realise this earlier :-/
>
> Hmm, I took this as default as it seems fixing the issue on machines,
> indeed.  Actually I had to use this option first for removing
> recording noises on AMD Hudson.  But, maybe I need to double-check
> again after the snoop bit and other workarounds.
>
> The FIFO size might got wrong on AMD.  In that case, the driver
> calculates as if FIFO = 0.  But, it can still help for correcting the
> position via position-buffer vs LPIB comparison.
>
> For the real check, we should put some debug prints on real machines.

Hey, you're faster than I am :-) Ok, so there actually is a FIFO 
register (I read the wrong table). But the position buffer is dead and 
always read as zero.

I did some debug print which is pasted here: http://paste.ubuntu.com/610637/

If LPIB only gives you occasional recording noises, perhaps we need a 
new type of position-fix that adds some margin (e g round down to 
nearest multiple of fifo-size, then subtract one fifo-size or something)?

-- 
David Henningsson, Canonical Ltd.
http://launchpad.net/~diwic

  parent reply	other threads:[~2011-05-20 14:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-20 13:33 Should we really use POS_FIX_VIACOMBO for AMD/ATI chipsets? David Henningsson
2011-05-20 13:46 ` Takashi Iwai
2011-05-20 14:19   ` Takashi Iwai
2011-05-20 14:32     ` Takashi Iwai
2011-05-20 14:51   ` David Henningsson [this message]
2011-05-20 14:54     ` Takashi Iwai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4DD67FE1.7010106@canonical.com \
    --to=david.henningsson@canonical.com \
    --cc=741825@bugs.launchpad.net \
    --cc=Andiry.Xu@amd.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.