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

Twisted Pear Superior quality electronic kits

Reply
 
Thread Tools Search this Thread
Old 25th July 2015, 08:25 PM   #11
phofman is offline phofman  Czech Republic
diyAudio Member
 
Join Date: Apr 2005
Location: Pilsen
Quote:
Code:
	device          "plughw:0"
You are accessing your card directly (only through the "nice guy" plug plugin). Your complex asound.conf setup is completely bypassed.

You need to use the device "default" which uses your filter plugin setup.
Code:
	device          "default"
  Reply With Quote
Old 25th July 2015, 11:27 PM   #12
francolargo is offline francolargo  United States
diyAudio Member
 
Join Date: Mar 2007
Location: Twin Cities, MN
Quote:
Originally Posted by phofman View Post
You need to use the device "default" which uses your filter plugin setup.
The only 'device' settings that give any output to the DACs are "hw:0..." or "plughw:0...".

I have tried virtually every other possibility. With "default" specified the system behaves as if it is playing music but there is silence and the 'time played' indicator from mpc stays at 0:00.

Last edited by francolargo; 25th July 2015 at 11:35 PM.
  Reply With Quote
Old 26th July 2015, 12:12 AM   #13
francolargo is offline francolargo  United States
diyAudio Member
 
Join Date: Mar 2007
Location: Twin Cities, MN
Oh yes, one other way to get sound from mpd: create an alsa loopback card, then set mpd output device to "hw:1,0". The alsa plugins still never see that data, but you can use hw:1 as an input to ecasound, and use hw:0,0 as the ecasound output. ...and just a reminder that the same behavior was found in the version of MPD that is included with Volumio 1.5...

I know the casual reader may not find this troubleshooting to be a riveting commentary, but getting MPD running as needed would be great!

Last edited by francolargo; 26th July 2015 at 12:15 AM.
  Reply With Quote
Old 26th July 2015, 07:01 AM   #14
phofman is offline phofman  Czech Republic
diyAudio Member
 
Join Date: Apr 2005
Location: Pilsen
OK, I see.

Let's have a look at the mpd alsa setup first.

Why is period_time = 1? This means asking the soundcard driver to provide notification period as close to 1 microsecond as possible. Is it needed? What happens if you remove the setting alltogether and let mpd setup buffer/period sizes on its own? What is corresponding setup in squeezelite? I did not see any mentioned in that post.

In your hw_params alsa dump (I assume running with squeezelite) alsa reports period_size = 1764 which is 10ms FramesPeriods - AlsaProject

I am not saying this will solve but is the first step in troubleshooting - figuring out the parameters.
  Reply With Quote
Old 26th July 2015, 03:45 PM   #15
francolargo is offline francolargo  United States
diyAudio Member
 
Join Date: Mar 2007
Location: Twin Cities, MN
Thanks for these suggestions! I tried greater period_time values and also commenting the line out. When the output 'device' is hw:0,0, all period times produce sound.

When 'device' is "default", no change - meaning no sound. However, period_time = 1 gave two different reports; it changed after a reboot:
at first - "playing"
Code:
root@botic:/# mpc play   # ...with period_time=1
Track4.aif
[playing] #1/3   0:00/5:03 (0%)
volume:100%   repeat: off   random: off   single: off   consume: off
root@botic:/# mpc stop
After changing period_time and then a reboot all the different period times (including "1" - and device="default") gave "paused"...
Code:
root@botic:/# mpc play
Track4.aif
[paused]  #1/3   0:00/5:03 (0%)
volume:100%   repeat: off   random: off   single: off   consume: off
ERROR: Failed to open audio output

root@botic:/# mpc outputs
Output 1 (Botic) is enabled
  Reply With Quote
Old 26th July 2015, 07:07 PM   #16
phofman is offline phofman  Czech Republic
diyAudio Member
 
Join Date: Apr 2005
Location: Pilsen
Quote:
Originally Posted by francolargo View Post
T
Code:
ERROR: Failed to open audio output
We need mpd verbose logs for this case.

Also, the /proc/...hw_params as well as sw_params would be useful as these give information on xruns. If the stream produces steady flow of xruns (due to e.g. too short buffers), it will not play at all.
  Reply With Quote
Old 27th July 2015, 06:00 AM   #17
francolargo is offline francolargo  United States
diyAudio Member
 
Join Date: Mar 2007
Location: Twin Cities, MN
OK, I have some light to shed on this problem. In mpd.conf I changed 'device' to "default" and I commented-out 'period_time'. After I attempted to play music with mpc I saw the following in mpd.log:
Code:
Jul 27 05:02 : avahi: Initializing interface
Jul 27 05:02 : avahi: Client changed to state 101
Jul 27 05:02 : avahi: Client is CONNECTING
Jul 27 05:02 : state_file: Loading state file /var/lib/mpd/state
Jul 27 05:02 : rt_opt: realtime_option(rtopt_change_priority): name player_priority   policy 1  priority 32
Jul 27 05:02 : rt_opt: realtime_option(change_priority): name player_priority  policy 1   priority 32
Jul 27 05:02 : rt_opt: realtime_option(rtopt_change_priority): name decoder_priority   policy 1  priority 31
Jul 27 05:02 : rt_opt: realtime_option(rtopt_change_output_priority): name Botic   policy 1  priority 32
Jul 27 05:02 : rt_opt: realtime_option(rtopt_change_thread_priority): name Botic not changed
Jul 27 05:02 : rt_opt: realtime_option(output_timerslack): name Botic   policy 1  timerslack 100
Jul 27 05:02 : rt_opt: set timerslack 100 usec
Jul 27 05:02 : rt_opt: output:Botic  timerslack 100
Jul 27 05:02 : rt_opt: realtime_option(change_priority): name decoder_priority  policy 1   priority 31
Jul 27 05:02 : playlist: play 0:"Track4.aif"
Jul 27 05:02 : decoder_thread: probing plugin sndfile
Jul 27 05:02 : decoder: audio_format=44100:32:2, seekable=true
Jul 27 05:02 : alsa_output: opened default type=PLUG
Jul 27 05:02 : alsa_output: format=S32_LE (Signed 32 bit Little Endian)
Jul 27 05:02 : alsa_output: buffer: size=2..4096 time=45..92880
Jul 27 05:02 : alsa_output: period: size=0..2049 time=22..46440
Jul 27 05:02 : alsa_output: default period_time = buffer_time/4 = 92879/4 = 23219
Jul 27 05:02 : alsa_output: Failed to open "Botic" [alsa]: Error opening ALSA device "default" (snd_pcm_hw_params): Invalid argument
Jul 27 05:02 : output: Failed to open audio output
Jul 27 05:02 : player: problems opening audio device while playing "Track4.aif"
Jul 27 05:02 : alsa_output: opened default type=PLUG
Jul 27 05:02 : alsa_output: format=S32_LE (Signed 32 bit Little Endian)
Jul 27 05:02 : alsa_output: buffer: size=2..4096 time=45..92880
Jul 27 05:02 : alsa_output: period: size=0..2049 time=22..46440
Jul 27 05:02 : alsa_output: default period_time = buffer_time/4 = 92879/4 = 23219
Jul 27 05:02 : alsa_output: Failed to open "Botic" [alsa]: Error opening ALSA device "default" (snd_pcm_hw_params): Invalid argument
Jul 27 05:02 : output: Failed to open audio output
Jul 27 05:02 : rt_opt: realtime_option(rtopt_memlock): stack_reserve 4194304
Jul 27 05:02 : rt_opt: realtime_option(rtopt_memlock): heap_reserve 41943040
Jul 27 05:02 : playlist: queue song 1:"crazylove.wav"
Jul 27 05:02 : client: [0] opened from [::1]:35763
Jul 27 05:02 : client: [0] process command "status"
Jul 27 05:02 : client: [0] command returned 0
Jul 27 05:02 : client: [0] process command "status"
Jul 27 05:02 : client: [0] command returned 0
Jul 27 05:02 : client: [0] process command "currentsong"
Jul 27 05:02 : client: [0] command returned 0
Jul 27 05:02 : client: [0] process command "playlistinfo "1""
The (snd_pcm_hw_params) invalid argument made me suspicious, so I changed /etc/asound.conf so that the pcm!default plug slaved directly to the last output plug. Sound! ...meaning "default" was an acceptable output in mpd.conf, and the issue lies in part with the type-ladspa plugs. If I directed pcm!default only to the simple delay plug but set all the delay parameters at 0, still 'ERROR: Failed to open audio output'.

