WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: shairport, minidlna, mpd or mopidy for TC6?  (Read 23654 times)

Offline ingotee

  • Newbie
  • *
  • Posts: 20
Re: shairport, minidlna, mpd or mopidy for TC6?
« Reply #15 on: March 20, 2015, 12:40:15 PM »
I will dumping gmediarender - it just seems to be too old.
Trying the fork gmrender-resurrect next.

alas, it seems I still have a lot to learn.

Code: [Select]
tc@itGhetto2:~/gmedia/gmrender-resurrect$ ./autogen.sh
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force
autoreconf: configure.ac: tracing
autoreconf: configure.ac: creating directory config
autoreconf: configure.ac: not using Libtool
autoreconf: running: /usr/local/bin/autoconf --force
configure.ac:59: error: possibly undefined macro: AC_SUBST
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
« Last Edit: March 20, 2015, 12:48:53 PM by ingotee »

Offline ingotee

  • Newbie
  • *
  • Posts: 20
Re: shairport, minidlna, mpd or mopidy for TC6?
« Reply #16 on: March 21, 2015, 01:23:16 AM »
Ok, consider this thread closed.

Thanks to Béla I have shairport and minidlna up and running.

I did not manage to build the seemingly obsolete gmediarender and the younger gmrender-resurrect.

But I managed to build mpd, although with a lot of the more exotic and some desirable plugins missing. I will try and make an mpd-minimal extension and submit it to Béla.

And then I will have a shot at a plugin for mpd that makes it a upnp/dlna renderer. I'll cover that in a separate thread.

Thanks for all the help and for being patient with my dumb questions while I am still learning.

Cheers,
Ingo

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: shairport, minidlna, mpd or mopidy for TC6?
« Reply #17 on: March 21, 2015, 01:28:29 AM »
Hi Ingo

in the mean time added mpd.tcz to the repo, please try. It is built with all features aavailable with current repo.

Minimal version welcome!

Béla
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline ingotee

  • Newbie
  • *
  • Posts: 20
Re: shairport, minidlna, mpd or mopidy for TC6?
« Reply #18 on: March 21, 2015, 01:55:40 AM »
Béla, you are just great. I will check out your mpd and try and build a mininmal one, too.


Offline pkozul

  • Newbie
  • *
  • Posts: 6
Re: shairport, minidlna, mpd or mopidy for TC6?
« Reply #19 on: March 21, 2015, 05:06:23 AM »
Hi all,

First of all, a big thank you to Bela for getting ShairPort into the repo.

I just managed to get ShairPort installed on my piCorePlayer installation, which already has Squeezelite running on it.

By configuring ALSA to use the dmix (direct mixing) plugin, I now have both apps working without stepping on each others toes.

To test the 'worst case' scenario, I've been playing music through both apps at the same time, and it's producing the mixed output from both sources. It's been playing for a few hours now, so it's looking really promising. I will test it more over the next few days, trying different scenarios.

In any case, I've included the steps below in case anyone else finds this useful. I really hope it works flawlessly, as I'd love to have my SqueezeBox-based players also support direct streaming from Airport devices.

In my setup, I'm using a Behringer UCA202 USB DAC, but I believe these steps will work with any USB DAC, as long as it's the default ALSA device.

Cheers,
Pete


Preparation

Burn the piCorePlayer image to the SD card:
https://sites.google.com/site/picoreplayer/

Expand the second partition:
(refer to the 'System with pre-installed extensions' section)
http://distro.ibiblio.org/tinycorelinux/5.x/armv6/releases/README

Install nano:
Code: [Select]
tce-load -wi nano

ShairPort

Install shairport:
Code: [Select]
tce-load -wi shairport
Create the shairport script:
Code: [Select]
sudo nano /usr/local/etc/init.d/shairport
Add the following to the shairport script:

Code: [Select]
#! /bin/sh
# /usr/local/etc/init.d/shairport
#
NAME="piCorePlayer"

case "$1" in
start)
/usr/local/bin/shairport -d -a "$NAME" -b 95
;;
stop)
killall shairport
;;
*)
echo "Usage: /usr/local/etc/init.d/shairport {start|stop}"
exit 1
;;
esac

exit 0

Set the execute permissions for the shairport script:
Code: [Select]
sudo chmod a+x /usr/local/etc/init.d/shairport
Configure the boot script to run the shairport script on startup:
Code: [Select]
sudo nano /opt/bootlocal.sh
Add this line to the bottom of the boot script:
Code: [Select]
/usr/local/etc/init.d/shairport start
Add the shairport script to the backup file list (to ensure it gets persisted between reboots):
Code: [Select]
sudo nano /opt/.filetool.lst
Add this line to the bottom of the backup file list:
Code: [Select]
usr/local/etc/init.d/shairport

ALSA Mixer

Configure the mixer to ensure multiple apps can share the sound device:
Code: [Select]
sudo nano /etc/asound.conf
Remove or comment out the original lines in the file, and add the following:

Code: [Select]
pcm.!default {
type plug
slave.pcm "dmixer"
}

pcm.dsp0 {
type plug
slave.pcm "dmixer"
}

pcm.dmixer {
type dmix
ipc_key 1024 # the key must be unique
ipc_key_add_uid 0
ipc_perm 0666# permissions - octal notation
slave {
pcm "hw:0,0"
period_time 0
period_size 1024
buffer_size 8192
rate 48000 #or 44100
}
}

ctl.dmixer {
type hw
card 0
}

Set the volume to maximum:
Code: [Select]
sudo alsamixer
Code: [Select]
sudo alsactl store

Squeezelite

Set Squeezelite to use the default ALSA audio device (to ensure the ALSA mixer get used):
Code: [Select]
sudo nano /usr/local/sbin/config.cfg
Comment out the first line below, and add the second line:
Code: [Select]
#OUTPUT="sysdefault:CARD=ALSA"
OUTPUT="default"


Save changes

Ensure the changes are persisted between reboots:
Code: [Select]
sudo filetool.sh -b
Reboot the device:
Code: [Select]
sudo reboot
« Last Edit: March 21, 2015, 05:09:22 AM by pkozul »

Offline ingotee

  • Newbie
  • *
  • Posts: 20
Re: shairport, minidlna, mpd or mopidy for TC6?
« Reply #20 on: March 21, 2015, 01:52:30 PM »
Béla,

did you Compiler mpd with zeroconf enabled? It runs fine, but does not announce itself in the LAN. The shairport you built does announce itself.

Thanks!

Ingo

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: shairport, minidlna, mpd or mopidy for TC6?
« Reply #21 on: March 23, 2015, 05:40:49 AM »

did you Compiler mpd with zeroconf enabled? It runs fine, but does not announce itself in the LAN. The shairport you built does announce itself.


No, something was missing as a dependency and had no time to look for, just built with available deps.
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline pkozul

  • Newbie
  • *
  • Posts: 6
Re: shairport, minidlna, mpd or mopidy for TC6?
« Reply #22 on: March 24, 2015, 09:24:29 PM »
Hi all,

First of all, a big thank you to Bela for getting ShairPort into the repo.

I just managed to get ShairPort installed on my piCorePlayer installation, which already has Squeezelite running on it.

By configuring ALSA to use the dmix (direct mixing) plugin, I now have both apps working without stepping on each others toes.

To test the 'worst case' scenario, I've been playing music through both apps at the same time, and it's producing the mixed output from both sources. It's been playing for a few hours now, so it's looking really promising. I will test it more over the next few days, trying different scenarios.


Hi again,

I spoke too soon. After getting ShairPort and Squeezelite working together, I went to bed and in the morning noticed that both had stopped. Actually, ShairPort wasn't even running any longer.

Oh well, was worth a shot :-)

I see there is a fork of ShairPort called Shairport-Sync. Would it be possible to build this and add it to the repo?

https://github.com/mikebrady/shairport-sync

Cheers.

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: shairport, minidlna, mpd or mopidy for TC6?
« Reply #23 on: March 25, 2015, 12:41:19 AM »
Can you provide details what happened to them?
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline ingotee

  • Newbie
  • *
  • Posts: 20
Re: shairport, minidlna, mpd or mopidy for TC6?
« Reply #24 on: March 25, 2015, 04:21:32 AM »
FYI: The shairport extension that you built has been running flawlessy for more that 12 hours straight a couple of times on several RPis here.

Offline boat-bum

  • Newbie
  • *
  • Posts: 5
Re: shairport, minidlna, mpd or mopidy for TC6?
« Reply #25 on: March 26, 2015, 11:43:25 PM »
Concerning Shairport-sync, wouldn't it be better if we could use Shairport on the Squeezeboxserver as an LMS plugin or a server source rather than re-invent the wheel to do all the same communication?

Offline sbp

  • Sr. Member
  • ****
  • Posts: 429
    • piCorePlayer homepage
Re: shairport, minidlna, mpd or mopidy for TC6?
« Reply #26 on: March 27, 2015, 02:43:56 AM »
Concerning Shairport-sync, wouldn't it be better if we could use Shairport on the Squeezeboxserver as an LMS plugin or a server source rather than re-invent the wheel to do all the same communication?

I fully agree.
This seems like a much better way. By doing so the LMS would take care of the sync and you would be able to play through LMS to all connected devices. Also the trouble with dual use of the sound card will be avoided as all will be played through LMS (and squeezelite in the case of piCorePlayer).

There is a recipe here, the only trouble seem to be related to the fact that the plug-in needs to be build for each architecture where the LMS is running:
http://forums.slimdevices.com/showthread.php?100379-Announce-ShairTunes-Plugin

Regards
Steen

Offline pkozul

  • Newbie
  • *
  • Posts: 6
Re: shairport, minidlna, mpd or mopidy for TC6?
« Reply #27 on: March 28, 2015, 01:30:58 AM »
Tried installing shairport on a Raspberry Pi 2, but getting a 'not found' error for one the the pulseudio files. Below is the output.

Any ideas?

Code: [Select]
tc@piCorePlayer:~$ tce-load -iw shairport
libao.tcz.dep OK
Downloading: pulseaudio.tcz
Connecting to repo.tinycorelinux.net (89.22.99.37:80)
wget: server returned error: HTTP/1.1 404 Not Found
md5sum: pulseaudio.tcz.md5.txt: No such file or directory
Error on pulseaudio.tcz

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: shairport, minidlna, mpd or mopidy for TC6?
« Reply #28 on: March 28, 2015, 01:36:18 PM »
pulseaudio added to armv7 repo


Az én iPad készülékemről küldve a Tapatalk segítségével
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline pkozul

  • Newbie
  • *
  • Posts: 6
Re: shairport, minidlna, mpd or mopidy for TC6?
« Reply #29 on: March 28, 2015, 06:52:22 PM »
Excellent. Thanks a lot for that bmarcus!