From e7943f2b266144490ea97cea800675c43c3ecf31 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Tue, 15 Jul 2008 16:28:43 +0200 Subject: [PATCH] --- yaml --- r: 106472 b: refs/heads/master c: e785d3d8fb5fab744d67fac9966229bcdc52db45 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/sound/pci/hda/hda_intel.c | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index d69810652c6c..dca338c3f964 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 2b30a55d4d09254d6b25814bf6ac0b7843afdc99 +refs/heads/master: e785d3d8fb5fab744d67fac9966229bcdc52db45 diff --git a/trunk/sound/pci/hda/hda_intel.c b/trunk/sound/pci/hda/hda_intel.c index 16715a68ba5e..ef9f072b47fc 100644 --- a/trunk/sound/pci/hda/hda_intel.c +++ b/trunk/sound/pci/hda/hda_intel.c @@ -1047,9 +1047,13 @@ static int azx_setup_periods(struct azx *chip, pos_adj = bdl_pos_adj[chip->dev_index]; if (pos_adj > 0) { struct snd_pcm_runtime *runtime = substream->runtime; + int pos_align = pos_adj; pos_adj = (pos_adj * runtime->rate + 47999) / 48000; if (!pos_adj) - pos_adj = 1; + pos_adj = pos_align; + else + pos_adj = ((pos_adj + pos_align - 1) / pos_align) * + pos_align; pos_adj = frames_to_bytes(runtime, pos_adj); if (pos_adj >= period_bytes) { snd_printk(KERN_WARNING "Too big adjustment %d\n",