Post Reply 
Let's brainstorm..Setting up MinimServer to feed a USB DAC
27-11-2013, 17:24
Post: #51
RE: Let's brainstorm..Setting up MinimServer to feed a USB DAC
(27-11-2013 16:57)PeteManchester Wrote:  Hi Simon,

I've got it working on both hardfloat and softfloat, although I've not tested wav16 and 32 on the softfloat yet.

Sorry I'm on a steep learning curve with mpd at the moment, it looks like mpd does use libav as you suggest. I found these instructions on how to compile mpd and libav is part of the pre reqs.

This is quite a puzzle, as I would expect that libav or ffmpeg would be used only when decoding compressed formats such as FLAC, not for playing uncompressed WAV data.

The mpd documentation seems very unhelpful for dealing with setup issues like this. It doesn't even mention the ffmpeg decoder plugin in the list of decoder plugins.

As mplayer is working with WAV files, I will switch to this instead. Thanks very much for your help!
Find all posts by this user
Quote this message in a reply
27-11-2013, 18:15
Post: #52
RE: Let's brainstorm..Setting up MinimServer to feed a USB DAC
(27-11-2013 12:51)PeteManchester Wrote:  Hi Simon,

The Prodigy Cube is ok, actually it's better than ok, it's good but the other two are better and cheaper

The HifiMeDIY U2 Async DAC is very good, it supports upto 24bit and sounds very good. It comes in a nice case.

The Stoner Acoustics UD110 is my favorite at the moment, it supports 16 and 32bit, sounds very clear. The only issue is that it does not support hardware volume control like the U2 does, i have passed my comments back to the developer, but there are ways around this by configuring the mixer_type in mpd to be software controlled rather than hardware. the UD110 just comes as the PCB covered in heatshrink tubing.

Between the U2 and the UD110 there is not a big difference in sound or price.

If you were to chose the UD110 make sure you ask for a UD110 v2, the original version would not work on any of my raspis.

PS I've got some hearing loss and slight tinnitus, so I may not be the best judge :-)

Thanks very much! I have emailed Stoner Acoustics with a purchase enquiry. The lack of volume control doesn't concern me because I will be connecting it to powered monitors and I can use the volume controls on the monitors. At some stage I am hoping to add a pre-amp as this would be more convenient for small volume adjustments and would allow me to use multiple inputs.
Find all posts by this user
Quote this message in a reply
27-11-2013, 20:40 (This post was last modified: 27-11-2013 20:40 by Cableguy.)
Post: #53
RE: Let's brainstorm..Setting up MinimServer to feed a USB DAC
I am looking forward to Wolfson's Pi Card when it will be released
http://www.element14.com/community/commu...wolfson_pi

I am also looking forward to trying this audio player Wien I get a raspi!
Find all posts by this user
Quote this message in a reply
17-12-2013, 10:35
Post: #54
RE: Let's brainstorm..Setting up MinimServer to feed a USB DAC
Hi Pete,

Thanks very much for your MediaPlayer OpenHome renderer!

Following your detailed instructions it was very easy to set it up on a Raspberry Pi (Model B with 512MB RAM running at 700MHz) under Raspbian hard float. So far I'm using the standard 3.5mm output and testing it with headphones but I've ordered the USB DAC you recommended (Stoner Acoustics UD110 v2). The quality is failry good already, I can only imagine what it would be like with the DAC in place!

I am using it in conjunction with MinimServer (of course!) and BubbleUPnP as the control point. I started testing it with a Wifi dongle installed on the Pi but I had connection problems and switched to wired Ethernet. The issues I came across (see below) have all been tested using wired Ethernet unless stated otherwise.

It has been pretty stable for the last few days of testing. I am particularly impressed with how well gapless works (in fact it even seems to work for mp3s; I am a but confused as I thought the mp3 format could not do gapless?!). I also like the fact that you chose to implement the OpenHome extensions and not just stadard UPnP, making it possible to turn off the control point without stopping playback or losing the playlist as well as being able to control the renderer with multiple CPs at the same time.

I've been testing with 16 bit 44.1 KHz flac and mp3s encoded at various bitrates. Unfortunately I don't have any high definition files to test with. The CPU usage of java (only used to run MediaPlayer) is around 1-2% and mpd uses 2-4% for flacs and 8-9% for mp3s, hardly taxing the low-powered Raspberry device.

