OS2 World Community Forum

OS/2, eCS & ArcaOS - Technical => Hardware => Topic started by: Lars on January 17, 2018, 07:33:10 am

Title: USBAUDIO: now supports 24-bit and sample frequencies > 65535 Hz
Post by: Lars on January 17, 2018, 07:33:10 am
Wim and me, we have been working on updating the MMPM subsystem so that it will finally support WAV files with 24-bit and > 65535 Hz (there was a limitation in the MMPM subsystem components that would restrict the sample rate to a 16-bit value).

In fact, we updated the MMPM subsystem to support these sample rates beyond 48000 Hz:
64000, 88200,96000,176400,192000,352800,384000 Hz.

The MMPM subsystem still has an inherent limitation to only support a discrete number of sample rates but we picked the rates that are in common use today. But I think we can live with that and the supported rates can be extended if necessary (but will require an updated USBAUDIO installation, see end).

With this support you can finally use more recent USB audio devices and exploit their full capabilities.
While 16-bit, 44100 Hz stereo (CD-ROM quality) was about the best you could get in 1996, more than 20 years later this is about the minimum sample rate /bit-depth used. It will also pave the way to support USB audio 2.0 devices which normally only offer these higher sample rates.

By the way: UNIAUD would also need this MMPM subsystem update to support WAV files with sample rates higher than 48000 Hz.

Once we have everything nice and polished I will release a new version of my USB device drivers.
It will be necessary to rerun the USBAUDIO driver installation to get everything updated properly.

Lars
Title: Re: USBAUDIO: now supports 24-bit and sample frequencies > 65535 Hz
Post by: David McKenna on January 17, 2018, 01:05:50 pm
Go, Lars and Wim, go! Any chance multiple streams could be added?...
Title: Re: USBAUDIO: now supports 24-bit and sample frequencies > 65535 Hz
Post by: Dariusz Piatkowski on January 17, 2018, 01:57:41 pm
Lars,

This is pretty awesome stuff. Will this make for a completely separate solution from something like the AN stuff though?

Thanks,
 - Dariusz
Title: Re: USBAUDIO: now supports 24-bit and sample frequencies > 65535 Hz
Post by: Lars on January 17, 2018, 02:13:11 pm
Go, Lars and Wim, go! Any chance multiple streams could be added?...

In principle, yes. But I don't see the concept of multiple simultaneous streams supported in the USB audio spec. And therefore the current installation restricts it to 1 stream. But thinking about it, maybe yes, I'll have to check if there are devices that support multiple interfaces with each having the same parameters.
What DOES work is having a simultaneous input (record) and output (playback stream).
Title: Re: USBAUDIO: now supports 24-bit and sample frequencies > 65535 Hz
Post by: Lars on January 17, 2018, 02:19:17 pm
Lars,

This is pretty awesome stuff. Will this make for a completely separate solution from something like the AN stuff though?

Thanks,
 - Dariusz

Don't worry. You can combine my USBAUDIO.SYS with the AN driver stack and it should work just fine. The updated installation installs a new dll called USBAUDIF.DLL as a replacement for AUDIOIF.DLL alongside to the already existing AUDIOIF.DLL (in the \MMOS2\DLL dir) but it leaves AUDIOIF.DLL untouched so they don't step on each others toes.

Likewise the new installation overwrites SPI.INI (in the \MMOS2 dir) but our SPI ini update is "cumulative", which means it includes and adds on top of what is already in the default SPI.INI file.

In short: we try to keep things compatible with whatever comes with an AN installation.
Title: Re: USBAUDIO: now supports 24-bit and sample frequencies > 65535 Hz
Post by: Sigurd Fastenrath on January 17, 2018, 03:41:07 pm
Just to add:

This is really great stuff! I was able to use with the Driver vom Lars+Wim (older one) and this Hardware:

https://www.amazon.de/gp/product/B01N905VOY/ref=oh_aui_detailpage_o05_s00?ie=UTF8&psc=1 (https://www.amazon.de/gp/product/B01N905VOY/ref=oh_aui_detailpage_o05_s00?ie=UTF8&psc=1)

