Author Topic: USB Audio - Issues with some Devices  (Read 16217 times)

Wim Brul

  • Sr. Member
  • ****
  • Posts: 295
  • Karma: +25/-0
    • View Profile
    • Wim's home page
USB Audio - Issues with some Devices
« on: January 15, 2021, 12:21:38 pm »
Hi

Today I tried some USB audio input devices I have arround:
- Music Fairy USB 2.0‎‎: worked great with Lar's USBAUDIO.SYS. The chipset is the same as "Conceptronic CSOUNDU C08-041 USB Audio Stick"
- C-Media Electronics USB Mic (0D8C:013C). Did not work.
Karaoke USB Adapter - Only audio Inputs -  This thing has a switch with two modes. Did not work.
-- 1) 046D:0A03  - Logitech USB Microphone  according to some sites)
-- 2) 1415:0000 - Sony SingStar USBMIC by Nam Tai E&E Products Ltd. or OmniVision Technologies, Inc.

I tested these devices with Wim's Audio Recorder.

REgards

Alas, for some reason, the cause of which is yet unknown to me, recording with microphone only USB audio devices does not work.
For me this is a known problem. I think it has to do with some flaw in the USB audio drivers, not with my Wim's Audio Recorder.

Lars

  • Hero Member
  • *****
  • Posts: 1271
  • Karma: +65/-0
    • View Profile
Re: USB Audio - Issues with some Devices
« Reply #1 on: January 15, 2021, 03:00:42 pm »
I think the flaw goes like this:
1) whatever the intention of the sound app, the audio device driver will always be requested with some "dummy" sound format (sample rate, num channels, bit depth) and to perform audio playback (and not record). The audio device driver is supposed to acknowledge the choice or give the next best alternative. Idiotic enough, the sound apps requirement will ultimatively be communicated to the sound driver once a stream is opened (for playback or recording), no matter what the device driver reported to this initial check request.

2) if the audio device driver cannot acknowledge the requested sound format, this will be ignored for the most part. But if it does not acknowledge the "playback" but instead reports that it can only do "record", then this is not ignored and the audio driver will never be opened with a stream.

Wim, I think not the audio device drivers need a fix but we rather need to add a hack to USBAUDIF.DLL to fake the caller of USBAUDIF.DLL that "playback" or at least "playback or record" was acknowledged instead of "record only". In the end, the caller will overrule this reporting anyway and will subsequently open the stream it needs (playback or record, whatever is intended by the sound app). The drawback of this solution is obvious: if a sound app requests playback but the device really is "record only", this will of course fail if the stream is finally created. However, the audio device drivers properly handle this error, and therefore, at least nothing will crash or break. You will just get an error in the sound app (which might be confusing if everything seemed to work initially).

This is all due to the lousy implementation of the multimedia subsystem as a whole. It's a mess.
« Last Edit: January 15, 2021, 03:05:25 pm by Lars »

Lars

  • Hero Member
  • *****
  • Posts: 1271
  • Karma: +65/-0
    • View Profile
Re: USB Audio - Issues with some Devices
« Reply #2 on: January 15, 2021, 03:20:03 pm »
Martin, I'll have quite some spare time in the next weeks. I'll try to fix it. But you will need to serve as the guinea pig for testing.
I currently have no usb audio device at all to test with.

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4710
  • Karma: +41/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: USB Audio - Issues with some Devices
« Reply #3 on: January 15, 2021, 03:41:33 pm »
Martin, I'll have quite some spare time in the next weeks. I'll try to fix it. But you will need to serve as the guinea pig for testing.
I currently have no usb audio device at all to test with.

Hi Lars. I have no problem with that, just let me know and I will test what you told me.
By the way, I'm using AN USB 12.07 and I copied USBAUDIO.SYS and USBAUD2.SYS from your usbdrv237. Just in case.

Regards
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Lars

  • Hero Member
  • *****
  • Posts: 1271
  • Karma: +65/-0
    • View Profile
Re: USB Audio - Issues with some Devices
« Reply #4 on: January 15, 2021, 03:54:31 pm »
My modifications will likely go against USBAUDIF.DLL. I have no clue if AN also delivers that. It's a customized version of AUDIOIF.DLL that was necessary to support the extended sampling rates and sound formats that the USB audio drivers support. The reason I did not modify AUDIOIF.DLL was that I did not want to modify stuff being in existance for decades, possibly breaking it for other audio drivers (like UNIAUD, which uses AUDIOIF.DLL).