Summary of hardware/software used:
- Raspberry Pi (Model B with 512MB RAM running at 700MHz), connected via wired Ethernet
- Tablet: Samsung Note 10.1 with Android 4.1.2
- Phone: Samsung Galaxy 1 with Android 2.3.6
- MediaPlayer v. 0.0.0.6 (got the version from the logs) (running on Raspberry Pi)
- MinimServer v. 0.72 (running on Linux PC)
- BubbleUPnP v. 1.7.6.1 (running on tablet and phone)

The issues I came across are almost all to do with playlists (i.e. the ad hoc playlist created when you want to play something, not the playlists stored on the server). They could be due to the interaction between your MediaPlayer and BubbleUPnP CP rather than due to problems in the MediaPlayer itself.

1. Adding albums to the playlist seems a bit slow. Here are some results (using BubbleUPnP running on a Galaxy Note 10.1):
- album with 6 tracks - 6 seconds
- 12 tracks - 10s
- 21 tracks - 15s
- 32 tracks - 19s
- 55 tracks - 31s
- 153 tracks - 1min 26s
- 247 tracks - 2min 28s

I re-tested the above with a different renderer and I got these results:
- 6 tracks - 6s
- 12 tracks - 7s
- 21 tracks - 7s
- 32 tracks - 8s
- 55 tracks - 12s
- 153 tracks - 28s
- 247 tracks - 43s


2. When adding large multi-disk albums (over 50 tracks or so), BubbleUPnP does not populate the playlist nor the Now Playing screen. The music starts playing and I can even jump to the next track but I don't see any metadata, progress bar or album art. I don't see this behaviour with Bubble's built in renderer, even when I add the album through a stand-alone BubbleUPnP control point on my phone.

3. If I have a playlist created already, I am unable to append any new tracks to it ("Enqueue" in BubbleUPnP). I get a busy cursor for a few seconds but nothing gets added to the playlist. Looking at the MediaPlayer logs, it appears that it receives the information for the new tracks but it's not reflected on the control point.

4. When I was initially testing over Wifi, it appeared that sometimes the Wifi connection dropped when adding large albums to the playlist (as in 2. above). It didn't happen every time but I have seen it about 3 times. The system log would then show something like this:
Dec 16 00:44:42 pi1 kernel: [ 6753.015649] rtw_cmd_thread: DriverStopped(0) SurpriseRemoved(1) break at line 482
If I unplugged the Wifi dongle and then plugged it back in again, it would reconnect without problems so the system as a whole was not affected by this.

It sems strange that it would be related to adding tracks to the playlist, perhaps it's just a coincidence? I did have connection problems with the Wifi dongle during playback too but not as often. (I also did an overnight test copying over 180GB of data over Wifi without any disconnection problems but obviously the driver is not terribly stable.)

5. When seeking through flac files (16 bit, 44.1 KHz), and the end of the track is reached, playback does not advance to the next track. This happens for me about 50% of the time with flac files only (it works fine for mp3s). Just to clarify, by seeking I mean jumping somewhere towards the end of the file and then I let it play normally until the end. Playback stops at the end of the track. Again, this does not happen with Bubble's built in renderer.

6. Using Kinsky v. 4.3.17 running on OS X Mavericks, I can see the renderer but I cannot add tracks to it or control playback. Also, changes to the playlist performed through BubbleUPnP do not get reflected here.

7. Using AssetControl v. 1.0.0.5 on Windows XP I cannot even see the renderer.


Please let me know if you need logs or any help testing any of the above.

Anyway, thanks again for MediaPlayer. It doesn't get much better than this: an open-source, software-based renderer, running on a cheap, silent computer but producing very high quality results through a cheap DAC. This is filling the last remaining piece of the puzzle (the other 2 great pieces being MinimServer and Bubble control point).

Cheers,
Ciprian
Find all posts by this user
Quote this message in a reply
17-12-2013, 17:02
Post: #55
RE: Let's brainstorm..Setting up MinimServer to feed a USB DAC
Hi Ciprian,

Thanks for testing...

There's a few issues I've not seen before..

Quote:1. Adding albums to the playlist seems a bit slow. Here are some results (using BubbleUPnP running on a Galaxy Note 10.1):

I'ts not the quickest at adding tracks to the playlist, but I tested using Kinsky and it took about 12secs to add 100 tracks.

Can you set the option

Code:
log.file.level

to 'debug' in the app.properties, then can you send a clean log file from startup until after you have added the tracks to the playlist.

