OpenXDK XAudio sometimes doesn't work when running the application a second time

Open
#362 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
c

Research direction

Start in lib/hal/audio.c at the KeConnectInterrupt call mentioned in the issue, then trace the AC97 cold-reset and XAudio initialization path. Investigate why interrupts stop after relaunch from an XDK-made dashboard and whether calling XAudioInit before exit changes the relevant state; done means identifying and fixing the cause so audio works after relaunch.

Written by the indexing model from the issue text.

Description

If I use xaudio, then quit my application, and then use an XDK-made homebrew dashboard to relaunch my application, then xaudio suddenly won't cause interrupts anymore and audio doesn't seem to work.
This probably breaks many applications, because they might use audio for synchronization.

This needs to be investigated.

We actually do an AC97 cold-reset, so I'm not sure what other state might affect it.

I did check the return value of KeConnectInterrupt but it's always TRUE.

I also looked at some AC97 registers but found nothing of interest.

I was able to prevent this issue (at least sometimes) by calling XAudioInit(16, 2, NULL, NULL); before quitting.

I did not check if the audio is also broken in the XDK-made dashboard.

Dominant language
C
Stars
600
Forks
97
Avg merge
11h 48m
Merged PRs (30d)
2

Getting set up

  • Ships a Dockerfile or Docker Compose file
  • No pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from XboxDev/nxdk

All issues in XboxDev/nxdk

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.