Go Back   Home > Forums > >
Home Forums Rules Articles diyAudio Store Blogs Gallery Wiki Register Donations FAQ Calendar Search Today's Posts Mark Forums Read

PC Based Computer music servers, crossovers, and equalization

Ecasound DSP startup difficulties
Ecasound DSP startup difficulties
Please consider donating to help us continue to serve you.

Ads on/off / Custom Title / More PMs / More album space / Advanced printing & mass image saving
Reply
 
Thread Tools Search this Thread
Old 10th January 2018, 07:22 PM   #21
CharlieLaub is offline CharlieLaub  United States
diyAudio Member
 
Join Date: Mar 2007
Location: Michigan
Quote:
Originally Posted by taita View Post
That works well, but how do I terminate the playing?
Control-C
__________________
Visit my Audio Web Page <<--CLICK TO LEARN MORE-->> Get my LADSPA plugins
  Reply With Quote
Old 10th January 2018, 07:25 PM   #22
CharlieLaub is offline CharlieLaub  United States
diyAudio Member
 
Join Date: Mar 2007
Location: Michigan
Quote:
Originally Posted by phofman View Post
"Device busy" is simple - your soundcard is taken by another process. In 99.9% it is pulseaudio. IMO that is also the cause for the "bus error" of ecasound.

Run

