INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: JRMC20 on Pi2 = Portable JRiver MC20 Speaker!  (Read 15714 times)

Hilton

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 1291
JRMC20 on Pi2 = Portable JRiver MC20 Speaker!
« on: March 04, 2015, 05:43:52 am »

The Sony SRS-X7 speaker just got even better! :)

Pi2 with Debian ARM JRiver Media Center 20 in Headless mode
Line-in to Speaker
Pi2 powered off Speaker auxiliary USB
Pi2 pulling media from HTPC
Remote control with JRemote

Priceless!!!

Pics and video demo below.

The mighty Pi2.



The awesome Sony SRS-X7. Speaker with the lot. :) AirPlay, DLNA, Bluetooth, Spotify Connect, Pandora.... NOW with JRMC20 and JRemote control! :)



The sexy rear shot..  :P



A match made in heaven.  ;D




Youtube Pi2 MC20 speaker overview
https://www.youtube.com/watch?v=NyRpa1ekA3Q

Youtube Pi2 MC20 headless mode power up
https://www.youtube.com/watch?v=QJhdErmiIF4
Logged

Hilton

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 1291
Re: JRMC20 on Pi2 = Portable JRiver MC20 Speaker!
« Reply #1 on: March 04, 2015, 06:16:07 am »

You can use this combo in a few different ways and get rid of the 3.5mm line-in cable too.

Pi2 MC20 wifi > JRemote on iPhone BT to Speaker
Pi2 pulls music from the server to JRemote on the iPhone which is paired with BT to speaker.

Pi2 MC20 wifi Push DLNA > DLNA Speaker with JRemote Control
Pi2 pushes music from the server to the speaker in DLNA mode with JRemote as the control point.

Edit: New Way - now my favourite as it reduces the power consumption on the speaker dramatically as I can now turn off Speakers wifi

Pi2 MC20 BT paired with Speaker in BT mode.

This runs off the local USB stick or HDD attached to the Pi and then uses BT to send the audio to the speaker. JRemote is still used for remote control of the Pi.

Edit My favourite is still line-in.  (line-out from the Pi is ok for non-critical use, but plug in a pair of headphones and you can hear how dreadful it is, noisy with lots of hiss) HDMI is fine BTW and doesn't have this issue.
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72438
  • Where did I put my teeth?
Re: JRMC20 on Pi2 = Portable JRiver MC20 Speaker!
« Reply #2 on: March 04, 2015, 07:04:15 am »

Ooohh!  Nice!
Logged

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13871
Re: JRMC20 on Pi2 = Portable JRiver MC20 Speaker!
« Reply #3 on: March 04, 2015, 10:18:40 pm »

Very Very cool!
Logged

Hilton

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 1291
Re: JRMC20 on Pi2 = Portable JRiver MC20 Speaker!
« Reply #4 on: March 04, 2015, 10:50:37 pm »

Tonight I'm going to get USB thumb drive/HDD working with hotspot mode on the phone to make it completely transportable and independent of your home wifi or media server.

I also picked up a 12000mAh battery about the same size as the Pi to make it completely stand alone so it doesn't have to be powered off the speaker.
Plug in a dragon fly DAC and you have a portable MC player using JRemote for control.

3D print an enclosure to hold battery and Pi2 with a 3" adafruit touch screen and you have your first MC powered portable media player. :) The reality isn't that far fetched.
Logged

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5234
  • "Linux Merit Badge" Recipient
Re: JRMC20 on Pi2 = Portable JRiver MC20 Speaker!
« Reply #5 on: March 05, 2015, 08:24:07 am »

Tonight I'm going to get USB thumb drive/HDD working with hotspot mode on the phone to make it completely transportable and independent of your home wifi or media server.

I also picked up a 12000mAh battery about the same size as the Pi to make it completely stand alone so it doesn't have to be powered off the speaker.
Plug in a dragon fly DAC and you have a portable MC player using JRemote for control.

Were you planning to hook the HDD to the Pi, or to the phone?  If the Pi you may need a USB hub as Pi's have a hard time powering most external HDDs from their own USB ports.

I just got something similar rigged up with a pi, an external harddrive using a linux script called "create_ap."  Basically my MC pi shows up as a WiFi router to my phone.  My phone can connect directly to the pi (wirelessly) even where there's no wifi around, and gizmo works a treat to control it.  It doesn't have internet access because the wifi dongle I used can't be both a router and connected to the internet at the same time, but you can find dongles that support both if that's important to you.  I view the lack of internet access as a bonus in this application because it makes the device more portable and more secure.  

