• WANTED: Happy members who like to discuss audio and other topics related to our interest. Desire to learn and share knowledge of science required. There are many reviews of audio hardware and expert members to help answer your questions. Click here to have your audio equipment measured for free!

RPi4 + CamillaDSP Tutorial

glc650

Active Member
Joined
Jun 30, 2021
Messages
190
Likes
68
The display routine does not use SPI but rather 6800 parallel. It could be adapted to SPI but I have not done it.

Michael
How do you tell if a display is 6800 or something else? How do you adapt it? Jumper?
 
OP
M

mdsimon2

Major Contributor
Forum Donor
Joined
Oct 20, 2020
Messages
2,515
Likes
3,371
Location
Detroit, MI
How do you tell if a display is 6800 or something else? How do you adapt it? Jumper?

For the display linked in this tutorial you have the option to purchase it in 3 wire SPI, 4 wire SPI, 6800 parallel or 8080 parallel.

1682541658548.png


I believe you are correct that the only difference is the position of a few resistors. @MarcosCh for example purchased a very similar display from audiophonics which was configured for SPI and was able to change it to 6800 parallel by de-soldering / moving some resistors as described here -> https://www.audiosciencereview.com/...s/rpi4-camilladsp-tutorial.29656/post-1362131.

Some displays like this one from New Haven Display -> https://newhavendisplay.com/3-12-inch-white-graphic-oled-module/ have the option for changing the interface by setting certain pins low / high.

1682541937390.png


Michael
 

dorirod

Active Member
Joined
Oct 9, 2019
Messages
255
Likes
257
I had missed this wonderful thread. Thank you very much @mdsimon2 for putting in all this effort!

I have not gone through in detail over the entire thread, but before embarking on it, quick question for anyone that knows. I want to use rpi4 and two DACs. One to send high pass to speakers, and one lowpass to sub. Can I use two different DACs (clock issues?) for this and if so do the two DACs need to match in capabilities, especially format?

For my speakers (Kali Audio LP-6) I would use Topping EX5, and was thinking for sub to use whatever other DAC I can find, potentially even use the headphone out of the rpi4 (bcm2835) if it would work.

I am noticing that these two DACs may not have the same format capabilities though:

Code:
pi@mypi:~$ aplay -v -D hw:CARD=DAC,DEV=0 /dev/zero --dump-hw-params <-----------------XtremPro X1 USB DAC
Playing raw data '/dev/zero' : Unsigned 8 bit, Rate 8000 Hz, Mono
HW Params of device "hw:CARD=DAC,DEV=0":
--------------------
ACCESS:  MMAP_INTERLEAVED RW_INTERLEAVED
FORMAT:  S24_3LE
SUBFORMAT:  STD
SAMPLE_BITS: 24
FRAME_BITS: 48
CHANNELS: 2
RATE: [44100 96000]
PERIOD_TIME: [1000 1000000]
PERIOD_SIZE: [45 96000]
PERIOD_BYTES: [270 576000]
PERIODS: [2 1024]
BUFFER_TIME: (937 2000000]
BUFFER_SIZE: [90 192000]
BUFFER_BYTES: [540 1152000]
TICK_TIME: ALL
--------------------
aplay: set_params:1352: Sample format non available
Available formats:
- S24_3LE
pi@mypi:~$ aplay -v -D hw:CARD=EX5,DEV=0 /dev/zero --dump-hw-params<-----------------Topping EX5 USB DAC
Playing raw data '/dev/zero' : Unsigned 8 bit, Rate 8000 Hz, Mono
HW Params of device "hw:CARD=EX5,DEV=0":
--------------------
ACCESS:  MMAP_INTERLEAVED RW_INTERLEAVED
FORMAT:  S32_LE SPECIAL DSD_U32_BE
SUBFORMAT:  STD
SAMPLE_BITS: 32
FRAME_BITS: 64
CHANNELS: 2
RATE: [44100 768000]
PERIOD_TIME: [125 1000000]
PERIOD_SIZE: [8 768000]
PERIOD_BYTES: [64 6144000]
PERIODS: [2 1024]
BUFFER_TIME: (20 2000000]
BUFFER_SIZE: [16 1536000]
BUFFER_BYTES: [128 12288000]
TICK_TIME: ALL
--------------------
aplay: set_params:1352: Sample format non available
Available formats:
- S32_LE
- SPECIAL
- DSD_U32_BE
pi@mypi:~$
 