Code:
sudo lsof /dev/snd/*
and you will see your soundcard device is open by pulseaudio process.

One-time solution - run several times the command

Code:
killall pulseaudio
untill the lsof command lists no pulseaudio processes holding your soundcards.

Permanent solution - disable the soundcard in pulseaudio:

pavucontrol -> tab Settings -> choose Off for the cards you do not want pulseaudio to touch.

[xubuntu] How to make Pulseaudio use only a specific device - Page 2
Possibly taita set his new 5.1 soundcard to be used by the OS via a GUI control?

If typing pavucontrol at the command prompt does nothing you (taita) might need to install pavucontrol:
sudo apt-get install pavucontrol
__________________
Visit my Audio Web Page <<--CLICK TO LEARN MORE-->> Get my LADSPA plugins
  Reply With Quote
Old 10th January 2018, 07:29 PM   #23
CharlieLaub is offline CharlieLaub  United States
diyAudio Member
 
Join Date: Mar 2007
Location: Michigan
Taita, the next problem is that only the default LADSPA plugins that come with ladspa-sdk are installed. If you try to use any of the plugins from Richard Taylor, ecasound will throw an error.

If you need help installing LADSPA plugins, just ask. I also wrote a plugin that some people seem to like. It does all the first and second order filters. See my sig for info.
__________________
Visit my Audio Web Page <<--CLICK TO LEARN MORE-->> Get my LADSPA plugins
  Reply With Quote
Old 10th January 2018, 07:30 PM   #24
phofman is online now phofman  Czech Republic
diyAudio Member
 
Join Date: Apr 2005
Location: Pilsen
Quote:
Originally Posted by CharlieLaub View Post
Possibly taita set his new 5.1 soundcard to be used by the OS via a GUI control?
From what I have seen pulseaudio occupies all soundcards it detects in the system by default (incl. the snd-aloop one :-) ). It has to be told to ignore a specific card explicitely.

IMO such behaviour is correct since a user expects all soundcards being offered by the GUI sound configuration of his desktop environment (pavucontrol or other specific PA frontends).
  Reply With Quote
Old 10th January 2018, 07:37 PM   #25
taita is offline taita  Netherlands
diyAudio Member
 
Join Date: Dec 2014
Quote:
Originally Posted by CharlieLaub View Post
Possibly taita set his new 5.1 soundcard to be used by the OS via a GUI control?

If typing pavucontrol at the command prompt does nothing you (taita) might need to install pavucontrol:
sudo apt-get install pavucontrol
I installed it.
I can play a wavfile by using ecasound sound.wav, but the chainsetup still fails. I think that should be the next step and than the filters.

I am unsure if
Code:
ecasound -B:rt -z:mixmode,sum -x -i:Flute.wav -f:16,2,44100 -o:alsa,plug:surround:Device
is right. I tried USB audio instead of Device but it failed too.
  Reply With Quote
Old 10th January 2018, 07:48 PM   #26
CharlieLaub is offline CharlieLaub  United States
diyAudio Member
 
Join Date: Mar 2007
Location: Michigan
A wave file contains a header that has all the audio formatting information. You do not need to include the "-f" formatting statement in your ecasound string. It could actually be wrong, which would cause an error. I would just leave it out.

Also, look back at what you posted in post #17 about the output from aplay -L. In your ecasound command you specify the output device
Code:
plug:surround:Device
I do not see that listed in post 17, so it doesn't exist to the OS. Typos like that will kill you. It is good practice to copy and paste the name within the terminal window and you can avoid those annoying problems completely. The part to copy is the first line of each entry that is listed when you type aplay -L.

I think you might have meant to use:
plughw:CARD=Device,DEV=0

There really isn't a reason to use the plug device. I would just stick to "hw", and use:
hw:CARD=Device,DEV=0

e.g. in ecasound, the end part shoudl be:
-o:alsa,hw:CARD=Device,DEV=0

Try that.
__________________
Visit my Audio Web Page <<--CLICK TO LEARN MORE-->> Get my LADSPA plugins

Last edited by CharlieLaub; 10th January 2018 at 07:53 PM.
  Reply With Quote
Old 10th January 2018, 07:56 PM   #27
taita is offline taita  Netherlands
diyAudio Member
 
Join Date: Dec 2014
Quote:
Originally Posted by CharlieLaub View Post
A wave file contains a header that has all the audio formatting information. You do not need to include the "-f" formatting statement in your ecasound string. It could actually be wrong, which would cause an error. I would just leave it out.

Also, look back at what you posted in post #17 about the output from aplay -L. In your ecasound command you specify the output device
Code:
plug:surround:Device
I do not see that listed in post 17, so it doesn't exist to the OS. Typos like that will kill you. It is good practice to copy and paste the name within the terminal window and you can avoid those annoying problems completely.

I think you might have meant to use:
plughw:CARD=Device,DEV=0

There really isn't a reason to use the plug device. I would just stick to "hw", and use:
hw:CARD=Device,DEV=0

e.g. in ecasound, the end part shoudl be:
-o:alsa,hw:CARD=Device,DEV=0

Try that.
Super!
ecasound -B:rt -z:mixmode,sum -x -i:Flute.wav -o:alsa,hw:CARD=Device,DEV=0 did it!

Ok, if you don't mind I come back to the filters. I need more filters and instructions you told me.....

And there is one annoying error left: why do mp3 files fail?

I checked flac and it played but with interruptions:
(audioio-db-client) WARNING: Underrun in reading from "Adele.flac". Trying to recover.

I have to stop for today. Thanks for the progress and I will try to make a filter. CU!

Last edited by taita; 10th January 2018 at 08:07 PM.
  Reply With Quote
Old 10th January 2018, 08:07 PM   #28
CharlieLaub is offline CharlieLaub  United States
diyAudio Member
 
Join Date: Mar 2007
Location: Michigan
Quote:
Originally Posted by taita View Post
Super!
ecasound -B:rt -z:mixmode,sum -x -i:Flute.wav -o:alsa,hw:CARD=Device,DEV=0 did it!

Ok, if you don't mind I come back to the filters. I need more filters and instructions you told me.....

And there is one annoying error left: why do mp3 files fail?

I checked flac and it played but with interruptions:
(audioio-db-client) WARNING: Underrun in reading from "Adele.flac". Trying to recover.
Not sure. I don't use ecasound to play files. I use a "player" for that. In my systems I use an alsa system called a loopback that connects the output of my player to the input of ecasound. It is also possible to pipe the output between programs.

Also, in:
Code:
ecasound -B:rt -z:mixmode,sum -x -i:Flute.wav -o:alsa,hw:CARD=Device,DEV=0
There is no reason to use -x or -z:mixmode,sum. The -x switch is only useful if you are writing files (it means overwrite) and -z:mixmode,sum is only useful if you are mixing two channels together, but you are not doing that. Might be useful later when you use filters, but I thought I would point it out.

Anyway, it's late where you are. Good work for today. We can take up the LADSPA filter stuff another time.
__________________
Visit my Audio Web Page <<--CLICK TO LEARN MORE-->> Get my LADSPA plugins

Last edited by CharlieLaub; 10th January 2018 at 08:10 PM.
  Reply With Quote
Old 10th January 2018, 10:45 PM   #29
jplesset is offline jplesset  United States
diyAudio Member
 
Join Date: Jan 2013
Location: Oregon City, Oregon
I use ecasound per Richard's article, and had some buffering issues some time ago. Please check your system load, (use top or uptime) to see if your processor is able to handle the load. You may also want to increase the buffer size. The error is a "buffer runderrun", meaning that the buffer has gone empty, and you get an interruption until more data gets into the buffer.

This is the ecasound command I am using in my OrangePi, with a 7.1 sound card, 2-way xover plus a stereo pair without crossover:

code
command "ecasound -b:1024 -z:db -z:mixmode,sum -x -are -f:s32_le,2,44100 -i:st
din -o:loop,1 -are2,full -i:loop,1 -are2 -o:loop,2 -a:woofer,tweeter -i:loop
,2 -a:woofer -pf:/etc/woofer.ecp -chorder:1,2,0,0,0,0 -a:tweeter -pf:/etc/tweete
r.ecp -chorder:0,0,0,0,1,2 -a:full -pf:/etc/full.ecp -chorder:0,0,1,2,0,0 -a:woo
fer,tweeter,full -f:f32_le,6,44100 -o:stdout | sox -q -c 6 -r 44100 -b 32 -e fl
oat -L -t raw - -e signed -c 6 -b 16 -t alsa surround51evice"
/code
  Reply With Quote
Old 11th January 2018, 12:25 AM   #30
CharlieLaub is offline CharlieLaub  United States
diyAudio Member
 
Join Date: Mar 2007
Location: Michigan
Quote:
Originally Posted by jplesset View Post
I use ecasound per Richard's article, and had some buffering issues some time ago. Please check your system load, (use top or uptime) to see if your processor is able to handle the load. You may also want to increase the buffer size. The error is a "buffer runderrun", meaning that the buffer has gone empty, and you get an interruption until more data gets into the buffer.

This is the ecasound command I am using in my OrangePi, with a 7.1 sound card, 2-way xover plus a stereo pair without crossover:

Code:
command "ecasound -b:1024 -z:db -z:mixmode,sum -x -a:pre -f:s32_le,2,44100 -i:st
din -o:loop,1 -a:pre2,full -i:loop,1 -a:pre2 -o:loop,2 -a:woofer,tweeter -i:loop
,2 -a:woofer -pf:/etc/woofer.ecp -chorder:1,2,0,0,0,0 -a:tweeter -pf:/etc/tweete
r.ecp -chorder:0,0,0,0,1,2 -a:full -pf:/etc/full.ecp -chorder:0,0,1,2,0,0 -a:woo
fer,tweeter,full  -f:f32_le,6,44100 -o:stdout | sox -q -c 6 -r 44100 -b 32 -e fl
oat -L -t raw - -e signed -c 6 -b 16 -t alsa surround51:Device"
Recently I solved a weird problem I was having with buffering. I'm running a stereo 3-way crossover from a Pi 2, and slowly over a time period of many hours (e.g. 10 hours) a lag would develop between the source and the audio emanating from the loudspeakers that was on the order of 4-5 seconds. If I stopped play, the audio would continue for several seconds. I experimented a bit with some settings and the cause turned out to be internal buffering by ecasound. Now I disable this with
Code:
-z:nointbuf
On that note, is there a reason you are invoking double internal buffering (the -z:db option) without specifying a buffer size? According to the manpage:
Quote:
-z:db,dbsize' enables double-buffering for audio objects that support it (dbsize=0 for default, otherwise buffer size in sample frames).
Since you do not specify dbsize it seems that ecasound uses the value of zero! I don't think it is doing anything.

Also, the buffering problems you are experiencing might be due to all the piping you are employing. I think you are calling this code from within MPD, which pipes MPD's output to ecasound, and then piping ecasound's output to sox. If you are using sox just to implement dither, I think you might prefer no dither and unbroken audio to the very subtle and likely inaudible effect of adding dither. You could try having ecasound send the audio directly to the DAC and see how that works...
__________________
Visit my Audio Web Page <<--CLICK TO LEARN MORE-->> Get my LADSPA plugins
  Reply With Quote

Reply


Ecasound DSP startup difficultiesHide this!Advertise here!
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ecasound crossover issue with Line in Tonio79 PC Based 16 25th January 2017 01:35 AM
help with delayed (15s) audio in ecasound crossover setup Gordon C PC Based 8 25th November 2016 09:38 AM
MPD to ecasound - plays flac but not MP3 JMF11 PC Based 7 13th June 2016 08:10 PM
ecasound in MPD - problem of Device or resource busy JMF11 PC Based 7 12th June 2016 06:02 AM
PCM2902 difficulties jmar Digital Source 7 13th January 2006 09:07 PM


New To Site? Need Help?

All times are GMT. The time now is 06:06 AM.


Search Engine Optimisation provided by DragonByte SEO (Pro) - vBulletin Mods & Addons Copyright © 2018 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 14.29%
vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2018 DragonByte Technologies Ltd.
Copyright ©1999-2018 diyAudio
Wiki