[wdmaudiodev] Re: AW: UAC2 driver loaded but no audio endpoints visible

  • From: "Tsai Tzung-Dar" <dmarc-noreply@xxxxxxxxxxxxx> ("tdtsai1973")
  • To: "wdmaudiodev@xxxxxxxxxxxxx" <wdmaudiodev@xxxxxxxxxxxxx>
  • Date: Fri, 24 Sep 2021 01:52:52 +0000 (UTC)

 Hi Johannes:I found something strange in your Audio control descriptor. 1. Why 
your clock source do not include "Clock Validity" control? Please reference to 
UAC 2.0 spec 5.2.5.1.2.2. Input Terminal 01 should include "Cluster" control 
and set "bmChannelConfig" to 0. Please reference to UAC 20 spec. 5.2.5.4.2.
BR,Tzung-Dar Tsai  

    在 2021年9月23日 星期四 下午11:17:22 [GMT+8], Johannes 
Freyberger<jfreyberger@xxxxxxxxxxxxxxxxxxxx> 寫道:  
 
 
Hi Tsai,

as I already thought this might be a problem in the descriptor which is 
generated inside the Linux drivers/usb/gadget/f_uac2.c I already opened an 
issue on github where I added the descriptor:

  

https://github.com/raspberrypi/linux/issues/4587

  

If you don’t mind you could also post your ideas directly there so we don’t 
have to bother this group here as it seems this could really be more a Linux 
than a windows problem?

  

Thanks a lot for your help and best regards,

Johannes

  

Von: wdmaudiodev-bounce@xxxxxxxxxxxxx Im Auftrag von Tsai Tzung-Dar 
("tdtsai1973")
Gesendet: Donnerstag, 23. September 2021 17:05
An: wdmaudiodev@xxxxxxxxxxxxx
Betreff: [wdmaudiodev] Re: AW: UAC2 driver loaded but no audio endpoints visible

  

Hi Johannes:

Sorry I don't have XMOS device on my hand. If you can post USB Tree View log of 
your device, I can help you to check what's wrong with your descriptor. 

  

BR,

Tzung-Dar Tsai  

  

在 2021年9月23日 星期四 下午08:30:31 [GMT+8], Johannes 
Freyberger<jfreyberger@xxxxxxxxxxxxxxxxxxxx> 寫道: 

  

  

Hi Tsai,

 

thanks, that’s great news – thanks a lot. I just bought the second one and now 
I’m waiting for the arrival 😊 … do you think it’s possible that you already 
send me the output of USB Tree View for this UAC2 device (XMOS 32Bit 384kHz DXD 
DSD256 USB to/from I2S, to DSD/reclock SPDIF PCB)? 

 

Best regards,

Johannes

 

Von: wdmaudiodev-bounce@xxxxxxxxxxxxx Im Auftrag von Tsai Tzung-Dar 
("tdtsai1973")
Gesendet: Donnerstag, 23. September 2021 13:52
An: wdmaudiodev@xxxxxxxxxxxxx
Betreff: [wdmaudiodev] Re: AW: UAC2 driver loaded but no audio endpoints visible

 

Hi Johannes:

USB DAC which use CM6631A or XMOS chips, were all use UAC 2.0 with feedback 
endpoint. You can find one in follow url:

384kHz Asynchronous USB to I2S/SPDIF CM6631A PCB - DIYINHK

 



 






 |

 |

|  | 
384kHz Asynchronous USB to I2S/SPDIF CM6631A PCB - DIYINHK

NDK NZ2520SDA Ultra low phase noise oscillator Uses external 3.3V regulated 
power supply PCB with optical spdif ...
 |

 |

 |


https://www.diyinhk.com/shop/audio-kits/170-xmos-32bit-384khz-dxd-dsd256-usb-tofrom-i2sdsdreclock-spdif-pcb.html

UAC1 feedback is work for Windows 10. I suggest use USB Tree View to check you 
configuration descriptor first. Maybe you put some AC Unit that MS 
usbaudio2.sys do not support. 

 