Quote:2. When adding large multi-disk albums (over 50 tracks or so), BubbleUPnP does not populate the playlist nor the Now Playing screen. The music starts playing and I can even jump to the next track but I don't see any metadata, progress bar or album art. I don't see this behaviour with Bubble's built in renderer, even when I add the album through a stand-alone BubbleUPnP control point on my phone.

Again please can you set the log level to debug and then provide a clean set of log files from startup until after adding the tracks to the playlist.

I'm still on the trial version of BubbleUPnP and so can only add a max if 16 tracks. I plan to get the full version over xmas..

Quote:4. When I was initially testing over Wifi, it appeared that sometimes the Wifi connection dropped when adding large albums to the playlist (as in 2. above)

I've not seen this before, I had some issues with my Wifi dongle going into power management mode, but I wouldn't expect that to happen whilst adding tracks. You could try to disable Power Management

Disable Power Management

Code:
sudo nano /etc/rc.local

And add the lines:

_wlanexist=$(ifconfig | grep wlan) || true
if [ "$_wlanexist" ]; then
    iwconfig wlan0 power off
fi

Quote:5. When seeking through flac files (16 bit, 44.1 KHz), and the end of the track is reached, playback does not advance to the next track

You could try the beta version of MediaPlayer (0.0.0.7) If you download from GitHub again, it is in the 'build/beta' folder. I made some changes to the code which might help with this.

Quote:Using Kinsky v. 4.3.17 running on OS X Mavericks

If possible can you also try the Windows version of Kinsky.

Quote:Using AssetControl v. 1.0.0.5 on Windows XP I cannot even see the renderer.

Can you check if you have the option

Code:
enableAVTransport

Set to 'true'.

I haven't documented it very well but that should enable the AVTransport service that Asset needs.

Quote:I am a but confused as I thought the mp3 format could not do gapless?!)

It is MPD that does all the hard work for the gapless playback, all I do is monitor the time left playing for the current track and when it reaches a configurable time I put the next track into the MPD playlist and it takes care of the gapless playback..

PS. The beta version of MediaPlayer will also fix an issue with Kinsky showing a strange volume level for DACs that don't support Volume Control such as the UD110.


Thanks again,

Pete.
Find all posts by this user
Quote this message in a reply
18-12-2013, 04:17
Post: #56
RE: Let's brainstorm..Setting up MinimServer to feed a USB DAC
Hi Pete,

Thanks for your prompt response.

I have attached some logs files for issues 1. and 2. :
- 32_tracks_logs.tar.gz
.gz  32_tracks_logs.tar.gz (Size: 11.71 KB / Downloads: 1) - this contains a working scenario (if only a little slow) for an album with 32 tracks. This album displays fine in BubbleUPnP
- 55_tracks_logs.tar.gz
.gz  55_tracks_logs.tar.gz (Size: 14.96 KB / Downloads: 1) - this is for a larger album that reproduces problem 2.

I have tested the above with the same version of MediaPlayer, 0.0.0.6 (non-beta).

Problem 3. is reproducible with both 0.0.0.6 release and 0.0.0.7 beta. I have also attached logs for this problem, append_tracks_logs.tar.gz
.gz  append_tracks_logs.tar.gz (Size: 13.97 KB / Downloads: 2) . This is the sequence of steps:
- Deleted log file and PlayList.xml
- Started MediaPlayer
- Added a new album "50th Anniversary Celebration" using BubbleUPnP, which was added correctly and started playing
- Waited ~ 1min
- Appended another album, "A Baroque Festival" ("Enqueue" in BubbleUPnP)
- I got a busy cursor for a few seconds but at the end the new album was not show in BubbleUPnP's playlist view
Note: I then had a look at Kinsky's playlist and Kinsky diplays both albums correctly... So it looks like a BubbleUPnP issue.