Last edited:

sarieri

Senior Member
Forum Donor
Joined
Mar 1, 2023
Messages
333
Likes
216
Just finished another build with an OLED screen. Works perfectly. I guess I will keep this one with Ultralite mk5. Topping's DM7 may measure better but motu offers way more I/O and that allows camilladsp to work with so many sources. The only problem I have now is different sample rate. Gaudio_ctl can only switch sample rates of a single input, it doesn't work well when switching between different inputs. Also, UL5 locks different sample rates really slow, I'm guessing that it has to reboot everytime sample rate changes. So I guess an ASRC interface that convert all input sources to a fixed sample rate should work.

Or maybe I could capture UL5's spdif with gaudio_ctl, have CDSP convert the sample rate, and set output to a fixing sample rate?
Anyway, I'm so happy about the result. Thank you so much for the effort of bringing this tutorial to us.
 

sarieri

Senior Member
Forum Donor
Joined
Mar 1, 2023
Messages
333
Likes
216
I had missed this wonderful thread. Thank you very much @mdsimon2 for putting in all this effort!

I have not gone through in detail over the entire thread, but before embarking on it, quick question for anyone that knows. I want to use rpi4 and two DACs. One to send high pass to speakers, and one lowpass to sub. Can I use two different DACs (clock issues?) for this and if so do the two DACs need to match in capabilities, especially format?

For my speakers (Kali Audio LP-6) I would use Topping EX5, and was thinking for sub to use whatever other DAC I can find, potentially even use the headphone out of the rpi4 (bcm2835) if it would work.

I am noticing that these two DACs may not have the same format capabilities though:

Code:
pi@mypi:~$ aplay -v -D hw:CARD=DAC,DEV=0 /dev/zero --dump-hw-params <-----------------XtremPro X1 USB DAC
Playing raw data '/dev/zero' : Unsigned 8 bit, Rate 8000 Hz, Mono
HW Params of device "hw:CARD=DAC,DEV=0":
--------------------
ACCESS:  MMAP_INTERLEAVED RW_INTERLEAVED
FORMAT:  S24_3LE
SUBFORMAT:  STD
SAMPLE_BITS: 24
FRAME_BITS: 48
CHANNELS: 2
RATE: [44100 96000]
PERIOD_TIME: [1000 1000000]
PERIOD_SIZE: [45 96000]
PERIOD_BYTES: [270 576000]
PERIODS: [2 1024]
BUFFER_TIME: (937 2000000]
BUFFER_SIZE: [90 192000]
BUFFER_BYTES: [540 1152000]
TICK_TIME: ALL
--------------------
aplay: set_params:1352: Sample format non available
Available formats:
- S24_3LE
pi@mypi:~$ aplay -v -D hw:CARD=EX5,DEV=0 /dev/zero --dump-hw-params<-----------------Topping EX5 USB DAC
Playing raw data '/dev/zero' : Unsigned 8 bit, Rate 8000 Hz, Mono
HW Params of device "hw:CARD=EX5,DEV=0":
--------------------
ACCESS:  MMAP_INTERLEAVED RW_INTERLEAVED
FORMAT:  S32_LE SPECIAL DSD_U32_BE
SUBFORMAT:  STD
SAMPLE_BITS: 32
FRAME_BITS: 64
CHANNELS: 2
RATE: [44100 768000]
PERIOD_TIME: [125 1000000]
PERIOD_SIZE: [8 768000]
PERIOD_BYTES: [64 6144000]
PERIODS: [2 1024]
BUFFER_TIME: (20 2000000]
BUFFER_SIZE: [16 1536000]
BUFFER_BYTES: [128 12288000]
TICK_TIME: ALL
--------------------
aplay: set_params:1352: Sample format non available
Available formats:
- S32_LE
- SPECIAL
- DSD_U32_BE
pi@mypi:~$
You can only set one DAC as playback device in camilladsp, at least at the moment.
 
