--
You received this message because you are subscribed to the Google Groups "Audio-Widget" group.
To unsubscribe from this group and stop receiving emails from it, send an email to audio-widget...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
This is not the port of the Audio Widget, I use a very simple DAC at a rate of 44.1kHz x 16-bit for the test purposes. Source codes are not open yet, because I am only at the research stage. I could not find a single working open source UAC2 project with an explicit feedback other than Audio Widget, and I use your project source code as a great tutorial.
At the current stage, I'm just trying to get the Win10 UAC2 driver to send packets with the size required in explicit feedback. I have tried FS and HS modes but so far I have not succeeded. I decided that the Win10 UAC2 driver does not support explicit feedback, but they write, that "For the asynchronous OUT case the driver supports explicit feedback only."
In my HS test the UAC2 driver persistently sends 44 samples in every micro-frame, except for every 40th in which it sends 48 samples. As if there is no feedback at all. Although every 1 ms is sent 4 bytes of feedback, such as 0x002C1BAB or similar, since the actual frequency of the DAC is 44.108073 kHz.
For the FS mode the UAC2 driver always sends 176 samples in every 1ms frame, except for every 10th in which it sends 180 samples. My feedback value is 0x000B06EA or similar, sent each 1ms.
I am totaly confused. Could you please view the attached descriptor files, maybe some inconsistency will be evident.
I have a few questions more:
1. The bmChannelConfig in the AC Input Terminal Descriptor and AS Interface Descriptor in your project are not defined (equal to 0). Is this intentional?
2. Is there a need for a Device Qualifier Descriptor and Other Speed Configuration Descriptor for UAC2? I ask this question because I noticed that the Other Speed Configuration Descriptor for FS is the same as the Configuration Descriptor for HS, which, in my opinion, is not quite true.
3. Have you tried the device (UAC2, FS and HS, explicit feedback) with Win10 x64? The latest version of usbaudio2.sys is 10.0.17763.1 Dec 15 2018.
I'm looking forward to you opening the source code for views and edits, preferably alongside device schematics.
The feedback value is supposedly the DAC's current sample rate. In reality we use it to make the Host speed up or slow down. I'm sure you have seen the state machine in uacX_device_audio_task.c
Your system obviously uses different sample rates in UAC1 (44.1 ksps) and UAC2 (176.4 ksps). 180 samples x 4 bytes x 2 channels is 1440 bytes. That is quite a lot for an endpoint buffer. You may want to check if the buffer can hold that.
Linux has a good reporting feature for how a DAC actually responds. Off the top of my head I don't remember the Linux DAC status file which you can cat repeatedly to see which sample rate the DAC reports. My Linux machine is tucked away at the moment.
root@nanopineo:~# cat /proc/asound/card1/stream0
Open source USB stack for STM32 UAC2 I2S-DAC demo at usb-1c1d000.usb-1, high sp : USB Audio
Playback:
Status: Running
Interface = 1
Altset = 1
Packet Size = 48
Momentary freq = 44108 Hz (0x5.8376)
Feedback Format = 16.16
Interface 1
Altset 1
Format: S16_LE
Channels: 2
Endpoint: 1 OUT (ASYNC)
Rates: 44100
Data packet interval: 250 us
I have a few questions more:
1. The bmChannelConfig in the AC Input Terminal Descriptor and AS Interface Descriptor in your project are not defined (equal to 0). Is this intentional?Haven't thought much about it. Have you checked with USB.org's Audio2.0_final.zip UAC2 specification?
4.1 Audio Channel Cluster Descriptor
...
The audio channel cluster descriptor contains the following fields:
...
• bmChannelConfig: a bitmap field that indicates which spatial locations are occupied by the channels
present in the cluster. The bit allocations are as follows:
• D0: Front Left - FL
• D1: Front Right - FR
...
4.7.2.4 Input Terminal Descriptor
...
The bNrChannels, bmChannelConfig and iChannelNames fields together constitute the cluster descriptor. They characterize the cluster that leaves the Input Terminal over the single Output Pin
(‘downstream’ connection). For a detailed description of the cluster descriptor, see Section 4.1, “Audio Channel Cluster Descriptor”.
3. Have you tried the device (UAC2, FS and HS, explicit feedback) with Win10 x64? The latest version of usbaudio2.sys is 10.0.17763.1 Dec 15 2018.Yes, it works very well. It's picky when it comes to sample rate triplets. You need one triplet for each frequency, no ranges. The Win10 device driver is a huge thing. It is frequently discussed at wdmau...@freelists.org. There is an ASIO driver for the Audio Widget which implements a subset of UAC in libusbK for Win7. Seriously, there shouldn't be a need for you to go into driver land. If you need the Host's view of the details, I'd suggest a USB debugger first, Linux kernel next, and Windows kernel if all else fails. But avoid it all if you can!
--
There was a discovery way before my time that Windows need to se a difference in feedback value of at least +-64 in order to relate to it. I don't know if that is still the case, but the Audio Widget state machine uses that.
Also, the poll rate of the feedback EP needs to be 1ms for Windows to consider it. The different OSes respond non-linearly to feedback EP poll rate.
--
You received this message because you are subscribed to the Google Groups "Audio-Widget" group.
To unsubscribe from this group and stop receiving emails from it, send an email to audio-widget+unsubscribe@googlegroups.com.