For 4., I already had the power management disabled on the Wifi dongle. I will retest this later when I get everything else working well using wired ethernet. I suspect I might have to try a few wireless dongles until I find a really stable one (I'm currently using EdiMax with a RTL8192cu chipset).

Problem 5: I have tested it with the beta 0.0.0.7 and it is now resolved. I was not able to reproduce it anymore.

For 6. and 7. - please ignore these. They were caused by a network configuration problem (firewall/NAT) at my end. Both Kinsky and AssetControl work fine now.


Cheers,
Ciprian
Find all posts by this user
Quote this message in a reply
18-12-2013, 22:06
Post: #57
RE: Let's brainstorm..Setting up MinimServer to feed a USB DAC
Hi Ciprian,

Great, thanks for providing these log files..

I've just had a quick look at the logs, but unfortunately I am working away from home so can't do any testing.

For the 32 tracks, I can see the start of the tracks being added at 12:23:08

Code:
2013-12-18 12:23:08,923 [Thread-10] DEBUG [org.rpi.providers.PrvPlayList] DeleteAll Adapter: 192.168.1.110 uriPrefix: http://192.168.1.110:52821/device-Lounge-pi1-MediaRenderer/Upnp/resource/ Version:1
2013-12-18 12:23:09,268 [Thread-7] DEBUG [org.rpi.providers.PrvPlayList] Insert After: 0

And then at 12:23:18 the last track seems to be added and BubbleUPnP then reads the list.

Code:
2013-12-18 12:23:16,926 [Thread-10] DEBUG [org.rpi.providers.PrvPlayList] Insert After: 31
2013-12-18 12:23:17,122 [Thread-7] DEBUG [org.rpi.providers.PrvPlayList] ReadList Adapter: 192.168.1.110 uriPrefix: http://192.168.1.110:52821/device-Lounge-pi1-MediaRenderer/Upnp/resource/ Version:1
2013-12-18 12:23:17,126 [Thread-7] DEBUG [org.rpi.providers.PrvPlayList] ReadList Contains : 32
2013-12-18 12:23:18,752 [Thread-8] DEBUG [org.rpi.providers.PrvPlayList] ReadList Adapter: 192.168.1.110 uriPrefix: http://192.168.1.110:52821/device-Lounge-pi1-MediaRenderer/Upnp/resource/ Version:1
2013-12-18 12:23:18,768 [Thread-8] DEBUG [org.rpi.providers.PrvPlayList] ReadList Contains : 32

That would suggest that MediaPlayer completed adding the 32 tracks in about 10 seconds.

For the 55 tracks the first track starts to be added at 12:28:37

Code:
2013-12-18 12:28:37,001 [Thread-7] DEBUG [org.rpi.providers.PrvPlayList] DeleteAll

And the last track is added at 12:28:55 which would suggest MediaPlayer completed adding the 55 tracks in about 18 seconds.

Code:
2013-12-18 12:28:51,244 [Thread-8] DEBUG [org.rpi.providers.PrvPlayList] Insert After: 86
2013-12-18 12:28:51,664 [Thread-7] DEBUG [org.rpi.providers.PrvPlayList] ReadList Adapter: 192.168.1.110 uriPrefix: http://192.168.1.110:52821/device-Lounge-pi1-MediaRenderer/Upnp/resource/ Version:1
2013-12-18 12:28:51,679 [Thread-7] DEBUG [org.rpi.providers.PrvPlayList] ReadList Contains : 55
2013-12-18 12:28:53,501 [Thread-10] DEBUG [org.rpi.providers.PrvPlayList] ReadList Adapter: 192.168.1.110 uriPrefix: http://192.168.1.110:52821/device-Lounge-pi1-MediaRenderer/Upnp/resource/ Version:1
2013-12-18 12:28:53,506 [Thread-10] DEBUG [org.rpi.providers.PrvPlayList] ReadList Contains : 55
2013-12-18 12:28:55,144 [Thread-9] DEBUG [org.rpi.providers.PrvPlayList] ReadList Adapter: 192.168.1.110 uriPrefix: http://192.168.1.110:52821/device-Lounge-pi1-MediaRenderer/Upnp/resource/ Version:1
2013-12-18 12:28:55,149 [Thread-9] DEBUG [org.rpi.providers.PrvPlayList] ReadList Contains : 55

For the appending tracks, I can see 6 tracks being added

Code:
2013-12-18 16:05:10,650 [Thread-5] DEBUG [org.rpi.providers.PrvPlayList] Insert After: 0

2013-12-18 16:05:11,776 [Thread-3] DEBUG [org.rpi.providers.PrvPlayList] ReadList Contains : 6

Then a delay and more tracks being added

Code:
2013-12-18 16:06:41,918 [Thread-4] DEBUG [org.rpi.providers.PrvPlayList] Insert After: 6

2013-12-18 16:06:47,572 [Thread-3] DEBUG [org.rpi.providers.PrvPlayList] ReadList Contains : 23

In BubbleUPnP there is a setting called 'Use Eventing' in 'Settings/UPnP Tweaks', what do you have that set to? Can you also try testing with it set to the opposite value please.

If you test with Kinsky or Asset Control do you experience the same delays when adding tracks and can you see the playlist being dynamically updated when another Control Point updates the playlist?

The MediaPlayer ReadList method returns an xml result to BubbleUPnP, maybe there is something not quite right with the xml I create, although it seems to work with other Control Points.

I will do some testing when I get home..

Thanks again,

Pete.
Find all posts by this user
Quote this message in a reply
19-12-2013, 09:43
Post: #58
RE: Let's brainstorm..Setting up MinimServer to feed a USB DAC
Hi Pete,

Thanks for taking the time to look at the logs. It looks like MediaPlayer is doing everything as it should.

I have just tried enabling the "Eventing" setting in BubbleUPnP but it did not help (it was disabled when I ran the earlier tests).

With Kinsky, adding tracks to the playlist is much faster: adding the 'problematic' 55 track album takes only 6 seconds. When adding the album with Kinsky, only part of it appears in BubbleUPnP's playlist.

When adding that same 55 track album to the playlist using BubbleUPnP, all tracks appear in Kinsky (but none of them appear in BubbleUPnP).

So it very much looks like the problem is with BubbleUPnP. I will run some more tests to understand what is going on - I will turn on logging in BubbleUPnP and compare results between the two cases. I'll let you know if I find anything.

Cheers,
Ciprian
Find all posts by this user
Quote this message in a reply
19-12-2013, 20:05
Post: #59
RE: Let's brainstorm..Setting up MinimServer to feed a USB DAC
(19-12-2013 09:43)classical11 Wrote:  Hi Pete,

Thanks for taking the time to look at the logs. It looks like MediaPlayer is doing everything as it should.

I have just tried enabling the "Eventing" setting in BubbleUPnP but it did not help (it was disabled when I ran the earlier tests).

With Kinsky, adding tracks to the playlist is much faster: adding the 'problematic' 55 track album takes only 6 seconds. When adding the album with Kinsky, only part of it appears in BubbleUPnP's playlist.

When adding that same 55 track album to the playlist using BubbleUPnP, all tracks appear in Kinsky (but none of them appear in BubbleUPnP).

So it very much looks like the problem is with BubbleUPnP. I will run some more tests to understand what is going on - I will turn on logging in BubbleUPnP and compare results between the two cases. I'll let you know if I find anything.

Cheers,
Ciprian

Hi Ciprian,

I think also I need to look at MediaPlayer, when I developed MediaPlayer I used mainly Kinsky to test with.

Maybe BubbleUPnP expects a slightly different format for some of the messages from MediaPlayer.

If you find anything in the logs please let me know, I will also try and test to see if there is anything I can change on MediaPlayer.

The more I use BubbleUPnP the more I like it, so I would like to get the issues fixed.

Cheers,

Pete.
Find all posts by this user
Quote this message in a reply
27-12-2013, 12:47
Post: #60
RE: Let's brainstorm..Setting up MinimServer to feed a USB DAC
(19-12-2013 09:43)classical11 Wrote:  Hi Pete,

Thanks for taking the time to look at the logs. It looks like MediaPlayer is doing everything as it should.

I have just tried enabling the "Eventing" setting in BubbleUPnP but it did not help (it was disabled when I ran the earlier tests).

With Kinsky, adding tracks to the playlist is much faster: adding the 'problematic' 55 track album takes only 6 seconds. When adding the album with Kinsky, only part of it appears in BubbleUPnP's playlist.

When adding that same 55 track album to the playlist using BubbleUPnP, all tracks appear in Kinsky (but none of them appear in BubbleUPnP).

So it very much looks like the problem is with BubbleUPnP. I will run some more tests to understand what is going on - I will turn on logging in BubbleUPnP and compare results between the two cases. I'll let you know if I find anything.

Cheers,
Ciprian

Hi,

I've just done a test and if I use BubbleUPnP to add two tracks at the same time then it works.
If I add one track, wait a few seconds and add a second track, the second track is not displayed in the BubbleUPnP playlist even though it is added to the MediaPlayer playlist.

BUT, if I do the same test with a different Renderer, then BubbleUPnP works.

I will have a look at MediaPlayer to see if I can figure out why this is happening..

Cheers,

Pete.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)