OP
M

mdsimon2

Major Contributor
Forum Donor
Joined
Oct 20, 2020
Messages
2,515
Likes
3,371
Location
Detroit, MI
I had missed this wonderful thread. Thank you very much @mdsimon2 for putting in all this effort!

I have not gone through in detail over the entire thread, but before embarking on it, quick question for anyone that knows. I want to use rpi4 and two DACs. One to send high pass to speakers, and one lowpass to sub. Can I use two different DACs (clock issues?) for this and if so do the two DACs need to match in capabilities, especially format?

For my speakers (Kali Audio LP-6) I would use Topping EX5, and was thinking for sub to use whatever other DAC I can find, potentially even use the headphone out of the rpi4 (bcm2835) if it would work.

I am noticing that these two DACs may not have the same format capabilities though:

Code:
pi@mypi:~$ aplay -v -D hw:CARD=DAC,DEV=0 /dev/zero --dump-hw-params <-----------------XtremPro X1 USB DAC
Playing raw data '/dev/zero' : Unsigned 8 bit, Rate 8000 Hz, Mono
HW Params of device "hw:CARD=DAC,DEV=0":
--------------------
ACCESS:  MMAP_INTERLEAVED RW_INTERLEAVED
FORMAT:  S24_3LE
SUBFORMAT:  STD
SAMPLE_BITS: 24
FRAME_BITS: 48
CHANNELS: 2
RATE: [44100 96000]
PERIOD_TIME: [1000 1000000]
PERIOD_SIZE: [45 96000]
PERIOD_BYTES: [270 576000]
PERIODS: [2 1024]
BUFFER_TIME: (937 2000000]
BUFFER_SIZE: [90 192000]
BUFFER_BYTES: [540 1152000]
TICK_TIME: ALL
--------------------
aplay: set_params:1352: Sample format non available
Available formats:
- S24_3LE
pi@mypi:~$ aplay -v -D hw:CARD=EX5,DEV=0 /dev/zero --dump-hw-params<-----------------Topping EX5 USB DAC
Playing raw data '/dev/zero' : Unsigned 8 bit, Rate 8000 Hz, Mono
HW Params of device "hw:CARD=EX5,DEV=0":
--------------------
ACCESS:  MMAP_INTERLEAVED RW_INTERLEAVED
FORMAT:  S32_LE SPECIAL DSD_U32_BE
SUBFORMAT:  STD
SAMPLE_BITS: 32
FRAME_BITS: 64
CHANNELS: 2
RATE: [44100 768000]
PERIOD_TIME: [125 1000000]
PERIOD_SIZE: [8 768000]
PERIOD_BYTES: [64 6144000]
PERIODS: [2 1024]
BUFFER_TIME: (20 2000000]
BUFFER_SIZE: [16 1536000]
BUFFER_BYTES: [128 12288000]
TICK_TIME: ALL
--------------------
aplay: set_params:1352: Sample format non available
Available formats:
- S32_LE
- SPECIAL
- DSD_U32_BE
pi@mypi:~$

Using two clock synced DACs is a bad idea for crossover applications.

Mac OS has a drift correction option where it will adaptively resample in attempt to sync two separate USB DACs, this seems to work OK for bass but would be unusable at high frequencies. I explored this a bit here -> https://www.audiosciencereview.com/...vice-i-need-ca-25-ms-delay.40051/post-1411908.

The only other way around this issue is to use a device like the miniDSP U-DIO8 which provides multiple clock sync'd SPDIF outputs. But that in itself is more expensive than say a MOTU M4.

Michael
 
OP
M

mdsimon2

Major Contributor
Forum Donor
Joined
Oct 20, 2020
Messages
2,515
Likes
3,371
Location
Detroit, MI
You can only set one DAC as playback device in camilladsp, at least at the moment.

