Ecasound DSP startup difficulties

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
I'm learning quite a bit sitting on the sidelines watching, so thanks @phofman and @CharlieLaub for all the debug advice.

Question : if @taita's budget DAC requires 48KHz, why not just resample with SOX to provide 48Khz ?
 
Last edited:
I'm learning quite a bit sitting on the sidelines watching, so thanks @phofman and @CharlieLaub for all the debug advice.

Question : if @taita's budget DAC requires 48KHz, why not just resample with SOX to provide 48Khz ?

I think the card supports both 441.k and 48k modes. Taita previously posted this:

The relevant part of /proc/asound/card1
Code:
Capture:
  Status: Stop
  Interface 2
    Altset 1
    Format: S16_LE
    Channels: 2
    Endpoint: 5 IN (ASYNC)
    Rates: 44100, 48000

What is not clear is whether the interface is full duplex (can play and record simultaneously) or not.
 
I wish @taita would provide a block wiring diagram. There are 2 RPIs involved and one single DAC (I think) and I'm not clear on how they are connected.

It seems the record requirement is for loopback monitoring. I'm guessing the SPDIF record is from [DAC] to [RPI#1]

Is it :
a) [RPI#1] -> SPDIF -> [RPI#2] -> SPDIF -> [DAC] -> Analog ??
b) [RPI#1] -> SPDIF -> [RPI#2] -> USB -> [DAC] -> Analog ??
c) [RPI#1] -> SPDIF -> [DAC] -> SPDIF -> [RPI#2]
 
Last edited:
I wish @taita would provide a block wiring diagram. There are 2 RPIs involved and one single DAC (I think) and I'm not clear on how they are connected.

It seems the record requirement is for loopback monitoring. I'm guessing the SPDIF record is from [DAC] to [RPI#1]

Is it :
a) [RPI#1] -> SPDIF -> [RPI#2] -> SPDIF -> [DAC] -> Analog ??
b) [RPI#1] -> SPDIF -> [RPI#2] -> USB -> [DAC] -> Analog ??
c) [RPI#1] -> SPDIF -> [DAC] -> SPDIF -> [RPI#2]

It is
d) [RPI#1] -> SPDIF -> [RPI#2] -> Analogue -> [Amplifier] -> [speakers]
This setup for now is only meant to test the spdif signal in and analogue out together (duplex). I'm thinking of combinining RPI#1 and 2 but I don't want to make things more complicated for now.
 
Since you do not show your ecp files and there could be something wrong with them, why don't we try to simplify things and just try to pass the audio thru the device, input via spdif and output via channels 1 and 2 (these are used for the woofers).

What happens if you run this:
Code:
ecasound -B:rt -f:16,2,44100 \
   -i:alsa,iec958:CARD=Device,DEV=0 \
   -o:alsa,front:CARD=Device,DEV=0
Ok, first alsamixer
full.jpg


Code:
ecasound -B:rt -f:16,2,44100    -i:alsa,iec958:CARD=Device,DEV=0    -o:alsa,front:CARD=Device,DEV=0
**************************************************************************
*        ecasound v2.9.1 (C) 1997-2014 Kai Vehmanen and others    
**************************************************************************
(eca-chainsetup-parser) Buffering mode 'rt' selected.
(eca-chainsetup) Chainsetup "untitled-chainsetup"
(eca-chainsetup) "rt" buffering mode selected.
(eca-chainsetup) WARNING: Couldn't lock all memory!
(eca-chainsetup) Opened input "alsa", mode "read". Format: s16_le, channels
... 2, srate 44100, interleaved.
(eca-chainsetup) Opened output "alsa", mode "write". Format: s16_le,
... channels 2, srate 44100, interleaved.
- [ Connected chainsetup: "untitled-chainsetup" ] ------------------------
- [ Controller/Starting batch processing ] -------------------------------
- [ Engine - Driver start ] ----------------------------------------------
^C- [ Controller/Batch processing finished (0) ] ---------------------------
- [ Engine exiting ] -----------------------------------------------------
(eca-control-objects) Disconnecting chainsetup:  "untitled-chainsetup".
steven@steven-desktop:~$ alsamixer
steven@steven-desktop:~$ ecasound -B:rt -f:16,2,44100    -i:alsa,iec958:CARD=Device,DEV=0    -o:alsa,front:CARD=Device,DEV=0
**************************************************************************
*        ecasound v2.9.1 (C) 1997-2014 Kai Vehmanen and others    
**************************************************************************
(eca-chainsetup-parser) Buffering mode 'rt' selected.
(eca-chainsetup) Chainsetup "untitled-chainsetup"
(eca-chainsetup) "rt" buffering mode selected.
(eca-chainsetup) WARNING: Couldn't lock all memory!
(eca-chainsetup) Opened input "alsa", mode "read". Format: s16_le, channels
... 2, srate 44100, interleaved.
(eca-chainsetup) Opened output "alsa", mode "write". Format: s16_le,
... channels 2, srate 44100, interleaved.
- [ Connected chainsetup: "untitled-chainsetup" ] ------------------------
- [ Controller/Starting batch processing ] -------------------------------
- [ Engine - Driver start ] ----------------------------------------------

The analogue output(jacks) don't give any music. No error messages on the code
 
Last edited:
Please do not show pictures which depict just a fraction of information. Post here output of that amixer command. It will list all the info in alsamixer + more items not listed in alsamixer at all.
You were too fast: I have to do the photo on my desktop and then add the code on my RPI. It is now according to your demands? :)