on my Lenovo T450s (that I already sold last week):

- headphones
- speakers

and ... YES ...

- microphone

So that I was able to use Voice Type Dictation/Navigation for OS/2 on my pimped up Warp 4.52 nativ on this T450s!

One will see this in my OS/2 Movie, that was estimated to be finished x-mas 2017, but I underestimated the needed Post Production of thís already 45 Minutes Video. But it will arrive....  8)

By the way I supported Lars by sponsoring him via bitwise, and that was something really worth it!

Thanks to Lars and Wim!
Title: Re: USBAUDIO: now supports 24-bit and sample frequencies > 65535 Hz
Post by: ak120 on January 17, 2018, 07:34:43 pm
In fact, we updated the MMPM subsystem to support these sample rates beyond 48000 Hz:
64000, 88200,96000,176400,192000,352800,384000 Hz.
Does it work for Playback and Recording in 8, 16 or 32 bits?

How it handles more than 2 audio channels? Is SPDIF digital I/O now possible?
Title: Re: USBAUDIO: now supports 24-bit and sample frequencies > 65535 Hz
Post by: Fahrvenugen on January 17, 2018, 09:00:31 pm
This sounds fantastic, I can't wait to try it out.

Are the additional sample rates available to any audio adapter, or just USB?

Just wondering - I've got a couple of Warp boxes running audio logging 24x7, I'd love to be able to up the sample rate (they're using onboard audio cards supported via Uniaudio). 

I could of course switch these 2 systems over to using USB audio cards if needed.

Title: Re: USBAUDIO: now supports 24-bit and sample frequencies > 65535 Hz
Post by: Lars on January 18, 2018, 09:00:28 am
This sounds fantastic, I can't wait to try it out.

Are the additional sample rates available to any audio adapter, or just USB?

Just wondering - I've got a couple of Warp boxes running audio logging 24x7, I'd love to be able to up the sample rate (they're using onboard audio cards supported via Uniaudio). 

I could of course switch these 2 systems over to using USB audio cards if needed.

Currently they are only available to USBAUDIO because the USBAUDIO installation package updates the MMPM subsystem accordingly.
The problem is an outdated AUDIOIF.DLL and SPI.INI. In principle Uniaudio could also support these higher rates and BitsPerSample (of course only if the HW supports them). But for that it needs an updated AUDIOIF.DLL and SPI.INI.
In order to not interfere with other audio adapters we have decided to build a USBAUDIF.DLL which takes the place of AUDIOIF.DLL so that AUDIOIF.DLL can remain untouched.

Lars

Title: Re: USBAUDIO: now supports 24-bit and sample frequencies > 65535 Hz
Post by: Eugene Tucker on January 19, 2018, 07:19:37 pm
I got ther recvomended USB audio adapter9Ugreen) but, I have run minstall and it stil does not work. is there anything eslse I need todo?
Title: Re: USBAUDIO: now supports 24-bit and sample frequencies > 65535 Hz
Post by: ivan on January 19, 2018, 09:42:38 pm
Did you unzip the two files found mmos2 in Lars' usbdrv220.zip and run minstall from the the dir you unzipped them into?
Title: Re: USBAUDIO: now supports 24-bit and sample frequencies > 65535 Hz
Post by: Eugene Tucker on January 20, 2018, 02:30:27 am
Yes sir I did.
Title: Re: USBAUDIO: now supports 24-bit and sample frequencies > 65535 Hz
Post by: ivan on January 20, 2018, 10:57:06 am
Then I suspect that we will have to wait for Lars to put the latest versions up on hobbes.

BTW, I asked that question because I have found in the past that people forget to put minstall into the directory with the files they are installing.
Title: Re: USBAUDIO: now supports 24-bit and sample frequencies > 65535 Hz
Post by: Wim Brul on January 20, 2018, 04:42:10 pm
I got ther recvomended USB audio adapter9Ugreen) but, I have run minstall and it stil does not work. is there anything eslse I need todo?