You can create an aggregate device in ALSA from more than one DAC. Henrik gives an example configuration here -> https://github.com/HEnquist/camilladsp-config. But I don't believe it has the ability to adaptively resample like Mac OS so it is only an option if your DACs are already clock sync'd.

Michael
 

sarieri

Senior Member
Forum Donor
Joined
Mar 1, 2023
Messages
333
Likes
216
You can create an aggregate device in ALSA from more than one DAC. Henrik gives an example configuration here -> https://github.com/HEnquist/camilladsp-config. But I don't believe it has the ability to adaptively resample like Mac OS so it is only an option if your DACs are already clock sync'd.

Michael
Thx for the insight. I talked to an ESS engineer few days ago. He is very interested in CDSP and if aggregate device is an option, there might be a way to modify DM7 and clock them together. Anyway, he also talks about about making something like a Hifime S2 digit but with multiple spdif input to have cdsp on NUC/MAC to work like a USB Gadget on raspi.
 

dorirod

Active Member
Joined
Oct 9, 2019
Messages
255
Likes
257
Using two clock synced DACs is a bad idea for crossover applications.

Mac OS has a drift correction option where it will adaptively resample in attempt to sync two separate USB DACs, this seems to work OK for bass but would be unusable at high frequencies. I explored this a bit here -> https://www.audiosciencereview.com/forum/index.php?threads/i’m-searching-for-a-cheap-digital-spdif-“bit-perfect”-only-delay-device-i-need-ca-25-ms-delay.40051/post-1411908.

The only other way around this issue is to use a device like the miniDSP U-DIO8 which provides multiple clock sync'd SPDIF outputs. But that in itself is more expensive than say a MOTU M4.

Michael
Ah, was hoping it might be an easy way to do it, but I was afraid it would be an issue. Thank you for setting me straight before I wasted any time on it!
 
OP
M

mdsimon2

Major Contributor
Forum Donor
Joined
Oct 20, 2020
Messages
2,515
Likes
3,371
Location
Detroit, MI
He is very interested in CDSP and if aggregate device is an option, there might be a way to modify DM7 and clock them together.

Or just get one of the many pro audio multichannel DACs that are designed to this, even the Okto has the ability to sync a second device via it's AES output.

Another great option if you need more than 8 channels of sync'd output is to use the ADAT output of an interface. With one MOTU Ultralite Mk5 on a device running CDSP you can send 8 channels of ADAT output to another MOTU Ultralite Mk5 (or other ADAT input DAC) and get 18 channels of analog output all visible to CDSP with no aggregate device. To me this is by far the simplest option.

Anyway, he also talks about about making something like a Hifime S2 digit but with multiple spdif input to have cdsp on NUC/MAC to work like a USB Gadget on raspi.

Are you looking for sync'd stereo SPDIF inputs for something like multichannel audio or multiple unsync'd stereo SPDIF inputs for source selection? There are lots of existing options that do both.

Michael
 

sarieri

Senior Member
Forum Donor
Joined
Mar 1, 2023
Messages
333
Likes
216
Or just get one of the many pro audio multichannel DACs that are designed to this, even the Okto has the ability to sync a second device via it's AES output.

Another great option if you need more than 8 channels of sync'd output is to use the ADAT output of an interface. With one MOTU Ultralite Mk5 on a device running CDSP you can send 8 channels of ADAT output to another MOTU Ultralite Mk5 (or other ADAT input DAC) and get 18 channels of analog output all visible to CDSP with no aggregate device. To me this is by far the simplest option.



Are you looking for sync'd stereo SPDIF inputs for something like multichannel audio or multiple unsync'd stereo SPDIF inputs for source selection? There are lots of existing options that do both.

Michael
I’m looking for some unsynced stereo SPDIF input for source selection. Hifime s2 would have worked but it only has one spdif input. And also, I’m not very confident about Hifime in general since amirm reviewed one of their poorly measured DACs before.

I figured CDSP’s sample rate is actually playback device’s sample rate. So in theory, is it possible to connect spdif source to UL5 with UL5’s clock set to internal and to a fixed rate . Then have CDSP capture that source from spdif and resample it to a fixed sample rate?