And for the debugging question. Like I told earlier the first RPI gives a good spdif signal that plays wel on two DAC's. I don't have an oscilloscoop.
 
Last edited:
That ecasound output says nothing about your soundcard controls. I am talking about amixer command as specified in http://www.diyaudio.com/forums/pc-based/316737-ecasound-dsp-startup-difficulties-6.html#post5312934
Code:
amixer -c 1
Simple mixer control 'Speaker',0
  Capabilities: pvolume pswitch pswitch-joined
  Playback channels: Front Left - Front Right - Rear Left - Rear Right - Front Center - Woofer - Side Left - Side Right
  Limits: Playback 0 - 197
  Mono:
  Front Left: Playback 175 [89%] [-4.13dB] [on]
  Front Right: Playback 175 [89%] [-4.13dB] [on]
  Rear Left: Playback 170 [86%] [-5.07dB] [on]
  Rear Right: Playback 170 [86%] [-5.07dB] [on]
  Front Center: Playback 182 [92%] [-2.82dB] [on]
  Woofer: Playback 140 [71%] [-10.69dB] [on]
  Side Left: Playback 69 [35%] [-24.00dB] [on]
  Side Right: Playback 69 [35%] [-24.00dB] [on]
Simple mixer control 'PCM',0
  Capabilities: cvolume cswitch cswitch-joined
  Capture channels: Front Left - Front Right
  Limits: Capture 0 - 6928
  Front Left: Capture 5481 [79%] [5.40dB] [on]
  Front Right: Capture 5481 [79%] [5.40dB] [on]
Simple mixer control 'PCM Capture Source',0
  Capabilities: enum
  Items: 'Mic' 'Line' 'IEC958 In' 'Mixer'
  Item0: 'IEC958 In'
Simple mixer control 'Line',0
  Capabilities: pvolume cvolume pswitch pswitch-joined cswitch cswitch-joined
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: Playback 0 - 8065 Capture 0 - 6928
  Front Left: Playback 6271 [78%] [0.49dB] [off] Capture 0 [0%] [-16.00dB] [off]
  Front Right: Playback 6271 [78%] [0.49dB] [off] Capture 0 [0%] [-16.00dB] [off]
Simple mixer control 'Mic',0
  Capabilities: pvolume cvolume pswitch pswitch-joined cswitch cswitch-joined
  Playback channels: Front Left - Front Right
  Capture channels: Front Left - Front Right
  Limits: Playback 0 - 8065 Capture 0 - 6928
  Front Left: Playback 6144 [76%] [-0.01dB] [off] Capture 6925 [100%] [11.04dB] [off]
  Front Right: Playback 6144 [76%] [-0.01dB] [off] Capture 6925 [100%] [11.04dB] [off]