It's a true appliance at this point; it will work anywhere I plug it in, and anyone with a phone can control it through gizmo or JRemote even if there's no wifi. If anyone's interested in how to setup the access point portion of the entertainment, let me know and I can provide some detail.

Quote
3D print an enclosure to hold battery and Pi2 with a 3" adafruit touch screen and you have your first MC powered portable media player. :) The reality isn't that far fetched.

I've been tinkering with the 3" capactive touchscreen, and the big issue is the resolution (320x200).  I've got it working, but MC doesn't scale very well to very small resolutions (it's almost impossible to interact with using the touch screen), so I haven't been able to get a usable interface going.  I'm currently thinking about trying to do something with webgizmo (which might scale appropriately), but I've been having real trouble getting webgizmo to work at all on a linux system (even trying to connect to the same system).  More to come.
Logged

Hilton

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 1291
Re: JRMC20 on Pi2 = Portable JRiver MC20 Speaker!
« Reply #6 on: March 05, 2015, 09:23:18 am »

I got USB and Thumb drive working tonight, was pretty simple, just had to add /media/ path to the media import in MC20 on the Pi.
I've just worked out I think I can actually get it to detect the volume name of any USB drive that I plug in and then automatically load it as the current library. When I unplug it, go back to default library.
I'll have to play around with some scripts but it shouldn't be too hard.

I also added shortcuts on the home screen of the iPhone so I can check libraries available and switch between them from the iPhone.
Enter these in the safari browser and then save them to home screen. I created a JRemote folder on the iPhone and put them all in there. I guess I could create just about any MCWS command and save it.

http://Your_Pi_IP:52199/MCWS/v1/Library/List
http://Your_Pi_IP:52199/MCWS/v1/Library/Load?Library=0  
http://Your_Pi_IP:52199/MCWS/v1/Library/Load?Library=1


The battery works really well, I've had the Pi powered off the battery all night which is about 6hours so far and it hasn't even used 25%.
I can use it as a portable server now with probably at least 12hrs battery life!
The battery has 2 USB ports too so I can plug a small powered hub into the battery to power it and then plug the hub into the Pi so I can then plug in any hard drive and not worry about tripping over voltage on the Pi USB ports.

Using the Pi as a server I can pull music from the the Pi to JRemote and then BT to the speaker and it works really well, as does pushing DLNA direct from the Pi to the DLNA speaker using JRemote.
Nice portable server setup for audio!


The Pi works well as a server. It can't play SACD ISO and transcode to JRemote without stopping every few seconds but it manages to play every other audio format I've tried.

I started working on an auto wifi connect script to force it to connect with an order of preference.
The iPhone in Hotspot mode will be the first wifi preference, if It cant find it, It will go through a list until it finds one that's available. (I'll manually setup the list with auto reconnect too)

Connecting to the phone in hotspot mode allows you to still use internet on the phone, as opposed to using the Pi as an access point where the phone then looses internet use.

And yes, the Pi works REALLY well in the car too paired with the iPhone and streaming via BT from JRemote to my car stereo with full text display on the car head unit and full steering wheel controls. :) (just like the NUC did)


Logged

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5234
  • "Linux Merit Badge" Recipient
Re: JRMC20 on Pi2 = Portable JRiver MC20 Speaker!
« Reply #7 on: March 05, 2015, 01:40:37 pm »

Awesome!
Logged

imugli

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1598
Re: JRMC20 on Pi2 = Portable JRiver MC20 Speaker!
« Reply #8 on: March 05, 2015, 06:44:15 pm »

I've been tinkering with the 3" capactive touchscreen, and the big issue is the resolution (320x200).  I've got it working, but MC doesn't scale very well to very small resolutions (it's almost impossible to interact with using the touch screen), so I haven't been able to get a usable interface going.  I'm currently thinking about trying to do something with webgizmo (which might scale appropriately), but I've been having real trouble getting webgizmo to work at all on a linux system (even trying to connect to the same system).  More to come.


Perhaps JR might consider porting Gizmo-style interface to regular MC for just this purpose? I was just looking at 3.5" monitor / case combo's for the pi B. If you could have a gizmo interface, I think this would be a great little product. I imagine screen use would reduce the life of that battery pack somewhat, but could be a nice addition anyway.

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72438
  • Where did I put my teeth?