After running "minstall /*" you needed to reboot your system. I assume that you have done that.
May be you did not remove the installation of an existing audio card and therefore you have right now 2 audio devices installed.
Check your "Multimedia Setup" which is in the map "System Setup" to verify that you have the "USB Adapter Wave" and the "USB Adapter MIDI" tabs available.
Make these the default devices and reboot your system.

I have always 2 audio devices installed on my systems and I do it in a different way.
After running "minstall /*" and reboot I edit MMPM2.INI and make sure that it contains the following section:

Code: [Select]
[defaultnames]
  Digitalvideo=IBMDIGVIDPLAYER01
  Ampmix=WMBAMPMIXUSB01
  Waveaudio=WMBWAVEUSB01
  Sequencer=WMBSEQUSB01

After that I reboot my system. Et voila I have usb audio working.
Title: Re: USBAUDIO: now supports 24-bit and sample frequencies > 65535 Hz
Post by: Eugene Tucker on January 20, 2018, 05:20:55 pm
Thank youi I wil give editing the INI a try.
Title: Re: USBAUDIO: now supports 24-bit and sample frequencies > 65535 Hz
Post by: Eugene Tucker on January 20, 2018, 05:44:16 pm
It worked!!!!! Yay! Thank you so very much. You were correct in what was wrong.
Title: Re: USBAUDIO: now supports 24-bit and sample frequencies > 65535 Hz
Post by: David McKenna on January 20, 2018, 05:52:38 pm
 Hi Wim,

  Thanks for all the development you've been doing on USB Audio! And thanks for the tip about the [defaultnames] section of MMPM2.INI! I had UniAud installed and working and added USB audio, but could never get the USB sound working by switching the 'Default Waveaudio Device' setting in 'Multimedia Setup'. After reboot it would still use Uniaud, so I just uninstalled UniAud to get USB audio to work.

  After seeing your MMPM2.INI tip, I tried again and discovered that when you switch the 'Default Waveaudio Device' setting in 'Multimedia Setup', only the 'Waveaudio=....' line in the [defaultnames] section of MMPM2.INI is changed. Apparently that is not enough, an 'Ampmix=...' line corresponding to the 'Waveaudio=...' line is also needed. Once I added the Ampmix line and rebooted, USB audio worked.

  This seems like either a bug, or a setup problem with MMOS/2 as the Waveaudio device should be associated with the proper mixer automatically, no?

 
Title: Re: USBAUDIO: now supports 24-bit and sample frequencies > 65535 Hz
Post by: Lars on January 22, 2018, 08:20:21 am
Hi Wim,

  Thanks for all the development you've been doing on USB Audio! And thanks for the tip about the [defaultnames] section of MMPM2.INI! I had UniAud installed and working and added USB audio, but could never get the USB sound working by switching the 'Default Waveaudio Device' setting in 'Multimedia Setup'. After reboot it would still use Uniaud, so I just uninstalled UniAud to get USB audio to work.

  After seeing your MMPM2.INI tip, I tried again and discovered that when you switch the 'Default Waveaudio Device' setting in 'Multimedia Setup', only the 'Waveaudio=....' line in the [defaultnames] section of MMPM2.INI is changed. Apparently that is not enough, an 'Ampmix=...' line corresponding to the 'Waveaudio=...' line is also needed. Once I added the Ampmix line and rebooted, USB audio worked.

  This seems like either a bug, or a setup problem with MMOS/2 as the Waveaudio device should be associated with the proper mixer automatically, no?

I don't know if you can name it a bug. I rather think that WPS blindly uses the first audio device for audio playback instead of explicitely asking for the "default" audio device. The result is that if you double click on a sound file, the first audio device (which is the one appearing on the very left of the Waveaudio= and Ampmix= line in MMPM2.INI) will be used. I think the "default" setting is ignored by about any application and that's the problem.
Title: Re: USBAUDIO: now supports 24-bit and sample frequencies > 65535 Hz
Post by: Lars on January 22, 2018, 08:23:20 am
Then I suspect that we will have to wait for Lars to put the latest versions up on hobbes.

