Opened 8 years ago

Last modified 7 years ago

#215 new defect

pmixWrite() failed if a buffer size is too small

Reported by: komh Owned by:
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 (13)

comment:1 Changed 8 years ago by abwillis

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

comment:2 Changed 8 years ago by komh

That's it.

It works with a small buffer size.

What's the change ?

comment:3 Changed 8 years ago by abwillis

Sorry, I was trying to watch this but missed your update anyhow: the diff is in: ticket #146

comment:4 Changed 8 years ago by abwillis

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:5 Changed 8 years ago by komh

Yes, at least in my box.

comment:6 Changed 8 years ago by komh

See ticket #191.

comment:7 Changed 8 years ago by abwillis

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(&params, SNDRV_PCM_HW_PARAM_RATE,
 						   pHwParams->ulSampleRate, 0);
+#if 0
 	_snd_pcm_hw_param_set(&params, SNDRV_PCM_HW_PARAM_PERIOD_SIZE,
 						   periodsize, 0);
 	_snd_pcm_hw_param_set(&params, SNDRV_PCM_HW_PARAM_PERIOD_BYTES,
@@ -985,6 +986,7 @@
 						   periodsize*nrperiods, 0);
 	_snd_pcm_hw_param_set(&params, 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.

Last edited 8 years ago by abwillis (previous) (diff)

comment:8 Changed 8 years ago by komh

It's a non-ACPI-W4 build.

comment:9 Changed 8 years ago by David McKenna

I'm also getting a Trap 8.... any way I could try out a corrected ACPI version?

comment:10 Changed 7 years ago by abwillis

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(&params, SNDRV_PCM_HW_PARAM_RATE,
 						   pHwParams->ulSampleRate, 0);
+if (periodsize > 6 * minperiodsize) {
 	_snd_pcm_hw_param_set(&params, SNDRV_PCM_HW_PARAM_PERIOD_SIZE,
 						   periodsize, 0);
 	_snd_pcm_hw_param_set(&params, SNDRV_PCM_HW_PARAM_PERIOD_BYTES,
@@ -985,6 +986,7 @@
 						   periodsize*nrperiods, 0);
 	_snd_pcm_hw_param_set(&params, SNDRV_PCM_HW_PARAM_BUFFER_BYTES,
 						   periodbytes*nrperiods, 0);
+}
 
 
 	dprintf(("HWP: SR rate %ld, BPS %ld, CH %ld, PRSZ %lx, periods %lx",

comment:11 Changed 7 years ago by abwillis

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 Changed 7 years ago by komh

Unfortunately, it does not help a small buffer problem regardless of any audio cards in VirtualBox?.

comment:13 Changed 7 years ago by abwillis

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.

Note: See TracTickets for help on using tickets.