"no csjsound" when running REW under JRE 17.0.9

oomzay

Registered
Thread Starter
Joined
Jan 3, 2024
Messages
33
More  
Preamp, Processor or Receiver
moOde/camillaDSP/rPi4
Main Amp
Onkyo TX-SR850
Front Speakers
Linn Kaber Aktiv

phofman

Member
Joined
Jun 26, 2019
Messages
137
What is your REW startup command? In order to tell java where to find .so library files correct LD_LIBRARY_PATH must be defined.

This is my startup script:

Code:
#!/bin/sh
export LD_LIBRARY_PATH=/home/pavel/REW:$LD_LIBRARY_PATH
/usr/lib/jvm/java-17-openjdk-amd64/bin/java -verbose:gc -splash:/home/pavel/REW/.install4j/s_1uqrgys.png -XX:+UnlockExperimentalVMOptions -XX:+UseZGC -Xms128m -Xmx8192m -Dsun.java2d.opengl=True -classpath /home/pavel/REW/.install4j/i4jruntime.jar:/home/pavel/REW/.install4j/launcherd9d2fef3.jar:/home/pavel/REW/./* install4j.roomeqwizard.RoomEQ_Wizard

Please note that officially REW is being developed and supported on java8 only. But IMO it's only good to test it on newer JVMs, e.g. the much improved garbage collection, transition to Wayland eventually, etc.
 

oomzay

Registered
Thread Starter
Joined
Jan 3, 2024
Messages
33
More  
Preamp, Processor or Receiver
moOde/camillaDSP/rPi4
Main Amp
Onkyo TX-SR850
Front Speakers
Linn Kaber Aktiv
This is my startup script:

Thanks. Setting the path has fixed the csjsound error, and re-instated the PCM devices in REWs list of outputs (as expected since you explained the role of csjsound elsewhere).

There is only one "PCM:HDMI" device listed though. I wonder why only one HDMI gets through csjsound?

The REW log shows this:

13:16:09.963 [AWT-EventQueue-0] INFO SimpleMixerProvider - No usable property csjsoundRates found, will use default rates: [44100, 48000, 88200, 96000, 176400, 192000, 352800, 384000, 705600, 768000, 1411200, 1536000]
13:16:10.049 [AWT-EventQueue-0] INFO SimpleMixerProvider - No usable property csjsoundChannels found, will use default channels: [1, 2, 4, 6, 8, 10, 12, 14, 16]
13:16:10.050 [AWT-EventQueue-0] INFO SimpleMixerProvider - Both default rates and default channels used, will use maximum combined limit: rate 384000 vs. channels 8
 

phofman

Member
Joined
Jun 26, 2019
Messages
137
Why do you need PCM at this stage? Stock javasound (plughw) should offer both hw cards (please post aplay -l).
 

oomzay

Registered
Thread Starter
Joined
Jan 3, 2024
Messages
33
More  
Preamp, Processor or Receiver
moOde/camillaDSP/rPi4
Main Amp
Onkyo TX-SR850
Front Speakers
Linn Kaber Aktiv
In any case, setting the LD_LIBRARY_PATH fixes the csjsound issue that is the subject of this thread. So thanks. I think we can call this issue closed.
 

oomzay

Registered
Thread Starter
Joined
Jan 3, 2024
Messages
33
More  
Preamp, Processor or Receiver
moOde/camillaDSP/rPi4
Main Amp
Onkyo TX-SR850
Front Speakers
Linn Kaber Aktiv
Why do you need PCM at this stage? Stock javasound (plughw) should offer both hw cards (please post aplay -l).

Well I don't particularly want PCM. But so far its the only listing of HDMI at all. I don't think the javasound is offering anything?

Code:
$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: vc4hdmi0 [vc4-hdmi-0], device 0: MAI PCM i2s-hifi-0 [MAI PCM i2s-hifi-0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: vc4hdmi1 [vc4-hdmi-1], device 0: MAI PCM i2s-hifi-0 [MAI PCM i2s-hifi-0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: Headphones [bcm2835 Headphones], device 0: bcm2835 Headphones [bcm2835 Headphones]
  Subdevices: 8/8
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
  Subdevice #7: subdevice #7
 

phofman

Member
Joined
Jun 26, 2019
Messages
137
You should see plughw:0 and plughw:1 in REW playback devices. What plughw:X are listed?
 

oomzay

Registered
Thread Starter
Joined
Jan 3, 2024
Messages
33
More  
Preamp, Processor or Receiver
moOde/camillaDSP/rPi4
Main Amp
Onkyo TX-SR850
Front Speakers
Linn Kaber Aktiv
You should see plughw:0 and plughw:1 in REW playback devices. What plughw:X are listed?
Only headphones:
Code:
Headphones [plughw:2,0]

Is this to do with the HDMI device expecting HDMI format frames? Or should plughw deal with that?
 

phofman

Member
Joined
Jun 26, 2019
Messages
137
Is this to do with the HDMI device expecting HDMI format frames? Or should plughw deal with that?
Yes, plug should convert from Sxx_LE to the IEC958_SUBFRAME_LE format.

Let's see what devices you have open. Please post output of

Code:
lsof /dev/snd/*
 

oomzay

Registered
Thread Starter
Joined
Jan 3, 2024
Messages
33
More  
Preamp, Processor or Receiver
moOde/camillaDSP/rPi4
Main Amp
Onkyo TX-SR850
Front Speakers
Linn Kaber Aktiv
By HDMI format, I mean:

Code:
$ aplay -v -D hw:vc4hdmi0 /dev/zero --dump-hw-params
...
FORMAT:  IEC958_SUBFRAME_LE
...
 

oomzay

Registered
Thread Starter
Joined
Jan 3, 2024
Messages
33
More  
Preamp, Processor or Receiver
moOde/camillaDSP/rPi4
Main Amp
Onkyo TX-SR850
Front Speakers
Linn Kaber Aktiv
Please post output of
Code:
lsof /dev/snd/*

Code:
$ lsof /dev/snd/*
COMMAND    PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
pipewire  2234   pi   50u   CHR  116,1      0t0  404 /dev/snd/seq
pipewire  2234   pi   51u   CHR  116,1      0t0  404 /dev/snd/seq
wireplumb 2236   pi   41u   CHR  116,9      0t0  593 /dev/snd/controlC3
wireplumb 2236   pi   42u   CHR  116,7      0t0  576 /dev/snd/controlC2
wireplumb 2236   pi   45u   CHR  116,3      0t0  323 /dev/snd/controlC0
wireplumb 2236   pi   46u   CHR  116,5      0t0  340 /dev/snd/controlC1
 

oomzay

Registered
Thread Starter
Joined
Jan 3, 2024
Messages
33
More  
Preamp, Processor or Receiver
moOde/camillaDSP/rPi4
Main Amp
Onkyo TX-SR850
Front Speakers
Linn Kaber Aktiv
Now if you put plughw instead of hw into your aplay command, you should see the plug command taking care of the conversion (among many other changes)

Nope:

Code:
$ aplay -v -D plughw:vc4hdmi0 /dev/zero --dump-hw-params
Playing raw data '/dev/zero' : Unsigned 8 bit, Rate 8000 Hz, Mono
HW Params of device "plughw:vc4hdmi0":
--------------------
ACCESS:  MMAP_INTERLEAVED MMAP_NONINTERLEAVED MMAP_COMPLEX RW_INTERLEAVED RW_NONINTERLEAVED
FORMAT:  IEC958_SUBFRAME_LE
...
--------------------
aplay: set_params:1352: Sample format non available

I usually use "hdmi:" to get the conversion, and then all is well and I get this:

Code:
$ aplay -v -D hdmi:vc4hdmi0 /dev/zero --dump-hw-params -c 2
Playing raw data '/dev/zero' : Unsigned 8 bit, Rate 8000 Hz, Stereo
HW Params of device "hdmi:vc4hdmi0":
--------------------
ACCESS:  MMAP_INTERLEAVED MMAP_NONINTERLEAVED RW_INTERLEAVED RW_NONINTERLEAVED
FORMAT:  S8 U8 S16_LE S16_BE U16_LE U16_BE S24_LE S24_BE U24_LE U24_BE S32_LE S32_BE U32_LE U32_BE S20_LE S20_BE U20_LE U20_BE S24_3LE S24_3BE U24_3LE U24_3BE S20_3LE S20_3BE U20_3LE U20_3BE S18_3LE S18_3BE U18_3LE U18_3BE
SUBFORMAT:  STD
SAMPLE_BITS: [8 32]
FRAME_BITS: [16 64]
CHANNELS: 2
RATE: [32000 48000]
PERIOD_TIME: (41 1024000]
PERIOD_SIZE: [2 32768]
PERIOD_BYTES: [4 262144]
PERIODS: [2 32768]
BUFFER_TIME: (83 2048000]
BUFFER_SIZE: [4 65536]
BUFFER_BYTES: [8 524288]
TICK_TIME: ALL
--------------------
Warning: rate is not accurate (requested = 8000Hz, got = 32000Hz)
         please, try the plug plugin
IEC958 subframe conversion PCM (IEC958_SUBFRAME_LE)
Its setup is:
  stream       : PLAYBACK
  access       : RW_INTERLEAVED
  format       : U8
  subformat    : STD
  channels     : 2
  rate         : 32000
  exact rate   : 32000 (32000/1)
  msbits       : 8
  buffer_size  : 16000
  period_size  : 4000
  period_time  : 125000
  tstamp_mode  : NONE
  tstamp_type  : MONOTONIC
  period_step  : 1
  avail_min    : 4000
  period_event : 0
  start_threshold  : 16000
  stop_threshold   : 16000
  silence_threshold: 0
  silence_size : 0
  boundary     : 9007199254740992000
Slave: Hooks PCM
Its setup is:
  stream       : PLAYBACK
  access       : MMAP_INTERLEAVED
  format       : IEC958_SUBFRAME_LE
  subformat    : STD
  channels     : 2
  rate         : 32000
  exact rate   : 32000 (32000/1)
  msbits       : 24
  buffer_size  : 16000
  period_size  : 4000
  period_time  : 125000
  tstamp_mode  : NONE
  tstamp_type  : MONOTONIC
  period_step  : 1
  avail_min    : 4000
  period_event : 0
  start_threshold  : 16000
  stop_threshold   : 16000
  silence_threshold: 0
  silence_size : 0
  boundary     : 9007199254740992000
Slave: Hardware PCM card 0 'vc4-hdmi-0' device 0 subdevice 0
Its setup is:
  stream       : PLAYBACK
  access       : MMAP_INTERLEAVED
  format       : IEC958_SUBFRAME_LE
  subformat    : STD
  channels     : 2
  rate         : 32000
  exact rate   : 32000 (32000/1)
  msbits       : 24
  buffer_size  : 16000
  period_size  : 4000
  period_time  : 125000
  tstamp_mode  : NONE
  tstamp_type  : MONOTONIC
  period_step  : 1
  avail_min    : 4000
  period_event : 0
  start_threshold  : 16000
  stop_threshold   : 16000
  silence_threshold: 0
  silence_size : 0
  boundary     : 9007199254740992000
  appl_ptr     : 0
  hw_ptr       : 0
 

phofman

Member
Joined
Jun 26, 2019
Messages
137
Thanks. The lsof file shows pipewire is still handling all your soundcards (0, 1, 2, 3). Only the control interfaces (alsa ctl), but still not disabled in PW. BTW, controlC3 suggests you have also card 3 (not in your aplay -l) - please post ls /dev/snd.
 

oomzay

Registered
Thread Starter
Joined
Jan 3, 2024
Messages
33
More  
Preamp, Processor or Receiver
moOde/camillaDSP/rPi4
Main Amp
Onkyo TX-SR850
Front Speakers
Linn Kaber Aktiv
The lsof file shows pipewire is still handling all your soundcards (0, 1, 2, 3). Only the control interfaces (alsa ctl), but still not disabled in PW
Oh. Setting "off" in GUI is not enough then. I'll have to dig.

please post ls /dev/snd.
Code:
$ ls -l /dev/snd
total 0
drwxr-xr-x  2 root root       60 Jan 23 21:30 by-id
drwxr-xr-x  2 root root      120 Jan 23 21:30 by-path
crw-rw----+ 1 root audio 116,  3 Jan 23 21:30 controlC0
crw-rw----+ 1 root audio 116,  5 Jan 23 21:30 controlC1
crw-rw----+ 1 root audio 116,  7 Jan 23 21:30 controlC2
crw-rw----+ 1 root audio 116,  9 Jan 23 21:30 controlC3
crw-rw----+ 1 root audio 116,  2 Jan 23 21:30 pcmC0D0p
crw-rw----+ 1 root audio 116,  4 Jan 23 21:30 pcmC1D0p
crw-rw----+ 1 root audio 116,  6 Jan 23 21:30 pcmC2D0p
crw-rw----+ 1 root audio 116,  8 Jan 23 21:30 pcmC3D0c
crw-rw----+ 1 root audio 116,  1 Jan 23 21:30 seq
crw-rw----+ 1 root audio 116, 33 Jan 23 21:30 timer

P.S. I am guessing that the 4th is the analogue Capture device?
 

phofman

Member
Joined
Jun 26, 2019
Messages
137
I usually use "hdmi:" to get the conversion, and then all is well and I get this:
OK, so plug does not seem to perform the conversion to the IEC958 format. I did not know. Most devices do not use this non-standard format and perform the conversion internally from standard SXX_LE formats, even HDMI devices with IntelHDA.

So the reason is the format not matching java expectations I talked about. Most likely we would see this issue in the log, if it was switched from default info to debug. Please try that (it may be handy later on): https://github.com/pavhofman/csjsound-provider#java-logs into file REW_HOME/roomeqwizard.vmoptions and take a look into the log file.

That's exactly why I coded the csjsound-pcm connector. You can define a pcm device in your .asoundrc which will wrap your hw:HDMI device with the hdmi plugin, probably the easiest with the plug plugin and the hdmi:hw:xxx as slave device. Then this device will be listed in PCM devices because it's not a hint/suggestion device, but a real defined PCM device.

BTW what is your card3?

Edit: I see, it's just some capture pcmC3D0c (i.e. not listed in aplay but would be in arecord -l)
 

oomzay

Registered
Thread Starter
Joined
Jan 3, 2024
Messages
33
More  
Preamp, Processor or Receiver
moOde/camillaDSP/rPi4
Main Amp
Onkyo TX-SR850
Front Speakers
Linn Kaber Aktiv
Most likely we would see this issue in the log, if it was switched from default info to debug. Please try that (it may be handy later on): https://github.com/pavhofman/csjsound-provider#java-logs into file REW_HOME/roomeqwizard.vmoptions and take a look into the log file.
Adding those simpleLogger options to $REW_HOME/roomeqwizard.vmoptions did not seem to have any effect. I wonder why "$REW/roomeqwizard.vmoptions" isn't being read. That would be more convenient than the command line. Do I need to set an option to refer to it?

In any case, adding "-Dorg.slf4j.simpleLogger.defaultLogLevel=debug" in my command line did the trick...

Code:
8:18:49.761 [AWT-EventQueue-0] DEBUG SimpleMixerProvider - Found device SimpleMixerInfo{PCM: sysdefault, version 1, index=0, deviceID='sysdefault', maxLines=1}
18:18:49.762 [AWT-EventQueue-0] DEBUG SimpleMixerProvider - Found device SimpleMixerInfo{PCM: front, version 1, index=1, deviceID='front', maxLines=1}
18:18:49.763 [AWT-EventQueue-0] DEBUG SimpleMixerProvider - Found device SimpleMixerInfo{PCM: rear, version 1, index=2, deviceID='rear', maxLines=1}
18:18:49.764 [AWT-EventQueue-0] DEBUG SimpleMixerProvider - Found device SimpleMixerInfo{PCM: center_lfe, version 1, index=3, deviceID='center_lfe', maxLines=1}
18:18:49.764 [AWT-EventQueue-0] DEBUG SimpleMixerProvider - Found device SimpleMixerInfo{PCM: side, version 1, index=4, deviceID='side', maxLines=1}
18:18:49.765 [AWT-EventQueue-0] DEBUG SimpleMixerProvider - Found device SimpleMixerInfo{PCM: surround21, version 1, index=5, deviceID='surround21', maxLines=1}
18:18:49.766 [AWT-EventQueue-0] DEBUG SimpleMixerProvider - Found device SimpleMixerInfo{PCM: surround40, version 1, index=6, deviceID='surround40', maxLines=1}
18:18:49.767 [AWT-EventQueue-0] DEBUG SimpleMixerProvider - Found device SimpleMixerInfo{PCM: surround41, version 1, index=7, deviceID='surround41', maxLines=1}
18:18:49.768 [AWT-EventQueue-0] DEBUG SimpleMixerProvider - Found device SimpleMixerInfo{PCM: surround50, version 1, index=8, deviceID='surround50', maxLines=1}
18:18:49.769 [AWT-EventQueue-0] DEBUG SimpleMixerProvider - Found device SimpleMixerInfo{PCM: surround51, version 1, index=9, deviceID='surround51', maxLines=1}
18:18:49.770 [AWT-EventQueue-0] DEBUG SimpleMixerProvider - Found device SimpleMixerInfo{PCM: surround71, version 1, index=10, deviceID='surround71', maxLines=1}
18:18:49.771 [AWT-EventQueue-0] DEBUG SimpleMixerProvider - Found device SimpleMixerInfo{PCM: iec958, version 1, index=11, deviceID='iec958', maxLines=1}
18:18:49.772 [AWT-EventQueue-0] DEBUG SimpleMixerProvider - Found device SimpleMixerInfo{PCM: spdif, version 1, index=12, deviceID='spdif', maxLines=1}
18:18:49.773 [AWT-EventQueue-0] DEBUG SimpleMixerProvider - Found device SimpleMixerInfo{PCM: hdmi, version 1, index=13, deviceID='hdmi', maxLines=1}
18:18:49.773 [AWT-EventQueue-0] DEBUG SimpleMixerProvider - Found device SimpleMixerInfo{PCM: dmix, version 1, index=14, deviceID='dmix', maxLines=1}
18:18:49.774 [AWT-EventQueue-0] DEBUG SimpleMixerProvider - Found device SimpleMixerInfo{PCM: modem, version 1, index=15, deviceID='modem', maxLines=1}
18:18:49.775 [AWT-EventQueue-0] DEBUG SimpleMixerProvider - Found device SimpleMixerInfo{PCM: phoneline, version 1, index=16, deviceID='phoneline', maxLines=1}
18:18:49.777 [AWT-EventQueue-0] DEBUG SimpleMixerProvider - Found device SimpleMixerInfo{PCM: lavrate, version 1, index=17, deviceID='lavrate', maxLines=1}
18:18:49.779 [AWT-EventQueue-0] DEBUG SimpleMixerProvider - Found device SimpleMixerInfo{PCM: samplerate, version 1, index=18, deviceID='samplerate', maxLines=1}
18:18:49.780 [AWT-EventQueue-0] DEBUG SimpleMixerProvider - Found device SimpleMixerInfo{PCM: speexrate, version 1, index=19, deviceID='speexrate', maxLines=1}
18:18:49.781 [AWT-EventQueue-0] DEBUG SimpleMixerProvider - Found device SimpleMixerInfo{PCM: jack, version 1, index=20, deviceID='jack', maxLines=1}
18:18:49.783 [AWT-EventQueue-0] DEBUG SimpleMixerProvider - Found device SimpleMixerInfo{PCM: oss, version 1, index=21, deviceID='oss', maxLines=1}
18:18:49.785 [AWT-EventQueue-0] DEBUG SimpleMixerProvider - Found device SimpleMixerInfo{PCM: pulse, version 1, index=22, deviceID='pulse', maxLines=1}
18:18:49.786 [AWT-EventQueue-0] DEBUG SimpleMixerProvider - Found device SimpleMixerInfo{PCM: a52, version 1, index=23, deviceID='a52', maxLines=1}
18:18:49.788 [AWT-EventQueue-0] DEBUG SimpleMixerProvider - Found device SimpleMixerInfo{PCM: speex, version 1, index=24, deviceID='speex', maxLines=1}
18:18:49.789 [AWT-EventQueue-0] DEBUG SimpleMixerProvider - Found device SimpleMixerInfo{PCM: upmix, version 1, index=25, deviceID='upmix', maxLines=1}
18:18:49.790 [AWT-EventQueue-0] DEBUG SimpleMixerProvider - Found device SimpleMixerInfo{PCM: vdownmix, version 1, index=26, deviceID='vdownmix', maxLines=1}
18:18:49.792 [AWT-EventQueue-0] DEBUG SimpleMixerProvider - Found device SimpleMixerInfo{PCM: usbstream, version 1, index=27, deviceID='usbstream', maxLines=1}
18:18:49.793 [AWT-EventQueue-0] DEBUG SimpleMixerProvider - Found device SimpleMixerInfo{PCM: default, version 1, index=28, deviceID='default', maxLines=1}

And then a lot more lines like this: (but no more mention of HDMI, nor IEC958)

Code:
18:18:49.923 [AWT-EventQueue-0] DEBUG SimpleMixer - Reporting modified 32bit format PCM_SIGNED 4000.0 Hz, 32 bit, mono, 4 bytes/frame, little-endian instead of the hardware format PCM_SIGNED 4000.0 Hz, 24 bit, mono, 4 bytes/frame, little-endian
18:18:49.925 [AWT-EventQueue-0] DEBUG SimpleMixer - Reporting modified 32bit format PCM_SIGNED 4000.0 Hz, 32 bit, 10000 channels, 40000 bytes/frame, little-endian instead of the hardware format PCM_SIGNED 4000.0 Hz, 24 bit, 10000 channels, 40000 bytes/frame, little-endian
18:18:49.927 [AWT-EventQueue-0] DEBUG SimpleMixer - Reporting modified 32bit format PCM_SIGNED 4000.0 Hz, 32 bit, stereo, 8 bytes/frame, little-endian instead of the hardware format PCM_SIGNED 4000.0 Hz, 24 bit, stereo, 8 bytes/frame, little-endian
18:18:49.930 [AWT-EventQueue-0] DEBUG SimpleMixer - Reporting modified 32bit format PCM_SIGNED 2.14748365E9 Hz, 32 bit, mono, 4 bytes/frame, little-endian instead of the hardware format PCM_SIGNED 2.14748365E9 Hz, 24 bit, mono, 4 bytes/frame, little-endian
 

oomzay

Registered
Thread Starter
Joined
Jan 3, 2024
Messages
33
More  
Preamp, Processor or Receiver
moOde/camillaDSP/rPi4
Main Amp
Onkyo TX-SR850
Front Speakers
Linn Kaber Aktiv
You can define a pcm device in your .asoundrc which will wrap your hw:HDMI device with the hdmi plugin
I will try that next - an entirely new adventure for me.

B.T.W. Thanks for your very patient support! I had not anticipated the ALSA v PULSE v WIRE v JAVA v HDMI driver v Linux version battles ahead just to get 24bit audio out of an HDMI port on the correct channels when I embarked on this project! I am just sneaking time to do this as my wife has told me that she thinks Pink Noise are rubbish, and she would rather listen to Philip Glass!
 

phofman

Member
Joined
Jun 26, 2019
Messages
137
Well, you are pioneering the new RPi linux path - Wayland, Pipewire, new KMS HDMI driver in RPi https://pip.raspberrypi.com/categor...004341-WP/Troubleshooting-KMS-HDMI-output.pdf (the previous FKMS driver used the standard linear S16/32_LE format which works OK with plughw in java). That's never without problems. But IMO the important outcome is that we both learned a lot and that there is a way due to flexibility of audio in linux. Flexibility typically stands on opposite side to simplicity... I prefer flexibility :-)
 
Top Bottom