BTW, I asked that question because I have found in the past that people forget to put minstall into the directory with the files they are installing.

No need to put "minstall" into the directory where the installation files are located. What you have to do though is switch to that directory and run the installation from there by invoking "minstall /*".
Title: Re: USBAUDIO: now supports 24-bit and sample frequencies > 65535 Hz
Post by: David McKenna on January 23, 2018, 01:06:40 pm
 Hi Lars,

 

  This seems like either a bug, or a setup problem with MMOS/2 as the Waveaudio device should be associated with the proper mixer automatically, no?

I don't know if you can name it a bug. I rather think that WPS blindly uses the first audio device for audio playback instead of explicitely asking for the "default" audio device. The result is that if you double click on a sound file, the first audio device (which is the one appearing on the very left of the Waveaudio= and Ampmix= line in MMPM2.INI) will be used. I think the "default" setting is ignored by about any application and that's the problem.

  Further fiddling shows me that just by having the line 'Ampmix=....' in the [defaultnames] section is all that is needed to get sound where I want it. So this:

[defaultnames]
Ampmix=UNIAUDAMPMIX01

 gets sounds out of the soundcard (apps and double clicking files) and this:

[defaultnames]
Ampmix=WMBAMPMIXUSB01

 gets sounds out of the USB speakers.

 I can't believe this is how MMOS/2 is intended to work, since there are no 'Ampmix' tabs in the Multimedia Setup object. Something isn't quite right. Can you point me to any documents that describe the contents or creation of the MMPM2.INI file? Google doesn't get me anything useful....
Title: Re: USBAUDIO: now supports 24-bit and sample frequencies > 65535 Hz
Post by: Lars on January 23, 2018, 03:24:53 pm
Hi Lars,

  Further fiddling shows me that just by having the line 'Ampmix=....' in the [defaultnames] section is all that is needed to get sound where I want it. So this:

[defaultnames]
Ampmix=UNIAUDAMPMIX01

 gets sounds out of the soundcard (apps and double clicking files) and this:

[defaultnames]
Ampmix=WMBAMPMIXUSB01

 gets sounds out of the USB speakers.

 I can't believe this is how MMOS/2 is intended to work, since there are no 'Ampmix' tabs in the Multimedia Setup object. Something isn't quite right. Can you point me to any documents that describe the contents or creation of the MMPM2.INI file? Google doesn't get me anything useful....

No there is no documentation. It's all trial and error (as so often in OS/2). When I look at the DDK code for all the MMPM related stuff (drivers as well as MMPM subsystem) I have the strong impression that all this stuff was hastily hacked together to have something working. Adding "OS/2 for PowerPC" support to the code base made the souce code even more messy.

However, now that you found out, I am thinking about adding a page to the Multimedia Object to allow setting the "default" mixer. Or it could be done via USBAUDIF.DLL (the VSD replacement for AUDIOIF.DLL).
Of course it would be even better if the "USB WaveAudio" page in the Multimedia Objekt would change that setting along with setting the default WAVE device.
I am pretty sure there is an MCI API function that allows to set the default mixer and the change should then make it into MMPM2.INI. In the past I had written an uninstall utility for UNIAUD using the MCI functions and those would also modify the MMPM2.INI file where necessary.
Title: Re: USBAUDIO: now supports 24-bit and sample frequencies > 65535 Hz
Post by: David McKenna on January 24, 2018, 10:14:31 pm
Lars,

  Back in the ISA buss days, I had 2 sound cards with Warp4 and I could switch between them from the Multimedia Setup object, so at least it used to work. Maybe I'll dig up the drivers (one was a Crystal Semiconductor card and one was one of those IBM multifunction cards) and try installing to see what kind of entries are added to MMPM2.INI...