So I'm trying to learn what parameters SoX or squeezelite are using because they work with the type-ladspa plugins. But the search will have to continue in the AM.
  Reply With Quote
Old 27th July 2015, 06:43 AM   #18
phofman is offline phofman  Czech Republic
diyAudio Member
 
Join Date: Apr 2005
Location: Pilsen
In fact, "default" is the default name. If you did not specify any alsa device, the "default" would have been used. It always works that way.

The problem is with the chain not accepting your parameters.

Why do you have just 1 channel in your format (*:32:1)? Is it for mono chain only (testing)? Your asound.conf looks stereo (x2) though...

I would comment out the format line.

Also the dsd lines are a bit stinky in this setup. Look here https://github.com/lintweaker/mpd-ds...DME-native-DSD Comment them out as well.

The automatically chosen period_time of 23 ms is sane now, unlike the minimum possible (probably just hundreds of microseconds) induced by the original period_size=1 option.

Please post verbose logs for the simplified mpd.conf.
  Reply With Quote
Old 27th July 2015, 08:37 AM   #19
phofman is offline phofman  Czech Republic
diyAudio Member
 
Join Date: Apr 2005
Location: Pilsen
And please post the simplified currently used mpd.conf too, so that we have a common ground. Thanks.
  Reply With Quote
Old 27th July 2015, 03:47 PM   #20
francolargo is offline francolargo  United States
diyAudio Member
 
Join Date: Mar 2007
Location: Twin Cities, MN
Quote:
Originally Posted by phofman View Post
Why do you have just 1 channel in your format (*:32:1)? Is it for mono chain only (testing)? Your asound.conf looks stereo (x2) though...

I would comment out the format line.
Done. I questioned the '1' but it is listed that way in Miero's documentation to force 32 bit output [SQ with volume control in software?].
Quote:
Originally Posted by phofman View Post
Also the dsd lines are a bit stinky in this setup. Look here https://github.com/lintweaker/mpd-ds...DME-native-DSD Comment them out as well.
Done. BTW, I see in the above github reference by lintweaker:
# BOTIC fixup: request the lowest period time
period_time "1"

