diff options
author | Jaroslav Kysela <perex@perex.cz> | 2010-06-02 13:29:17 +0200 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2010-06-02 13:34:18 +0200 |
commit | 8fc6d4186e0a60b3755a6b88bf67a3ac3214dcc3 (patch) | |
tree | ebfb9581a66a2aa02cd9f0f8dd97800b3b6ed29d /sound/pci | |
parent | aef4b9aaae1decc775778903922bd0075cce7a88 (diff) | |
download | op-kernel-dev-8fc6d4186e0a60b3755a6b88bf67a3ac3214dcc3.zip op-kernel-dev-8fc6d4186e0a60b3755a6b88bf67a3ac3214dcc3.tar.gz |
ALSA: hda-intel - fix wallclk variable update and condition
This patch fixes thinko introduced in "last minutes" before commiting
of the last wallclk patch.
It also fixes the condition checking if the first period after last
wallclk update is processed. There is a little rounding error in
period_wallclk.
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'sound/pci')
-rw-r--r-- | sound/pci/hda/hda_intel.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index dc79564..af701a8 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c @@ -1913,11 +1913,11 @@ static int azx_position_ok(struct azx *chip, struct azx_dev *azx_dev) if (WARN_ONCE(!azx_dev->period_bytes, "hda-intel: zero azx_dev->period_bytes")) return -1; /* this shouldn't happen! */ - if (wallclk <= azx_dev->period_wallclk && + if (wallclk < (azx_dev->period_wallclk * 5) / 4 && pos % azx_dev->period_bytes > azx_dev->period_bytes / 2) /* NG - it's below the first next period boundary */ return bdl_pos_adj[chip->dev_index] ? 0 : -1; - azx_dev->start_wallclk = wallclk; + azx_dev->start_wallclk += wallclk; return 1; /* OK, it's fine */ } |