BR,

Tzung-Dar Tsai

 

 

 

 

在 2021年9月23日 星期四 下午06:18:35 [GMT+8], Johannes 
Freyberger<jfreyberger@xxxxxxxxxxxxxxxxxxxx> 寫道: 

 

 

Hi all,

 

seems not an easy thing to answer. Meanwhile I asked some audio colleagues to 
check their USB audio devices if we can find any device that uses usbaudio2.sys 
and a feedback endpoint – but so far they’re all using either UAC1 or native 
drivers or no feedback endpoint. And I think we already checked > 20 devices 
from various manufacturers. But I found a device which uses a feedback endpoint 
and UAC1. Though the feedback endpoint seems something USB specific and not 
directly related to UAC1 or UAC2 I think it also would have to be somehow 
supported in the audio part and I found different answers whether W10 and UAC1 
support a feedback endpoint to adjust the samplerate during a playback from the 
PC to the device. Does anybody know whether a feedback endpoint should also 
work for UAC1 in W10?

 

Thanks and best regards,

Johannes

 

Von: Johannes Freyberger 
Gesendet: Dienstag, 21. September 2021 21:04
An: 'wdmaudiodev@xxxxxxxxxxxxx' <wdmaudiodev@xxxxxxxxxxxxx>
Betreff: AW: [wdmaudiodev] Re: AW: UAC2 driver loaded but no audio endpoints 
visible

 

Hi,

 

as usbaudio2.sys is from 06.12.2019 I thought I’d give the latest TMFs for W10 
2004 a chance even if they are not for W10 21H1. And the output seems not so 
wrong to me. The feedback endpoint seems to be OK:

 

00000593             USBAudio2         4             17220    4             0   
           09\21\2021-19:57:40:08               AS Interface List:

00000594             USBAudio2         4             17220    4             0   
           09\21\2021-19:57:40:08               AS OUT Interface IfNb=0x01 
'Playback Inactive' Terminal ID=0x01 Type=0x101 USB_STREAMING 'USBH Out'

00000595             USBAudio2         4             17220    4             0   
           09\21\2021-19:57:40:08                 *** Alt Setting Group ***

00000596             USBAudio2         4             17220    4             0   
           09\21\2021-19:57:40:08                 AS OUT IfNb=0x01 
AltSetting=0x01 'Playback Active'

00000597             USBAudio2         4             17220    4             0   
           09\21\2021-19:57:40:08                    Format Type I PCM 
(0x00000001) SubSlotSize=2 BitsPerSample=16 ChannelCount=2

00000598             USBAudio2         4             17220    4             0   
           09\21\2021-19:57:40:08                    Data Endpoint 0x01 
Isochronous Asynchronous Data ActualMaxPacketSize=188 
ActualPacketFrequency=1000/s (HS Endpoint)

00000599             USBAudio2         4             17220    4             0   
           09\21\2021-19:57:40:08                    Feedback Endpoint 0x81 
Isochronous None Feedback ActualMaxPacketSize=4 ActualPacketFrequency=1000/s 
(HS Endpoint)

00000600             USBAudio2         4             17220    4             0   
           09\21\2021-19:57:40:08                    Supported sampling 
frequencies:

00000601             USBAudio2         4             17220    4             0   
           09\21\2021-19:57:40:08                      min=44100 max=44100 res=0

00000602             USBAudio2         4             17220    4             0   
           09\21\2021-19:57:40:08               AS IN  Interface IfNb=0x02 
'Capture Inactive' Terminal ID=0x04 Type=0x101 USB_STREAMING 'USBH In'

00000603             USBAudio2         4             17220    4             0   
           09\21\2021-19:57:40:08                 *** Alt Setting Group ***

00000604             USBAudio2         4             17220    4             0   
           09\21\2021-19:57:40:08                 AS IN  IfNb=0x02 
AltSetting=0x01 'Capture Active'

00000605             USBAudio2         4             17220    4             0   
           09\21\2021-19:57:40:08                    Format Type I PCM 
