Way to play and control music directly from server (webUI or remote controller) to the connected usb DAC

  • Should not, except for strange configs in your container configs.

    Oh man, I do not know If I should or should not do this :D

    I have a one, additional question about running - let's named it - "additional applications" - is it possible to create a virtual machine or something

    similar (Docker, right, but as we know from this thread it is not quite sufficient for jobs like this) which will work independent than OMV system and install there some complete hifi system such as HiFiBerry or piCorePlayer?

  • As first, thanks to all users which have been involved into this thread. Especially chente and Zoki. I really appreciate that. Thank you!


    The last stand for me - before I get rid of all it from my OMV server - is to try to configure Logitech Media Server with Squeezelite. Maybe we have here an user who is familiar with this software and will give me a hand with proper configuration.

    So I have this docker-compose for the LMS for Docker:

    LMS container is deployed and running, but before accessing via http://serverip:9001 I am removing additional PGID:100 Env variable which was added by default (?) to the container setup. Anyway, the webGUI container loading with or without it.


    After installation I have found in the internet that I need to install plugin (inside the LMS) named LocalPlayer, description of the plugin is:

    Zitat

    Local playback from your server computer using the Squeezelite software emulator. This plugin uses Squeezelite to playback through the audio output of your server computer. The player can be controlled from the server's web interface or other Squeezebox controller applications. Note: the plugin will only support servers or NAS devices with Intel or ARM processors.

    so the LocalPlayer plugin is installed and updated (there is an update available just after installation).


    Restart of the LMS container (just to be sure everything is OK).


    Next, as the LocalPlayer description said, we need to install squeezelite package from debian repositories (I believe there is no need to add other repository, as the squeezelite-pa repository is available in Debian's repo). So under bash:

    (Polish and English language are mixed up in my SSH, I don't know why, sorry) - all installed packages are: libfaad2, liblirc-client0, libmad0, libportaudio2, squeezelite-pa.


    Restart of the LMS container (to communicate with newly installed packages - not sure if this is required or not).


    After opening LMS webGUI my OMV server name appears in the upper right dropdown (where all available devices are listed; it is not listed there when squeezelite is not installed):


    So let's try to play some music:



    Music can be loaded and looks like it is played, but no sound on the iFi Zen Dac.

  • (continuation of the post)


    So let's check if squeezelite is runing and if it see my device:

    As you can see there are some weird errors. I believe pcm-related errors comes from built-in audio card, which currently is disabled in my bios.

    On the Output devices: section my device is listed in 5 row: 5 - iFi (by AMR) HD USB Audio: - (hw:1,0) [ALSA], so looks like the squeezelite recognized it correctly.

  • (continuation of the post)


    As there is an option -o to set the output device, I have tried to run squeezelite -o 5 command. Output:

    and looks like process is hang, or waiting for something. After about 5 minutes of waiting I stopped it with CTRL+Z.

    iFi is still on, but output of squeezelite -l looks as follow now:

    As you can see my device dissapeared. I need to reconnect it to be recognized by squeezelite -l again.


    So I am stuck here and do not know what should I do next.


    Please advise :)

  • So I re-check all the output I have provided you and:


    1. sudo apt-get install libjack0 - to get rid of:

    - 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.

    2. sudo apt-get install alsa-tools alsa-utils - it is not installed, so that is why it keeps erroring with all ALSA stuff.

    3. uninstalled squeezelite-pa and installed squeezelite.


    And now it looks as follows:

    But if i try to select device using aplay --device plughw:CARD=Audio,DEV=0:

    Code
    $ > aplay --device plughw:CARD=Audio,DEV=0
    
    ^Z
    [4]+  Zatrzymano              aplay --device plughw:CARD=Audio,DEV=0
    $ > aplay --device plughw:CARD=Audio,DEV=0
    aplay: main:828: audio open error: Urządzenie lub zasoby zajęte

    first it hangs up, and after stoping it and trying again it indicates, that device is busy.


    It looks almost the same for squeezelite -o plughw:CARD=Audio,DEV=0:

    Code
    $ > squeezelite -o plughw:CARD=Audio,DEV=0
    ^Z
    [6]+  Zatrzymano              squeezelite -o plughw:CARD=Audio,DEV=0
    $ > squeezelite -o plughw:CARD=Audio,DEV=0
    [13:57:15.289864] test_open:294 playback open error: Device or resource busy
    [13:57:15.289902] output_init_common:381 unable to open output device
  • Additional information:


    I borrowed RPI3B+, installed piCorePlayer 8.1.0 standard version. I managed to configure it to communicate (and play music) to my iFi Zen Dac without any problems.


    On my OMV machine I have checked also the other dac that I have own - Lotoo Paw S1. And there is exactly the same situation as for iFi:

    So now I am 100% sure that this problem is not related to my DAC devices but with my OMV system.


    Is anyone here familiar with ALSAa and overall all audio based stuff working under OMV?

  • No idea about audio, but ypu can use strace to check where it hangs.

    If you got help in the forum and want to give something back to the project click here (omv) or here (scroll down) (plugins) and write up your solution for others.

  • strace aplay -D plughw:CARD=PAWS1,DEV=0 should tell you on which call it hangs.

    If you got help in the forum and want to give something back to the project click here (omv) or here (scroll down) (plugins) and write up your solution for others.

  • strace aplay -D plughw:CARD=PAWS1,DEV=0 should tell you on which call it hangs.

    I got it, can I attach here .txt file with full output? Is it safe?

    Last lines before hang:

  • I am leaving this problem right now for Raspberry Pi, but I will check if it would appear again on freshly installed instance of OMV:


    - if no - is there a way to safely reinstall OMV system without loosing all setup, data, etc.?

    - if yes - where should I report this problem?

  • I borrowed RPI3B+, installed piCorePlayer 8.1.0 standard version. I managed to configure it to communicate (and play music) to my iFi Zen Dac without any problems.

    And you did this with the same setting:

    RaspiOS Lite Buster with OMV5?

    Or the IMG just install the needed files for that specific case?


    So now I am 100% sure that this problem is not related to my DAC devices but with my OMV system.

    Is anyone here familiar with ALSAa and overall all audio based stuff working under OMV?

    I've lost track of the whole thread but this really makes no sense.


    If I remember, you're trying to do this via docker, correct?

    So, why would OMV be at fault for you not beeing able to pass the DAC to docker?


    The DAC is controlled by the underlaying OS (RaspiOS or Debian) and then is passed to the docker container.


    If you really want to figure out where it's going wrong, you should start asking in their respective foruns.

    Either on the Pi/Debian forum or the github page of the image container you want to use.


    Seasons Greetings

  • So after my last post, at about the end of the previous year I have finally managed to get it to work. I am not 100% sure now if the below scenario is correct - I was not have time to write it just after configuring, so now I may not remember it exactly - sorry for that. But If you guys want to achieve this and encounter some problems during it - please share with us - we will try to resolve it together :)


    1. As first I completely removed the pulseaudio and squeezelite services from my system using - as far as I remember:

    sudo apt-get remove pulseaudio and sudo apt-get remove squeezelite. For both uninstallation process there was an information about dependencies packages which will not being removed and user need to remove it manually using apt-get autoremove. After performing autoremove command I rebooted my machine.

    2. As second I reinstalled the pulseaudio. Just after installation I have found that the communication with my device is still problematic (the device or resource busy problem) and there are a lot of other, strange problems. I have finally found a solution for this - removing the ~./config/pulse/default.pa file and performing the pulseaudio -vvvvv comand to restart/reload the pulseaudio. After that I have finally working pulseaudio process with ability to comunicate with my device without problems (eg. setting volume).

    3. Now there should be some steps with installing packages squeezelite and squeezelite-pa, installing docker version of the Logitech Media Server (using image lmscommunity/logitechmediaserver) and blacklisting the built-in audio card of my machine. But I do not remember now all the steps which I performed. While messing around with it I noticed that when using squeezelite or squeezelite-pa packages I am able to play music in Logitech Media Server to my device but audio comes from it only after clicking on the progress bar of currently playing track (in any place on it). No audio for just playing selected track or skipping tracks. So I kept looking for an solution and finally I found it.. the giof71/squeezelite image for Docker :D

    4. giof71/squeezelite-docker - the description is simple and clear. I have not tested it with the SQUEEZELITE_AUDIO_DEVICE=default value yet, but I know that my device is found under my system as hw:CARD=Audio,DEV=0 (or plughw:CARD=Audio,DEV=0) so I leaved it like this. The SQUEEZELITE_SERVER_PORT leave empty for auto discover of your LMS server or place the IP:port addres here. SQUEEZELITE_NAME=your_custom_endpointdevice_name - name it as you want. I have named it just iFi Zen Dac. Deploy the container. INFO: for the auto discovery function you should have already configured Logitech Media Server. Otherwise the container need to be restarted after configuring LMS.

    5. Installing Logitech Media Server using docker/portainer. I have used following image: lmscommunity/logitechmediaserver - this is an official image. The configuration is also simple. Just after installing you should at least load the library im LMS settings. This step may be performed before installing squeezelite from Step 4.


    Finally - test the connection with your device. In Logitech Media Server your device custom name should be now selectable. Sleect it, turn it ON (physically and in Logitech Media Server) and play some music. Music should be played without problems right now.


    Now it is time for configuration of LMS - as you may found there were A LOT of options and addons there :)


    Thanks!


    The last word

    I am very happy with my setup right now. I am able to play my music or radio stations directly from my server. The quality is superb - squeezelite and LMS are bit-perfect capable (as default). The GUI of the LMS (especially in the Material skin) is great and simple to use. It is a lot responsed and user-friendly than Airsonic. And running it on my server machine instead of RaspberryPi 0W or Raspberry Pi 3B+ in final effect is a lot quicker and responsive.

  • chente

    Hat das Label gelöst hinzugefügt.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!