Opened 15 years ago
Last modified 3 days ago
#215 assigned defect
pmixWrite() failed if a buffer size is too small
| Reported by: | KO Myung-Hun | Owned by: | martini |
|---|---|---|---|
| Priority: | highest | Milestone: | MMPM/2 Compatibility |
| Component: | UNIAUD16 | Version: | 1.9.26 |
| Severity: | blocker | Keywords: | |
| Cc: |
Description
Hi/2.
As a subject, pmixWrite() failed if a buffer size is too small.
For examples, a buffer size is 2048 bytes, it returns an error code, 5613, which means "Insufficient Buffer".
Change History (18)
comment:1 by , 15 years ago
comment:3 by , 15 years ago
Sorry, I was trying to watch this but missed your update anyhow: the diff is in: ticket #146
comment:4 by , 15 years ago
I see that you had found it and also had some patches for uniaud apis? Do those changes then allow uniaud.dll to work?
comment:7 by , 15 years ago
For some reason your driver gives me a Trap 8 on my system... I applied your uniaud diff to my tree and that build works fine. I am running the acpi build... which build do you have for download? Also, this information shows that it is due to the buffer so I found that the buffer diff can be pared down some:
Index: sound.c
===================================================================
--- sound.c (revision 563)
+++ sound.c (working copy)
@@ -975,6 +975,7 @@
pHwParams->ulNumChannels, 0);
_snd_pcm_hw_param_set(¶ms, SNDRV_PCM_HW_PARAM_RATE,
pHwParams->ulSampleRate, 0);
+#if 0
_snd_pcm_hw_param_set(¶ms, SNDRV_PCM_HW_PARAM_PERIOD_SIZE,
periodsize, 0);
_snd_pcm_hw_param_set(¶ms, SNDRV_PCM_HW_PARAM_PERIOD_BYTES,
@@ -985,6 +986,7 @@
periodsize*nrperiods, 0);
_snd_pcm_hw_param_set(¶ms, SNDRV_PCM_HW_PARAM_BUFFER_BYTES,
periodbytes*nrperiods, 0);
+#endif
dprintf(("HWP: SR rate %ld, BPS %ld, CH %ld, PRSZ %lx, periods %lx",
The first section of the older diff did not have to be if'd out.
comment:9 by , 15 years ago
I'm also getting a Trap 8.... any way I could try out a corrected ACPI version?
comment:10 by , 14 years ago
Here is a better workaround... it works with VPC and does better with mplayer here:
Index: sound.c
===================================================================
--- sound.c (revision 563)
+++ sound.c (working copy)
@@ -975,6 +975,7 @@
pHwParams->ulNumChannels, 0);
_snd_pcm_hw_param_set(¶ms, SNDRV_PCM_HW_PARAM_RATE,
pHwParams->ulSampleRate, 0);
+if (periodsize > 6 * minperiodsize) {
_snd_pcm_hw_param_set(¶ms, SNDRV_PCM_HW_PARAM_PERIOD_SIZE,
periodsize, 0);
_snd_pcm_hw_param_set(¶ms, SNDRV_PCM_HW_PARAM_PERIOD_BYTES,
@@ -985,6 +986,7 @@
periodsize*nrperiods, 0);
_snd_pcm_hw_param_set(¶ms, SNDRV_PCM_HW_PARAM_BUFFER_BYTES,
periodbytes*nrperiods, 0);
+}
dprintf(("HWP: SR rate %ld, BPS %ld, CH %ld, PRSZ %lx, periods %lx",
comment:11 by , 14 years ago
In case anyone is interested but missed seeing it, I uploaded a build with this change to netlabs incoming, it is an acpi build... uniaud32-vpc.zip
comment:12 by , 14 years ago
Unfortunately, it does not help a small buffer problem regardless of any audio cards in VirtualBox.
comment:13 by , 14 years ago
It works with VirtualPC here but VirtualBox does not have the sound support built into the OS/2 port. The VirtualBox Port would need to be updated to support sound.
comment:14 by , 6 years ago
Hi KO Myung-Hun
I'm giving a hand with some ticket house keeping.
Can you please report if you still have the same issue with:
- version 2.2.6. ftp://ftp.netlabs.org/pub/uniaud/Uniaud-20200506.exe
Regards
comment:15 by , 6 years ago
| Owner: | set to |
|---|---|
| Status: | new → assigned |
comment:16 by , 6 years ago
Ok, this seems to be fixed by setting the minimum buffer size.
However, unfortunately, it's not possible to use a small buffer such 2048 bytes(512 samples * 16 bits audio * stereo) for very short latency and very fast response in games and so on.
comment:17 by , 6 years ago
Sorry, I've tested incorrectly.
Setting the minimum buffer size was a feature of kai.
This problem has not been fixed, yet.
You can test like this:
set KAI_MINSAMPLES=512 && kaidemo any-16bits-streo-audio.wav
Sound card is Intel HD audio in VirtualBox v6.1.16.
comment:18 by , 3 days ago
Can be reproduced outside VirtualBox environment as well.
Use PM123 1.41 and listen for example on internet radio (anything playable with PM123 should suffice). Start Otter Browser (QT5.15.2) If you temporarly stop the music and try to play again it will output the message 5613 and it's not possible to recover. One has to restart the system to be able to play anything with PM123.

Could you try the uniaud32.sys on netlabs? I am curious if that is the problem that VPC is having considering it uses small buffer sizes. The uniaud32.sys just has a change backed out that allows VPC to work. If it also works for your situation then it may give an idea what is happening. I am using it here so that VPC has sound but it does exhibit problems with Z! and I have been told with PM123 (though I am not sure I have seen problems with PM123 myself - may have and forgotten too). ftp://ftp.netlabs.org/incoming/uniaud32-19226-vpc.zip