Edit: I verified that spdif input of motu does not have to be on the same clock as USB playback of CDSP. Intuitively, this makes sense since UL5 is a capture device itself, but it does required the input spdif sample rate to be less than 96khz(not sure why but 32bit works as well). Anyway, I don’t need to buy the hifime s2 digi anymore.
 
Last edited:

glc650

Active Member
Joined
Jun 30, 2021
Messages
190
Likes
68
I’m looking for some unsynced stereo SPDIF input for source selection. Hifime s2 would have worked but it only has one spdif input.
I bought two for my two optical sources (TV and MacBook dock).
And also, I’m not very confident about Hifime in general since amirm reviewed one of their poorly measured DACs before.
Apples to oranges. The particular hifime devices recommended in this thread are strictly being used for optical input/output with the signal never leaving the digital domain (i.e. no D/A conversion).
 
Last edited:

HenrikEnquist

Member
Joined
Jul 1, 2021
Messages
82
Likes
110
You can only set one DAC as playback device in camilladsp, at least at the moment.
This will not change. There are too many issues with using several devices to make it worth implementing. And there are alternative solutions such as aggregate devices and Alsa multi plugins for the few cases when it is actually is a good idea.
 
OP
M

mdsimon2

Major Contributor
Forum Donor
Joined
Oct 20, 2020
Messages
2,515
Likes
3,371
Location
Detroit, MI
I’m looking for some unsynced stereo SPDIF input for source selection. Hifime s2 would have worked but it only has one spdif input. And also, I’m not very confident about Hifime in general since amirm reviewed one of their poorly measured DACs before.

I have one, what measurement do you want to see? Here is a 0 dBFS 1 kHz FFT. This is 145 dB SINAD with a 48 kHz measurement bandwidth. It is transparent.

1682774807636.png


I figured CDSP’s sample rate is actually playback device’s sample rate. So in theory, is it possible to connect spdif source to UL5 with UL5’s clock set to internal and to a fixed rate . Then have CDSP capture that source from spdif and resample it to a fixed sample rate?

Why don't you actually read the tutorial / documentation? Hint, there are both capture and playback rates and they are independent and need to be set in CamillaDSP. This means if you are starting from a fixed sample rate you can certainly resample to another rate but if you have a variable sample rate source you need to restart CamillaDSP every time a change occurs. Detecting this change with a SPDIF is not trivial. You are better off putting an ASRC upstream as described in the tutorial.

Edit: I verified that spdif input of motu does not have to be on the same clock as USB playback of CDSP. Intuitively, this makes sense since UL5 is a capture device itself, but it does required the input spdif sample rate to be less than 96khz(not sure why but 32bit works as well). Anyway, I don’t need to buy the hifime s2 digi anymore.

Are you sure? This is not my experience.

You cannot have different rate families on capture and playback, for example using 48 kHz on capture and 96 kHz on playback won't work as the MOTU sample rate defines the channel counts presented and 48 kHz and 96 kHz have different channel counts. Oddly enough it does seem to "work" if you have say 44.1 kHz capture with 48 kHz output because the channel counts are the same BUT only if resampling is not enabled. As you cannot enable resampling I don't think this is a good idea long term as you will have buffer under/over runs due to different capture and playback clock domains. And of course I see no benefit of capturing at 44.1 kHz and outputting at 48 kHz when they are so similar.

Of course SPDIF only works up to 96 kHz (RTFM).

Michael
 
Last edited:

sarieri

Senior Member
Forum Donor
Joined
Mar 1, 2023
Messages
333
Likes
216
Are you sure? This is not my experience.
I connect my PC to a topping d10s and connect d10s to UL5 with toslink. UL5 is connected to raspi with USB (clock is set to internal). I toggled “enable rate adjust” in CDSP, with resampler disabled and synchronize selected. Sample rate is fixed to 96khz. Capture rate is 44.1khz. I play music with foobar using ASIO driver outputting all different kind of sample rates from 44.1khz all the way up to 96khz. D10s clearly shows the output rate is changing but UL5’s sample rate is fixed to 96khz since it’s locked to internal clock. I read everything on github relating resampling and enable rate adjust, but I don’t know why my setting is working.