Re: JRMC20 on Pi2 = Portable JRiver MC20 Speaker!
« Reply #9 on: March 05, 2015, 06:48:33 pm »

We're talking about doing a JRemote version for Windows, etc.
Logged

Hilton

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 1291
Re: JRMC20 on Pi2 = Portable JRiver MC20 Speaker!
« Reply #10 on: March 05, 2015, 07:28:05 pm »

We're talking about doing a JRemote version for Windows, etc.

That would be very cool, I'm sure that'll port well over to Linux, though the layout will need to change for low res screens like the 3".

I hope that means you're also looking at a JRemote iPad style interface in a theatre view mode on windows! :)

PS. While we're talking JRemote - Why isn't this feature already available in JRemote?
Quote
I also added shortcuts on the home screen of the iPhone so I can check libraries available and switch between them from the iPhone.
Logged

Hilton

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 1291
Re: JRMC20 on Pi2 = Portable JRiver MC20 Speaker!
« Reply #11 on: March 06, 2015, 06:48:28 am »

What a nightmare! I got Bluetooth audio streaming from the Pi to the Sony Speaker.

This was the missing piece of the puzzle to create loopback from the ALSA audio device to the paired BT speaker.

pactl load-module module-loopback source=alsa_output.0.analog-stereo.monitor sink=bluez_sink.3C_77_E6_B3_0A_D8


Logged

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5234
  • "Linux Merit Badge" Recipient
Re: JRMC20 on Pi2 = Portable JRiver MC20 Speaker!
« Reply #12 on: March 06, 2015, 07:31:59 am »

What a nightmare! I got Bluetooth audio streaming from the Pi to the Sony Speaker.

This was the missing piece of the puzzle to create loopback from the ALSA audio device to the paired BT speaker.

pactl load-module module-loopback source=alsa_output.0.analog-stereo.monitor sink=bluez_sink.3C_77_E6_B3_0A_D8

In my experience pulseaudio (the subsystem being called by pactl) is a bottomless configuration nightmare.  It often works fine for simple configs, but if you need to do anything clever, gods help you. 

After one particularly frustrating bout with pulse I was reduced to writing scurrilous limericks about its author not suitable for republication on a family-friendly forum.  It's bad enough to drive a grown man to verse  ;D
Logged

Hilton

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 1291
Re: JRMC20 on Pi2 = Portable JRiver MC20 Speaker!
« Reply #13 on: March 06, 2015, 08:41:52 am »

This is where I need help from the Bob "Id" maestro...

I have the Bluetooth speaker setup as a BTheadset Alsa device and as a pulse audio device. (appearing in MC Audio devices)
I can get both to work after running some commands to stuff around with default source and sink devices but I cant seem to get it to remember the settings after a reboot.

The Pi auto connects to the BT speaker now when it sees it but there's still far too much faffing around for it to be headless.



 
Logged

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5234
  • "Linux Merit Badge" Recipient
Re: JRMC20 on Pi2 = Portable JRiver MC20 Speaker!
« Reply #14 on: March 06, 2015, 08:55:26 am »

This is where I need help from the Bob "Id" maestro...

I have the Bluetooth speaker setup as a BTheadset Alsa device and as a pulse audio device. (appearing in MC Audio devices)
I can get both to work after running some commands to stuff around with default source and sink devices but I cant seem to get it to remember the settings after a reboot.

The Pi auto connects to the BT speaker now when it sees it but there's still far too much faffing around for it to be headless.

Assuming you're talking about shell commands, you can setup the commands to run on startup by putting them in a script in rc.local.  Or if it's a "detection" type thing (i.e. you want it to run more often than just on startup), you can set up a cron job to run the script at intervals (once a minute, three times an hour, etc.).
Logged

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13871
Re: JRMC20 on Pi2 = Portable JRiver MC20 Speaker!
« Reply #15 on: March 06, 2015, 10:13:52 am »

This is where I need help from the Bob "Id" maestro...

I have the Bluetooth speaker setup as a BTheadset Alsa device and as a pulse audio device. (appearing in MC Audio devices)
I can get both to work after running some commands to stuff around with default source and sink devices but I cant seem to get it to remember the settings after a reboot.

The Pi auto connects to the BT speaker now when it sees it but there's still far too much faffing around for it to be headless.
If the device is missing when mediacenter starts it will drop back to default. Perhaps that's what you are seeing?
Logged

