update v71

This commit is contained in:
Steven Dan
2026-05-15 11:48:58 +08:00
parent dee4b3daf5
commit 917def34d9
2 changed files with 2 additions and 16 deletions

View File

@@ -1,7 +1,6 @@
#if UART_DEBUG || DEBUG_MEMORY_LOG_ENABLED
#define DEBUG_PRINT_ENABLE 1
#endif
#define DEBUG_PRINT_ENABLE 1
#include <xs1.h>
#include <assert.h>
@@ -279,9 +278,6 @@ unsigned g_uac_mode = 2; // 2 for UAC2.0, 1 for UAC1.0
void device_reboot(void);
unsafe streaming chanend uc_audiohw;
/* 改动原因main 在绑定 uc_audiohw 后置 1AudioHwInit 内自旋等待,避免与 usb_audio_io同 tile 另一逻辑核)并行启动时
* CODEC_REGWRITE 早于 uc_audiohw 初始化触发的 ET_ILLEGAL_RESOURCE。xC 中 volatile 仅用于 unsafe 指针目标,故用普通 unsigned。 */
unsigned g_uc_audiohw_chan_bound = 0;
/* 改动原因:添加 uc_dfu 全局 streaming chanend用于从 EP0 HID 处理
* (process_send_params) 向 uart_handler 转发固件升级命令。
* sender 端在此处赋值AudioHwRemote par 分支receiver 端传给 uart_handler。 */
@@ -1552,14 +1548,8 @@ void AudioHwRemote(streaming chanend c, client interface c1_led_ctrl_if i_c1_led
void AudioHwInit()
{
debug_printf("AudioHwInit\n");
/* 改动原因:等待 main 中 tile[0] 完成对 uc_audiohw 的绑定;与 usb_audio_io 无固定启动顺序,仅靠“先 unsafe 再 par”不足。 */
{
unsigned spin = 0;
while (g_uc_audiohw_chan_bound == 0 && spin < 20000) {
delay_microseconds(50);
spin++;
}
}
/* 改动原因main 中 tile[0] 绑定 uc_audiohw 与 usb_audio_io→AudioHwInit 同属外层 par无固定顺序短延时让 USER_MAIN 核先跑完 unsafe。
* 不能用普通全局标志跨 par 握手(违反 xC parallel usage rules。 */
delay_milliseconds(100);
if((XUA_SYNCMODE == XUA_SYNCMODE_SYNC || XUA_SPDIF_RX_EN || XUA_ADAT_RX_EN) && XUA_USE_SW_PLL)

View File

@@ -454,9 +454,6 @@ extern void key_receiver(chanend c_key);
extern void SetEx3dToUbmChan (chanend c);
/* 改动原因main 绑定 uc_audiohw 后写 1供 AudioHwInit 自旋等待(定义在 audiohw.xc消除与 usb_audio_io 的启动竞态。 */
extern unsigned g_uc_audiohw_chan_bound;
/* Main for USB Audio Applications */
int main()
{
@@ -597,7 +594,6 @@ int main()
on tile[0] : {
unsafe {
uc_audiohw = (streaming chanend)c_audiohw;
g_uc_audiohw_chan_bound = 1;
}
par {
{