INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Issues USB DAC  (Read 1826 times)

streamerguy

  • Junior Woodchuck
  • **
  • Posts: 66
Issues USB DAC
« on: April 20, 2020, 07:06:55 am »

Hi,

Last week I bought a Raspberry Pi 4 (also have this issues with an older RPI3B) to have JRiver for linux installed and use it to connect to a USB Dac (Marantz NA11S1).
Everything seems ok, but I have issues when I create a playlist with tracks and different sample rates. Apparently it takes some time for the Dac to switch to the new sample rate, thus resulting in stopping. Weird thing is thsi happens not always. When I skip manually in the playlist to a track with a different sample rate, it almost always goes wrong, but when I click again on the same track it plays fine.
I suspect it's got something to do with timing.
I am using the hw,dev0 device without puleseaudio and I played a lot with "prebuffering" and "Play silence at startup for synchronization" settings.

Of course i can resample everything to the same sample rate, but this is not bitperfect anymore.

Hopefully someone can point me in the right direction.

Best


10023088: 2827129872: Playback: CMJWaveFeeder::Thread: Firing error
10023088: 2827129872: Playback: CJRPlaybackEngine::OnError: Error Playback could not be started on the output 'ALSA' using the fo
rmat '96 kHz 2ch'.

This output format may not be supported by your hardware.  You can use DSP Studio to change the output to a compatible format.

Also, make sure that your system has a valid sound playback device and that it is properly configured in playback options. callba
ck 0x35604a8
10023088: 2827129872: Playback: CPlayerZone::JRPlaybackEngine_PlaybackError: Start
10023088: 2827129872: Playback: CPlayerZone::JRPlaybackEngine_PlaybackError: Error: Playback could not be started on the output '
ALSA' using the format '96 kHz 2ch'.

This output format may not be supported by your hardware.  You can use DSP Studio to change the output to a compatible format.

Also, make sure that your system has a valid sound playback device and that it is properly configured in playback options.
10023088: 2827129872: Playback: CPlayerZone::JRPlaybackEngine_PlaybackError: Finish (0 ms)
10023088: 2827129872: Playback: CMJWaveFeeder::Thread: Sending EOF




Logged

streamerguy

  • Junior Woodchuck
  • **
  • Posts: 66
Re: Issues USB DAC
« Reply #1 on: April 21, 2020, 02:26:16 am »

I did some more testing and changed all sample rates in DSP studio to the same sample rate, but even then the skipping issue exists.
It seems that the problem is only there when I change a track manually, if I create a playlist with random sample rate order and let it run, tracks are not skipped.

I also noticed that when a track is skipped, the small thumbnail icon for that track becomes blue as if that track has no thumbnail, but all my files have embedded thumbnails. When I click again on the same file, it starts playing and the thumbnail is visible.

Another thing I noticed is when I start a new playlist, the first track is also always skipped.

Any ideas?

Thanks.
Logged

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13487
Re: Issues USB DAC
« Reply #2 on: April 21, 2020, 02:55:00 pm »

You may want to try turning off SetNext support for that zone in the DLNA Controller options (right-click on the zone).
Logged

streamerguy

  • Junior Woodchuck
  • **
  • Posts: 66
Re: Issues USB DAC
« Reply #3 on: April 22, 2020, 02:51:08 am »

Hi Bob,

Maybe I was not clear but I'm using the DAC USB connected using alsa (hw:CARD=NA11S1,dev=0 [ALSA])

Best,
Logged

wer

  • Citizen of the Universe
  • *****
  • Posts: 2640
Re: Issues USB DAC
« Reply #4 on: April 22, 2020, 03:09:55 am »

Please provide a screenshot of the Audio tab of MC options, and of the Device Settings dialog accessible from that page.

If you also have MC running on something else like a PC, I would try plugging the Marantz into that and see if the behavior is identical or not.
Logged

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13487
Re: Issues USB DAC
« Reply #5 on: April 22, 2020, 10:04:43 am »

Please provide a screenshot of the Audio tab of MC options, and of the Device Settings dialog accessible from that page.

If you also have MC running on something else like a PC, I would try plugging the Marantz into that and see if the behavior is identical or not.
Second this. Also please run /usr/lib/jriver/Media\ Center\ 26/alsacap from a terminal and attach the results as well.
Logged

streamerguy

  • Junior Woodchuck
  • **
  • Posts: 66