Hilton

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 1291
Re: JRMC20 on Pi2 = Portable JRiver MC20 Speaker!
« Reply #16 on: March 07, 2015, 10:28:54 am »

If the device is missing when mediacenter starts it will drop back to default. Perhaps that's what you are seeing?


Thanks Bob I worked it out eventually but that wasn't it. I had to change a few things around the place to get it to work.
When I've some more time Ill go back retrace my steps and try document it. It was about 6hrs of stuffing around.

I've now got the Pi booting in headless mode powered off a small battery and auto pairing with the Sony Speakers or BT headphones in BT mode now.

Logged

Hilton

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 1291
Re: JRMC20 on Pi2 = Portable JRiver MC20 Speaker!
« Reply #17 on: March 07, 2015, 11:08:46 am »

Here it is running off battery with the E17 DAC and JRemote for control.



Logged

rudyrednose

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 344
  • nothing more to say...
Re: JRMC20 on Pi2 = Portable JRiver MC20 Speaker!
« Reply #18 on: March 07, 2015, 09:38:46 pm »

This is verrry cool!
Thank you Hilton for pushing back the frontiers.
Logged

Hilton

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 1291
Re: JRMC20 on Pi2 = Portable JRiver MC20 Speaker!
« Reply #19 on: March 08, 2015, 01:24:25 am »

I had the Pi as my music companion today outside with me for 7hrs today while doing a clean up around the house, lawns, yard work and washing the cars.
A break of probably 1hr when no music was playing.

The Pi was streaming Bluetooth to the Sony BT Speaker.

The Sony SRS-X7 is only down to 60% battery.

The Pi 12000mAh battery is through half charge in 7 hours since 11am this morning. I had a 1TB drive attached for music.

The "Pi mini stack", completely portable and wireless. :)  (I can also Velcro the Pi to the back of the speaker/ power it off the speaker and then stream BT to the speaker as per above pics - this avoids using the dodgy onboard Pi lineout and avoids the extra cable for the lineout)

128GB Sandisk USB, Bluetooth, wifi and 12000mAh battery.






The "Pi with the lot", also completely portable and wireless. :)  

4 port powered hub, 128GB Sandisk USB + Toshiba 1TB 2.5" USB drive, Bluetooth, wifi and 12000mAh battery.

It's slightly more cumbersome but manageable until I work out how to miniaturise it and tidy it up.









Logged

Hilton

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 1291
Re: JRMC20 on Pi2 = Portable JRiver MC20 Speaker!
« Reply #20 on: March 08, 2015, 03:15:49 am »

I'll start digging through the changes I made to get the auto BT pairing for BT streaming to the speaker/headphones working.

I'll try document this based on the history of the command line prompt. It'll be in the reverse of what I did until I come back and clean it up.
This was on a clean install of Raspbian NooB with JRMC20.0.81 ARM.

Some of these settings may not be required, but as I mentioned earlier it took 6 hours of experimenting to get it to work.

So please humor me if I've done something stupid below that's not needed.  I'll redo it again based on what I think it needs another time, to confirm what's needed.

I also set alsa mixer to 100% with this command:  amixer -c 1 set PCM 110

The last thing I did was:

Edit the /etc/asound.conf

Code: [Select]
pcm.!default {
   type bluetooth
   device "3C:77:E6:B3;0A:D8"
 }

Edit the /home/pi/.asoundrc

Code: [Select]
pcm.bluetooth {
  type bluetooth
  # The "device" setting is optional.
  # It forces a connection to a specific device
  # instead of the default one.
  #device 00:11:22:AA:BB:FF
  profile "hifi" #optional, supported profiles are: auto, hifi, and voice
 }


Here's my /etc/bluetooth/audio.conf - I don't think I changed anything in this in the end, I did in previous attempts, but pretty sure this is defaults

Code: [Select]
# Configuration file for the audio service

# This section contains options which are not specific to any
# particular interface
[General]
Enable = Sink,Source

# Switch to master role for incoming connections (defaults to true)
#Master=true

# If we want to disable support for specific services
# Defaults to supporting all implemented services
#Disable=Control,Source

# SCO routing. Either PCM or HCI (in which case audio is routed to/from ALSA)
# Defaults to HCI
#SCORouting=PCM

# Automatically connect both A2DP and HFP/HSP profiles for incoming
# connections. Some headsets that support both profiles will only connect the
# other one automatically so the default setting of true is usually a good
# idea.
AutoConnect=true