That's probably the original source of that param... I like the approach to get PCM working first, then see what is happening with DSD. For now, same errors...
Quote:
Originally Posted by phofman View Post
Please post verbose logs for the simplified mpd.conf.
Code:
Jul 27 15:23 : avahi: Initializing interface
Jul 27 15:23 : avahi: Client changed to state 101
Jul 27 15:23 : avahi: Client is CONNECTING
Jul 27 15:23 : state_file: Loading state file /var/lib/mpd/state
Jul 27 15:23 : rt_opt: realtime_option(rtopt_change_priority): name player_priority   policy 1  priority 32
Jul 27 15:23 : rt_opt: realtime_option(change_priority): name player_priority  policy 1   priority 32
Jul 27 15:23 : rt_opt: realtime_option(rtopt_change_priority): name decoder_priority   policy 1  priority 31
Jul 27 15:23 : rt_opt: realtime_option(rtopt_change_output_priority): name Botic   policy 1  priority 32
Jul 27 15:23 : rt_opt: realtime_option(rtopt_change_thread_priority): name Botic not changed
Jul 27 15:23 : rt_opt: realtime_option(output_timerslack): name Botic   policy 1  timerslack 100
Jul 27 15:23 : rt_opt: set timerslack 100 usec
Jul 27 15:23 : rt_opt: output:Botic  timerslack 100
Jul 27 15:23 : rt_opt: realtime_option(change_priority): name decoder_priority  policy 1   priority 31
Jul 27 15:23 : playlist: play 0:"Track4.aif"
Jul 27 15:23 : decoder_thread: probing plugin sndfile
Jul 27 15:23 : decoder: audio_format=44100:32:2, seekable=true
Jul 27 15:23 : alsa_output: opened default type=PLUG
Jul 27 15:23 : alsa_output: format=S32_LE (Signed 32 bit Little Endian)
Jul 27 15:23 : alsa_output: buffer: size=2..4096 time=45..92880
Jul 27 15:23 : alsa_output: period: size=0..2049 time=22..46440
Jul 27 15:23 : alsa_output: default period_time = buffer_time/4 = 92879/4 = 23219
Jul 27 15:23 : alsa_output: Failed to open "Botic" [alsa]: Error opening ALSA device "default" (snd_pcm_hw_params): Invalid argument
Jul 27 15:23 : output: Failed to open audio output
Jul 27 15:23 : player: problems opening audio device while playing "Track4.aif"
Jul 27 15:23 : alsa_output: opened default type=PLUG
Jul 27 15:23 : alsa_output: format=S32_LE (Signed 32 bit Little Endian)
Jul 27 15:23 : alsa_output: buffer: size=2..4096 time=45..92880
Jul 27 15:23 : alsa_output: period: size=0..2049 time=22..46440
Jul 27 15:23 : alsa_output: default period_time = buffer_time/4 = 92879/4 = 23219
Jul 27 15:23 : alsa_output: Failed to open "Botic" [alsa]: Error opening ALSA device "default" (snd_pcm_hw_params): Invalid argument
Jul 27 15:23 : output: Failed to open audio output
Jul 27 15:23 : rt_opt: realtime_option(rtopt_memlock): stack_reserve 1048576
Jul 27 15:23 : rt_opt: realtime_option(rtopt_memlock): heap_reserve 10485760
Jul 27 15:23 : playlist: queue song 1:"crazylove.wav"
Jul 27 15:23 : client: [0] opened from [::1]:55942
Jul 27 15:23 : client: [0] process command "status"
Jul 27 15:23 : client: [0] command returned 0
Jul 27 15:23 : client: [0] process command "status"
Jul 27 15:23 : client: [0] command returned 0
Jul 27 15:23 : client: [0] process command "currentsong"
Jul 27 15:23 : client: [0] command returned 0
Jul 27 15:23 : client: [0] process command "playlistinfo "1""
...and output section of mpd.conf:
Code:
audio_output {
        type            "alsa"
        name            "Botic"
        device          "default"
#       format          "*:32:2"
#       dsd_usb         "no"
#       dsd_native      "yes"
#       dsd_native_type "3"
        priority        "FIFO:32"
#        period_time     "1"
        mixer_type      "software"
#       mixer_device    "default"       # optional
#       mixer_control   "PCM"           # optional
#       mixer_index     "0"             # optional
}
  Reply With Quote

Reply


LADSPA filters for digital crossovers on the BBBHide 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
LADSPA plugin programming for Linux audio crossovers CharlieLaub PC Based 476 14th June 2018 07:38 AM
filters/crossovers a little understanding needed charlie2 Multi-Way 3 19th February 2015 01:33 PM
Any new digital filters ? percy Digital Source 17 20th July 2008 12:39 AM
1st order filters/crossovers with proper drivers compared to full range? tech.knockout Multi-Way 8 15th May 2006 06:52 AM
Active crossovers and notch filters Saurav Multi-Way 15 26th February 2004 09:25 PM


New To Site? Need Help?

All times are GMT. The time now is 09:22 AM.


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