Update:
In the xmos_usb_audio software, the USB input stream packets size is already related to SOF speed.
I said that "USB_CHAN_IN data size is not associated with the actual host rate" is incorrect, sorry!
Testing at 48KHz, 24bit, 2ch, by the Wirkshark tool, I can see that the USB input stream packet size dynamically adjusts between 6 and 5.
And the size of the USB output stream is also dynamically adjusted between 6 and 5. It seems that implicit feedback is works.
However the random "blanks space" on the DAC line still present.
The feedback endponit doesn't work with Evaluation-Driver-for-Windows_5_72 ?
-
- Member
- Posts: 14
- Joined: Mon Jun 03, 2024 10:19 am
-
- Active Member
- Posts: 44
- Joined: Mon Nov 21, 2022 5:38 pm
Hi Ross,
as suggested I've checked for zero-count on mclk as
in fact count_zero_clk is > 0 after a few time of streaming, would this suggest some kind of hardware issue on MCLK side?
as suggested I've checked for zero-count on mclk as
Code: Select all
/* Get MCLK count */
asm volatile(" getts %0, res[%1]" : "=r" (u_tmp) : "r" (p_off_mclk));
if(u_tmp == 0)
count_zero_clk++;
-
Verified
- XCore Legend
- Posts: 1264
- Joined: Thu Dec 10, 2009 9:20 pm
- Location: Bristol, UK
yes, that is a bad sign. Port isn't getting a mclk signal or the clock hasn't been started.
I just noticed you have a slightly odd hardware arrangement, I think its worth checking that the clockblock is indeed started, otherwise the port counter will remain at zero
You will want to make sure that start_clock(clk_name); is called.
I just noticed you have a slightly odd hardware arrangement, I think its worth checking that the clockblock is indeed started, otherwise the port counter will remain at zero
You will want to make sure that start_clock(clk_name); is called.
Technical Director @ XMOS. Opinions expressed are my own
-
- Active Member
- Posts: 44
- Joined: Mon Nov 21, 2022 5:38 pm
Hi Ross,
I'm using sw_usb_audio v9.1.0 leaving untouched usb clocks.
I've AUDIO_IO_TILE != XUD_TILE so from lib_xua\src\core\main.xc seems that clock block is started
Anyway that happend only using "Evaluation-Driver-for-Windows", without drivers or with an Android device the problem doesn't occour, could this still be a hardware issue?
I'm using sw_usb_audio v9.1.0 leaving untouched usb clocks.
I've AUDIO_IO_TILE != XUD_TILE so from lib_xua\src\core\main.xc seems that clock block is started
Code: Select all
on tile[AUDIO_IO_TILE] : clock clk_audio_mclk = CLKBLK_MCLK; /* Master clock */
#if (AUDIO_IO_TILE != XUD_TILE) && XUA_USB_EN
/* Separate clock/port for USB feedback calculation */
on tile[XUD_TILE] : clock clk_audio_mclk_usb = CLKBLK_MCLK; /* Master clock */
#endif
...
/* Attach mclk count port to mclk clock-block (for feedback) */
//set_port_clock(p_for_mclk_count, clk_audio_mclk);
#if(AUDIO_IO_TILE != XUD_TILE)
set_clock_src(clk_audio_mclk_usb, p_mclk_in_usb);
set_port_clock(p_for_mclk_count, clk_audio_mclk_usb);
start_clock(clk_audio_mclk_usb);
#else
/* Clock port from same clock-block as I2S */
/* TODO remove asm() */
asm("ldw %0, dp[clk_audio_mclk]":"=r"(x));
asm("setclk res[%0], %1"::"r"(p_for_mclk_count), "r"(x));
#endif