Title: Re: USBAUDIO: now supports 24-bit and sample frequencies > 65535 Hz
Post by: Lars on January 26, 2018, 10:13:13 am
Lars,

  Back in the ISA buss days, I had 2 sound cards with Warp4 and I could switch between them from the Multimedia Setup object, so at least it used to work. Maybe I'll dig up the drivers (one was a Crystal Semiconductor card and one was one of those IBM multifunction cards) and try installing to see what kind of entries are added to MMPM2.INI...

I have now written an installation DLL that is called during MINSTALL installation.
It does this for both, the WAVEAUDIO device as well as the AMPMIX device:
1) it scans the list of installed drivers in MMPM2.INI. If it finds it own install name (WMB....) it picks the first instance of itself (in theory there might be more than one USBAUDIO.SYS installed even though that is more or less impossible in practice)
2) it sets this first instance as the default device

Admittedly, that'll force USB use as a default even if you have UNIAUD installed in parallel.

I have never seen a configuration page to switch between different instances of AMPMIX devices. You can switch the default WAVEAUDIO device but strange enough that does not seem to have any effect.

I am open to suggestions. I suggest that once I get the USB driver set out of the door that you just rerun the USB audio installation. In order to see if it works or not, you can modify MMPM2.INI beforehand to list UNIAUD as the default device for WAVEAUDIO and AMPMIX. The USB installation should then change that to USB WAVEAUDIO/AMPMIX.



Title: Re: USBAUDIO: now supports 24-bit and sample frequencies > 65535 Hz
Post by: Rich Walsh on January 27, 2018, 02:28:51 am
I have never seen a configuration page to switch between different instances of AMPMIX devices. You can switch the default WAVEAUDIO device but strange enough that does not seem to have any effect.

I spent most of today experimenting with UniAud, UsbAudio, and MMPM2.INI, and discovered some things that surprised me. Since I know nothing about the drivers' internals, I'm hoping you can confirm or refute my findings.

It appears that the WaveAudio and AmpMix components of a driver operate independently of one another or at least with minimal dependencies. Without changing the WaveAudio component, I found that I could switch the audio output from my built-in soundcard to my USB audio dongle simply by changing the default AmpMix, then rebooting. Conversely, I could switch between WaveAudio components and always have the output appear at the default AmpMix device.

To confirm that I could actually mix-and-match audio driver components, I wiped out all MMPM2.INI references to one driver's WaveAudio and the other driver's AmpMix so MMOS2 wouldn't (shouldn't?) be able to use them. After a reboot the results were identical to using [defaultnames] to set the components it should use. (Note: I did this multiple times in multiple ways and it always worked as expected.) However, while It was easy enough to confirm which AmpMix was in use, I didn't have a way to prove which WaveAudio was being used (e.g. playing a .WAV that UniAud can't handle but UsbAudio can).

If we can really mix-and-match driver components, then the enhancements you and Wim have made to UsbAudio's WaveAudio component can be enjoyed by everyone, not just those who have a USB audio adapter. Someone with a working UniAud setup could install UsbAudio, then make its WaveAudio component the default. Because of the deficiencies in 'STPM.EXE' (the "Multimedia Setup object"), UsbAudio's enhanced sound would still be routed through his soundcard by UniAud's AmpMix. For many users, it would be the best of both worlds.

BTW... to clear up some possible confusion: it appears that when two drivers are listed for a component, the first is always the default. You only need an entry under '[defaultnames]' if you want to use the second driver for that component. Alternately, you can just change the order of the driver names to change the default.
Title: Re: USBAUDIO: now supports 24-bit and sample frequencies > 65535 Hz
Post by: David McKenna on January 27, 2018, 05:22:04 pm
Hi Rich,

  Yes, that is exactly what I found too! Didn't think of the 'mix and match' aspect, but it's a great idea. Once Lars releases his new version I have some 24 bit WAV files to test with.

 I was getting ready to install old Crystal Semiconductor drivers to inspect MMOS2.INI file entries when I read the READ.ME and ran across this little tidbit:

