Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

S/PDIF output intermittently disabling #128

Open
iambryanhaney opened this issue May 21, 2020 · 15 comments
Open

S/PDIF output intermittently disabling #128

iambryanhaney opened this issue May 21, 2020 · 15 comments

Comments

@iambryanhaney
Copy link

iambryanhaney commented May 21, 2020

Catalina 10.15.4
Using 48khz for general OS output (Spotify, Chrome, etc).

If there are no active audio streams for a few minutes, the S/PDIF output will cease to function when playback is resumed. I verified that the 0404 is receiving the stream - the headphone output continues to function.

Toggling the sample rate back and forth eventually re-activates the S/PDIF output, but not dependably; it generally takes 1-10 toggles.

The receiving DAC responds and locks to the rate changes with each toggle. As well, the same 0404->DAC has been used without issues under Windows.

@Wouter1
Copy link
Owner

Wouter1 commented May 21, 2020

The crashing control panel is issue #81 . I can not do anything about that as Creative Labs never released the source code of the control panel.

@Wouter1
Copy link
Owner

Wouter1 commented May 21, 2020

@iambryanhaney we could move that stacktrace to the proper ticket #81 but it looks mostly identical to the stacktrace we already have there. Shall we remove it here?

@Wouter1
Copy link
Owner

Wouter1 commented May 21, 2020

@iambryanhaney

If there are no active audio streams for a few minutes, the S/PDIF output will cease to function when playback is resumed. I verified that the 0404 is receiving the stream - the headphone output continues to function.

What I suspect is that the stream is really stopped, and restarted when playback resumes.

And maybe there is a bug in the driver that restarts the normal stream but not the spdif

Can you see any evidence of this theory in the log ? And, do you see any errors in the logs?

@iambryanhaney
Copy link
Author

Removed the stacktrace and removed mention of issue #81 type crash.

@iambryanhaney
Copy link
Author

What I suspect is that the stream is really stopped, and restarted when playback resumes.

And maybe there is a bug in the driver that restarts the normal stream but not the spdif

Can you see any evidence of this theory in the log ? And, do you see any errors in the logs?

My understanding of under-the-hood particulars is limited. Are there other logs that I might inspect that would be of assistance?

An example scenario would be playing a YouTube video.

S/PDIF outputs normally -> Youtube video ends -> Click on another video -> S/PDIF is no longer outputting (but headphones are) -> Toggle sample rate repeatedly while video is playing -> S/PDIF resumes outputting.

As a stopgap to this behavior, I have been keeping Spotify running at an imperceptible volume in the background. As long as the OS has at least one active audio stream routing to the 0404, it appears to prevent S/PDIF failure.

@Wouter1
Copy link
Owner

Wouter1 commented May 22, 2020

@iambryanhaney ok thanks for removing the stacktrace.

Yes apparently something does not restart properly.

If you open Applications/Utilities/Console you get to see the log files. I would like to hear if there are messages there that might indicate a problem with restarting the s/pdif

@Wouter1
Copy link
Owner

Wouter1 commented May 22, 2020

searched for pdif in the sources.

Binary file ./ControlPanel/E-MU USB Audio Control Panel.app/Contents/MacOS/E-MU USB Audio Control Panel matches
./src/EMUUSBAudio/EMUUSBAudioDevice.cpp: if (mRealClockSelector->valueExists(kClockSourceSpdifExternal)) {
./src/EMUUSBAudio/EMUUSBAudioDevice.h: EMUXUCustomControl* mDigitalIOSPDIF; // spdif settings
./src/EMUUSBAudio/EMUUSBDeviceDefines.h: kClockSourceSpdifExternal
./src/EMUUSBAudio/EMUUSBDeviceDefines.h: spdif,
./src/EMUUSBAudio/EMUUSBDeviceDefines.h: kDigitalFormat = 0x05, // the spdif format

@Wouter1
Copy link
Owner

Wouter1 commented May 22, 2020

We can't fix any control panel stuff so let' s hope this problem does not originate there.

The only reference in our code thus is the EMUUSBAudioDevice.cpp code.

But this code is disabled.

@Wouter1
Copy link
Owner

Wouter1 commented May 22, 2020

Checked
https://github.com/Wouter1/EMU-driver/blob/e573375c486c64b577f28776adb19ee317510b53/src/EMUUSBAudio/EMUUSBAudioDevice.cpp

This code has been disabled from the start.

But that is only logging. What I suppose matters is mRealClockSelector->setProperty(kIOAudioSelectorControlClockSourceKey,"0");. (which is there and enabled)

@Wouter1
Copy link
Owner

Wouter1 commented May 22, 2020

That is about the CLOCK SOURCE. The issue seems about the s/pdif OUTPUT, not the clock source.

@Wouter1
Copy link
Owner

Wouter1 commented May 22, 2020

@iambryanhaney a few checks

  • What does control panel show when it works, and when it does not work. Please report all settings, also device, sample rate etc.
  • What do the sync status indicators show when it works and does not work
  • you had this exact same setup working in Windows
  • What happens if you toggle the direct monitor or s/pdif buttons on the EMU itself?

@Wouter1
Copy link
Owner

Wouter1 commented May 22, 2020

The S/Pdif output requires channel 3 and 4 to be enabled.
From the diagram I made long ago it looks that the computer has to send these channels separately. They would then be a copy of channels 1 and 2 ?

@Wouter1
Copy link
Owner

Wouter1 commented May 22, 2020

The normal control panel suggests that SPDIF output is always on becaues you can not select 'off', only 'SPDIF" or "AES"

@Wouter1
Copy link
Owner

Wouter1 commented May 22, 2020

@iambryanhaney I tried to use the spdif on some old audio equipment but I get no signal at all. Also it seems I would have to transmit data to channel 3 and 4 of the EMU where default is 1+2.

How do you play to SPDIF on mac?

@iambryanhaney
Copy link
Author

iambryanhaney commented Sep 14, 2020

Sincere apologies for the belated reply.

I haven't done anything special with regard to audio setup - it would appear that channels 3/4 are always mirroring when the E-MU is being used as the system sound device.

Screen Shot 2020-09-14 at 3 06 45 PM

That said, I'm fairly certain that you can independently address the Analog/Digital outs from within a DAW. Will verify when I'm home this evening.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants