aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_intel.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/hda/hda_intel.c')
-rw-r--r--sound/pci/hda/hda_intel.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index 16715a68ba5e..ef9f072b47fc 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -1047,9 +1047,13 @@ static int azx_setup_periods(struct azx *chip,
1047 pos_adj = bdl_pos_adj[chip->dev_index]; 1047 pos_adj = bdl_pos_adj[chip->dev_index];
1048 if (pos_adj > 0) { 1048 if (pos_adj > 0) {
1049 struct snd_pcm_runtime *runtime = substream->runtime; 1049 struct snd_pcm_runtime *runtime = substream->runtime;
1050 int pos_align = pos_adj;
1050 pos_adj = (pos_adj * runtime->rate + 47999) / 48000; 1051 pos_adj = (pos_adj * runtime->rate + 47999) / 48000;
1051 if (!pos_adj) 1052 if (!pos_adj)
1052 pos_adj = 1; 1053 pos_adj = pos_align;
1054 else
1055 pos_adj = ((pos_adj + pos_align - 1) / pos_align) *
1056 pos_align;
1053 pos_adj = frames_to_bytes(runtime, pos_adj); 1057 pos_adj = frames_to_bytes(runtime, pos_adj);
1054 if (pos_adj >= period_bytes) { 1058 if (pos_adj >= period_bytes) {
1055 snd_printk(KERN_WARNING "Too big adjustment %d\n", 1059 snd_printk(KERN_WARNING "Too big adjustment %d\n",