# Headset interface specific options (i.e. options which affect how the audio
# service interacts with remote headset devices)
[Headset]

# Set to true to support HFP, false means only HSP is supported
# Defaults to true
HFP=true

# Maximum number of connected HSP/HFP devices per adapter. Defaults to 1
MaxConnected=1

# Set to true to enable use of fast connectable mode (faster page scanning)
# for HFP when incomming call starts. Default settings are restored after
# call is answered or rejected. Page scan interval is much shorter and page
# scan type changed to interlaced. Such allows faster connection initiated

# by a headset.
FastConnectable=false

# Just an example of potential config options for the other interfaces
#[A2DP]
#SBCSources=1
#MPEG12Sources=0


List of packages installed: (I installed synaptic package manager and used it to install the following)
A lot of these were installed as dependencies for the bluetooth, Alsa and Pulse packages.

Installed the following packages:
acl (2.2.51-8)
avahi-daemon (0.6.31-2)
bc (1.06.95-2)
bind9-host (1:9.8.4.dfsg.P1-6+nmu2+deb7u4)
blueman (1.23-1)
bluetooth (4.99-2)
bluez (4.99-2)
bluez-alsa (4.99-2)
bluez-compat (4.99-2)
bluez-cups (4.99-2)
bluez-gstreamer (4.99-2)
bluez-tools (0.1.38+git662e-3)
bluez-utils (4.99-2)
btscanner (2.1-5.1)
colord (0.1.21-1)
cups (1.5.3-5+deb7u5)
cups-filters (1.0.18-2.1+deb7u1)
cups-ppdc (1.5.3-5+deb7u5)
dc (1.06.95-2)
foomatic-db-compressed-ppds (20120523-1)
foomatic-db-engine (4.0.8-3)
foomatic-filters (4.0.17-1)
geoip-database (20130213-1)
ghostscript-cups (9.05~dfsg-6.3+deb7u1)
gstreamer0.10-pulseaudio (0.10.31-3+nmu1)
gstreamer1.0-pulseaudio (1.2.0-1co6rpi3)
hpijs (3.12.6-3.1+deb7u1)
hplip (3.12.6-3.1+deb7u1)
hplip-data (3.12.6-3.1+deb7u1)
imagemagick-common (8:6.7.7.10-5+deb7u3)
libart-2.0-2 (2.3.21-2)
libasound2-plugins (1.0.25-2)
libatkmm-1.6-1 (2.22.6-1)
libavahi-core7 (0.6.31-2)
libbind9-80 (1:9.8.4.dfsg.P1-6+nmu2+deb7u4)
libcairomm-1.0-1 (1.10.0-1)
libcamel-1.2-33 (3.4.4-3+deb7u1)
libcanberra-gtk3-0 (0.28-6)
libcanberra-gtk3-module (0.28-6)
libcap-ng0 (0.6.6-2)
libcupscgi1 (1.5.3-5+deb7u5)
libcupsdriver1 (1.5.3-5+deb7u5)
libcupsfilters1 (1.0.18-2.1+deb7u1)
libcupsmime1 (1.5.3-5+deb7u5)
libcupsppdc1 (1.5.3-5+deb7u5)
libdns88 (1:9.8.4.dfsg.P1-6+nmu2+deb7u4)
libebook-1.2-13 (3.4.4-3+deb7u1)
libedataserver-1.2-16 (3.4.4-3+deb7u1)
libescpr1 (1.1.1-2)
libgconfmm-2.6-1c2 (2.28.0-1)
libgeoip1 (1.4.8+dfsg-3)
libglademm-2.4-1c2a (2.6.7-2)
libglibmm-2.4-1c2a (2.32.1-1)
libgtkmm-2.4-1c2a (1:2.24.2-1)
libgtkmm-3.0-1 (3.4.2-1)
libgusb2 (0.1.3-5)
libgutenprint2 (5.2.9-1)
libhpmud0 (3.12.6-3.1+deb7u1)
libieee1284-3 (0.2.11-10)
libisc84 (1:9.8.4.dfsg.P1-6+nmu2+deb7u4)
libisccc80 (1:9.8.4.dfsg.P1-6+nmu2+deb7u4)
libisccfg82 (1:9.8.4.dfsg.P1-6+nmu2+deb7u4)
liblqr-1-0 (0.4.1-2)
liblwres80 (1:9.8.4.dfsg.P1-6+nmu2+deb7u4)
libmagickcore5 (8:6.7.7.10-5+deb7u3)
libmagickwand5 (8:6.7.7.10-5+deb7u3)
libnss-mdns (0.10-3.2)
libopenobex1 (1.5-2+deb7u1)
libpangomm-1.4-1 (2.28.4-1)
libperl5.14 (5.14.2-21+rpi2+deb7u2)
libpulse-mainloop-glib0 (2.0-6.1)
libsane (1.0.22-7.4)
libsane-common (1.0.22-7.4)
libsane-extras (1.0.22.2)
libsane-extras-common (1.0.22.2)
libsane-hpaio (3.12.6-3.1+deb7u1)
libsensors4 (1:3.3.2-2+deb7u1)
libslp1 (1.2.1-9)
libsnmp-base (5.4.3~dfsg-2.8+deb7u1)
libsnmp15 (5.4.3~dfsg-2.8+deb7u1)
libspeexdsp1 (1.2~rc1-7)
libsystemd-daemon0 (44-11+deb7u4)
libwebrtc-audio-processing-0 (0.1-2)
mscompress (0.3-4)
notification-daemon (0.7.6-1)
obex-data-server (0.4.5-1)
obexd-client (0.46-1+b1)
paman (0.9.4-1)
paprefs (0.9.10-1)
pavucontrol (1.0-1)
pavumeter (0.9.3-4)
printer-driver-all (0.20120416)
printer-driver-c2050 (0.3b-4)
printer-driver-c2esp (24-2)
printer-driver-cjet (0.8.9-3)
printer-driver-escpr (1.1.1-2)
printer-driver-foo2zjs (20120510dfsg0-1)
printer-driver-gutenprint (5.2.9-1)
printer-driver-hpcups (3.12.6-3.1+deb7u1)
printer-driver-hpijs (3.12.6-3.1+deb7u1)
printer-driver-m2300w (0.51-7)
printer-driver-min12xxw (0.0.9-6)
printer-driver-pnm2ppa (1.13-4)
printer-driver-postscript-hp (3.12.6-3.1+deb7u1)
printer-driver-ptouch (1.3-4)
printer-driver-pxljr (1.3+repack0-2)
printer-driver-sag-gdi (0.1-3)
printer-driver-splix (2.0.0+svn306-2)
pulseaudio (2.0-6.1)
pulseaudio-module-bluetooth (2.0-6.1)
pulseaudio-module-gconf (2.0-6.1)
pulseaudio-module-x11 (2.0-6.1)
pulseaudio-module-zeroconf (2.0-6.1)
pulseaudio-utils (2.0-6.1)
python-cairo (1.8.8-1)
python-gconf (2.28.1+dfsg-1)
python-gobject (3.8.2-1+rpi1rpi2)
python-gobject-2 (2.28.6-10)
python-gtk2 (2.24.0-3)
python-imaging (1.1.7-4+deb7u1)
python-notify (0.1.1-3)
python-pexpect (2.4-1)
python-renderpm (2.5-1.1)
python-reportlab (2.5-1.1)
python-reportlab-accel (2.5-1.1)
rtkit (0.10-2+wheezy1)
sane-utils (1.0.22-7.4)
ssl-cert (1.0.32)

