Moode Forum
[SOLVED] CamillaDSP - MPD unable to play flat.yml - Printable Version

+- Moode Forum (https://moodeaudio.org/forum)
+-- Forum: moOde audio player (https://moodeaudio.org/forum/forumdisplay.php?fid=3)
+--- Forum: Support (https://moodeaudio.org/forum/forumdisplay.php?fid=7)
+--- Thread: [SOLVED] CamillaDSP - MPD unable to play flat.yml (/showthread.php?tid=3727)

Pages: 1 2 3 4


RE: CamillaDSP - MPD unable to play flat.yml - katariat - 05-05-2021

Hi @bitlab ..just checking if you got a chance to look at the logs/ output code and any help or guidance. Appreciate the help


RE: CamillaDSP - MPD unable to play flat.yml - bitlab - 05-06-2021

@katariat nothing in the logs that clarifies the issues. Only the error the following error, but that provides not enough info:
Code:
May 01 13:32 : exception: Failed to play on "ALSA Default" (alsa): snd_pcm_poll_descriptors_revents() failed: No such device


If you feel comfortable with the command-line terminal, you could try to increase the log output of camilladsp by editing the file /etc/alsa/conf.d/camilladsp.conf (requires sudo).
Make -v argument comment and add the -l debug to the section below:

Code:
###############################################
# Uncomment the following lines,              #
# if you want more detailed logging output in #
# /var/log/mpd/log                            #
###############################################
  cargs [
#        -v
       -l debug
       -p "1234"
       -a "0.0.0.0"
  ]

}

Start playback again and the look/post the /var/log/mpd/log again.

In my case this looks like:
Code:
May 06 23:11 : alsa_output: opened _audioout type=COPY
May 06 23:11 : alsa_output: buffer: size=3840..16384 time=80000..341334
May 06 23:11 : alsa_output: period: size=1920..2048 time=40000..42667
May 06 23:11 : alsa_output: default period_time = buffer_time/4 = 341333/4 = 85333
May 06 23:11 : alsa_output: format=S24_LE (Signed 24 bit Little Endian)
May 06 23:11 : alsa_output: buffer_size=16384 period_size=2048
May 06 23:11 : output: opened "ALSA Default" (alsa) audio_format=48000:24:2
May 06 23:11 : output: converting in=48000:16:2 -> f=48000:24:2 -> out=48000:24:2
May 06 23:11 : client: [4] command returned 0
May 06 23:11 : client: [4] process command list
May 06 23:11 : client: process command "status"
May 06 23:11 : client: command returned 0
May 06 23:11 : client: process command "currentsong"
May 06 23:11 : client: command returned 0
May 06 23:11 : client: [4] process command list returned 0
May 06 23:11 : client: [2] process command "status"
May 06 23:11 : client: [2] command returned 0
May 06 23:11 : client: [2] process command "currentsong"
May 06 23:11 : client: [2] command returned 0
May 06 23:11 : client: [4] closed
May 06 23:11:00.366 DEBG Read config file Some("/usr/share/camilladsp/working_config.yml"), module: camilladsp
May 06 23:11:00.368 DEBG Apply override for samplerate: 48000, module: camillalib::config
May 06 23:11:00.368 DEBG Samplerate changed, adjusting chunksize: 1024 -> 1024, module: camillalib::config
May 06 23:11:00.369 DEBG Scale extra samples: 0 -> 0, module: camillalib::config
May 06 23:11:00.369 DEBG Apply override for capture channels: 2, module: camillalib::config
May 06 23:11:00.369 DEBG Apply override for capture sample format: S24LE, module: camillalib::config
May 06 23:11:00.370 DEBG Config is valid, module: camilladsp
May 06 23:11:00.370 DEBG Start websocket server on 0.0.0.0:1234, module: camillalib::socketserver
May 06 23:11:00.371 DEBG Wait for config, module: camilladsp
May 06 23:11:00.372 DEBG Config ready, module: camilladsp
May 06 23:11:00.372 DEBG Using channels [true, true], module: camilladsp
May 06 23:11:00.372 DEBG Build new pipeline, module: camillalib::filters
May 06 23:11:00.373 DEBG build filters, waiting to start processing loop, module: camillalib::processing
May 06 23:11:00.373 DEBG Capture thread ready to start, module: camilladsp
May 06 23:11:00.378 DEBG Opening audio device "hw:1,0" with parameters: HwParams { channels: Ok(2), rate: "Ok(48000) Hz", format: Ok(S16LE), access: Ok(RWInterleaved), period_size: "Ok(480) frames", buffer_size: "Ok(2048) frames" }, SwParams(avail_min: Ok(480) frames, start_threshold: Ok(544) frames, stop_threshold: Ok(2048) frames), module: camillalib::alsadevice
May 06 23:11:00.379 DEBG Audio device "hw:1,0" successfully opened, module: camillalib::alsadevice
May 06 23:11:00.379 DEBG Playback thread ready to start, module: camilladsp
May 06 23:11:00.380 DEBG Both capture and playback ready, release barrier, module: camilladsp
May 06 23:11:00.380 DEBG Starting playback loop, module: camillalib::alsadevice
May 06 23:11:00.380 DEBG starting captureloop, module: camillalib::filedevice
May 06 23:11:00.380 DEBG starting captureloop, module: camillalib::filedevice
May 06 23:11:00.381 INFO Starting playback from Prepared state, module: camillalib::alsadevice
May 06 23:11 : client: [2] process command "lsinfo "SDCARD/Stereo Test/LRMonoPhase4.flac""
May 06 23:11 : client: [2] command returned 0
May 06 23:11 : client: [2] process command "close"
May 06 23:11 : client: [2] command returned 4
May 06 23:11 : client: [2] closed
May 06 23:11 : client: [5] opened from 127.0.0.1:37386
May 06 23:11 : client: [5] process command "status"
May 06 23:11 : client: [5] command returned 0
May 06 23:11 : client: [5] process command "idle"
May 06 23:11 : client: [5] command returned 1
May 06 23:11 : client: [6] opened from 127.0.0.1:37390
May 06 23:11 : client: [6] process command "playlistinfo"
May 06 23:11 : client: [6] command returned 0
May 06 23:11 : client: [6] process command "close"
May 06 23:11 : client: [6] command returned 4
May 06 23:11 : client: [6] closed
May 06 23:11 : client: [7] opened from 127.0.0.1:37394
May 06 23:11 : client: [7] process command "stop"
May 06 23:11 : playlist: stop
May 06 23:11 : player: played "SDCARD/Stereo Test/LRMonoPhase4.flac"
May 06 23:11:03.212 DEBG End of file, read only 4096 of 8192 bytes, module: camillalib::filedevice
May 06 23:11:03.232 DEBG Reached end of file, module: camillalib::filedevice
May 06 23:11:03.252 INFO Capture finished, module: camilladsp
May 06 23:11:03.321 INFO Playback finished, module: camilladsp
May 06 23:11:03.322 DEBG Restarting with new config, module: camilladsp
May 06 23:11:03.322 DEBG Wait for config, module: camilladsp
May 06 23:11:03.322 DEBG No config and not in wait mode, exiting!, module: camilladsp

suc6!


RE: CamillaDSP - MPD unable to play flat.yml - bitlab - 05-06-2021

@katariat correction the -v is also enough, but mpd needs to be restarted. (it is sucesfull if you see the DEBG message in log)


RE: CamillaDSP - MPD unable to play flat.yml - windows97 - 05-12-2021

How exactly was this solved? I'm running the latest version of moode and when I'm heading to config CamillaDSP the flat pipeline is red-crossed, and so the others in the list as well. How do I go forward?


RE: CamillaDSP - MPD unable to play flat.yml - gingerbeer - 05-12-2021

I was OP so when my setup was working I changed the flag on the thread. Others have tried to do something similar and aren’t quite able to get theirs working yet, so the discussion is ongoing (which is fine by me, just explaining the title flag)


RE: CamillaDSP - MPD unable to play flat.yml - windows97 - 05-12-2021

(05-12-2021, 09:02 AM)gingerbeer Wrote: I was OP so when my setup was working I changed the flag on the thread. Others have tried to do something similar and aren’t quite able to get theirs working yet, so the discussion is ongoing (which is fine by me, just explaining the title flag)

Aaah, I see, thank you. So there's still ongoing on how to completely resolve this?

A side question, is there a way to still access moode gui while streaming from Spotify or Airplay? I'd like to fiddle with eq while playing, but since the window is blocked by "disconnect" in the browser, it's not possible simultaneousley.


RE: CamillaDSP - MPD unable to play flat.yml - jensgk - 05-12-2021

(05-12-2021, 09:11 AM)windows97 Wrote: A side question, is there a way to still access moode gui while streaming from Spotify or Airplay? I'd like to fiddle with eq while playing, but since the window is blocked by "disconnect" in the browser, it's not possible simultaneousley.

It is only the album view that is blocked while streaming, - the camilladsp specific windows are not blocked.
If you keep the camilladsp specific windows open you can change config on the fly.
Additionally, if you keep the camilladsp pipeline editor window open, you can see the current bitrate, and also some almost real-time VU meters moving :-)


RE: CamillaDSP - MPD unable to play flat.yml - katariat - 05-12-2021

Hi @jensgk, as Gingerbeer mentioned, he was the original OP and i was piggybacking his thread to see if i could leverage Camilladsp and or its GUI. Unfortunately i still haven't been able to make it work through MoOde. Having said that i was able to get it working as a different step up to still my needs. My understanding from your post is that your needs might be similar to mine. Some how i think the issue is Alsa and or loopback and how it interacted with my sound card - atleast for me.

I wanted a headless setup to play Spotify and or airplay with camilladsp for crossover/ DSP. I used Shaiport-Sync (Airplay) and configured it to pipe the data to a folder and link that folder as the capture for Camilladsp. Rest everything else is the same. The plugin that moOde uses allows to capture the playback from Stdin....in my case i used shairport-sync and not depend on moOde or any MPD configurations.

Happy to share the code/ set up if needed. It was very simple honestly once you get it work :-).


