Trying to develop a USB DAC application with RT1160.
Build project from SDK example:
evkmimxrt1160_dev_composite_hid_audio_unified_freertos_cm7
SDK version: 2.13.0
Test device:
While connecting with iPhone. Run into a situation where audio playback become intermittent.
Reproduce steps:
Attaching a sniffer tool. I found that iPhone is always sending setInterface request after step4.
Control Groups:
- Yamaha AG-03
- Shure X2U
don't not have this issue.
Solved! Go to Solution.
Hi @SeenFan ,
I have finished your 1KHz audio testing on my side, my wave is good:
My test method is:
Board USB J20 connect to the PC will emute USB AUDIO+HID DEMO interface.
1. Use window media player play your 1Khz
Then the board speaker will output the 1KHZ sound
2. Use the Audacity to record the sound from the PC mic, my surrounding is quite, so, it can record the board speaker sound, then I check the wave, totally OK.
You can see:
The original one and the record one are the same.
What's the code you are testing?
Use my previous project release version:
If you use the debug version to work, set the symbols NDEBUG.
I attach the new project again.
What's the product you want to use, if you also want to play in the PC and iphone for long time, do you mind to change to the Full speed instead of the High speed, then both PC and the iphone will stable, as my iphone 7 is full speed, no issues.
Best Regards,
Kerry
Hi @SeenFan ,
Any updated information with my new attached project in this link:
If you still have issues with it, please kindly let me know.
Please also give me the reply to my question confirm:
What product do you want to use, if you also want to play on the PC and iPhone for a long time, do you mind changing to Full speed instead of High speed, then both the PC and the iPhone will both stable, as my iPhone 7 is full speed, no issues.
Best Regards,
Kerry
Hi @SeenFan ,
I attach the SDK project, please download it with the release version.
Any issues, let me know.
Best Regards,
Kerry
Hi Mike,
I use an Apple Lightening to USB3 Camera kit as below to connect EVK and iPhone.
Lightning to USB 3 Camera Adapter - Apple (台灣)
Camera port connects to EVK's OTG1 with a USB type A to micro USB cable.
No need to install any extra apps in my experience.
Regards
Seen
Hi Mike,
Some update.
1. When youtube is suspended to background. Then iPhone sends 2 setInterface requests.
2. If user has subscribed youtube music. i.e. youtube can keep playing music in background.
No setInterface request is sent. The phenomenon(intermittent) has disappeared.
Regards
Seen
Hi Seen,
Due to China Mainland could not use Youtube, we tested with many pop video APP, such as Toutiao, Baidu, IQiYi, we could not regenerate you mentioned phenomenon. All video APPs work as expected.
When subscribed youtube music, this phenomenon would be disappeared.
Do you find this similar phenomenon with other video/music APP?
Mike
Hi Mike,
I can reproduce this issue with
1. built-in Camera => Recording
2. Voice Memo.
as well.
Please give it a try
Regards
Seen
Hi Seen,
Using another iphone, we could regenerate your mentioned issue.
We are in progress to analysis this issue and will update our found later. Thank you for the patience.
best regards,
Mike
Hi Mike,
Roger that. Thank you.
Regards
Seen
Hi @SeenFan ,
After our NXP Expert Tim Wang's detail checking and testing.
We also check the USB transfer data through the different iphone: iphone 7(no issue), iphone 12, iphone 13, pad v9. iphone 7 is the full speed. others are the high speed, and can reproduce the issues.
We find the issues is caused by the iphone spec is unmatch with the SDK, iphone will open speak and record 2 interface, and use the record interface to do the synchronization, but it has 2 feedback endpoint, then it may have the conflict.
more details about the iphone USB, please refer to this doc:
https://developer.apple.com/library/archive/technotes/tn2274/_index.html
So, we try to remove the feedback endpoint, then we can't reproduce the issues now.
I attach the IAR project for your testing, you can also check it on your side.
The modify points are:
1. usb_audio_config.h, enable USB_DEVICE_AUDIO_USE_SYNC_MODE
#define USB_DEVICE_AUDIO_USE_SYNC_MODE (1U)
2. audio_unified.c
comment the CTimer related code, you can copy the related file.
I suggest you use the IAR to run the project directly.
If you use the mcuxpresso IDE, I suggest you use the release version to download.
Then do more testing, if you still meet issues, kindly let us know.
Best Regards,
Kerry
Hi Kerry,
I've tried to patch dev_composite_hid_audio_unified_freertos_cm7.
Seems intermittent issue has gone.
However the sound output become always abnormal. Please check attached picture.
1K Hz tone playback from UAC
Before:
Patched:
I use MCUExpresso V11.7 build 9198, SDK V2.13.0.
Not sure if I miss some something like preprocessor config.
Could you upload your axf for confirm?
Regards
Seen
Hi @SeenFan ,
You are using the PC side to input 1KHZ and play it, right?
The expert tells me, to match the iphone application note, we remove the feedback points, so it has the PC play risk, as the PC side use the feedback points, but I do some testing with PC playing music, the result also can be accept.
Please share your tested 1KHZ, I will also test it on my side, and talk internally again.
Please reply to me ASAP.
If you need the debug project version, you may find it have some issues, it is caused by the code add some assert, just comment it will solve the issues, as the assert printf make the play time delay.
Best Regards,
Kerry
Hi @SeenFan ,
You mention: I feel playback sound is abnormal when using iPhone.
You mean, iphone still have issues?
Do you download the debug version, please wait a moment, I share you a new project version, you can test it again.
Best Regards,
Kerry
Hi Kerry,
You mean, iphone still have issues?
==> Cannot reproduce intermittent issue. But sound playback is always abnormal(different pattern).
Regards
Seen
HI @SeenFan ,
So, now, iphone situation, you can accept.
But, you also need PC playback works OK, and now, the sound playback in PC have issues, right?
I will test it like you on the PC, yesterday, I just play music, from AE expert desciption, the PC situation is reasonable, anyway, after I test it, I will talk with our expert again.
Any updated information, I will let you know.
Best Regards,
Kerry
Hi Kerry,
So, now, iphone situation, you can accept.
==> I'm afraid not. iPhone playback is abnormal(Different intermittent pattern)
Regards
Seen
Hi @SeenFan ,
I have finished your 1KHz audio testing on my side, my wave is good:
My test method is:
Board USB J20 connect to the PC will emute USB AUDIO+HID DEMO interface.
1. Use window media player play your 1Khz
Then the board speaker will output the 1KHZ sound
2. Use the Audacity to record the sound from the PC mic, my surrounding is quite, so, it can record the board speaker sound, then I check the wave, totally OK.
You can see:
The original one and the record one are the same.
What's the code you are testing?
Use my previous project release version:
If you use the debug version to work, set the symbols NDEBUG.
I attach the new project again.
What's the product you want to use, if you also want to play in the PC and iphone for long time, do you mind to change to the Full speed instead of the High speed, then both PC and the iphone will stable, as my iphone 7 is full speed, no issues.
Best Regards,
Kerry
Hi Kerry,
Seems main difference of my modification and yours is preprocessor option: NDEBUG.
After adding this. Everything works fine now. Thanks for your supporting.
Regards
Seen