Simple mixer control 'IEC958 In',0
  Capabilities: cswitch cswitch-joined
  Capture channels: Mono
  Mono: Capture [on]
 
Very well, thanks.

Now let's look at the problem with not recording anything.

Keep the PCM Capture Source at 'IEC958 In', connect toslink cable from a tested SPDIF source to TOSLINK input, start playback of stereo 48/16 material on RPI#1 (make sure no resampling to other samplerate happens) and run command


Code:
arecord -v -D hw:1 -r 48000 -c 2 -f S16_LE recorded.wav

You can quit recording with Ctrl+C at any time.

The recorded.wav file (48/16/2) should contain the music (it does in my case). If not, it must be diagnosed more.
 
Very well, thanks.

Now let's look at the problem with not recording anything.

Keep the PCM Capture Source at 'IEC958 In', connect toslink cable from a tested SPDIF source to TOSLINK input, start playback of stereo 48/16 material on RPI#1 (make sure no resampling to other samplerate happens) and run command


Code:
arecord -v -D hw:1 -r 48000 -c 2 -f S16_LE recorded.wav
You can quit recording with Ctrl+C at any time.

The recorded.wav file (48/16/2) should contain the music (it does in my case). If not, it must be diagnosed more.
Sorry for being a bit stubborn, but I have no 48/16 material and hence I tried it with 41/16
First I record using
Code:
arecord -v -D hw:1 -r 41100 -c 2 -f S16_LE recorded.wav

This is the result when I play the file:
Code:
ecasound recorded.wav
**************************************************************************
*        ecasound v2.9.1 (C) 1997-2014 Kai Vehmanen and others    
**************************************************************************
(eca-chainsetup-parser) NOTE: Interpreting option recorded.wav as
... -i:recorded.wav.
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
(eca-chainsetup) Chainsetup "untitled-chainsetup"
(eca-chainsetup) "rt" buffering mode selected.
(eca-chainsetup) WARNING: Couldn't lock all memory!
(eca-chainsetup) Opened input "recorded.wav", mode "read". Format: s16_le,
... channels 2, srate 44100, interleaved (locked params).
(eca-chainsetup) Opened output "alsa", mode "write". Format: s16_le,
... channels 2, srate 44100, interleaved.
- [ Connected chainsetup: "untitled-chainsetup" ] ------------------------
- [ Controller/Starting batch processing ] -------------------------------
- [ Engine - Driver start ] ----------------------------------------------

- [ Engine - Processing finished ] ---------------------------------------
- [ Controller/Batch processing finished (0) ] ---------------------------
- [ Controller/Processing stopped (cond) ] -------------------------------
- [ Engine exiting ] -----------------------------------------------------
(eca-control-objects) Disconnecting chainsetup:  "untitled-chainsetup".
No sound.

I am happy to do this with 48/16 but to avoid downloading the wrong 48/16 file can you please give me a suggestion?
 
Again, I'm just sitting on the side but I think a debug "reset" is required. I have not seen any evidence that any of this H/W is working or properly configured. It is a complicated system configuration, and the thread is now circling.

So I have a suggestion for @taita to incrementally "prove" the H/W is functioning. This will check the DAC and SPDIF.

Step#1 : [RPI#2] -> USB -> [DAC] -> analog ==== can you hear clear music?
Step#2 : [RPI#1] -> SPDIF -> [DAC] -> analog ==== can you hear clear music?
 
Last edited:
Again, I'm just sitting on the side but I think a debug "reset" is required. I have not seen any evidence that any of this H/W is working or properly configured. It is a complicated system configuration, and the thread is now circling.

So I have a suggestion for @taita to incrementally "prove" the H/W is functioning. This will check the DAC and SPDIF.

Step#1 : [RPI#2] -> USB -> [DAC] -> analog ==== can you hear clear music?
Step#2 : [RPI#1] -> SPDIF -> [DAC] -> analog ==== can you hear clear music?

I agree this thread is getting a mess. My intention was to setup a filter, but the troubles with the input of my soundcard lead to a debug mode that is difficult to understand for people who are not involved. For me its a challenge to get things to work even if this is not so easy. During this thread I already had some success:
- The line in (analogue) is working properly
- I can make a 2 channel filter with different settings and send the result to different channels
- I have learned different settings and views for alsa and ecasound

One thing still is very annoying: I still can't get my spdif in to work although phofman has succes using this with the same soundcard. This issue is not really blocking me. I can test the dsp functionality by using the line in. I intend to do some measurements using Arta next weekend.

The spdif in would be usefull when I want to listen to dsp/amplifiers/speakers. If spdif in is not working I have to choose between analogue input or installing a player on de RPI (with DSP). Anyway, if it comes to real results a better soundcard is needed.

And to come back to your increments: step 1 is still not working, step 2 is working (and the quality using an hifiberry digi+ and a good dac is excellent).
 
I agree this thread is getting a mess. My intention was to setup a filter, but the troubles with the input of my soundcard lead to a debug mode that is difficult to understand for people who are not involved. For me its a challenge to get things to work even if this is not so easy. During this thread I already had some success:
- The line in (analogue) is working properly
- I can make a 2 channel filter with different settings and send the result to different channels
- I have learned different settings and views for alsa and ecasound

One thing still is very annoying: I still can't get my spdif in to work although phofman has succes using this with the same soundcard. This issue is not really blocking me. I can test the dsp functionality by using the line in. I intend to do some measurements using Arta next weekend.

The spdif in would be usefull when I want to listen to dsp/amplifiers/speakers. If spdif in is not working I have to choose between analogue input or installing a player on de RPI (with DSP). Anyway, if it comes to real results a better soundcard is needed.

And to come back to your increments: step 1 is still not working, step 2 is working (and the quality using an hifiberry digi+ and a good dac is excellent).


You need to use your budget DAC in all these tests. If you use a different quality DAC it only proves the RPI SPDIF output is working.

Would it help to install a consumer friendly player (ie. Volumio2) on one RPI to temporarily side step your configuration problems. Volumio is very plug-n-play and should auto configure your system to use the USB DAC. That way you can prove your budget DAC actually works.
 
One other thing to check in alsamixer is the muting of each input and output. For each control, at the bottom of each "slider" that shows the level there is is text that is either "00" or "MM" (MM="muted"). You change between 00 and MM by pressing the "m" key on the keyboard while the control is selected (use the left and right arrow keys to choose which control is selected). I noticed that in a couple of your pictures there is a control called "LINE" that is muted. I cannot tell what that control does exactly. When it is selected you can see a description of the control (4th line down, at the top of the alsamixer window) next to the text "Item:".

Using alsamixer, I would check that you have all inputs and outputs unmuted.
 
All details of alsamixer settings (plus more) are listed in the amixer printout. The soundcard is setup correctly. Playback works fine, reported several times here.

My 2 cents - no SPDIF signal is brought to the TOSLINK input.

taita: Are you really sure the TOSLINK fiber has running SPDIF signal? Can you see the red light at its end? Are you inserting the TOSLINK cable into correct "SPDIF input" of the USB soundcard?

From the recorded wav file you will post we will see if it contains just zeros or perhaps no samples at all.
 
No sound.

Please post here the resultant wav file.



You can resample any file you have, e.g. using sox

Code:
sox -V somefile.sometype -r 48000 -c 2 -b 16 output-48-16-2.wav
Sox works fine and I have made a 48K wav file but....
I have been thinking. Everything I play on my first RPI using squeezebox and hifiberry digi+ is flac.The reason for that is that squeezebox doesn't play wav files. I have tried to solve this in the past, but I think its a bug. As I told earlier squeezebox is putting the format of the file through. So the output of RPI-1= spdif input RPI-2 is flac. I think this is the reason there is no sound. Anyway I can't play the 48K.wav file using squeezebox and I don want to do any experiments on that RPI.

So I think here it ends with my spdif input. In future I wil think about installing a musicplayer on the dpa-rpi but for now I go back to the original subject of this topic: dsp functinality to filter speakers.
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.