• 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!

Budget Standalone "Toslink > DSP > Toslink" with Camilladsp. Set up instructions for newbies.

Zarken

Member
Joined
Aug 20, 2023
Messages
6
Likes
3
Hi, first of all thank you for this thread. I bought the Leagy USB card to try it but I'm facing some issues.
I'm not able to get any sound from the SPDIF input connected to my TV. I tried forcing the TV audio output to PCM and no luck either. Line input works fine though, along with the SPDIF output.
It looks like the issue tiago.trindade described earlier but I don't have any other peripherals with SPIDF output to try to make the input work. Any idea on how to troubleshoot this ?
 
OP
M

MCH

Major Contributor
Joined
Apr 10, 2021
Messages
2,657
Likes
2,264
Hi, first of all thank you for this thread. I bought the Leagy USB card to try it but I'm facing some issues.
I'm not able to get any sound from the SPDIF input connected to my TV. I tried forcing the TV audio output to PCM and no luck either. Line input works fine though, along with the SPDIF output.
It looks like the issue tiago.trindade described earlier but I don't have any other peripherals with SPIDF output to try to make the input work. Any idea on how to troubleshoot this ?
Hi,
Can you describe your signal flow and share your config?
Is it something like this?
tv > toslink > card > USB > RPI > USB > USB DAC > amp?
 

Zarken

Member
Joined
Aug 20, 2023
Messages
6
Likes
3
tv > toslink > card > USB > RPI > USB > USB DAC > amp?
I'm using the card as toslink output and I'm missing the amp for my final setup so for now I'm testing on a soundbar with toslink input. So:
TV > Toslink > Card > USB > RPI > USB > Toslink > Soundbar.
As for the camilladsp config I'm basically using the one you describe in the thread. I tried changing almost every parameter to get some sound but without success.
By the way I noticed some audio glitches when the Toslink input wasn't plugged to the TV which would indicate that the soundcard is actually able to capture some sound but absolutely nothing when it's plugged...
Before testing this config I was using the soundbar directly connected to the TV using toslink without any issue so I guess this rules out any problem coming from both these devices
 
Last edited:
OP
M

MCH

Major Contributor
Joined
Apr 10, 2021
Messages
2,657
Likes
2,264
Ok. A couple of initial things to check:
-CamillaDSP does not complain about your configuration and says "OK"
-you have tried to set capture sample rate to 48kHz and sample rate to 48kHz and sample format S16_LE
-the name of your card when you do aplay is the same that you are using in CamillaDSP
-have you tried plughw:ICUSBAUDIO7D instead of hw:ICUSBAUDIO7D for both capture and playback devices?
-have you tried to connect headphones to the card? if i remember well, sound was coming out of the headphone out as well
- Is the blue led of the card blinking? It does blink when it works
 

Zarken

Member
Joined
Aug 20, 2023
Messages
6
Likes
3
-CamillaDSP does not complain about your configuration and says "OK"
Absolutely
-you have tried to set capture sample rate to 48kHz and sample rate to 48kHz and sample format S16_LE
Yes that's the config I'm using
-the name of your card when you do aplay is the same that you are using in CamillaDSP
Yes
-have you tried plughw:ICUSBAUDIO7D instead of hw:ICUSBAUDIO7D for both capture and playback devices?
Tried with plughw but it doesn't seem to have any effect
-have you tried to connect headphones to the card? if i remember well, sound was coming out of the headphone out as well
As I don't have any audio captured, there is nothing on the headphone output. Although when I'm using Line input, I'm indeed able to hear the output both from the Toslink OUT and the headphone OUT. Basically the only thing not working in this setup seems to be the Toslink IN
- Is the blue led of the card blinking? It does blink when it works
It doesn't blink when the Toslink IN is selected. It does blink when the Line IN is selected.

I bought another similar sound card from the same brand to see if the issue was coming from the hardware but I got the exact same issue... I don't know what else to try
 

Zarken

Member
Joined
Aug 20, 2023
Messages
6
Likes
3
Well after some tests using Windows and using one of the board ouput as input for the other one, I plugged back the original setup and... it's working now. I'm not really sure what I did in the meantime to fix that. I did try to add a few linux packages, and activate the loopback mode but I don't know how it would have an impact of the issue. Anyway I'm glad everything fine now, so thanks again for the thread, I have to work on my filtering now :)
 
  • Like