Edit: i think what’s going on is that UL5’s spdif is working as a capture device in raspi(not cdsp). So by enabling the rate adjust feature, so alsa virtual clock is adjusted by the playback device of cdsp.

This is documented in github:
  • If the capture device is an Alsa Loopback device, the adjustment is done by tuning the virtual sample clock of the Loopback device. This avoids any need for resampling.
 
Last edited:
OP
M

mdsimon2

Major Contributor
Forum Donor
Joined
Oct 20, 2020
Messages
2,515
Likes
3,371
Location
Detroit, MI
I connect my PC to a topping d10s and connect d10s to UL5 with toslink. UL5 is connected to raspi with USB (clock is set to internal). I toggled “enable rate adjust” in CDSP, with resampler disabled and synchronize selected. Sample rate is fixed to 96khz. Capture rate is 44.1khz. I play music with foobar using ASIO driver outputting all different kind of sample rates from 44.1khz all the way up to 96khz. D10s clearly shows the output rate is changing but UL5’s sample rate is fixed to 96khz since it’s locked to internal clock. I read everything on github relating resampling and enable rate adjust, but I don’t know why my setting is working.

Edit: i think what’s going on is that UL5’s spdif is working as a capture device in raspi(not cdsp). So by enabling the rate adjust feature, so alsa virtual clock is adjusted by the playback device of cdsp.

This is documented in github:
  • If the capture device is an Alsa Loopback device, the adjustment is done by tuning the virtual sample clock of the Loopback device. This avoids any need for resampling.

Have you tried listening with 44.1 kHz SPDIF input when CDSP is running at 96 kHz? I get a nasty almost bit crushing edge to the sound. CDSP also still shows the capture rate as 96000 Hz which is odd. To make sure I wasn't completely insane I checked the DAC output with a Cosmos ADC using a 44.1 kHz SPDIF source with CDSP running at 96 kHz with clock set to internal, the results weren't pretty.

UL Mk5 SPDIF Test 44.1 In 96 CDSP.png


If you have a 96 kHz SPDIF input when CDSP is running at 96 kHz with the UL Mk5 clock set to internal it sounds fine but I get the very occasional drop out. As a result I really think the only reliable way to use the SPDIF input on the UL Mk5 is to set the clock source to SPDIF at the same frequency as the SPDIF source as specified in the UL Mk5 user guide.

Your quote about ALSA loopback doesn't make sense as you are using the UL Mk5 as a capture device not an ALSA loopback.

Michael
 

sarieri

Senior Member
Forum Donor
Joined
Mar 1, 2023
Messages
333
Likes
216
Have you tried listening with 44.1 kHz SPDIF input when CDSP is running at 96 kHz?
Here is my config, I did not have any clicking sound unless I play anything above 96khz (this should be a limit of motu UL5 spdif input).
 

Attachments

  • UltraLitemk5.txt
    4.2 KB · Views: 42
OP
M

mdsimon2

Major Contributor
Forum Donor
Joined
Oct 20, 2020
Messages
2,515
Likes
3,371
Location
Detroit, MI
Here is my config, I did not have any clicking sound unless I play anything above 96khz (this should be a limit of motu UL5 spdif input).

Change verbosity to -v on your log and I think you will find that although you specify a 44100 Hz capture rate CDSP is actually using a 96000 Hz capture rate. It seems to set the playback rate first and then recognize that the capture rate needs to match playback.

