Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ALSA: hda - Align BDL position adjustment parameter

It seems NVidia and other hardwares require the alignment for period
update timing. For satisfying this condition, align the position
adjustment for delayed wake-up to the initial bdl_pos_adj value.

Signed-off-by: Takashi Iwai <tiwai@suse.de>

+5 -1
+5 -1
sound/pci/hda/hda_intel.c
··· 1047 1047 pos_adj = bdl_pos_adj[chip->dev_index]; 1048 1048 if (pos_adj > 0) { 1049 1049 struct snd_pcm_runtime *runtime = substream->runtime; 1050 + int pos_align = pos_adj; 1050 1051 pos_adj = (pos_adj * runtime->rate + 47999) / 48000; 1051 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 1057 pos_adj = frames_to_bytes(runtime, pos_adj); 1054 1058 if (pos_adj >= period_bytes) { 1055 1059 snd_printk(KERN_WARNING "Too big adjustment %d\n",