3) OS/2 Version 4 and Multiple MIDI and Audio devices
-------------------------------------------------------------------------------
On OS/2 Warp Version 4, the operating system has a bug where
it always uses the MMPM/2 defined WaveAudio01 device for audio and
the Sequencer01 device for MIDI. 

If the machine has more than one WaveAudio device or more than
one Sequencer device, the WaveAudio02 and Sequencer02 devices
are NEVER used even if the user launches a "Digital Audio 2" application.

This problem applies to system sounds and all of the GUI based
applications that ship with the operating system. 

For more information, consult IBM OS/2 APAR:
   "JR10933 OS/2 Merlin MIDI player always uses MIDI1 device"

The system bug is a configuration issue where the workplace shell
associates ".WAV" and ".MID" file extensions expressly with the "01"
version of the WaveAudio and Sequencer devices.

There is no method to change the association and there is no facility
provided in the OS/2 shipped applets to select a different device.

NOTE: MMPM/2 is very capable of handling a multitude of devices.
This bug however limits the functionality.

The problem does not exist on OS/2 Warp version 3.
-------------------------------------------------------------------------------------------

 So my memory of multiple sound cards must have been from the Warp3 days. I wonder exactly where this bug resides? Would be nice to add an 'Ampmix' page to STPM as a workaround...

Regards,
Title: Re: USBAUDIO: now supports 24-bit and sample frequencies > 65535 Hz
Post by: Rich Walsh on January 27, 2018, 11:05:57 pm
It looks like what I wrote in my last posting was wrong.

After a lot more experimentation, I found that the WaveAudio and AmpMix components do work together. Surprisingly, it's the AmpMix setting that controls which WaveAudio component will be used (i.e. its own). As Lars noted, changing the WaveAudio default has no effect.

Even more surprising, you can create a completely bogus WaveAudio device in MMPM2.INI, make it the _only_ WaveAudio device, and your sound will still work.

In MMPM2.INI, under [Drivers], I changed 'Waveaudio' to "Waveaudio=JOEBLOWAVE01". I then made a copy of the three [UNIAUDWAVE01] sections and changed all references in them from UNIAUD to JOEBLO. With no [defaultnames] entries, UniAud's AmpMix was in control and sound came from my built-in Intel HD audio. With [defaultnames] set to use UsbAudio's AmpMix, sound was routed through my USB audio dongle. Even after deleting both UniAud and UsbAudio's [*WAVE*] sections, it still worked so those specific entries clearly weren't needed.

Finally, I deleted the "Waveaudio=" line under [Drivers] and rebooted. PM wouldn't start. It appears that the system needs (or at least wants) some of the info in the WaveAudio sections, but entries you'd think were important, like "PDDNAME=JOEBLO1$" are ignored.

All this suggests that Crystal and/or IBM's analysis of the problem was incorrect. The system uses whichever WaveAudio device is associated with the AmpMix device currently in use. It also suggests that my mix-and-match idea probably won't work: to get the benefits of UsbAudio's WaveAudio enhancements, you'll need a USB audio adapter.

P.S. All of my tests were conducted using only the two audio drivers mentioned. Other sound drivers may behave differently.
Title: Re: USBAUDIO: now supports 24-bit and sample frequencies > 65535 Hz
Post by: Lars on January 28, 2018, 10:08:07 am
If mix and match do not work the solution is still very easy:

modify UNIAUD CARDINFO.DLL to also use a new VSD driver for its WaveAudio, Midi, Ampmix respectively.
This new VSD could be a straight copy of USBAUDIF.DLL (or a source code copy, recompiled to another name) renamed to something different like UNIAUDIF.DLL. This is still necessary as our new USBAUDIF.DLL will finally allow to use sample rates > 65535 Hz.

For the matter of not completely confusing the user, it would be helpful to repack the whole UNIAUD installation to also install the necessary SPI.INI update (even though the result will be identical to what USBAUDIO installation needs) and to modify my new USBUPDT.DLL installation DLL (which explicitely sets default WAVEAUDIO and AMPMIX device) by renaming it and to set the defaults to the UNIAUD driver instead of the USB driver in order to help the user so that he does not have to fumble with MMPM2.INI