alsa-oss (1.0.25-1)
alsamixergui (0.9.0rc2-1-9.1)
libfltk1.1 (1.1.10-14)
qasconfig (0.17.2-2)
qashctl (0.17.2-2)
qastools-common (0.17.2-2)
Logged

jmone

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 14463
  • I won! I won!
Re: JRMC20 on Pi2 = Portable JRiver MC20 Speaker!
« Reply #21 on: March 08, 2015, 03:57:27 am »

Looks great!  .... and has me wondering if the Bat Pack would work to fix my ground loop issue mmmmmm
Logged
JRiver CEO Elect

Hilton

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 1291
Re: JRMC20 on Pi2 = Portable JRiver MC20 Speaker!
« Reply #22 on: March 08, 2015, 04:00:41 am »

I used the Blueman BT GUI to pair with the speaker and headphones and set them to trusted.

I created a Bluetooth zone in MC20 on the Pi and changed the sound device to pulse [ALSA]

DSP was untouched. Pulse I think is automatically downsampling everything to 2ch 44.1.
I noticed a couple tracks were just playing silent, so it might be a good idea to convert everything in the DSP to 2ch 44.1. (for Bluetooth only - The USB DAC I have will handle anything upto 24bit/96k on the Pi)

Edit: It looks like the Pi can ALMOST handle transcoding 2ch SACD ISO to 2ch PCM.  It's using 65>80% CPU and pausing for 8-10 seconds to buffer every 32 sec.  

