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

Simple DLNA Renderer for Odroid C1+...or not?
Simple DLNA Renderer for Odroid C1+...or not?
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 17th September 2020, 03:03 PM   #21
linuxfan is offline linuxfan  Australia
diyAudio Member
 
Join Date: Dec 2007
Quote:
Originally Posted by linuxfan View Post
I can give you the manual commands which will automatically mount your NAS each time DietPi boots.
It appears to me that you have already configured the NAS to automount, but let's check with this command -
Code:
sudo nano /etc/fstab
You should see this line -
Code:
//<IP-address-of-NAS>/<shared-directory-on-NAS>/   /mnt/dsmusic   cifs   user=<SMBuser>,pass=<SMBpassword>,cache=none,iocharset=utf8   0 0
If that line does not exist, create it, and save.
If that line already exists, you can modify it to add improvements - "iocharset=utf8" allows the use of special characters - useful for the German language!

Quote:
Originally Posted by masterkw View Post
/mnt/dsmusic
the directory structure is made up of several subdirectories (artist's folder for each album).
I think (?) that MPD will allow sub-directories within the main music directory, but we will soon see. If it fails, there's another method where you can create symlinks.

OK, now it's time to configure MPD. Open the MPD configuration file in nano -
Code:
sudo nano /etc/mpd.conf
The first thing to set is where to access the music -
Code:
music_directory   "/mnt/dsmusic"
Next, you will probably see this line -
Code:
bind_to_address “localhost”
This means that MPD will only allow client apps to connect from the same computer on which MPD is running ... and this is no good, we want to connect from phones/tablets. So change this line to -
Code:
bind_to_address “any”
Next, you established during DietPi setup that your USB audio interface is seen as "hw:1,0"
So under "audio_output {" you want -
Code:
device          "hw:1,0"
also
Code:
type		"alsa"
and to ensure that MPD never does its own software volume adustment - so that your output is bit-perfect:
Code:
mixer_type      "none"
Save the changes in nano.
Reboot.
Try to connect with an MPD client app ... for this you will need to know the IP address of your Odroid C1. If you have not done so already, it may be worth running the DietPi configuration again to set a manual IP address.
  Reply With Quote
Old 17th September 2020, 03:43 PM   #22
linuxfan is offline linuxfan  Australia
diyAudio Member
 
Join Date: Dec 2007
Must sleep now.
  Reply With Quote
Old 17th September 2020, 05:02 PM   #23
masterkw is offline masterkw  Germany
diyAudio Member
 
masterkw's Avatar
 
Join Date: Sep 2020
Sleep well! Meanwhile I do my best.
  Reply With Quote
Old 17th September 2020, 05:56 PM   #24
phofman is offline phofman  Czech Republic
diyAudio Member
 
Join Date: Apr 2005
Location: Pilsen
The infamous systemd may not be present on the NAS (yet) but I would recommend to take a safe defensive approach and consider using the mount option "nofail" in non-critical fstab entries already. Systemd has very unfortunate default options - e.g. failing boot when a no-nofail or no-noauto entry in fstab fails to mount - really annoying when upgrading from a tolerant non-systemd version to a newer version which has adopted systemd (hello debian...). The same for the default indefinite timeout on network interfaces startup when the network cable is disconnected or when the remote DHCP server does not run... but that is a different story.
  Reply With Quote
Old 18th September 2020, 12:10 AM   #25
linuxfan is offline linuxfan  Australia
diyAudio Member
 
Join Date: Dec 2007
Oh, if nano is not available in DietPi, you can install it with this command -
Code:
sudo apt-get install nano
  Reply With Quote
Old 18th September 2020, 08:52 AM   #26
masterkw is offline masterkw  Germany
diyAudio Member
 
masterkw's Avatar
 
Join Date: Sep 2020
At some point I was struggled last night. Now, things going faster, I’ve used the time for a clean install.

Side note: once again, I had to flash mSDHC with balena etcher on my wife’s windows machine. Failed on my mac, other pre-packaged distributions work.

So what, these are my results:

[+]
  • network directory set (fstab)
  • terminal acceess granted
  • edit mpd conf (nano works!)
  • alsa config
  • installed app „MaximumMPD“ on iPad & config
  • —> access to music directory, built up library
  • installed myMPD for testing purposes --> access to web gui but no connection to MPD

[-]...?
  • no sound/playback
  • only static samplerate (@384kHz) in amp display even if it‘s just connected (no playback) - RuneAudio does it dynamic starting at 44,1kHz
  • do I have to set the amp‘s maximum bit-/samplerate in alsa?
  • found „upscaling“ option in mpd.conf —> disabeling? (don‘t want it)
  • sometimes i get input/output erros (sdcard?)
  • any other settings in configs that I have overlooked?

BTW, I‘m getting fun doing all this on my „old days“ ...and with a little DOS in mind. But is it all worth it while RuneAudio does the things out of the box? As a perfectionist I would say „yes“.
  Reply With Quote
Old 18th September 2020, 01:05 PM   #27
masterkw is offline masterkw  Germany
diyAudio Member
 
masterkw's Avatar
 
Join Date: Sep 2020
Config handling is clear so I think it's easier to show my configs for details:

My changes/adjustments

mpd.conf

Code:
music_directory "/mnt/dsmusic"
playlist_directory "/mnt/dietpi_userdata/Music"
db_file "/mnt/dietpi_userdata/.mpd_cache/db_file"
log_file "/var/log/mpd/mpd.log"
pid_file "/run/mpd/pid"
state_file "/mnt/dietpi_userdata/.mpd_cache/state"
sticker_file "/mnt/dietpi_userdata/.mpd_cache/sticker.sql"

#user "mpd" # Set via systemd unit to preserve supplementary group permissions i.e. "dietpi"$

bind_to_address "/run/mpd/socket"
bind_to_address "any"

log_level "default"
#gapless_mp3_playback "yes"
#save_absolute_paths_in_playlists "no"
metadata_to_use "artist,album,title,track,name,genre,date"
auto_update "yes"
#auto_update_depth "3"

#follow_outside_symlinks "yes"
#follow_inside_symlinks "yes"

zeroconf_enabled "yes"
zeroconf_name "DietPi MPD"

#password "password@read,add,control,admin"
#default_permissions "read,add,control,admin"

input {

plugin "curl"
#proxy "proxy.isp.com:8080"
#proxy_user "user"
#proxy_password "password"

}

connection_timeout "30"
max_connections "4"
#max_playlist_length "16384"
#max_command_list_size "2048"
#max_output_buffer_size "8192"

filesystem_charset "UTF-8"

# Audio Output / Processing

# Disabled to allow native DSD output
#replaygain "track"
#replaygain_preamp "8"
#volume_normalization "yes"

audio_buffer_size "2048"
#buffer_before_play "10%"

audio_output {

type "alsa"
name "Audiolab m-one"
device "hw:1,0"
format "44100:16:2"
mixer_type "none"
#mixer_control "PCM"
#mixer_index "0"

# Disable DSD DoP MPD 0.19
dop "no"

}

# Realtime audio conversion & upscaling
#audio_output_format "44100:16:2"
#samplerate_converter "soxr very high"
fstab

Code:
Please use "dietpi-drive_manager" to setup mounts
#----------------------------------------------------------------
# NETWORK
#----------------------------------------------------------------
//192.168.178.3/music /mnt/dsmusic cifs username=xxx,password=yyy,iocharset=utf8,uid=dietpi,gid=dietpi,file_mode=0770,dir_mode=0770,vers=3.1.1,_netdev,nofail,n$ <-- by drive manager/settings 

#----------------------------------------------------------------
# TMPFS
#----------------------------------------------------------------
tmpfs /tmp tmpfs size=1024M,noatime,lazytime,nodev,nosuid,mode=1777
tmpfs /var/log tmpfs size=50M,noatime,lazytime,nodev,nosuid,mode=1777

#----------------------------------------------------------------
# MISC: ecryptfs, vboxsf (VirtualBox shared folder), gluster, bind mounts
#----------------------------------------------------------------


#----------------------------------------------------------------
# SWAPFILE
#----------------------------------------------------------------
/var/swap none swap sw 0 0

#----------------------------------------------------------------
# PHYSICAL DRIVES
#----------------------------------------------------------------
UUID=d524574c-c83a-48c3-9211-b8eed72ec103 / ext4 noatime,lazytime,rw 0 1
UUID=C3D7-565C /boot vfat noatime,lazytime,rw 0 2
What else is to change?



===
Edit:
===

Aaaah...run
Code:
dietpi-services
Result:

...althoug autostart is set

Code:
┤ DietPi-Services ├──────────────────────────────┐
│ Please select an option or program:                                          │
│                                                                              │
│                         ●─ Single Service Options ─────────────●             │
│            avahi-daemon : active | Affinity 0-3                              │
│            mpd          : failed | Affinity 0-3                              │
│            cron         : active | Affinity 0-3                              │
│            dropbear     : active | Affinity 0-3                              │

=====
Edit #2
=====

Could restart it manually

Last edited by masterkw; 18th September 2020 at 01:17 PM.
  Reply With Quote
Old 18th September 2020, 01:19 PM   #28
linuxfan is offline linuxfan  Australia
diyAudio Member
 
Join Date: Dec 2007
Quote:
Originally Posted by masterkw View Post
I had to flash mSDHC with balena etcher on my wife’s windows machine. Failed on my mac
Quote:
Originally Posted by masterkw View Post
sometimes i get input/output errors
Mmm, that's not good. I seem to recall that for Win32 Disk Imager give a 100% reliable image-write, it was first necessary to format the microSD card with FAT32. Maybe this is also true for balenaEtcher?
I have also read that image-writes can be faulty with certain USB adapters - maybe you could try a different adapter?
But I must say, I'm concerned about the filesystem integrity of your microSD card.

Quote:
Originally Posted by masterkw View Post
these are my results:
installed app "MaximumMPD" on iPad & config
--> access to music directory, built up library
That's great. Your client app can connect to the MPD server, and successfully read its database. Good start.

Quote:
Originally Posted by masterkw View Post
no sound/playback
That's bad, but not necessarily MPD's fault. DietPi's ALSA setup might be bad.
Some diagnosis is in order:
Do you have some mp3 files in your music library? Try to play an mp3 file with a command line player - madplay or mpg123
Code:
sudo madplay /mnt/dsmusic/<some-other-directory>/mymusicfile.mp3
If silence, run
Code:
sudo alsamixer
and check that the various bars, especially the "master" bar, does not have "MM" listed at the bottom - this means mute. You can un-mute by pressing "m".
  Reply With Quote
Old 18th September 2020, 01:31 PM   #29
wealas is offline wealas
diyAudio Member
 
Join Date: Apr 2017
You seem to have hard-coded the audio output format. I'm sure your dac can handle more than 44khz 16bit music. Just comment that part out.
  Reply With Quote
Old 18th September 2020, 01:48 PM   #30
linuxfan is offline linuxfan  Australia
diyAudio Member
 
Join Date: Dec 2007
Yes, wealas is correct.
Of course ALSA can mess with the audio output, too - resample, software volume adjustment,
but this can be disabled with the following configuration in /etc/asound.conf
Code:
pcm.!default {
    type hw
    card 0
}

ctl.!default {
    type hw          
    card 0
}

Last edited by linuxfan; 18th September 2020 at 01:50 PM. Reason: additional info
  Reply With Quote

Reply


Simple DLNA Renderer for Odroid C1+...or not?Hide 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
Network media renderer DAC, ABC-PCB Lazy Cat Swap Meet 12 28th October 2014 10:49 PM
IC/FS:edel media renderer mcluxun Swap Meet 3 25th October 2014 07:23 PM
FS: Edel Media Renderer (New) MisterRogers Swap Meet 1 28th December 2013 11:44 AM
DIY Airplay/DLNA denny9167 Digital Source 0 15th December 2013 06:19 PM
Pull content and Push to media renderer jan.didden PC Based 2 1st June 2013 12:38 PM


New To Site? Need Help?

All times are GMT. The time now is 04:41 PM.


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