Re: Issues USB DAC
« Reply #6 on: April 23, 2020, 02:46:27 am »

Hi Wer and Bob,

Here is the requested information:

pi@raspberrypi4:~ $ /usr/lib/jriver/Media\ Center\ 26/alsacap
*** Scanning for playback devices ***
Card 0, ID `ALSA', name `bcm2835 ALSA'
  Device 0, ID `bcm2835 ALSA', name `bcm2835 ALSA', 7 subdevices (7 available)
    1..2 channels, sampling rates 8000, 11025, 16000, 22050, 32000, 44100, 48000, 88200, 96000, 176400, 192000 Hz
    Sample formats: U8, S16_LE
      Subdevice 0, name `subdevice #0'
      Subdevice 1, name `subdevice #1'
      Subdevice 2, name `subdevice #2'
      Subdevice 3, name `subdevice #3'
      Subdevice 4, name `subdevice #4'
      Subdevice 5, name `subdevice #5'
      Subdevice 6, name `subdevice #6'
  Device 1, ID `bcm2835 IEC958/HDMI', name `bcm2835 IEC958/HDMI', 1 subdevices (1 available)
    2..8 channels, sampling rates 44100, 48000, 88200, 96000, 176400, 192000 Hz
    Sample formats: S16_LE
      Subdevice 0, name `subdevice #0'
  Device 2, ID `bcm2835 IEC958/HDMI1', name `bcm2835 IEC958/HDMI1', 1 subdevices (1 available)
    2..8 channels, sampling rates 44100, 48000, 88200, 96000, 176400, 192000 Hz
    Sample formats: S16_LE
      Subdevice 0, name `subdevice #0'
Card 1, ID `NA11S1', name `NA-11S1'
  Device 0, ID `USB Audio', name `USB Audio', 1 subdevices (1 available)
    2 channels, sampling rates 32000, 44100, 48000, 88200, 96000, 176400, 192000, 352800 Hz
    Sample formats: S32_LE
      Subdevice 0, name `subdevice #0'
pi@raspberrypi4:~ $


Thanks,




Logged

wer

  • Citizen of the Universe
  • *****
  • Posts: 2640
Re: Issues USB DAC
« Reply #7 on: April 23, 2020, 02:51:05 am »

You missed one.  Please show a screenshot of the Device Settings dialog.  Click the device settings link under Audio Device and screenshot the dialog that appears.
Logged

streamerguy

  • Junior Woodchuck
  • **
  • Posts: 66
Re: Issues USB DAC
« Reply #8 on: April 23, 2020, 03:24:16 am »

Hi Wer,

here you go.

Best,
Logged

streamerguy

  • Junior Woodchuck
  • **
  • Posts: 66
Re: Issues USB DAC
« Reply #9 on: April 23, 2020, 08:13:19 am »

Hi Wer,

I did some testing using Windows 10 on a laptop with the same version of MC (Marantz connected as wasapi device) and I don't have any issues.
The only difference is that I had to install a Marantz driver to get DSD working (DoP).

Best,
Logged

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13487
Re: Issues USB DAC
« Reply #10 on: April 23, 2020, 08:21:20 am »

Everything looks good to me.

Try this though.
Change track skipping to gapless.
Seek to Standard
Stop to Immediate
Pause to Immediate
Logged

streamerguy

  • Junior Woodchuck
  • **
  • Posts: 66
Re: Issues USB DAC
« Reply #11 on: April 23, 2020, 08:46:11 am »

Still the same.
Only when the next track has a different sample rate, one or two tracks are skipped. And sometimes the error pops up that "something went wrong with playback".

Best,
Logged

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13487
Re: Issues USB DAC
« Reply #12 on: April 23, 2020, 10:46:37 am »

Still the same.
Only when the next track has a different sample rate, one or two tracks are skipped. And sometimes the error pops up that "something went wrong with playback".

Best,
From your log, the device is returning an error when trying to set the sample rate, I think that's a device issue.
The only solution I can see is to use DSP studio and set the sample rate for everything to the Max sample rate your source material has. Alternately you could choose one of the PlugHW devices (if there is one) and let the ALSA driver handle it. I don't know that there would be any advantage in that though.
Logged

wer

  • Citizen of the Universe
  • *****
  • Posts: 2640
Re: Issues USB DAC
« Reply #13 on: April 23, 2020, 01:10:09 pm »

I think the "device issue" Bob refers to stems from not using the correct device driver, .

The DAC does not misbehave when it is controlled by the Marantz driver.

The problem is Marantz does not offer a driver for that DAC for Linux.

If the drivers you have available to you on Linux can't work correctly with that DAC, you're pretty much stuck.  The device might offer only limited Windows-USB compatibility without a driver, which could explain the behavior you saw on the Windows machine.
Logged

streamerguy

  • Junior Woodchuck
  • **
  • Posts: 66
Re: Issues USB DAC
« Reply #14 on: April 23, 2020, 02:26:02 pm »

Hi Bob and Wer,

There is indeed no Linux driver as far as I know.

But about two years ago I did some testing as well using a RPi3 and an older Rapbian version (can't remember what version).
I am not 100% sure, but I think I haven't seen this issue then, only clicking of the DAC because USB and network share the same bus. I was hoping that this was solved with the RPI4 and indeed I have no clicking anymore, but now the skipping issue. And I can't try an older raspbian version because the RPI4 was not supported yet. Maybe this will be fixed in the future with a new raspbian version or I could try another Linux build.
I also have the idea it's a timing issue. Or do I need to change the values Buffer Time and/or Buffer Time? I played random with these settings and noticed changes but I don't know what values to use for these parameters.
Any idea's.

Thanks again.
Logged

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13487
Re: Issues USB DAC
« Reply #15 on: April 23, 2020, 02:57:02 pm »

Hi Bob and Wer,

There is indeed no Linux driver as far as I know.

But about two years ago I did some testing as well using a RPi3 and an older Rapbian version (can't remember what version).
I am not 100% sure, but I think I haven't seen this issue then, only clicking of the DAC because USB and network share the same bus. I was hoping that this was solved with the RPI4 and indeed I have no clicking anymore, but now the skipping issue. And I can't try an older raspbian version because the RPI4 was not supported yet. Maybe this will be fixed in the future with a new raspbian version or I could try another Linux build.
I also have the idea it's a timing issue. Or do I need to change the values Buffer Time and/or Buffer Time? I played random with these settings and noticed changes but I don't know what values to use for these parameters.
Any idea's.

Thanks again.
The driver is part of the linux kernel and is pretty generic but the specifics of various devices don't always play nice with ALSA.

The Buffer Time and Period Time control the ALSA buffering.
You MAY have some luck playing with those or not.
They are in milliseconds so the defaults depending on the version of MC you are running are 500000/100000 or 400000/100000
or about .5 sec and .1 sec. The first is how much to buffer up, the second is when the buffer should start refilling.
You might try increasing them to 1000000/200000 which doubles to 1 sec/.2 sec and see if that makes any difference.
Ideally you'd like to buffer as little as possible to minimize latency. With a fast machine you can easily start with 50000/10000 and work your way down until playback stops working.
If the buffer underruns you will see that in MC's log.
Logged

streamerguy

  • Junior Woodchuck
  • **
  • Posts: 66
Re: Issues USB DAC
« Reply #16 on: April 25, 2020, 04:04:45 am »


Hi Bob,

I tried several period/buffer settings but still no lock.
I still have the idea that this wasn't an issues about 2 years, so I tried to install a Jessie build from 2016 with the latest version of MC on a RPI3, but MC didn't run . It can even be a RPI4 problem, but I can't test an older version of Raspbian.
So I can only hope this will be magically fixed by a new version of Raspbian, alsa or MC, otherwise I'm stuck to use a pc with Win10 which seems a bit overkill for me.
Or do you have some more options I can test?

Thanks,
Logged

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13487
Re: Issues USB DAC
« Reply #17 on: April 25, 2020, 09:16:44 am »

Hi Bob,

I tried several period/buffer settings but still no lock.
I still have the idea that this wasn't an issues about 2 years, so I tried to install a Jessie build from 2016 with the latest version of MC on a RPI3, but MC didn't run . It can even be a RPI4 problem, but I can't test an older version of Raspbian.
So I can only hope this will be magically fixed by a new version of Raspbian, alsa or MC, otherwise I'm stuck to use a pc with Win10 which seems a bit overkill for me.
Or do you have some more options I can test?

Thanks,
I think for the time being you are just going to have to set DSP studio to change everything to a fixed sample rate at the highest rate your material is that your device supports.
Logged
Pages: [1]   Go Up