Code:
2023-04-30 02:03:07.080720 DEBUG [src/alsadevice.rs:413] Playback: supported channels, min: 10, max: 22, list: [10, 18, 22]
2023-04-30 02:03:07.080879 DEBUG [src/alsadevice.rs:414] Playback: setting channels to 18
2023-04-30 02:03:07.081104 DEBUG [src/alsadevice.rs:418] Playback: supported samplerates: Discrete([88200, 96000])
2023-04-30 02:03:07.081226 DEBUG [src/alsadevice.rs:419] Playback: setting rate to 96000
2023-04-30 02:03:07.081394 DEBUG [src/alsadevice.rs:423] Playback: supported sample formats: [S24LE3]
2023-04-30 02:03:07.081516 DEBUG [src/alsadevice.rs:424] Playback: setting format to S24LE3
2023-04-30 02:03:07.085946 DEBUG [src/alsadevice.rs:455] Opening audio device "hw:UltraLitemk5" with parameters: HwParams { channels: Ok(18), rate: "Ok(96000) Hz", format: Ok(S243LE), access: Ok(RWInterleaved), period_size: "Ok(512) frames", buffer_size: "Ok(4096) frames" }, SwParams(avail_min: Ok(2048) frames, start_threshold: Ok(1536) frames, stop_threshold: Ok(4096) frames)
2023-04-30 02:03:07.086124 DEBUG [src/alsadevice.rs:460] Audio device "hw:UltraLitemk5" successfully opened
2023-04-30 02:03:07.086312 DEBUG [src/bin.rs:323] Playback thread ready to start
2023-04-30 02:03:07.087157 DEBUG [src/alsadevice.rs:413] Capture: supported channels, min: 16, max: 16, list: [16]
2023-04-30 02:03:07.087310 DEBUG [src/alsadevice.rs:414] Capture: setting channels to 16
2023-04-30 02:03:07.087433 DEBUG [src/alsadevice.rs:418] Capture: supported samplerates: Discrete([96000])
2023-04-30 02:03:07.087540 DEBUG [src/alsadevice.rs:419] Capture: setting rate to 96000
2023-04-30 02:03:07.087644 DEBUG [src/alsadevice.rs:423] Capture: supported sample formats: [S24LE3]
2023-04-30 02:03:07.087750 DEBUG [src/alsadevice.rs:424] Capture: setting format to S24LE3
2023-04-30 02:03:07.088155 DEBUG [src/alsadevice.rs:455] Opening audio device "hw:UltraLitemk5" with parameters: HwParams { channels: Ok(16), rate: "Ok(96000) Hz", format: Ok(S243LE), access: Ok(RWInterleaved), period_size: "Ok(512) frames", buffer_size: "Ok(4096) frames" }, SwParams(avail_min: Ok(2048) frames, start_threshold: Ok(0) frames, stop_threshold: Ok(4096) frames)
2023-04-30 02:03:07.088317 DEBUG [src/alsadevice.rs:460] Audio device "hw:UltraLitemk5" successfully opened
2023-04-30 02:03:07.088504 DEBUG [src/bin.rs:333] Capture thread ready to start
2023-04-30 02:03:07.088619 DEBUG [src/bin.rs:336] Both capture and playback ready, release barrier
2023-04-30 02:03:07.088744 DEBUG [src/bin.rs:338] Supervisor loop starts now!
2023-04-30 02:03:07.088775 DEBUG [src/alsadevice.rs:958] Starting captureloop
2023-04-30 02:03:07.088793 DEBUG [src/processing.rs:21] Processing loop starts now!
2023-04-30 02:03:07.088838 DEBUG [src/alsadevice.rs:863] Starting playback loop
2023-04-30 02:03:07.089264 DEBUG [src/alsadevice.rs:249] Starting capture from state: SND_PCM_STATE_PREPARED, Ready to start

The sound is not a clicking but a nasty digital harshness that is very audible on music. I find piano makes it extremely obvious. Again see the FFT I posted previously, it is knocking SINAD down to 30 dB.

Michael
 

Wirrunna

Member
Joined
May 27, 2021
Messages
93
Likes
45
Location
South Coast, NSW, Australia
Recommended hardware to take the NAD analog out put and digitise or can the MOTU Ultralight MK5 do that as well as the outputs?