Wim Brul

  • Sr. Member
  • ****
  • Posts: 295
  • Karma: +25/-0
    • View Profile
    • Wim's home page
Re: USB Audio - Issues with some Devices
« Reply #5 on: January 15, 2021, 04:09:50 pm »
Wim, I think not the audio device drivers need a fix but we rather need to add a hack to USBAUDIF.DLL to fake the caller of USBAUDIF.DLL that "playback" or at least "playback or record" was acknowledged instead of "record only". In the end, the caller will overrule this reporting anyway and will subsequently open the stream it needs (playback or record, whatever is intended by the sound app). The drawback of this solution is obvious: if a sound app requests playback but the device really is "record only", this will of course fail if the stream is finally created. However, the audio device drivers properly handle this error, and therefore, at least nothing will crash or break. You will just get an error in the sound app (which might be confusing if everything seemed to work initially).
Yes Lars, that thought crossed my mind too. I think you are right.

By the way, I'm using AN USB 12.07 and I copied USBAUDIO.SYS and USBAUD2.SYS from your usbdrv237. Just in case.
Hi Martin, I hope that you did not just copy those drivers. Proper deinstall/install using minstall /* must have been done.

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4710
  • Karma: +41/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: USB Audio - Issues with some Devices
« Reply #6 on: January 15, 2021, 06:58:13 pm »
Hi

I slip these topic to only focus on what may I be doing wrong.

By the way, I'm using AN USB 12.07 and I copied USBAUDIO.SYS and USBAUD2.SYS from your usbdrv237. Just in case.
Hi Martin, I hope that you did not just copy those drivers. Proper deinstall/install using minstall /* must have been done.
....uhm... Yes. I did it the wrong way. I will reinstall USBAudio with dinstall and minstall and test again those devices.

Do you think that changing the USB Base drivers to Lar's USB will make a difference for these two Audio USB Devices to work? (0D8C:013C and 046D:0A03 / 1415:000 )

Regards
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Lars

  • Hero Member
  • *****
  • Posts: 1271
  • Karma: +65/-0
    • View Profile
Re: USB Audio - Issues with some Devices
« Reply #7 on: January 15, 2021, 07:08:53 pm »
No, it will not help. The problem is already identified. It needs to be fixed preferably in USBAUDIF.DLL. Or in the audio drivers which is less preferred because they are doing the right thing.

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4710
  • Karma: +41/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: USB Audio - Issues with some Devices
« Reply #8 on: January 15, 2021, 07:37:47 pm »
Ok. Thanks !!
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Lars

  • Hero Member
  • *****
  • Posts: 1271
  • Karma: +65/-0
    • View Profile
Re: USB Audio - Issues with some Devices
« Reply #9 on: January 15, 2021, 09:19:51 pm »
It turned out that I had to change both: the audio drivers as well as USBAUDIF.DLL.
But the changes are limited to usbaudio.zip package. I now updated it. Sent to you.

Lars

  • Hero Member
  • *****
  • Posts: 1271
  • Karma: +65/-0
    • View Profile
Re: USB Audio - Issues with some Devices
« Reply #10 on: January 15, 2021, 09:22:40 pm »
Sorry, this was too premature. Need to do additional fixes.

Lars

  • Hero Member
  • *****
  • Posts: 1271
  • Karma: +65/-0
    • View Profile
Re: USB Audio - Issues with some Devices
« Reply #11 on: January 15, 2021, 09:43:49 pm »
Martin, I cannot send this zip file to your email account. It refuses these attachments.

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4710
  • Karma: +41/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: USB Audio - Issues with some Devices
« Reply #12 on: January 16, 2021, 01:33:55 am »
Hi Lars.

To send it to gmail try rename it from .zip to .piz and gmail will not scan it. Otherwise you can try uploading to the forum or using dropbox or something similar.

Regards
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Lars

  • Hero Member
  • *****
  • Posts: 1271
  • Karma: +65/-0
    • View Profile
Re: USB Audio - Issues with some Devices
« Reply #13 on: January 16, 2021, 12:31:55 pm »
just renaming the zip is NOT enough. I would have to rename EVERY file with a .DLL,.EXE,.SCR,.SYS extension inside the zip. I don't feel like doing so. Where do I upload in the forum ?

Lars

  • Hero Member
  • *****
  • Posts: 1271
  • Karma: +65/-0
    • View Profile
Re: USB Audio - Issues with some Devices
« Reply #14 on: January 16, 2021, 12:33:18 pm »
Ah, sorry, forgot. Here it is.