diff options
author | Joachim Deguara <joachim.deguara@amd.com> | 2007-03-16 10:01:36 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2007-03-16 10:02:15 -0400 |
commit | 5f1545bc45a33361d6bb2fb44af7c35bcd733b9d (patch) | |
tree | 2097dce16d2a7e15c2c9dba0ab99e59d5bd6be45 /sound | |
parent | a8a5d06775f54ab2d23ad6455db399c15a664feb (diff) |
[ALSA] hda-intel - Fix HDA buffer alignment
From the HDA spec it appears that the buffers written to the BDL and
sent to a codec must be 128 byte aligned (section 4.5.1). The alignment
was not happening especially when playing 6 channels. This patch set
the alignment of buffers and periods to 128 bytes.
Signed-off-by: Joachim Deguara <joachim.deguara@amd.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/hda/hda_intel.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 13e4837b5ae6..1672cace1ae7 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c | |||
@@ -1087,6 +1087,10 @@ static int azx_pcm_open(struct snd_pcm_substream *substream) | |||
1087 | runtime->hw.rates = hinfo->rates; | 1087 | runtime->hw.rates = hinfo->rates; |
1088 | snd_pcm_limit_hw_rates(runtime); | 1088 | snd_pcm_limit_hw_rates(runtime); |
1089 | snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS); | 1089 | snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS); |
1090 | snd_pcm_hw_constraint_step(runtime, 0, SNDRV_PCM_HW_PARAM_BUFFER_BYTES, | ||
1091 | 128); | ||
1092 | snd_pcm_hw_constraint_step(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_BYTES, | ||
1093 | 128); | ||
1090 | if ((err = hinfo->ops.open(hinfo, apcm->codec, substream)) < 0) { | 1094 | if ((err = hinfo->ops.open(hinfo, apcm->codec, substream)) < 0) { |
1091 | azx_release_device(azx_dev); | 1095 | azx_release_device(azx_dev); |
1092 | mutex_unlock(&chip->open_mutex); | 1096 | mutex_unlock(&chip->open_mutex); |