This is close to no rework at all. As always all the code that I have written can be found in the Netlabs USB repository. I still need to tweak it a little (brush up) but we are close to completion.
Title: Re: USBAUDIO: now supports 24-bit and sample frequencies > 65535 Hz
Post by: Lars on February 05, 2018, 04:31:22 pm
I now uploaded USB 10.221 to Hobbes. I changed the USBAUDIO installation to no longer install a Sequencer (MIDI) device as USBAUDIO.SYS does not support MIDI. But I changed the installation so that the Ampmixer will now get its own page in the Multimedia Setup Object. That allows to not only select default WAVEAUDIO but now also default AMPMIX device and consequently it should now be possible to force WAVE play/record via USB audio.

Title: Re: USBAUDIO: now supports 24-bit and sample frequencies > 65535 Hz
Post by: Eugene Tucker on February 05, 2018, 05:12:04 pm
Thank you Lars. The driver(s) work fine on my machine.
Title: Re: USBAUDIO: now supports 24-bit and sample frequencies > 65535 Hz
Post by: David McKenna on February 05, 2018, 07:24:46 pm
 Thanks Lars! This seems to work with regular MP3 and WAV files, but I can't play any 24 bit WAV files (by double-clicking on them). I get an error saying 'The device driver cannot be opened or the required hardware is missing (rc=5006)'. Files are 24bit, 48KHz, 2 channel and are properly recognized if I right click on it and choose 'Open as..' -> 'Wavefile Info'. Far as I can tell the USBWAV codec is installed (using listprocs). Is this a limitation of the OS/2 player? What do you or Wim use to play 24 bit files?

 Still can't switch back and forth from Uniaud to USBWav, probably because there is no AmpMix page for UniAud. Unchecking the 'Default Device' under the USB Ampmix page doesn't stick for some reason. Once checked, USB is all I get until I go into MMPM2.INI and remove it from the [defaultnames] section. Can the Ampmix page for UniAud be added manually by tweaking MMPM2.INI? I'll play around with that...

 One other thing that seems obvious in retrospect... I uninstalled the old USB audio stuff using this package before re-installing, but the USB sequencer stuff was not removed (because it doesn't install it!). Have to use the last package (USBDrv220) to do it right.

Regards,
Title: Re: USBAUDIO: now supports 24-bit and sample frequencies > 65535 Hz
Post by: David McKenna on February 05, 2018, 07:44:41 pm
 You CAN add an Ampmix page for UniAud to the multimedia setup object by tweaking MMPM2.INI. Under the [UNIAUDAMPMIX01] section, change DEVICEFLAG=2 to DEVICEFLAG=1, and at the bottom of the section add a line: ALIASNAME=OS/2 Audio: Ampmix. Now I can switch between UniAud and USBWav without a reboot or messing with MMPM2.INI! DO NOT restart after the change, do <CTRL><ALT><DEL> otherwise the original MMPM2.INI will be re-written during shutdown and you lose the change.
Title: Re: USBAUDIO: now supports 24-bit and sample frequencies > 65535 Hz
Post by: Lars on February 06, 2018, 07:40:34 am
Thanks Lars! This seems to work with regular MP3 and WAV files, but I can't play any 24 bit WAV files (by double-clicking on them). I get an error saying 'The device driver cannot be opened or the required hardware is missing (rc=5006)'. Files are 24bit, 48KHz, 2 channel and are properly recognized if I right click on it and choose 'Open as..' -> 'Wavefile Info'. Far as I can tell the USBWAV codec is installed (using listprocs). Is this a limitation of the OS/2 player? What do you or Wim use to play 24 bit files?

 Still can't switch back and forth from Uniaud to USBWav, probably because there is no AmpMix page for UniAud. Unchecking the 'Default Device' under the USB Ampmix page doesn't stick for some reason. Once checked, USB is all I get until I go into MMPM2.INI and remove it from the [defaultnames] section. Can the Ampmix page for UniAud be added manually by tweaking MMPM2.INI? I'll play around with that...

 One other thing that seems obvious in retrospect... I uninstalled the old USB audio stuff using this package before re-installing, but the USB sequencer stuff was not removed (because it doesn't install it!). Have to use the last package (USBDrv220) to do it right.

Regards,

1) "cannot play 24-bit": the error messages states exactly what happens: Your USB audio HW does not support replay of 24-bit. I decided to not add additional conversion code into USBAUDIO.SYS (apart from support for "legacy" sample rates and bit sizes of 8 kHz,11.025kHz, 22.050kHz and 8-bit respectively). We let the HW do what the HW can do but no more. You can use PM player which will do 24-bit and 32-bit to 16-bit conversion in SW. I could add that to USBWAV.DLL but currently it's not in there.

2) installation woes: unfortunately, audio installation is a bit tricky. The minstall.exe uses the info in CARDINFO.DLL in order to decide what to install or uninstall (which is ok and the right way to go). As you found out, the new CARDINFO.DLL no longer contains the "sequencer" section because USBAUDIO.SYS has never and probably will never support MIDI. That's the reason why you cannot uninstall it. If everything else fails, you can always copy the "virgin" MMPM2.INI from \MMOS2\INSTUNST\INIBACK directory to \MMOS2 and rerun the installation.
In hindsight I should have never delivered a USBAUDIO installation that installs the sequencer device ...

