Page 1 of 3

samRes_DAC (within audiohw.xc) always 32

Posted: Tue Sep 11, 2018 9:36 pm
by DHembree
I am attempting to write some code within audiohw.xc that responds to conditions defined by samRes_DAC, but the value is always 32 regardless of the stream.

I'm not sure what else to provide other than I'm using the Thesycon evaluation driver.

Thanks,
Dan

Re: samRes_DAC (within audiohw.xc) always 32

Posted: Wed Sep 12, 2018 2:33 pm
by infiniteimprobability
Which version are you using? I checked the signal path in 6.15.2rc2 and it goes from:

Endpoint 0 - interface change (SET_STREAM_FORMAT_OUT) outputs a channel
usb_buffer - sets a shared memory flag
decouple - reads the flag and sends the stream format change to:
audio..

All seems to be well in the source. Are you sure the host is changing the USB interface?

Re: samRes_DAC (within audiohw.xc) always 32

Posted: Mon Sep 17, 2018 10:06 pm
by DHembree
I am running 6.15.2rc1. Is there any reason to suspect this version is causing the issue?

Do you have any recommendations as to how I can verify what the host is sending? I am using Foobar2000 to stream. Windows has some test tones that can be played back at a variety of sample rates and bit depths (within the playback device properties). I can see no change in samRes_DAC with altering these settings.

Re: samRes_DAC (within audiohw.xc) always 32

Posted: Mon Sep 17, 2018 10:07 pm
by DHembree
Also, where can I verify the Endpoint, usb_buffer, etc. that you mentioned?

Re: samRes_DAC (within audiohw.xc) always 32

Posted: Tue Sep 18, 2018 11:34 am
by infiniteimprobability
I would recommend making sure xscope is on (-fxscope and -DXSCOPE) is switched on (this will mean it won't break realtime) and printing the value as the stream change command propagates through from EP0 down to audiohwconfig().
If you want to check the the App running on your host has properly changed the interface (each bit resolution option will present itself as a USB Alternate interface) then a USB analyser of some sort will be needed. I use a beagle (in circuit) but I understand that software analysers are available that can capture USB transactions.

Re: samRes_DAC (within audiohw.xc) always 32

Posted: Tue Sep 18, 2018 4:17 pm
by DHembree
Is there any remote possibility I might have a discussion with you about this and a few other issues I need to resolve as quickly as possible?

Re: samRes_DAC (within audiohw.xc) always 32

Posted: Thu Sep 20, 2018 4:35 pm
by DHembree
-fxscope and -dxscope look like command line switches. I am primarily using the the Edit perspective for editing, compiling, and running. How do I invoke these?

Re: samRes_DAC (within audiohw.xc) always 32

Posted: Thu Sep 20, 2018 6:40 pm
by mon2
Hi Dan.

Please review the following appnotes to see if it helps:

https://www.xmos.com/support/appnotes/AN00196

Code: Select all

https://www.xmos.com/support/appnotes/AN00196
and

https://www.xmos.com/support/tools/docu ... ion=X9923A

Re: samRes_DAC (within audiohw.xc) always 32

Posted: Thu Sep 20, 2018 8:54 pm
by DHembree
Mon2,

I have followed the app note to the letter but get the following error:

ERROR: plugin 'XScopePlugin.dll' returned 'XSI_STATUS_INVALID_ARGS' on creation with args '-xe 'C:\XMOS Xscope\AN00196_Getting_started_with_real_time_xSCOPE_in_xTIMEcomposer_Studio\bin\app_getting_started_with_real_time_xscope.xe' -realtime localhost:10101 -xe C:\XMOS Xscope\AN00196_Getting_started_with_real_time_xSCOPE_in_xTIMEcomposer_Studio\bin\app_getting_started_with_real_time_xscope.xe'
WARNING: Enabling XLink 7 when not all pads connected
WARNING: Trying to communicate over XLink7 when it is not connected
WARNING: Enabling XLink 7 when not all pads connected

I have no clue what arguments to use. I would like to figure this xscope out. I think it will be useful.

Thank you, sir

Re: samRes_DAC (within audiohw.xc) always 32

Posted: Fri Sep 21, 2018 12:03 am
by mon2
Hi Dan. No pro at this but believe it is working here.

1) Saw the same link issues when selecting a random StartKit as the target. Currently do not have any XMOS hardware connected to my PC so changed the configuration to be Simulator.

Screen grab is copied to this post.
xscope_xmos.png

2) Try the following:

a) Run Configuration -> Simulator radio button checked.

b) XSCOPE tab -> Select Real-Time Mode for the Mode

c) Now select the RUN button

What are the results?