RE: CamillaDSP - MPD unable to play flat.yml - bitlab - 05-12-2021

@windows97 The problem "MPD unable to play flat.yml" is not really a specifc issue to solve. It a general way of saying that it 'just' doesn't work, so there will not not be a single solution to solve it. In case of the OP the cause was found and solved.

If the config file contains a red cross at the moode camilladsp config page (like with selecting the config and press the check button), it can be the case the config file is corrupt or invalid.
It this is the case can you download the flat config and post it here, thanks?

@katariat any reason why you didn't provided the requested information anymore?

There is a hotfix available to enable toggling of the requested debug information from the moode camilladsp config page:
Code:
sudo wget -q http://moodeaudio.org/test/camilla_hotfix1.zip
sudo unzip -q ./camilla_hotfix1.zip
sudo ./camilla_hotfix1/install.sh
sudo rm -rf ./camilla_hotfix1*
After this you can change the log level to verbose.

And if the camilladgui configuration is valid (pipeline configuration > listbox > select config > press button check), then:

Some of the problems can come of that the playback device used in the camilladsp config uses the "hw:x,0" instead of the "plughw:x,0"device.
You can check this by:
  • On the moode camilladsp config page diable the option of patch the default device in the general section.
  • On the moode camilladsp config page pipelineditor editor section; eanble expert mode and flip status to on.
  • On the moode camilladsp config page pipelineditor editor section; press open editor
  • In the camillagui editor on the devices tab section playback device change 'hw:x,0' to 'plughw:x,0'



RE: CamillaDSP - MPD unable to play flat.yml - windows97 - 05-14-2021

(05-12-2021, 07:47 PM)bitlab Wrote: @windows97 The problem "MPD unable to play flat.yml" is not really a specifc issue to solve. It a general way of saying that it 'just' doesn't work, so there will not not be a single solution to solve it. In case of the OP the cause was found and solved.

If the config file contains a red cross at the moode camilladsp config page (like with selecting the config and press the check button), it can be the case the config file is corrupt or invalid.
It this is the case can you download the flat config and post it here, thanks?

@katariat any reason why you didn't provided the requested information anymore?

There is a hotfix available to enable toggling of the requested debug information from the moode camilladsp config page:
Code:
sudo wget -q http://moodeaudio.org/test/camilla_hotfix1.zip
sudo unzip -q ./camilla_hotfix1.zip
sudo ./camilla_hotfix1/install.sh
sudo rm -rf ./camilla_hotfix1*
After this you can change the log level to verbose.

And if the camilladgui configuration is valid (pipeline configuration > listbox > select config > press button check), then:

Some of the problems can come of that the playback device used in the camilladsp config uses the "hw:x,0" instead of the "plughw:x,0"device.
You can check this by:
  • On the moode camilladsp config page diable the option of patch the default device in the general section.
  • On the moode camilladsp config page pipelineditor editor section; eanble expert mode and flip status to on.
  • On the moode camilladsp config page pipelineditor editor section; press open editor
  • In the camillagui editor on the devices tab section playback device change 'hw:x,0' to 'plughw:x,0'

@bitlab Here is how my flat.yml looks like:


devices:
  samplerate: 44100
  chunksize: 1024
  queuelimit: 1
  capture:
    type: File
    channels: 2
    filename: "/dev/stdin"
    format: S16LE
  playback:
    type: Alsa
    channels: 2
    device: "hw:2,0"
    format: S32LE
mixers:
  stereo:
    channels:
      in: 2
      out: 2
    mapping:
      - dest: 0
        sources:
          - channel: 0
            gain: -3
            inverted: false
      - dest: 1
        sources:
          - channel: 1
            gain: -3
            inverted: false
pipeline:
  - type: Mixer
    name: stereo


Now I can see some mismatches, but the thing is also that I seem to not be able to edit without getting the "500 error, server got itself in trouble message."
It's also that every time I save, I cannot load the configuration back into CamillaDSP and the gui to edit, so I have to start from zero again, building the pipeline and everything. At least it doesn't load into the gui editor.

My platform is:

Release: 7.2.1 2021-05-06
RaspiOS: 10.6
Linux kernel: 5.4.77+ #1371
Platform: Pi-B 2.0 256MB
Architecture: armv6l
MPD version: 0.22.6_p0x3