EDIT: The bad news with the way I this setup is you cant use the HDMI or lineout for audio, however
I can now get BT and the HDMI or Line-out to work.  Unplug the BT dongle and it will then switch between lineout or HDMI.  Plug the BT dongle in and it will also work again.
I had to enable hdmi_drive=2 in the /boot/config.txt

Here's my /boot/config.txt
Ive changed a couple other things in here:
This changes console resolution to standard 1080p
framebuffer_width=1920
framebuffer_height=1080

This forces HDMI to 1080p 60hz even with no monitor attached.
Which means if you need to plug it in to a monitor or TV after running in headless mode, it wont be in a minicule unusuable resolution.
BTW you need to boot into gui mode for some of the features to work in headless mode.
hdmi_group=2
hdmi_mode=82

I believe because of the above setting I also need to set this to enable HDMI audio
hdmi_drive=2


/boot/config.txt

Code: [Select]
# For more options and information see
# http://www.raspberrypi.org/documentation/configuration/config-txt.md
# Some settings may impact device functionality. See link above for details

# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1

# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan
disable_overscan=1

# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border
#overscan_left=16
#overscan_right=16
#overscan_top=16
#overscan_bottom=16

# uncomment to force a console size. By default it will be display's size minus
# overscan.
framebuffer_width=1920
framebuffer_height=1080

# uncomment if hdmi display is not detected and composite is being output
#hdmi_force_hotplug=1

# uncomment to force a specific HDMI mode (this will force VGA)
hdmi_group=2
hdmi_mode=82
# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes
hdmi_drive=2

# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display
#config_hdmi_boost=4

# uncomment for composite PAL
#sdtv_mode=2

#uncomment to overclock the arm. 700 MHz is the default.
arm_freq=1000


# NOOBS Auto-generated Settings:
hdmi_force_hotplug=1
config_hdmi_boost=4
#overscan_left=24
# NOOBS Auto-generated Settings:
hdmi_force_hotplug=1
config_hdmi_boost=4
#overscan_left=24
#overscan_right=24
#overscan_top=16
#overscan_bottom=16
disable_overscan=1
core_freq=500
sdram_freq=500
over_voltage=2
framebuffer_depth=32
framebuffer_ignore_alpha=1



USB DAC works fine and you can select the USB DAC as an output device from JRemote just fine.
The built in Pi lineout DAC isn't that great (its very noisy and has a lot of hiss if you listen on headphones)
edit got HDMI audio working as per above I'll play some more and see if I can get HDMI to work though I'll possibly need some assistance and guidance on that.

I'm sending audio to 2 zones on the Pi at the moment. 1 zone using BT which is transcoding a 2ch SACD ISO to BT and the other zone a FLAC to the USB DAC @ 96/24. (this is being transcoded on the HTPC from the library on the HTPC and sent to the 2 zones on the Pi)

To get it start in MC20 in headless mode I just followed this guide by Mwillems: Mwillems doesn't mention the detail of this in his guide, but you need to create a script. I made a couple minor modifications.
I created a MC20start.sh script under /etc and made it executable with chmod +x MC20start.sh
The MC20start.sh contain Mwillems script:

Code: [Select]
export USER=pi
ps -e | grep tightvnc || vncserver :0 -localhost -geometry 1920x1080
export DISPLAY=':0'
ps -e | grep mediacenter || mediacenter20

I also added this to crontab using crontab -e
Code: [Select]
@reboot /etc/MC20start.sh

Here's Mwillems full directions on how to make MC20 boot into gui mode.
http://yabb.jriver.com/interact/index.php?topic=91227.0





Logged

Hilton

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 1291
Re: JRMC20 on Pi2 = Portable JRiver MC20 Speaker!
« Reply #23 on: March 08, 2015, 07:35:25 am »

No rest for the hard working Pi! ;)

Desktop Mode with the DAC, Pi streaming from the HTPC.  ;D

Nigh Nigh!


Logged

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5234
  • "Linux Merit Badge" Recipient
Re: JRMC20 on Pi2 = Portable JRiver MC20 Speaker!
« Reply #24 on: March 08, 2015, 08:32:49 am »

Glad my script was some help, it looks like you got it well adapted to your needs.  One nice thing about it is that with that script you can actually access MC's GUI from your phone (or at least I can from an android phone) using apps like bVNC.  Obviously JRemote does most of what one needs, But if you need to flip an inaccessible option (or safely turn the pi off), you can use the ssh/vnc combo to do it. 

Is @reboot working well for you?  Last time I tried it it didn't always work as expected.  They may have fixed it (it's been years).

I believe because of the above setting I also need to set this to enable HDMI audio
hdmi_drive=2

My understanding is that "hdmi_drive=2" is required for certain monitors whose EDID fools the HDMI output into thinking their accepting DVI only or something to that effect.  Forcing drive=2 forces audio to those monitors that report they don't take audio (even though they do).  So you might not need that option with a different monitotr, but I don't think there's a downside to using it if you don't plan to use the 3.5mm output (and why would you  ;D ).
Logged

Hilton

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 1291
Re: JRMC20 on Pi2 = Portable JRiver MC20 Speaker!
« Reply #25 on: March 08, 2015, 09:03:30 am »

Found out you can software mod the Pi B+ and Pi 2B to double the supplied/allowed USB port current from 600ma to 1200ma.
This allows you to run most 2.5" drives directly off it without a USB hub.

You just turn on GPIO pin 38.

I'll try it and report back.

http://www.htpcguides.com/power-2-5-hard-drive-with-raspberry-pi-b/

I can confirm this works if you have a GOOD power source with 2.1A 5V, 2 of the power supplies I've got wouldn't work and 2 did. Also 3 of my batteries do work.

That'll tidy up the wiring immensely!
Logged

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5234
  • "Linux Merit Badge" Recipient
Re: JRMC20 on Pi2 = Portable JRiver MC20 Speaker!
« Reply #26 on: March 08, 2015, 09:26:37 am »

Found out you can software mod the Pi B+ and Pi 2B to double the supplied/allowed USB port current from 600ma to 1200ma.
This allows you to run most 2.5" drives directly off it without a USB hub.

You just turn on GPIO pin 38.

I'll try it and report back.

http://www.htpcguides.com/power-2-5-hard-drive-with-raspberry-pi-b/

Great find, I just tried it and that works a treat.  Previously my usb hdd wouldn't spin up at all, but with that tweak it seems to work perfectly.  It might still present some problems with certain drives because the Pi has a hard limit on how much current it can draw in through it's power input. 

That said, with my WD 1TB drive I couldn't provoke instability even doing copy operations while all 4 CPUs were pegged, so that seems promising.
Logged

Hilton

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 1291
Re: JRMC20 on Pi2 = Portable JRiver MC20 Speaker!
« Reply #27 on: March 08, 2015, 09:51:17 am »

Great find, I just tried it and that works a treat.  Previously my usb hdd wouldn't spin up at all, but with that tweak it seems to work perfectly.  It might still present some problems with certain drives because the Pi has a hard limit on how much current it can draw in through it's power input. 

That said, with my WD 1TB drive I couldn't provoke instability even doing copy operations while all 4 CPUs were pegged, so that seems promising.

Thanks for all your help with the guides and scripts. I wouldn't have got this far without your help! Happy I could give something back! :)
The monitor in question has audio over HDMI has worked with the Pi before, so I think something about my settings stopped it working until I used the hdmi_drive=2 .

PS long power cables to the Pi cause too much voltage drop. I changed to a shorter cable on one of my power supplies that didn't work, and it now works.
Logged

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5234
  • "Linux Merit Badge" Recipient
Re: JRMC20 on Pi2 = Portable JRiver MC20 Speaker!
« Reply #28 on: March 08, 2015, 10:17:18 am »

PS long power cables to the Pi cause too much voltage drop. I changed to a shorter cable on one of my power supplies that didn't work, and it now works.

Yeah we're kind of on the leading edge of what the Pi can manage power-wise;  so far it seems to manage the hdd and the e17 just fine at the same time, but the e17 has a battery buffer so if it doesn't get enough power for a moment it just supplies its own. 

My intended application for my Pi player is driving an ODAC and headphone amp at work.  The ODAC has no battery buffer and is entirely USB powered.  I'm kind of anxious about hooking the Pi up to a DAC with no battery buffer, but I've got a 3 amp USB hub on hand just in case.  It would be nice to do without all the extra wires though.

I'll be setting my pi up in it's new home in my office tomorrow, so we'll see how it does.  I'll try and take some pics and post them once everything is setup.
Logged
Pages: [1]   Go Up