3) you have to "toggle" the "AMPMIX as default" setting (deselect and then reselect). That will finally create the [defaultnames] section in MMPM2.INI with WMBAMPMIX01 set as default. You do likewise for the WAVEAUDIO device.

As you now have found out, setting the DEVICEFLAG from 2 to 1 in the [UNIAUDAMPMIX] section (and then giving it a sensible ALIASNAME for displaying on the settings tab) will get you the AMPMIX page in the Multimedia Setup object (and the USBAUDIO installation does that  through CARDINFO.DLL for its own installation). I think the UNIAUD installation should be updated but oh well ...

Lars

Title: Re: USBAUDIO: now supports 24-bit and sample frequencies > 65535 Hz
Post by: David McKenna on February 06, 2018, 12:24:04 pm
 Thanks for the explanation, Lars. I guess I thought conversion was going on, and these are old USB speakers, so makes sense they don't support 24 bit. I actually prefer there is no conversion - now I just need to get some USB speakers that support 24 bit. Is there a tool you know of that can report what speakers are capable of?

Regards,
Title: Re: USBAUDIO: now supports 24-bit and sample frequencies > 65535 Hz
Post by: Lars on February 06, 2018, 01:07:12 pm
Thanks for the explanation, Lars. I guess I thought conversion was going on, and these are old USB speakers, so makes sense they don't support 24 bit. I actually prefer there is no conversion - now I just need to get some USB speakers that support 24 bit. Is there a tool you know of that can report what speakers are capable of?

Regards,

There was a good reason to not put conversion into the driver (apart from the stated exceptions) :
The first guy asks: can't you make 24-bit work ?
The second guy asks: can't you downsample from 64000 Hz to 32000 Hz ?
The third guy asks: can't you make it play MIDI ? I thought it was an audio driver !

You could go on forever. I would have no chance to ever get ahead of the game. The correct solution is to move the conversion into either an application or into an MMIO proc (like USBWAV.DLL). It's also more stable if the conversion code traps: a driver is running at Ring0, an application / MMIO proc is running at Ring3 ...


Yes, there is a tool called 'lsusb' and there also exists an OS/2 port of it. I think the latest version can be found on Paul Smedley's website. 'lsusb' will show you detailed USB device info for each device. That also includes the supported bit-depths and sample rates of your USB audio devices.

From practical experience I can say that normally, if a device supports 24-bit (or even 32-bit) it's also sophisticated enough to support 16-bit.