(0x00000001) SubSlotSize=2 BitsPerSample=16 ChannelCount=2

00000606             USBAudio2         4             17220    4             0   
           09\21\2021-19:57:40:08                    Data Endpoint 0x82 
Isochronous Asynchronous Data ActualMaxPacketSize=180 
ActualPacketFrequency=1000/s (HS Endpoint)

00000607             USBAudio2         4             17220    4             0   
           09\21\2021-19:57:40:08                    Supported sampling 
frequencies:

00000608             USBAudio2         4             17220    4             0   
           09\21\2021-19:57:40:08                      min=44100 max=44100 res=0

00000609             USBAudio2         4             17220    4             0   
           09\21\2021-19:57:40:08               SUCCESS

 

But later on I see several of these problems:

 

00001014             USBAudio2         2820      2948      3             0      
        09\21\2021-19:57:40:270             [

00001015             USBAudio2         2820      2948      3             0      
        09\21\2021-19:57:40:270             PIN 0 HostPin OutPin

00001016             USBAudio2         2820      2948      3             0      
        09\21\2021-19:57:40:270                KSPROPERTY_PIN_PROPOSEDATAFORMAT 
SET

00001017             USBAudio2         2820      2948      3             0      
        09\21\2021-19:57:40:270             SET: ValueSize=64 < 
sizeof(KSDATAFORMAT_WAVEFORMATEX)

00001018             USBAudio2         2820      2948      3             0      
        09\21\2021-19:57:40:270             ] 
0xc0000023(STATUS_BUFFER_TOO_SMALL)

 

On the other hand I don’t see how I could have any influence on this in my USB 
device definition. Is there anybody who could confirm that he/she got the Linux 
uac2 usb audio gadget driver working with W10 usbaudio2.sys version 
10.0.19041.1 from 06.12.2019?

 

Thanks and best regards,

Johannes

 

Von: Johannes Freyberger 
Gesendet: Montag, 20. September 2021 22:31
An: 'wdmaudiodev@xxxxxxxxxxxxx' <wdmaudiodev@xxxxxxxxxxxxx>
Betreff: AW: [wdmaudiodev] Re: AW: UAC2 driver loaded but no audio endpoints 
visible

 

Hi Jerry,

 

thanks for your reply. I already found your post and I followed the idea using 
.bFunctionSubClass = UAC2_FUNCTION_DESKTOP_SPEAKER. So far I didn’t check the 
USB_ENDPOINT_SYNC_SYNC as I think this link 
https://docs.microsoft.com/en-us/windows-hardware/drivers/audio/usb-2-0-audio-drivers?source=docs
  in combination with USB spec 2.0 chapter 5.12.4.1 suggests that 
USB_ENDPOINT_XFER_ISOC | USB_ENDPOINT_SYNC_ASYNC is correct. Unfortunately I 
don’t have any USB device here that uses usbaudio2.sys. Either they have native 
drivers or they use usbaudio.sys. Otherwise I could compare the USB Tree View 
output from a working device to my Raspberry.

 

Best,

Johannes

 

Von: wdmaudiodev-bounce@xxxxxxxxxxxxx Im Auftrag von Jerry Evans
Gesendet: Montag, 20. September 2021 20:28
An: wdmaudiodev@xxxxxxxxxxxxx
Betreff: [wdmaudiodev] Re: AW: UAC2 driver loaded but no audio endpoints visible

 

Hello Johannes 

 

ICYMI See https://www.freelists.org/post/wdmaudiodev/Linux-UAC2-gadget,1 for ;
some details on a then working UAC2 gadget. This may or may not help with your 
particular problem:)

 

Good luck 

 

Jerry.

Sent from my iPad

 


On 20 Sep 2021, at 17:46, Johannes Freyberger 
<jfreyberger@xxxxxxxxxxxxxxxxxxxx> wrote:





OK … sadly that’s no good news

 

Currently I think my problem is around this output from KS Topology Filter Test:

 