MOTU Ultralite Mk5 can do this. It would also be a fun option because you can start with using the Ultralite Mk5 analog inputs but also experiment with using RPi4 + Ultralite Mk5 without the Allo streamer and NAD preamp. You might have other reasons for using the NAD preamp (other sources for example) but the RPi4 + Ultralite Mk5 can do everything your Allo + NAD + miniDSP setup can with much better analog performance and less DA / AD conversions.

Michael
After testing the streaming and source switching via FLIRC and OLED, I have taken your advice and removed my NAD pre-amp from the audio chain.

For the recommended OLED I bought a 1 unit half width plastic rack case and mounted the oled and FLIRC on the flat faced back panel.


1683081723502.jpeg


Here is a pic of piCore player with 7" screen sitting on the OLED display case. In piCore player I select player "CDSP-ULMK5" to control Squeezelite feeding CamillaDSP.

The rPi is not screwed down yet and the back of the case is open for ventilation.

The OLED allows 9 characters for display of the input so I used Squeezbox (a deliberate typo} as the name for the Squeezelite process running on the RPi 4 with CamillaDSP.

FLIRC.
I use an old Logitec Squeezebox Boom remote matched to the FLIRC. I made one change to Michael's keymap as I used the red Power button to toggle the Mute function.

On the living room system I have 3 inputs, "NAD Ctl" that uses analog from my NAD preamp, "Squeezbox" which uses the Squeezelite instance feeding CamillaDSP and "TV" for the TV sound through the CamillaDSP. The NAD is only there as a fallback, FM radio is streamed through the Squeezebox server and selected via the PiCore player "Favorites" menu.

Squeezelite

Having built piCore Players for years to stream from my Squeezebox server (LMS), I modified the Squeezelite initscript to include a player name and the modified SB extra args according to those recommended in Archimago's blog. I stream at 96000 with the conversion taking place in the LMS server. One less conversion.

Code:
# Defaults for squeezelite initscript
# sourced by /etc/init.d/squeezelite
# installed at /etc/default/squeezelite by the maintainer scripts

# The name for the squeezelite player (no blanks):

SL_NAME="CDSP-ULMK5"

# ALSA output device:

SL_SOUNDCARD="hw:Loopback,1"

# Squeezebox server (Logitech Media Server):
# Uncomment the next line if you want to point squeezelite at the IP address of
# your squeezebox server. This is usually unnecessary as the server is
# automatically discovered.
#SB_SERVER_IP="192.168.x.y"

# Additional options to pass to squeezelite:
# Please do not include -z to make squeezelite daemonise itself.
#SB_EXTRA_ARGS=""

SB_EXTRA_ARGS="-W -C 30 -r 96000-96000 -R v::4:28:95:105:45"



Amps.JPG


The Motu Ultralite MK5 is sitting on a box that has 6 single end RCA to balanced converters that I built during early testing. The TV analog is converted to balanced using this. The amp on the bottom left is an N-Core from Audiophonics for the bass, the two amps on top are SMSL SH-9 THX headphone amps for mid and high. I made 4 pin XLR to banana plug cables for the SMSL amps.


I converted this amp to balanced input by replacing the RCA sockets with a TRS sockets.

 

Wirrunna

Member
Joined
May 27, 2021
Messages
93
Likes
45
Location
South Coast, NSW, Australia
rigger Output

It is easy to add a trigger output to the Ultralite Mk5 using a Bobwire DAT1. Simply connect the TOSLINK output of the Ultralite Mk5 to the Bobwire DAT1 and use the Audio Detect output port. All of my configuration files are set to stop after 5 seconds of output less than -100 dB, as a result CamillaDSP will stop after 5 seconds and after 60 seconds the trigger from the Bobwire DAT1 will stop and your amplifiers will turn off. Once CamillaDSP starts playing the Bobwire DAT1 trigger will fire up immediately.
Michael, I have just got this working (I think) by configuring Optical Out to TOS as you specified and then Source to Phones 1-2 Mix (L-R) as it did not turn off the amps when Source was set to USB Out Optical 1-2.
Is that right or have I got it wrong, again ? It appears to me that the Bobwire connected to TOS needs a signal that is there when music is playing and is mute when the music stops.
 
Last edited:
Top Bottom