Reactions: MCH

antcollinet

Master Contributor
Forum Donor
Joined
Sep 4, 2021
Messages
7,743
Likes
13,068
Location
UK/Cheshire
Nice tutorial.

If I'd seen this before I bought my flex (and pis had been available) I'd have been all over this.

As it is, I'll just be glad I can do it the easy (albeit historically expensive) way. :D
 
Joined
Jul 25, 2022
Messages
32
Likes
8
Well after some tests using Windows and using one of the board ouput as input for the other one, I plugged back the original setup and... it's working now. I'm not really sure what I did in the meantime to fix that. I did try to add a few linux packages, and activate the loopback mode but I don't know how it would have an impact of the issue. Anyway I'm glad everything fine now, so thanks again for the thread, I have to work on my filtering now :)
Hi,

I am only checking this now.

A few additional notes:
1. On Windows, that board only activated the Toslink OUT in a specific USB port (I can't understand why)
2. Some content in my TV (Philips OLED 706) is not "accepted" by this board (but is accepted by my E50 DAC) - e.g. via Netflix I get sound, via KODI (on the TV) I did not. In order to have KODI to have sound I had to put this configuration ON "Enable Dolby Digital (AC3) transcoding"

Moode Audio newest release has the possibility to apply CamillaDSP on Bluetooth (I might be a good workaround - will try it this week)
 

Zarken

Member
Joined
Aug 20, 2023
Messages
6
Likes
3
Hi,

I am only checking this now.

A few additional notes:
1. On Windows, that board only activated the Toslink OUT in a specific USB port (I can't understand why)
2. Some content in my TV (Philips OLED 706) is not "accepted" by this board (but is accepted by my E50 DAC) - e.g. via Netflix I get sound, via KODI (on the TV) I did not. In order to have KODI to have sound I had to put this configuration ON "Enable Dolby Digital (AC3) transcoding"

Moode Audio newest release has the possibility to apply CamillaDSP on Bluetooth (I might be a good workaround - will try it this week)
2 days ago my setup actually stopped working, the Toslink input doesn't accept the output of my TV anymore. I wasn't able to fix it this time. It still works using the toslink output of another device though, so this clearly seems to be similar to the issue you have with your TV.
I got tired of this and ordered the S2 Digi from Hifime, I will receive it in a few days and I hope it'll work better.
 

Zarken

Member
Joined
Aug 20, 2023
Messages
6
Likes
3
2 days ago my setup actually stopped working, the Toslink input doesn't accept the output of my TV anymore. I wasn't able to fix it this time. It still works using the toslink output of another device though, so this clearly seems to be similar to the issue you have with your TV.
I got tired of this and ordered the S2 Digi from Hifime, I will receive it in a few days and I hope it'll work better.
Just received the Hifime S2 Digi to replace the Leagy sound card and I was immediately able to capture the toslink output of my TV. I would recommend it for people having similar issues.
 

Floupi

Member
Joined
Dec 19, 2023
Messages
6
Likes
1
Sorry for hijacking the thread with my issue,
I've followed this great tutorial and got a setup working, but I'm stuck with a frustrating problem which I think comes from my TV rather than the soundcard/raspberry pi.

Disclaimer, I live in Japan and my reading comprehension is not the best, so I don't get all the nuances of the TV's menu.

I am using a raspberry pi 4B connected to a Sound Blaster X-Fi HD.

The problem is: I can't successfully decode the audio from the TV.
- If I connect the toslink out of my TV to my amp (Yamaha a-s301) directly, I get sound.
- if I connect my PS4 or something to the X-Fi HD I get sound through CamillaDSP
- if I connect the toslink out of my TV to the X-Fi (with the same PS5 signal going through HDMI) there's a little pop and then no sound at all (CamillaDSP works but the input is -infinity dBFS).

I'm suspecting that the audio format on the Toslink connection is not being decoded correctly. I tried S16LE and S24LE, as well as different bitrates but no luck.

On my TV's manual (all in Japanese, it's a Japanese MaxZen brand), it says that you can configure the output of the digital audio as "auto, PCM or bitstream". They explain that auto will play AAC or PCM depending on the output device capabilities, PCM will just output PCM and bitstream will just play whatever is on the HDMI (passthrough?). They don't say anything about sample rate.
However when I go in the submenus, that digital output submenu is only available on the TV source and not on the HDMI sources. On the latter there is another submenu instead which let's me choose the "HDMI mode" between digital or analog.
I tried a combination of these different options but couldn't figure it out at all. With the "analog" option I get a bit of noise in the camillaDSP vu-metre but that's all...

Now I'm not experienced with TVs at all, never had a TV at home in my 29 years of existence until now, so maybe I'm missing something obvious.

Do these submenus ring a bell to any of you? Any way I could get that TV sound to get through my CamillaDSP?

I did get a HDMI extractor but the advantage of the TV is that I can just plug the PS4 and AppleTV and get switching between both sounds, without having to get am external switcher.
 

RogerM

Member
Joined
Jul 11, 2020
Messages
11
Likes
5
On my Samsung TV I have a Rasp PI 4B capturing the toslink output.
On the TV menus I have sound output set to PCM. It always outputs at S16LE @ 48KHz
Below the first of the CamillaDSP config I use to capture the data.
Input interface I have is a HiFiBerry Digi+ IO HAT. The only issue with this setup is sometimes the Digi+ IO interface needs to be restarted if the input gets stalled. I do this by stopping and restarting CamillaDSP. Something to do with timing of TV on/off and Digi+ IO stream stop/start causes this stalling. But once input is working it never fails again until next TV off/on cycle.
Hope this helps...

devices:
samplerate: 48000
chunksize: 1024
queuelimit: 4
resampler_type: BalancedAsync
enable_rate_adjust: false
enable_resampling: false
adjust_period: 10.0
silence_threshold: -80.0
silence_timeout: 60.0
target_level: 0
capture:
channels: 2
device: hw:sndrpihifiberry
format: S16LE
type: Alsa
 

Floupi

Member
Joined
Dec 19, 2023
Messages
6
Likes
1
On my Samsung TV I have a Rasp PI 4B capturing the toslink output.
On the TV menus I have sound output set to PCM. It always outputs at S16LE @ 48KHz
Below the first of the CamillaDSP config I use to capture the data.
Input interface I have is a HiFiBerry Digi+ IO HAT. The only issue with this setup is sometimes the Digi+ IO interface needs to be restarted if the input gets stalled. I do this by stopping and restarting CamillaDSP. Something to do with timing of TV on/off and Digi+ IO stream stop/start causes this stalling. But once input is working it never fails again until next TV off/on cycle.
Hope this helps...

devices:
samplerate: 48000
chunksize: 1024
queuelimit: 4
resampler_type: BalancedAsync
enable_rate_adjust: false
enable_resampling: false
adjust_period: 10.0
silence_threshold: -80.0
silence_timeout: 60.0
target_level: 0
capture:
channels: 2
device: hw:sndrpihifiberry
format: S16LE
type: Alsa
Thanks a lot for your answer! Unfortunately I still couldn't find the right TV settings that would get any understandable sound by the soundcard, neither using windows or the RPi...

For the moment I'm using the HDMI extractor but it seems very wasteful when the TV has an optical output.

I sent a message to Maxzen's support, hoping they'll teach me the magic settings to make it work.
 

Floupi

Member
Joined
Dec 19, 2023
Messages
6
Likes
1
In the unlikely chance that anyone else has a MaxZen TV, and looking to do the same as me, I just received an answer from their support :
Mr Floupi,
My name is _____ from MAXZEN Technical Center.
This product allows you to select PCM only for TV broadcasts.

There is no way to select PCM with HDMI.
For the sample rate of optical digital output,
Not published.
Thank you for your support.

Well, しょうがない like we say around here...
 

TheBatsEar

Major Contributor
Forum Donor
Joined
Jun 16, 2020
Messages
3,180
Likes
5,162
Location
Germany
I think they are all the same, with the same board, likely from the same factory.
You can buy them for 12€ or so at Aliexpress.

Mine is exactly like the one in the first post.
 

mattzildjian

Member
Joined
Oct 17, 2020
Messages
69
Likes
24
I think they are all the same, with the same board, likely from the same factory.
You can buy them for 12€ or so at Aliexpress.

Mine is exactly like the one in the first post.
Ah I see, they all use the CM6206 chip.
 

mattzildjian

Member
Joined
Oct 17, 2020
Messages
69
Likes
24
I still haven't taken the plunge buying one of these cheap sound cards because so many people are complaining about spdif in the reviews, saying it flat out doesnt work or is intermittent or has a fixed sample rate, or can only output stereo etc.

I just want to correct my TV optical out before it reaches my Loxjie A30. (So only stereo is required for my use)
However I have many concerns.
Will I still be able to control the loxjie A30 volume with my TV remote like I can do now? Will it add noticeable latency, even for gaming? What happens if the TV outputs more channels than stereo?

Are these all the same?
https://www.amazon.co.uk/AMZLORD-Converter-Aluminium-Headphone-Soundcard/dp/B0CNHBTKQT (This one seems the newest as it's only just started showing up on amazon)

They seem to either use the CM6206, or CM6206LX.
Why is this CM6206 chip seemingly the only option on the market that I can find? Nothing newer? The drivers are ancient!
 

Rafaille

Member
Joined
Dec 5, 2021
Messages
75
Likes
37
Great thread! A cheap way to do room correction, dream come true really.

I have one question regarding my setup based on Nvidia shield pro as the source (for everything music, tv...).
The shield does not have a dedicated digital output, only hdmi or usb. I currently use hdmi to tv and usb to DAC and it works great.
Can the RPi4 accept digital audio in via usb the same way my dac does in this setup?
If so, will the shield comply (any shield users here?)?

As an alternative I can use my tv as a hdmi to spdif converter but I am a bit worried about the 'quality' of the conversion. It would also incur an unnecessary 44.1kHz to 48kHz but I suppose that is fine. I could do this conversion within the shield and output 48kHz through hdmi to start with.

Last question, can usb 3.0 ports be used on the RPi4 or do these carry interferences? I know for high frequency (2.4 GHz) applications like Zigbee coordinators (smart home stuff) they should be avoided.

Cheers from the UK,
Alex
 
OP
M

MCH

Major Contributor
Joined
Apr 10, 2021
Messages
2,657
Likes
2,264
Great thread! A cheap way to do room correction, dream come true really.

I have one question regarding my setup based on Nvidia shield pro as the source (for everything music, tv...).
The shield does not have a dedicated digital output, only hdmi or usb. I currently use hdmi to tv and usb to DAC and it works great.
Can the RPi4 accept digital audio in via usb the same way my dac does in this setup?
If so, will the shield comply (any shield users here?)?

As an alternative I can use my tv as a hdmi to spdif converter but I am a bit worried about the 'quality' of the conversion. It would also incur an unnecessary 44.1kHz to 48kHz but I suppose that is fine. I could do this conversion within the shield and output 48kHz through hdmi to start with.

Last question, can usb 3.0 ports be used on the RPi4 or do these carry interferences? I know for high frequency (2.4 GHz) applications like Zigbee coordinators (smart home stuff) they should be avoided.

Cheers from the UK,
Alex
hey Rafaille,

Yes, the RPi4 can accept digital audio via USB, usually from an audio interface. I am not familiar at all with nvidia shield. Is this USB acting as a host? it seems so as you connect it to your DAC. In this case i believe you will have to use your RPi4 in gadget mode. There is a thread in the forum about how to achieve that (I cannot find it now, maybe someone can link it edit: link at the end). I think you will have to use the USB-C port of your RPi4 and an adaptor in gadget mode.
If the shield could act as an audio interface via USB, it would make it much easier. Maybe in the camilladsp tutorial thread you can find someone that does what you aim to (link below).

If you don't want to use your TV as HDMI to SPDIF converter you can also use a dedicated HDMI audio extractor. A couple have been reviewed here with good results.

I have never heard about any issues with the USB 3.0 ports of the RPi4. These are the ones i use for my DAC and interface and they work fine.


using raspberry pi in gadget mode thread:

 
Top Bottom