Device Name = USB Audio 2.0

PnP ID      = USB\VID_1D6B&PID_0101&MI_00\8&1583D6B2&1&0000

    Device: USB Audio 2.0 (USB\VID_1D6B&PID_0101&MI_00\8&1583D6B2&1&0000)

     Filter: Source/Sink

      Pin[00] ()

      Pin[01] ()

      Pin[02] ()

      Pin[03] ()

     Filter: Source/Sink

      Pin[00] ()

      Pin[00] : Basic support: 0x201

    KSPROPERTY_AUDIOSIGNALPROCESSING_MODES response: KSMULTIPLE_ITEM.Size = 24, 
KSMULTIPLE_ITEM.Count = 1, buffer size = 24

    AUDIO_SIGNALPROCESSINGMODE_RAW is mode 0

    Message:Driver supports processing modes but the preferred formats donot 
have the attribute flag set, so setting it [hr = E_INVALIDARG (0x80070057)]

    pCPinInstance->CreatePin() succeeded

    Pin creation successful for AUDIO_SIGNALPROCESSINGMODE_RAW 

      Pin[01] ()

      Pin[02] ()

      Pin[03] ()

      Pin[03] : Basic support: 0x201

    KSPROPERTY_AUDIOSIGNALPROCESSING_MODES response: KSMULTIPLE_ITEM.Size = 24, 
KSMULTIPLE_ITEM.Count = 1, buffer size = 24

    AUDIO_SIGNALPROCESSINGMODE_RAW is mode 0

    Message:Driver supports processing modes but the preferred formats donot 
have the attribute flag set, so setting it [hr = E_INVALIDARG (0x80070057)]

    pCPinInstance->CreatePin() failed with 0x9000001f.

      FAIL: Pin[03] : Pin creation failed for AUDIO_SIGNALPROCESSINGMODE_RAW

End Case: ID 16.1007:3.10 : FAIL : KS Topology Filters\KS Pins\Check Processing 
Modes : [Mon Sep 20 18:28:33 2021]

 

But yet I don’t know the relationship from the USB Driver struct to the 
processing modes – why does the Linux audio gadget have the support of 
processing modes set or in other words what entry in the USB Tree View lets 
windows activate the processing modes for this device?

 

Von: wdmaudiodev-bounce@xxxxxxxxxxxxx Im Auftrag von Matthew van Eerde 
("Matthew.van.Eerde")
Gesendet: Montag, 20. September 2021 18:29
An: wdmaudiodev@xxxxxxxxxxxxx
Betreff: [wdmaudiodev] Re: AW: Re: [EXTERNAL] AW: UAC2 driver loaded but no 
audio endpoints visible

 

For various dry and boring technical reasons I find myself unable to update 
this blog post with new Windows OSes.

 

From: wdmaudiodev-bounce@xxxxxxxxxxxxx <wdmaudiodev-bounce@xxxxxxxxxxxxx> On 
Behalf Of Johannes Freyberger
Sent: Monday, September 20, 2021 7:52 AM
To: wdmaudiodev@xxxxxxxxxxxxx
Subject: [wdmaudiodev] AW: Re: [EXTERNAL] AW: UAC2 driver loaded but no audio 
endpoints visible

 

Yes, thanks … I already found this link today and grabbed the TMF files from 
your github page. Do you think it’s possible to also add the ausbaudio2 tmf 
files for W10 21H1 there?

 

Von: wdmaudiodev-bounce@xxxxxxxxxxxxx Im Auftrag von Matthew van Eerde 
("Matthew.van.Eerde")
Gesendet: Montag, 20. September 2021 16:44
An: wdmaudiodev@xxxxxxxxxxxxx
Betreff: [wdmaudiodev] Re: [EXTERNAL] AW: UAC2 driver loaded but no audio 
endpoints visible

 

You may be interested in How to gather and read logs for Microsoft’s USB Audio 
2.0 class driver – Matthew van Eerde's web log (wordpress.com)

  

PNG image

PNG image

Other related posts: