UAC audio intermittent.

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

UAC audio intermittent.

跳至解决方案
7,358 次查看
SeenFan
Contributor II

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:

- iPhone 13 Pro Max.
  - iOS 16.4.1
- iPhone 12 mini.
  - iOS 16.4.1
 

While connecting with iPhone. Run into a situation where audio playback become intermittent.
Reproduce steps:

 

  1. Open the Apple Podcast app.
  2. Connect the EVK. The audio will switch to the headphone jack output.
  3. Open YouTube and play any video. The audio should be normal at this point.
  4. Exit YouTube. The audio will stop. Wait for approximately 10 seconds.
  5. Reopen Podcasts/YouTube/Spotify, etc. The audio may become intermittent.

 

Attaching a sniffer tool. I found that iPhone is always sending setInterface request after step4.snap.png

Control Groups:

- Yamaha AG-03
- Shure X2U

don't not have this issue.

 

0 项奖励
回复
1 解答
6,932 次查看
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @SeenFan ,

  I have finished your 1KHz audio testing on my side, my wave is good:

kerryzhou_0-1688108118412.png

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

kerryzhou_1-1688108240082.png

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.

kerryzhou_2-1688108351112.png

kerryzhou_4-1688108374064.png

You can see:

kerryzhou_5-1688108555269.png

The original one and the record one are the same.

What's the code you are testing?

Use my previous project release version:

kerryzhou_6-1688108915797.png

If you use the debug version to work, set the symbols NDEBUG.

kerryzhou_0-1688112895797.png

 

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

 

 

 

 

 

 

 

 

 

 

在原帖中查看解决方案

0 项奖励
回复
25 回复数
6,059 次查看
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @SeenFan ,

    Any updated information with my new attached project in this link:

https://community.nxp.com/pwmxy87654/attachments/pwmxy87654/imxrt/25757/1/evkmimxrt1160_dev_composit...

  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

 

 

0 项奖励
回复
6,398 次查看
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @SeenFan ,

  I attach the SDK project, please download it with the release version.

 

Any issues, let me know.

Best Regards,

Kerry

 

6,670 次查看
SeenFan
Contributor II

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

0 项奖励
回复
6,648 次查看
Hui_Ma
NXP TechSupport
NXP TechSupport

Hi Seen,

When I using below lighting to USB Host convert, RT1160-EVK as USB audio device works with iphone.

Hui_Ma_0-1686753163268.jpeg

Hui_Ma_1-1686753288223.jpeg

Please check attached videos for your reference.

During test, I could not regenerate your mentioned issue.

Mike

 

0 项奖励
回复
6,629 次查看
SeenFan
Contributor II

Hi Mike, 

I can duplicate this issue with YouTube on my test iPhone.

Please check attached video for the steps to reproduce.

I don't have permission to upload video.
I archive it to 7-zip 

 

Regards

Seen

0 项奖励
回复
6,614 次查看
SeenFan
Contributor II

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

0 项奖励
回复
6,554 次查看
Hui_Ma
NXP TechSupport
NXP TechSupport

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

0 项奖励
回复
6,545 次查看
SeenFan
Contributor II

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

0 项奖励
回复
6,515 次查看
Hui_Ma
NXP TechSupport
NXP TechSupport

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

0 项奖励
回复
6,510 次查看
SeenFan
Contributor II

Hi Mike,

Roger that. Thank you.

Regards

Seen

0 项奖励
回复
6,412 次查看
kerryzhou
NXP TechSupport
NXP TechSupport

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

 

 

   

 

6,378 次查看
SeenFan
Contributor II

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:

1K_org.png

Patched:

1K_patched.png

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

 

0 项奖励
回复
6,373 次查看
kerryzhou
NXP TechSupport
NXP TechSupport

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

0 项奖励
回复
6,368 次查看
SeenFan
Contributor II

Hi Kerry,

You are right. I feel playback sound is abnormal when using iPhone.

Then I used PC to do the recording.

Attached test audio file  for your reference.

 

Regards

Seen

0 项奖励
回复
6,362 次查看
kerryzhou
NXP TechSupport
NXP TechSupport

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

0 项奖励
回复
6,358 次查看
SeenFan
Contributor II

Hi Kerry,

You mean, iphone still have issues?

==> Cannot reproduce intermittent issue. But sound playback is always abnormal(different pattern).

 

Regards

Seen

0 项奖励
回复
6,354 次查看
kerryzhou
NXP TechSupport
NXP TechSupport

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

0 项奖励
回复
6,350 次查看
SeenFan
Contributor II

Hi Kerry,

So, now, iphone situation, you can accept.

==> I'm afraid not. iPhone playback is abnormal(Different intermittent pattern)

 

Regards

Seen

0 项奖励
回复
6,933 次查看
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @SeenFan ,

  I have finished your 1KHz audio testing on my side, my wave is good:

kerryzhou_0-1688108118412.png

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

kerryzhou_1-1688108240082.png

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.

kerryzhou_2-1688108351112.png

kerryzhou_4-1688108374064.png

You can see:

kerryzhou_5-1688108555269.png

The original one and the record one are the same.

What's the code you are testing?

Use my previous project release version:

kerryzhou_6-1688108915797.png

If you use the debug version to work, set the symbols NDEBUG.

kerryzhou_0-1688112895797.png

 

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

 

 

 

 

 

 

 

 

 

 

0 项奖励
回复
6,048 次查看
SeenFan
Contributor II

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

0 项奖励
回复