HDA buffer alignment
Quoted 1 line
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.
-Joachim
pci/hda/hda_intel.c +4 -0
@@ -1087,6 +1087,10 @@ static int azx_pcm_open(struct snd_pcm_s runtime->hw.rates = hinfo->rates;snd_pcm_limit_hw_rates (runtime);snd_pcm_hw_constraint_integer (runtime,SNDRV_PCM_HW_PARAM_PERIODS ); +snd_pcm_hw_constraint_step (runtime,0 ,SNDRV_PCM_HW_PARAM_BUFFER_BYTES , +128 ); +snd_pcm_hw_constraint_step (runtime,0 ,SNDRV_PCM_HW_PARAM_PERIOD_BYTES , +128 );if ((err = hinfo->ops.open (hinfo, apcm->codec, substream)) <0 ) {azx_release_device (azx_dev);mutex_unlock (&chip->open_mutex);
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Alsa-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-devel
At Fri, 16 Mar 2007 12:54:02 +0100,
Quoted 5 lines · Joachim Deguara
Quoted 2 lines
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.
Good catch.
The changes look good to me, but please fold lines to fit within 80 chars. Also, please give a sign-off for the patch to apply to the upstream.
Thanks,
Takashi
Quoted 19 lines
-Joachim
[2align_hda_buffers<text/plain (base64)>]
diff -rf8284261b2bepci/hda/hda_intel.cpci/hda/hda_intel.c +4
-0@@ -1087,6 +1087,10 @@ static int azx_pcm_open(struct snd_pcm_s runtime->hw.rates = hinfo->rates;snd_pcm_limit_hw_rates (runtime);snd_pcm_hw_constraint_integer (runtime,SNDRV_PCM_HW_PARAM_PERIODS ); +snd_pcm_hw_constraint_step (runtime,0 ,SNDRV_PCM_HW_PARAM_BUFFER_BYTES , +128 ); +snd_pcm_hw_constraint_step (runtime,0 ,SNDRV_PCM_HW_PARAM_PERIOD_BYTES , +128 );if ((err = hinfo->ops.open (hinfo, apcm->codec, substream)) <0 ) {azx_release_device (azx_dev);mutex_unlock (&chip->open_mutex);[3 <text/plain; us-ascii (7bit)>]
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Quoted 8 lines
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
[4 <text/plain; us-ascii (7bit)>]
_______________________________________________
Alsa-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-devel
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
"Takashi Iwai" <[email protected]> wrote on 13:00 16/03/2007 +0100 :
Quoted 7 lines
At Fri, 16 Mar 2007 12:54:02 +0100,
Quoted 4 lines · Joachim Deguara
Quoted 1 line
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.
Quoted 7 lines
Good catch.
The changes look good to me, but please fold lines to fit within 80 chars. Also, please give a sign-off for the patch to apply to the upstream.
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.
pci/hda/hda_intel.c Fri Mar 16 07:04:47 2007 +0100 renamed from pci/hda/hda_intel.c Thu Mar 15 15:10:28 2007 +0100 +4 -0
@@ -1087,6 +1087,10 @@ static int azx_pcm_open(struct snd_pcm_s runtime->hw.rates = hinfo->rates; snd_pcm_limit_hw_rates(runtime); snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS); + snd_pcm_hw_constraint_step(runtime, 0, SNDRV_PCM_HW_PARAM_BUFFER_BYTES, + 128); + snd_pcm_hw_constraint_step(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_BYTES, + 128); if ((err = hinfo->ops.open(hinfo, apcm->codec, substream)) < 0) { azx_release_device(azx_dev); mutex_unlock(&chip->open_mutex);
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
Takashi Iwai
AppliedAt Fri, 16 Mar 2007 14:21:34 +0100,
Quoted 15 lines · Joachim Deguara
"Takashi Iwai" <[email protected]> wrote on 13:00 16/03/2007 +0100 :
Quoted 12 lines
At Fri, 16 Mar 2007 12:54:02 +0100,
Quoted 4 lines · Joachim Deguara
Quoted 1 line
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.
Good catch.
The changes look good to me, but please fold lines to fit within 80 chars. Also, please give a sign-off for the patch to apply to the upstream.
Quoted 6 lines
Quoted 1 line
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 <[email protected]>
Thanks, applied to HG tree now.
Takashi
Quoted 8 lines
diff -r
f8284261b2bepci/hda/hda_intel.c
pci/hda/hda_intel.c Fri Mar 16 07:04:47 2007 +0100 static int azx_pcm_open(struct snd_pcm_s · line 1096
Quoted 10 lines
pci/hda/hda_intel.c Fri Mar 16 07:04:47 2007 +0100 renamed from pci/hda/hda_intel.c Thu Mar 15 15:10:28 2007 +0100 +4
-0@@ -1087,6 +1087,10 @@ static int azx_pcm_open(struct snd_pcm_s runtime->hw.rates = hinfo->rates; snd_pcm_limit_hw_rates(runtime); snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS); + snd_pcm_hw_constraint_step(runtime, 0, SNDRV_PCM_HW_PARAM_BUFFER_BYTES, + 128); + snd_pcm_hw_constraint_step(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_BYTES, + 128); if ((err = hinfo->ops.open(hinfo, apcm->codec, substream)) < 0) { azx_release_device(azx_dev); mutex_unlock(&chip->open_mutex);
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV