Author Topic: USB Audio  (Read 4658 times)

Neil Waldhauer

  • Sr. Member
  • ****
  • Thank You
  • -Given: 6
  • -Receive: 18
  • Posts: 309
    • View Profile
    • Blonde Guy
Re: USB Audio
« Reply #30 on: March 07, 2017, 10:01:05 pm »

Would you be willing to test a new set of drivers ? If yes let me know where to send the stuff ...

OK, sure. Sent you PM with contact info.

Expert consulting for ArcaOS, OS/2 and eComStation
http://www.blondeguy.com

Neil Waldhauer

  • Sr. Member
  • ****
  • Thank You
  • -Given: 6
  • -Receive: 18
  • Posts: 309
    • View Profile
    • Blonde Guy
Re: USB Audio
« Reply #31 on: March 08, 2017, 03:51:11 am »
Thanks for the test driver. I installed both the USB stack and the USB audio driver.

Without them, I was able to play system sounds and PM123 sounded pretty good. Both VLC and Firefox would give a sort of a squeal when attempting to play a sound.

With the new drivers, I was able to play system sounds, PM123, VLC and Firefox. I got an occasional drop-out while watching a YouTube video.

I did not see traps, but I did not do extensive testing. I will leave these drivers installed as I go on to test other things.
Expert consulting for ArcaOS, OS/2 and eComStation
http://www.blondeguy.com

Lars

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 24
  • Posts: 185
    • View Profile
Re: USB Audio
« Reply #32 on: March 08, 2017, 09:02:38 pm »
Good to hear that it does not trap any more. That was the predominant thing to fix, obviously.
If possible you should try and play those system sound files (non sample rate converted files) that led to the trap and see if they will work without trap now.
Just today, Wim has found another bug in USBAUDIO.SYS that might also have a bearing on the problem.

About drop outs in Firefox: maybe that cannot fully be avoided. It might happen on high interrupt load. Isochronous transfer will lead to a fairly steady interrupt load. If something else is busy in the system (hard disk etc.) that might lead to a delay in interrupt processing.


Neil Waldhauer

  • Sr. Member
  • ****
  • Thank You
  • -Given: 6
  • -Receive: 18
  • Posts: 309
    • View Profile
    • Blonde Guy
Re: USB Audio
« Reply #33 on: March 09, 2017, 03:13:22 am »
I have now tried a variety of the old 11 KHz and 22 KHz and 1-channel 44 KHz files. Of course they sound wrong, but none of them seem to give a trap. So I think the test build you provided has improved matters quite a bit.
Expert consulting for ArcaOS, OS/2 and eComStation
http://www.blondeguy.com

Wim Brul

  • Full Member
  • ***
  • Thank You
  • -Given: 3
  • -Receive: 29
  • Posts: 135
    • View Profile
    • Wim's home page
Re: USB Audio
« Reply #34 on: March 09, 2017, 12:37:59 pm »
Quote
About drop outs in Firefox: maybe that cannot fully be avoided. It might happen on high interrupt load. Isochronous transfer will lead to a fairly steady interrupt load. If something else is busy in the system (hard disk etc.) that might lead to a delay in interrupt processing.

Most likely the drop outs of sound in firefox occur when the sample rate is too low to be handled in time. It probably occurred when the sound was playing too fast. The usb audio driver goes into a kind of overdrive to spit out the 16 bit stereo sound samples at a rate of 44.1 kHz. whereas the application produces say 8 bit mono sound at 8 kHz. hence lack of samples occur  i.e. drop out of sound. Moreover the overdrive operation results in an interrupt load that is in this case 2*2*44100/8000 i.e. 22 times so high. I am having sound dropouts when I play the macaw.avi file which produces 8 bit mono sound at 22.050 kHz.

Wim
« Last Edit: March 09, 2017, 01:10:52 pm by Wim Brul »

Lars

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 24
  • Posts: 185
    • View Profile
Re: USB Audio
« Reply #35 on: March 09, 2017, 08:31:30 pm »
Hi Wim,

from what I can tell from USBAUDIO.SYS tracing, Youtube will use 44.1 kHz stereo 16-bit PCM for sounds it wants to play. Therefore the dropouts when using Youtube in Firefox must stem from a different problem.

Andreas Kohl

  • Full Member
  • ***
  • Thank You
  • -Given: 6
  • -Receive: 10
  • Posts: 246
    • View Profile
    • warpserver.de
Re: USB Audio
« Reply #36 on: March 09, 2017, 10:28:21 pm »
Hi Wim,

from what I can tell from USBAUDIO.SYS tracing, Youtube will use 44.1 kHz stereo 16-bit PCM for sounds it wants to play. Therefore the dropouts when using Youtube in Firefox must stem from a different problem.

Do you use any add-ons or the normal youtube website? How many tabs are opened? If you want to listen to continuous sound playback from a youtube stream, simply switch to a newly opened tab. For video playback I would recommend to use HTML5 everywhere add-on, to disable all the fancy yt stuff and open the video playback in its own tab or fullscreen. The behaviour seems to be introduced with the new audio backend which relies on this kai library. You can compare it to Firefox 10 (or Seamonkey 2.7.2) where the same stuff runs smoothier on the same hardware.

Neil Waldhauer

  • Sr. Member
  • ****
  • Thank You
  • -Given: 6
  • -Receive: 18
  • Posts: 309
    • View Profile
    • Blonde Guy
Re: USB Audio
« Reply #37 on: March 10, 2017, 05:59:08 am »
When playing a YouTube movie, I can run AcpiStat.exe and show the number of interrupts, and it is thousands per second.
Expert consulting for ArcaOS, OS/2 and eComStation
http://www.blondeguy.com

Dave Yeo

  • Hero Member
  • *****
  • Thank You
  • -Given: 8
  • -Receive: 93
  • Posts: 1216
    • View Profile
Re: USB Audio
« Reply #38 on: March 10, 2017, 06:07:30 am »
The audio problem seems to be caused by Mozilla switching from sydneyaudio to libcubeb. One uses a push API and the other uses a pull API.

roberto

  • Sr. Member
  • ****
  • Thank You
  • -Given: 14
  • -Receive: 6
  • Posts: 342
    • View Profile
Re: USB Audio
« Reply #39 on: March 11, 2017, 11:33:34 pm »
My problem with youtube videos seems to have been solved simply with this:
Rem this line in config.sys and restart
REM 11-03-2017 DEVICE=C:\OS2\BOOT\USBRESMG.SYS

I have little tried but the difference is substantial.
And with different versions I appreciate important differences.
Saludos

Pete

  • Hero Member
  • *****
  • Thank You
  • -Given: 0
  • -Receive: 28
  • Posts: 554
    • View Profile
Re: USB Audio
« Reply #40 on: March 12, 2017, 02:05:16 am »
Hi roberto

How current is the usbresmg.sys? - It might be worth testing with Wims latest from here http://home.hccnet.nl/w.m.brul/usbcalls/


Regards

Pete

roberto

  • Sr. Member
  • ****
  • Thank You
  • -Given: 14
  • -Receive: 6
  • Posts: 342
    • View Profile
Re: USB Audio
« Reply #41 on: March 12, 2017, 10:36:49 am »
The fact is that I was trying to use a relay plate, which I have been unable to make it work.
It seems that not only is it trying to remove the usbresmg.sys, I also have to plug the relay board to the usb, with this in the config.sys:
 DEVICE = c: \ OS2 \ BOOT \ USBECD.SYS / D: 067B: 2303: 0300 / N: $ / S / V
Before starting firefox.
Now on this computer I am using Lars usb 10.215.
From my point of view, video crashes are a problem in the usb.

Lars

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 24
  • Posts: 185
    • View Profile
Re: USB Audio
« Reply #42 on: March 12, 2017, 01:23:57 pm »
Just to be sure,

have you ensured that USBCALLS.DLL was properly updated ?
It should be in the \OS2\DLL directory (only !) and bldlevel.exe run against USBCALLS.DLL should tell you that it's version 10.215.
I can see no reason that USBRESMG.SYS should interfere with USB audio unless you use it with something, in your case, that seems to be USBECD.SYS.
By the way: USBCALLS 10.215 is fully compatible with Wim Brul's latest USBCALLS.DLL. Wim just did some additions to the header file but that's only relevant to programmers.

roberto

  • Sr. Member
  • ****
  • Thank You
  • -Given: 14
  • -Receive: 6
  • Posts: 342
    • View Profile
Re: USB Audio
« Reply #43 on: March 12, 2017, 03:51:08 pm »
Just to be sure,

have you ensured that USBCALLS.DLL was properly updated ?
yes, I install from another partition and have this:
2017/02/28  10:23:16  49098     C:\OS2\DLL\usbcalls.dll

Quote
It should be in the \OS2\DLL directory (only !)
Is ok.

 
Quote
and bldlevel.exe run against USBCALLS.DLL should tell you that it's version 10.215.

I have:
[C:\]bldlevel.exe c:\os2\dll\usbcalls.dll
Build Level Display Facility Version 6.12.675 Sep 25 2001
(C) Copyright IBM Corporation 1993-2001
Signature:       @#W.M.Brul:14.20170228#@USBCALLS
Vendor:          W.M.Brul
Revision:        14.20170228
File Version:    14.20170228
Description:     USBCALLS


Quote
I can see no reason that USBRESMG.SYS should interfere with USB audio unless you use it with something, in your case, that seems to be USBECD.SYS.
Yes, I have to connect the usb to the board for a good result.

Finally the firefox with youtuve, failed, but the improvement is considerable.

If I run the cmd that attach with the rem usbresmg.sys, show:
[d:\usbreles]usb-queryversion
+RxUsbQueryVersion(),RC=0x0
*RxUsbQueryVersion(),RC=0x1B58
USBCALLS 15356.6175
USBRESMG 4.0
-RxUsbQueryVersion(),RC=0x0
+RxUsbQueryNumberDevices(),RC=0x0
*RxUsbQueryNumberDevices(),RC=0x1B58
number NUMBER
-RxUsbQueryNumberDevices(),RC=0x0

0x1B58 - USB_NOT_INIT
  Library not initialized.
Code: [Select]
/* add RxUsbQueryVersion */
rc = RxFuncAdd('RxUsbQueryVersion','usbcalls','RxUsbQueryVersion')
say '+RxUsbQueryVersion(),RC=0x'd2x(rc)

/* invoke RxUsbQueryVersion */
drop DLLMajor DLLMinor /* receives usbcalls version */
drop USBMajor USBMinor /* receives usbresmg version */
rc = RxUsbQueryVersion(DLLMajor,DLLMinor,USBMajor,USBMinor)
say '*RxUsbQueryVersion(),RC=0x'd2x(rc)
say 'USBCALLS 'DLLMajor'.'DLLMinor
say 'USBRESMG 'USBMajor'.'USBMinor

/* drop RxUsbQueryVersion */
rc = RxFuncDrop('RxUsbQueryVersion')
say '-RxUsbQueryVersion(),RC=0x'd2x(rc)

/* add RxUsbQueryNumberDevices */
rc = RxFuncAdd('RxUsbQueryNumberDevices','usbcalls','RxUsbQueryNumberDevices')
say '+RxUsbQueryNumberDevices(),RC=0x'd2x(rc)

/* invoke RxUsbQueryNumberDevices */
drop Number /* receives number of devices */
rc = RxUsbQueryNumberDevices(Number)
say '*RxUsbQueryNumberDevices(),RC=0x'd2x(rc)
say 'number' number
/* drop RxUsbQueryNumberDevices */
rc = RxFuncDrop('RxUsbQueryNumberDevices')
say '-RxUsbQueryNumberDevices(),RC=0x'd2x(rc)

Lars

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 24
  • Posts: 185
    • View Profile
Re: USB Audio
« Reply #44 on: March 12, 2017, 04:37:07 pm »
What you attempt to do will not work. There is a version crosscheck between USBCALLS.DLL and USBRESMG.SYS.
That is, you need to install them BOTH from the same package, either AN package, my package or Wim's package. You cannot mix my drivers with Wim's USBCALLS.DLL (and it is also not necessary).