# Raspberry Pi & DIY



## wakibaki

I guess a few people had the same reaction as I had when I first saw announcements about the credit-card-sized computer that would run linux with a full GUI. 

Cool. Where can I get one? When can I have it? Yesterday?

Anyway it actually arrived the day before yesterday, but I didn't have all the ancillaries to make it work. I put in a mail order, and most of the things I needed turned up today, except for the monitor. The delivery company loaded it on the wrong van, so I may not see it 'till Monday.

I got the Pi going by plugging it into a TV with HDMI, I didn't really want to have to fiddle with the cables on the TV, and I didn't have anything but a VGA monitor, but I couldnt wait for the new monitor to arrive.

I've posted this here in DIY because I think that most people who'll mess with the raspi will have a DIY bent, it's a geek's toy.

What am I going to do with it?

Well. I'm writing this post on it, if it gets used for nothing else.

One of the things I will be trying, like a lot of other people, is using it as a music (and possibly video) server. For music playback it can be run withoiut a monitor, you can talk to it over ethernet.

I recently bought a USB oscilloscope, so it may be used as a host for that, I'm not sure, I have to check out the software on Sourceforge, I know there's a third party program that runs my hardware, I just don't know if it runs under Linux.

I'm also working on a USB signal generator using an AD DDS (PCB off ebay). I've had some problems getting the USB interface going, but the raspi could end up being the controller for that, I want to move these instrument functions off the Windows box that is my main computer. If I can't solve the problems with the USB interface (in a reasonable timescale) then I may resort to trying to control the DDS using the raspi's GPIO pins.

Anyway, anyone who gets one, or who is just interested, feel free to post here. If any of the subjects raised generate a lot of interest then they can be cloned off into threads of their own.

More later...

w


----------



## ujamerstand

Newark postponed my shipment yet again. So now I'm set to receive it on the 5th. Must've fallen through the cracks, since they are suppose to send me an email if my order was affected by manufacturing delays. Boooo.


----------



## wakibaki

You've got my sympathy. I was fit to be tied when the monitor didn't come.
   
  w


----------



## qusp

may end up using one of these as an embedded crossover


----------



## wakibaki

Quote: 





qusp said:


> may end up using one of these as an embedded crossover


 
   
   
  I wondered about that.
   
  I know it has HDMI audio, I guess (hope) that's eight channels (7.1?). If it is you could pre-filter a wav file into 3 or 4 frequency bands per stereo channel. It'd be costly in storage terms though, then you'd need an HDMI audio/video splitter with 8 channels of audio out...
   
  Or I guess you could try an 8-channel USB interface, or even a bunch of 2-channel USB interfaces.
   
  I'm not sure how you'd achieve playback though, although it's probably not too difficult to write a player, there are quite a few 2-channel ones (for Windoze) out there already, some making extraordinary claims about having better sound than others because of extraordinary buffering strategies or WHY.
   
  I don't think the processor's capable of doing the processing in real time though, so I don't see inputting digital or analogue audio and outputting after a short delay, although that's just a guess on my part. I saw claims that an 850MHz x86 was sufficient, but that may have included a floating-point maths coprocessor.
   
  Limiting the requirement to 1 channel in and 2 out per pi might make it more feasable. 
   
  The real issue might be the quality of the DACs in the USB or HDMI interfaces, 3 ODACs is starting to stack up the cost.
   
  What kind of architecture do you envisage?
   
  w


----------



## Flume

Finally, took forever to ship, got my friends running XBMC. It's a sweet little computer. Now we're just waiting on the PI Plate from Adafruit.


----------



## DarkWinter

I was having a look at these today, and I saw that people have installed XMBC on it, looks great!, I wonder if the grub dac would work with it, mgiht be a very nice little desktop setup. I also found this case for them. http://builttospecstore.storenvy.com/products/404262-raspberry-pi-enclosure-kit


----------



## wakibaki

Would you believe it?
   
  Mine has developed a fault on the USB ports. The mouse went intermittent on me last night, so thinking that that was the problem I went and bought a new one today. Brought it back and plugged it in and got a screenful of USB hub errors on boot-up. Tried the old mouse on a Windows box and it works fine.
   
  So it's back to RS for this one. I hope they've got stock to send me a replacement.
   
  I don't think it's indicative of a design fault, early life is when part failures are most common, I guess they just give them a functional test without any burn-in to keep the costs down, that's what I would do.
   
  Grrrrr.
   
  w


----------



## ujamerstand

The usb fault has been documented, and they have suggested that it is possibly related to a weak power supply. Try swapping it out with something else?


----------



## wakibaki

Thanks for that. After reading what you wrote I googled for the problem (I was convinced previously there was a hardware fault) and I see that PSU issues can cause problems like this. It's a new 1A power supply, but I guess it could be at fault, I'll try and find another one or maybe build a regulated one that I'll have confidence in, I've got a few things I could steal an A socket off.
   
w


----------



## ujamerstand

How's it going? Getting it to work well yet?
   
  (Because they moved my ship date back a week AGAIN!)


----------



## Threeek

Hi,
   
  This is my first post on Head-Fi - here goes ...
   
  My Raspberry Pi turned up a couple of days ago, and I also  have PSU problems. So far I've tried 3 x different PSUs and with each one, I see problems varying between constant reboots/USB freezing/network interface dropping out. From reading various forums, it seems that there's no voltage regulator on the Pi, so it's a little bit picky in terms of which USB PSUs will work.
   
  There is a list of verified RPi hardware (including PSUs) here   http://elinux.org/RPi_VerifiedPeripherals
   
  Based on that list, I've just ordered this 2A PSU from Amazon UK for £4.99, which I'm hoping will do the trick:    http://www.amazon.co.uk/CostMad-Technology-Certified-Approved-Universal/dp/B005NZKTRG
   
  Once I get it working, I'm planning(/hoping) to run it headless, plug it into my E-Dac and run Squeezeslave to use it to stream audio from my Linux box that's running Logitech Squeezeserver.


----------



## wakibaki

I'm having difficulty making up my mind whether it's working OK or not. I *think* the problem I was having getting it to boot was PSU related, because I had the mouse and keyboard plugged into the regular USB ports on the board, and when I put the powered USB hub into the system it would boot again, but I'm having problems with the mouse becoming unresponsive. It doesn't stop altogether, just moves so slow that it's almost useless, I keep on overshooting the buttons and I have to click multiple times. Then the Ethernet seems slow too, pages take forever to load.
   
  I've (just) ordered one of those 'CostMad' 2A jobs from Amazon, should get here Saturday, maybe Monday. I might get impatient and build one.
   
  I bought a second SD card to try a different distro.
   
  Does anybody know of a comprehensive set of instructions on how to make a USB DAC work under a virgin install of Debian (or any other distro)?
   
  w


----------



## ujamerstand

which chip? You'll have to load the right ALSA device driver. I remember that TI's pcm2702 usb dac works right out of the box.
   
  Also, I'd simply go headless on the thing. If you really need to, xtunnel to the thing via ssh.


----------



## Threeek

Agree about going headless and connecting over ssh being the way forward. This is how I plan to use it once I have the power/network stabilised.
   
  I've read that it's easy to configure how much memory is assigned to graphics duties, and how much is available as system memory. As there's only 256GB overall, even with the lightweight windowing system, I'm inclined to use as much memory as possible for the system and go headless. I'd rather avoid paging to an SD card swap partition and burning up the write cycles.
   
  I'm hoping that PSU does the trick for you - I'll report back when I get a chance to try mine out. If you look in the system log you'll see the network interface going up and down, and something like "failed to read register on eth0". This seems to be symptomatic of a lack of power.
   
  There's a reasonable chance that the DAC will get auto-detected and the right kernel driver subsequently gets loaded - you need to then set it as the default sound device. I know it's not identical, but on Ubuntu my DAC just worked, so fingers crossed.
  
  Just for reference I found a troubleshooting page here:  http://elinux.org/R-Pi_Troubleshooting


----------



## wakibaki

It's a TI PCM2902E. Behringer UCA202. It didn't work right out of the box. I guess I could put the virgin install on the new card and try again, because I've modified quite a bit, but I only started into that because it didn't work. 
   
  I been talking to it using puTTY, but that doesn't give me any reassurance about the mouse behaviour. I know it's not a multi-core Intel x86 powerhouse, but I didn't expect it to need to go off every couple of minutes to think about whether it was going to move the mouse pointer.
   
  Anyway, they told me it would display HD video, so I don't want to be just talking to it in a terminal window on a Windows box. Maybe the new PSU will fix things.
   
  w


----------



## wakibaki

Things just took a turn for the better, I started to set up the new SD card. I found a set of instructions for expanding the partitions that included fixing up the swap file:- http://elsmorian.com/post/23366148056/basic-raspberry-pi-setup. The instructions I was following previously omitted the instructions for creating a new swap file. I thought at the time that this was a bit odd, but the page I was following seemed authoritative enough. Now I have 13.5G of free space and the computer (esp. the mouse) is acting quite normally, not fast, but quite acceptable. 
   
  There's an excellent and straightforward set of instructions for making the Pi serve music, either from onboard or streamed @ http://www.piggott.me.uk/blog/
   
  w


----------



## chinsettawong

Hi,
   
  I'm very interested in this Raspberry Pi, but I've read that there is a huge backorder.  Could you advise me where is the best place to place an order for one?
   
  Wachara C.


----------



## wakibaki

I live in the UK. I have a friend who wants one, so looked on uk.farnell.com. They said that they would soon be accepting regular orders (you had to register and wait previously). You may be able to order direct with a credit card or get someone in the UK to buy one and send it to you.
   
  I see they have a Thai site (Element 14) that you can access from the UK site by clicking 'Change Country' in the top righthand corner.
   
  w


----------



## chinsettawong

Thanks a lot for the info. I'll try that.

Wachara C.


----------



## Threeek

Excellent, glad to hear you're making good progress with it now. Thanks for the link, looks useful.
   
  The power supply has done the trick for my problems - my Pi has been up for over an hour now and I'm logged into it remotely.


----------



## Threeek

Also, it seems to have detected my Epiphany Acoustics E-Dac when I just plumbed it in:
   
  [ 3593.200449] usb 1-1.3: new full speed USB device number 4 using dwc_otg
 [ 3593.364089] usb 1-1.3: New USB device found, idVendor=1852, idProduct=7022
 [ 3593.364128] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
 [ 3593.364149] usb 1-1.3: Product: UAC1 DAC
 [ 3593.364177] usb 1-1.3: Manufacturer: Binary Audio
 [ 3593.386741] input: Binary Audio UAC1 DAC as /devices/platform/bcm2708_usb/usb1/1-1/1-1.3/1-1.3:1.0/input/input0
 [ 3593.386884] generic-usb 0003:1852:7022.0001: input: USB HID v1.00 Device [Binary Audio UAC1 DAC] on usb-bcm2708_usb-1.3/input0
 [ 3593.892579] usbcore: registered new interface driver snd-usb-audio
   
  Wish I had time to actually try playing some audio to it now to see if it's working


----------



## Threeek

Update: I've now got my Raspberry Pi working as a Squeezebox streamer with squeezeslave and my E-DAC. I had a problem in that squeezeslave couldn't see any sound devices when I ran 'squeezeslave -L'. After some Googling, I determined that I had to add my login ID to the 'audio' group of users in order to have access to the soundcard, i.e.
   
  sudo adduser <username> audio
   
  Logging in and logging out resulted in 'squeezeslave -L' giving the following output:
   
  Output devices:
   0: (ALSA) UAC1 DAC: USB Audio (hw:0,0) (11/46)
   1: (ALSA) front (11/46)
   2: (ALSA) surround40 (11/46)
   3: (ALSA) iec958 (11/46)
   4: (ALSA) spdif (11/46)
 * 5: (ALSA) default (42/46)
   6: (ALSA) dmix (42/42)

 And then when I ran 'squeezeslave -D -F', it detected my squeezeserver and it worked 
   
  Sound quality is good, though I've not had chance for a proper listen. I've certainly had no glitches, gaps, or jumps yet.
   
  This was easier to setup than I expected.
   
   
  edit: I've observed that it's only using 15% of the Raspberry Pi's CPU, so there's more than enough processor power:


----------



## wakibaki

I did manage to get a few seconds of sound out of the USB DAC before it fell over and started popping up error messages. I think the problem may be the powered USB hub I've been using (I bought a second power supply from the eLinux list). I _have_ got another hub here but it's a bit awkward physically to unplug it from the existing system and rewire it so it comes on simultaneously with the rpi.
   
  I'm finding the whole thing pretty unrewarding, I've got a lot of other stuff here I can work on and get results. I've got at least 20 hours in the rpi with nothing but flaky behaviour to show for it plus I've bought 2 PSUs, a USB hub, various cables, keyboard, mouse, a new monitor and 2 SD cards. The more time goes by with nothing to show, the less likely I am to bother switching it on...
   
  w


----------



## KimLaroux

Quote: 





wakibaki said:


> I did manage to get a few seconds of sound out of the USB DAC before it fell over and started popping up error messages. I think the problem may be the powered USB hub I've been using (I bought a second power supply from the eLinux list). I _have_ got another hub here but it's a bit awkward physically to unplug it from the existing system and rewire it so it comes on simultaneously with the rpi.
> 
> *I'm finding the whole thing pretty unrewarding, I've got a lot of other stuff here I can work on and get results. I've got at least 20 hours in the rpi with nothing but flaky behaviour to show for it plus I've bought 2 PSUs, a USB hub, various cables, keyboard, mouse, a new monitor and 2 SD cards. The more time goes by with nothing to show, the less likely I am to bother switching it on...*
> 
> w


 
   
  Is this in regard to the raspberry pi in general, or simply for it's use as a music source?


----------



## wakibaki

I'm taking the problems involved in getting it up as a music server as representative of it as a whole. 
   
  I was hoping maybe to use it to run my USB oscilloscope and signal generator and maybe as a silent recorder, my desktop's fan is really noisy. I don't need it for playback, there are numerous sources across 4 different rooms here all with hardwired ethernet.
   
  I wrote my first program 45 years ago, it's not as though I don't know what I'm doing. I just don't have the energy to spend hours on a scattergun technique of trying every possible variation of setup until eventually it springs into life. I don't need some Linux guru telling me I haven't applied myself, I just want some straightforward instructions and then it works. I don't need to be re-inventing the wheel.
   
  I was given to understand it had enough processing power to support HD video and gaming. I'm spending too much time just waiting to get back control of the mouse. Talking to it on the command line from another computer just isn't fun for me, it's work. I threw out an old Intel box with Linux I used to use as a gateway and webserver when I bought a modem router.
   
  It could be I've got some hardware problems but I've already spent 4 or 5 times what the rpi cost on ancillaries and my appetite for spending more is diminishing rapidly
   
  I don't really see it exciting the explosion of interest in programming the developers are hoping for. If it turns out that a new USB hub or maybe even power cable fixes things maybe I'll change my opinion. Maybe.
   
  w


----------



## mechgamer123

Has anyone tried using this little guy as a video player? Someone told me it could handle 1080p content easily...


----------



## Boris-Aries

Well here is something I found, and since this is the D.I.Y.'ers area, I thought it might be of interest for those that have Pi's.
   
  http://www.electronics-lab.com/blog/?tag=smps go to the centre of the page  and follow the link. It seems an interesting read and mod. The direct link is here: http://www.bitwizard.nl/wiki/index.php?title=Reducing_power_consumption_of_a_raspberry_Pi
   
  and for interesting enclosures, here is another link:
  http://forum.stmlabs.com/archive/index.php?thread-719-1.html
  
  Let me know guys what you think


----------



## wakibaki

Yesterday I downloaded Debian 'Wheezy' and loaded it onto my SD card. It's a big improvement over Squeeze, having a menu with a number of options on first boot. These include auto-resizing of partitions, disabling overscan to allow the desktop to fully occupy 1900*1080, locale selection, timezone setting and a few others. It also seems to run quicker all round, in my limited experience.
   
  There are no music players in this distro, so I installed Audacity which I'm familiar with.
   
  The DAC was detected and installed automatically, and I plugged in a USB stick with some MP3s on it.
   
  The first problem was that the USB stick kept connecting and disconnecting. This caused the OS to pup up one window after another asking if I wanted to mount the drive on the filesystem. I managed to get a track onto the SD card and loaded it into Audacity. When I tried to play it I just got a gravelly sound with the track faintly in the background. Eventually I gave up and created a test tone to see if that got me any further. It played for about 2 seconds then the program hung solid. The light on the DAC keeps going on and off at irregular intervals.
   
  This morning a new USB A to Micro B cable arrived. I tried booting with this in place but there was no improvement. The Ethernet port will not fire up unless one of the 2 USB hubs I have got is plugged in. The other hub just fires up into kernel panic.
   
  I've now tried 2 different USB cables (one from the ModMyPi shop), 2 different PSUs (one from the eLinux verified hardware list), 2 different powered USB hubs and a wired mouse and keyboard and a wireless desktop.
   
  I think I've done my due diligence, this afternoon I returned the rpi to RS marked as faulty for replacement.
   
  More when I get the new one.
   
  w
   
  The low power mod looks interesting.


----------



## Boris-Aries

Hi wakibaki,
  I have a suggestion for you, if you would like to try it out.
  Once you get your new one in, if you have an old PSU lying around, then that is perfect.
  Here are the steps, this is to make sure that everything will work ok.
  Make two simple linear - only because they are easier on BOM, then you can make your own swithing or buy off eBay.
   
  The 5v to be at least 2Amp or 3Amp, or for convinience, use the TO220 1.5A the L7805, not LM unless that is what you have, then it will be good for 1 Amp. That should be enough anyway for the usb ports, just...
  Each USB channel needs at least 500mAh, as per spec or a little more, for USB rev 1.1 - 2.0.
   
  Then also make a 3.3v.
  This can be as little as 0.5A or 1A. This is due to powering the board only.
   
  Then connect the power to the header pins.
   
  Use the 12v from the 4 pin molex or diskette drive connector, either size molex connector will do, if going up to 2A.
  More than that, use the larger Molex connector.
   
  This way, you will know if it is the power, if it is, then you can just de-solder the onboard linear, and buy those switching ones  and you will also have two regulated power supplies boards ready for other experiments.
   
  Once you get all that sorted, just add an external H.D.D. for extra storage 
   
  Another thing to check for, but now a little late, is the 5v rail on the USB. It should be between 4.75v and 5.25v, anything outside that range, and you will be having problems.
   
  Now, as for your "powered" USB hub... have you ever checked the power supply rating for it?
   
  I ask since *most of the ones I have personally come across have a very small power adaptor *( or wall cube or whatever it is called in other parts of the world). It should be capable of at least 500mAh PER PORT.
  I have seen adaptor included in packs that were 300mAh!! Much less than what the USB port actually provides...
  Unless you do a design similar to what was published in Silicon Chip a few years ago... then you need to beef up your adaptor to match your hub.
   
  p.s. I do not own yet a Pi, but I am contemplating on buying one soon in the next couple of months. Not to mention I will need to learn how to do the linux thing.


----------



## wakibaki

Hi Boris
   
  It was a bit lazy of me not to check the voltages on the board but the other evidence of a fault was overwhelming in the end. When the Ethernet wouldn't come up with the eLinux recommended supply and the USB cable from ModMyPi with no other load that was the last straw. The device was totally incommunicado headless. Useless.
   
  I do have numerous PSUs and regulators lying around here, but once you plug in a homebuilt supply you're on shaky ground as far as warranty claims are concerned. I just want to get a benchmark for the thing's reliable performance before I move on.
   
  Linux is actually a PITA in many respects. The Squeeze distro wouldn't even let me drag and drop files from the USB stick to the SD card when logged in as pi. Permission denied. You had to open the file manager as root. What kind of nonsense is that? A computer where you log on as a user who can't do anything other than on the command line if you prefix everything with 'sudo'. Text editors that run in character mode with a bunch of cryptic keystroke combinations to run commands. I gave up stuff like that years ago with Wordstar and DOS programming. I don't need to be an expert in gobbledygook to feel good about myself (anymore), and stuff like that is going to piss off naiive users quick time.
   
  w


----------



## MrSlim

In case anyone is interested, there is a new "Raspbian" disto, available on the Raspberry Pi site that takes better advantage of the floating point hardware in the ARM processor, and improves performance in a number of ways..  particularly web browsing (not that we're talking about using it in that way here)., but it's good to know they are tweaking things to get the most out of it..


----------



## wakibaki

The replacement rpi arrived this morning and to my relief this one works like the other one didn't.
   
  It's still a fairly slow computer, you have to be patient while it does things like installing a new package, but at least now mine fires up with the ethernet port active and it talks to the USB DAC.
   
  The sound from the USB DAC leaves something to be desired though, there's a popping superimposed on the loudest peaks of the music, sounds a bit like a scratched vinyl record. I wouldn't use it as a music server in this configuration, it definitely isn't acceptable as it stands.
   
  I'll play with it some more...
   
  w


----------



## Boris-Aries

Hi,
  Sorry for the late reply.
  It is great everything is "working", albeit slowly.
  As for the popping, it may have to do with jitter. Not sure how you can get around that, maybe a different driver to make it work in async mode? Just a wild guess.
   
  Btw, thanks for the follow-up.


----------



## Avro_Arrow

You knew it was just a matter of time...
   
  Raspberry Pi has a friend.


----------



## ujamerstand

Eh, but that thing has almost half the processing power and a quarter of the ram...No ethernet port either. D:


----------



## KimLaroux

But it's smaller, uses a lot less energy, has 60 GPIO pins and is fully open source and open hardware.
   
  The Raspi Model A consumes 2.5W and the Model B consumes 3.5W. The OLinuxXino Micro consumes between 0.3W and 1W, depending on what hardware is activated. They have other models, like the the Maxi, which has Ethernet, stereo audio IN and OUT. And guess what? The Maxi only consumes between 0.6W and 1.5W. You can turn off different features on the OLinuXino boards to save energy. For an application running on a battery or solar, the Raspi is not a preferable choice here.
   
Olimex is working on a bigger one around the A13 CORTEX-A8 running at 1 Ghz and 512MB of RAM, which features an LCD port so you can plug a mini LCD directly into it. It has 74 GPIO pins.
   
  Also, the Raspi only has 8 GPIO pins, hardly accessed trough the double row header. The OLinuXino Micro has two rows of 30 GPIO pins. The form factor allows the board to be mounted directly over another larger PCB.
   
  Just because the Raspi is hyped doesn't mean it's now the yard stick from which everything is compared to. It's not the first mini computer running Linux available, nor the cheapest, nor the most powerful... Yes the Raspi is cool, but it's just being stubborn to automatically discard any other mini computer as being a "Raspberry Pi wannabe". Not everybody need everything the Raspi has on board, and some people need features the Raspi does not have.


----------



## ujamerstand

Overreaction much? I never said raspi i is the best one size fit all solution. It'd be nice if you don't put words in my mouth. And I do agree, it isn't that great for portable usage; it's also hard to mount the darn thing securely in a portable setup. I personally do not need to worry about power usage though, and compared to the product linked, the raspberry pi simply has more processing power and ram to work with at similar price point, it also have an ethernet port when the other one don't. That's why I liked it better. That's all I'm saying.
   
  Maxi does seem very nice, being carried by mouser and digikey is a plus, so's the fully open source part. The cortex-a8 based kit also sounds nice. An easy to work with display solution is always welcome. Got more info on it?


----------



## onefatsurfer

I just finished setting up my Raspberry Pi as a server for my Logitech Transporter.  Thing works awesome.


----------



## wakibaki

I'm afraid $1000 for a streaming music player is exactly what I was hoping to avoid. I wanted the RPi to strip data from my NAS and feed it out the USB port to a DAC and thence to one or other of my amplifiers. It proved incapable of reading from its own SD card and sending it to the DAC without gaps and pops.
   
  I dunno, maybe somebody's found out how to do it reliably, but a setup that would work no problem on most other Linux boxes just didn't hack it, and I didn't have the patience to mess with it.
   
  Anyway I went to a radio rally and a guy sold me a pair of Celestion DItton 15s in great condition for £10, which is a tenth of what you'd pay for them on ebay, and I hooked them up to the new HDTV via a T-amp that did come from ebay (10 dollars, plus 10 for a PSU) and put a zillion MP3s on a USB stick, plugged it into the TV, and it all works great using the remote.
   
  I found a use for the RPi too.
   
  My wife hated me using the desktop in the same room as her because of the fan noise. I discovered that you could log on to the PC in the bedroom (we have wired Ethernet everywhere, as well as the wireless) using its native (WinXP) remote desktop connection and running rdesktop on the RPi. This has the advantage that the RPi runs the monitor in full HD, which the video card in the PC was too old to manage. Plus I have some other PCs around the house, and I can log on to any of them. The remote desktop is not quite as responsive as sitting at the machines, but it's OK, and I can use my existing PCB design software, which is a bonus.
   
  w


----------



## onefatsurfer

You can set up squeezeplug on the pi and connect your USB DAC to the pi and it'll do what you want. I haven't tried it yet, but I've read of people doing just that with it. Connect an LCD screen to it and do some programming and you should be able to read what's playing, skip songs etc. That's my next project. I spent $720 on my transporter, my wife nearly killed me, and if I can get a raspberry pi set up to replicate it's functionality and ease of use, I'll use that and sell the transporter. For now, I'm enjoying the silent, power efficient server.


----------



## onefatsurfer

If you do set up squeezeplug on the pi, make sure you update in the ssh interface, to the newest version.


----------



## onefatsurfer

Actually, now that I think about it, you could use the Logitech app to control it, most likely. I'll get mine set up like that and keep everyone posted.


----------



## wakibaki

Quote: 





onefatsurfer said:


> You can set up squeezeplug on the pi and connect your USB DAC to the pi and it'll do what you want. I haven't tried it yet, but I've read of people doing just that with it.


 
   
  Yes, that's what I read, early on just after the release. Then a load of flame wars broke out on the RPi forum, because it turned out there was some kind of hardware problem with the USB on the first version, many people saying that it wouldn't support reliable audio playback, and it became very difficult to tell what was the actual state of play. I certainly couldn't get mine to work with what I thought was a minimal software burden, I had to return the first one because it had a more serious hardware fault, and by the time I got the replacement I had lost interest in trying to make it work.
   
  I did think about trying the HDMI audio, but it would have meant re-tasking one of the TV's, because the HD monitor I bought to use with the RPi doesn't have audio. You can't get an HDMI audio splitter unless you pay quite a lot (more than the cost of an RPi), so I chucked it in a box and left it for months, until I thought about using it as a remote desktop.
   
  If you get it working satisfactorily, please post a blow-by-blow description of the setup process, I'm sure lots of people here would welcome a verified description of exactly how to set up a working system. As you can see the thread has fallen into abeyance for some time, which I think indicates that nobody here has come across a satisfactory working system.
   
  Oh, I'd also be interested to know if yours is the newer version with increased memory, as there may be other hardware updates incorporated which impact the USB audio.
   
  w


----------



## onefatsurfer

Quote: 





wakibaki said:


> Yes, that's what I read, early on just after the release. Then a load of flame wars broke out on the RPi forum, because it turned out there was some kind of hardware problem with the USB on the first version, many people saying that it wouldn't support reliable audio playback, and it became very difficult to tell what was the actual state of play. I certainly couldn't get mine to work with what I thought was a minimal software burden, I had to return the first one because it had a more serious hardware fault, and by the time I got the replacement I had lost interest in trying to make it work.
> 
> I did think about trying the HDMI audio, but it would have meant re-tasking one of the TV's, because the HD monitor I bought to use with the RPi doesn't have audio. You can't get an HDMI audio splitter unless you pay quite a lot (more than the cost of an RPi), so I chucked it in a box and left it for months, until I thought about using it as a remote desktop.
> 
> ...


 
  Mine is the newest version as of today, with 512mb ram.  I haven't tried setting up USB audio since I'm using mine as a server at the moment, but today when I go home, I'm going to give it a shot setting it up as a home-built squeezebox.  I'll keep you posted after I get it working (or if I don't) with whatever problems I come across.


----------



## onefatsurfer

OK I have it set up as a player through my Fiio E10, but I'm having some issues at the moment with poor audio quality.  When I get this all figured out, I'm going to build another one from scratch (I ordered another raspberry pi yesterday) and I'll post on here step by step how to do it.  It's very doable, there's just something screwy with my USB audio.


----------



## onefatsurfer

I am still having these issues.  I think it has something to do with the actual hardware of the Raspberry Pi.  I'm going to try one more thing and if that doesn't work, I'll use the Pi solely as a media server hidden away in a closet somewhere, and I'll try using an android stick for the same intended purpose.


----------



## C3IQ

Hello,
    I've been floating around Head Fi and the internet building and computer and audio system for my office.  This led me to build a listening station for my better half:
   

 Little Dot III
 AKG K-701
 SMSL SD-1955+
 Squeezebox Duet remote control (extravagant when a smart phone would do the same thing)
 Raspberry PI
   
  I've forgotten all of the steps to get good audio from the Pi but there are two things:
   
  o blacklist the on board audio: /etc/modules (comment out snd-bcm2835)
  o My command line:
   
  /usr/local/bin/squeezeslave-1.2-381 -v off --mac 00:00:00:00:0a:0b -R 192.168.0.3 --latency 1000 >/tmp/sq.log 2>&1 &
   
  which I put in /etc/rc.local
   
  The '-v off' switches off the software volume control allowing bit perfect sound mapped to the quality of the DAC.
   
  My /etc/asound.conf :
   
  pcm.mmap0 {
     type mmap_emul;
     slave {
       pcm "hw:0,0";
     }
 }

 pcm.!default {
   type plug;
   slave {
     pcm mmap0;
   }
 }
  
  may be relevant but I need to investigate that a bit more.
   
  [edit] Having the Duet remote too close to the Little Dot introduces some noise!
   
  I'm smiling now as I listen to Muddy Water's Folk Singer.
   
  There is a slight pop at the beginning of a track.  This, apparently, is because of the DAC's chip selecting the correct mode.  Other's are talking about HDMI sound but I don't know how to access that without a TV/monitor in the way.
   
  I hope this is useful and thanks for helping me to spend a small fortune on audio.
   
  Owen.


----------



## mboerma

Hi Owen, 
   
  Just starting to look into this. Did you also see this thread?
   
http://www.head-fi.org/t/631355/raspberry-pi-dac-for-headless-audio-player
   
  It would be great if you could give some more pointers to how to get to the stage where you are now?
   
  I would like to use the RPI as a headless computer hooked up to my DAC, using a Samba share to get the music from. It would be great if it could output 24/96 from Flac files. Do you know/think this is possible?
   
  Thanks,
  Maarten


----------



## onefatsurfer

I've pretty much given up on using the Pi as a playback device.  I purchased an android 4.1 stick that I'm going to try using.  If that doesn't work fairly easily, I'll go back to the pi and keep trying to get that to work.  For now, my frustration has gotten the better of me.


----------



## wakibaki

@ofs
   
  That's pretty much where I ended up.
   
  For anyone else...
   
   
  What _I_ need is a straightforward set of instructions with no missing details on how to go from a RPi + blank SD card + generic USB DAC to a system where you can load a (16/44k1) .wav file onto the SD card and play it back over the USB with no pops, clicks, audio hash or interruptions whatsoever.
   
  Headless is not required, I'll treat that as a separate issue and get to it when I've got it working with a monitor.
   
  I'd prefer to be able to access my NAS, but again I'll treat that as a separate issue.
   
  As of October 2012 this issue was still being discussed as unresolved on the RPi forum in the highest ranked thread on google. Discussion has died out with the continued failure to resolve the issue.
   
  Until such time as I discover simple instructions on how to make this most basic of setups work reliably, I'm forced to continue to regard the RPi as unsuitable for this application.
   
  No smartphones, squeezebox or other hardware please, the whole point is cheap, and do-able with equipment already on hand. RPi, SD card, DAC (that works under Windoze), monitor, keyboard, mouse. It should be possible to make this happen, but so far, no joy. Thus far I'm out a lot of hours of work and I've got no inclination to waste any more time. Hell, I already solved this by putting everything on a USB stick as MP3s and plugging it into the TV. Instant jukebox with remote. My only preference would be to make it access my NAS so I don't have to put new tracks onto the USB stick. It's only curiosity that keeps me going with the RPI, I even have another use for it now.
   
  w


----------



## onefatsurfer

Quote: 





wakibaki said:


> @ofs
> 
> That's pretty much where I ended up.
> 
> ...


 
  Your desire is very easy to do using Squeezeplug software http://www.squeezeplug.de  .  The issue that I ran into is with pops and clicks using my USB DAC/AMP (a Fiio E10) but most people in the squeezeplug thread have no problems with their USB audio since they're using a dirt cheap DAC.  For some reason, raspberry pi doesn't like the Fiio.. My plan for this was to use an ODAC but I am not willing to invest the $100 to buy one until I get my E10 working.  If you install Logitech Media Server on your NAS, you will be able to access the music on your NAS.  If you use a cheap DAC as recommended on the raspberry pi wiki, you shouldn't have many problems.  It's not a cakewalk right out of the box, but it should work.  The new version of squeezeplug (version 6) is much more intuitive than the older version.


----------



## wakibaki

onefatsurfer said:


> Your desire is very easy to do


 
   
  If I only had a dollar for every time I heard this.
   



onefatsurfer said:


> The issue that I ran into is with pops and clicks using my USB DAC


 
   
   


  Thanks, but I notice yours doesn't work...
   
   
  The issue I ran unto is pops and clicks using my USB DAC. As I have stated numerous times. I've got no desire to spend another 10 or 20 hours ferreting through a bunch of ill-documented rigmarole to end up with pops and clicks.
   
  When yours works, come back and tell me how you did it.
   
  w
   
  It's not a Fiio, it's a Behringer, which uses one of the commonest DACs, the [size=small]TI PCM2902. If it can't make this work out of the box, it's a waste of time.[/size]


----------



## onefatsurfer

I'm not trying to make it work anymore. I'm getting an android stick and trying to set it up with that.


----------



## wakibaki

Android stick. Hadn't seen those. Cool.
   
  I already got my wife's Nexus 7 playing audio off the NAS, so it should be a snap with an android stick.
   
  w


----------



## onefatsurfer

Quote: 





wakibaki said:


> Android stick. Hadn't seen those. Cool.
> 
> I already got my wife's Nexus 7 playing audio off the NAS, so it should be a snap with an android stick.
> 
> w


 
  You have to use one that has Android 4.1, if I've done my research correctly.  This is the one I bought.  I'll post a new thread with my results and PM it to you when I get it working.:
   
  http://www.amazon.com/MK808-Android-Rockchip-RK3066-Cortex-A9/dp/B009OX22B4/ref=sr_1_1?ie=UTF8&qid=1357614221&sr=8-1&keywords=mk+808


----------



## Threeek

I also had pops, clicks and digital noise using Squeezeplug on my R-Pi. I had the same problem with both an ODAC and then with my HDP.
   
  In the end I'm afraid I gave up trying to use the R-Pi, and got a Shuttle XS36V and installed Ubuntu on it to use as my bedside streamer. Possibly overkill, but it works perfectly as a headless streamer driven from the Logitech remote.
  
  I'd be very interested to hear how people get on with using an Android stick with an external DAC - I hope it goes well.


----------



## onefatsurfer

Good to know it doesn't work with the ODAC either. I think it's a core driver issue, but I'm done with it. Hopefully, the android stick will recognize the ODAC and all I'll have to do is pay $5 for SqueezePlayer and that's it. Wishful thinking,I know. Hopefully by next week the android stick will be here and I can test.





threeek said:


> I also had pops, clicks and digital noise using Squeezeplug on my R-Pi. I had the same problem with both an ODAC and then with my HDP.
> 
> In the end I'm afraid I gave up trying to use the R-Pi, and got a Shuttle XS36V and installed Ubuntu on it to use as my bedside streamer. Possibly overkill, but it works perfectly as a headless streamer driven from the Logitech remote.
> 
> ...


----------



## smopoim86

For the people that are getting popping. Are you connecting the DAC through a powered USB hub? I could see there being power issues if it is not.  
   
  IIRC the NIC is on the usb bus as well. Does the popping happen when played from the SD card?


----------



## wakibaki

Yes and yes.
   
  I had to return the first Pi I got because of it's unreliability, it kept throwing error messages during boot, different error messages each time, sometimes pages of them followed by a failure to produce a command prompt. To try to resolve the problems I was having I bought a second USB PSU, and tried a second powered USB hub. When neither of these fixed the problem in any combination I returned the PI to RS. The replacement didn't have those particular problems.
   
  I am trying (have tried) to get MPD to play tracks from the SD card, I figured that was the place to start, as simple as possible. I even created a continuous tone in Audacity and tried to play that. Always the pops and clicks, sometimes the output just stopped happening at all.
   
  I'm using the Pi at the moment as a remote desktop to access another machine under the table (to write this), because the video card in the Win box won't run this monitor at 1920*1080, and it makes PCB layout (and other things) a pain because circles appear as ovals. Using the Pi I can get full HD resolution and access any computer in the house, it's good for that, the refresh is surprisingly quick, and I only lose the occasional mouse click.
   
  Going to get an android stick like ofs I think, even though I don't need it.
   
  w


----------



## onefatsurfer

My android stick is supposed to be coming in the mail tomorrow. I'll test it and let you know how it works. The raspberry pi was a huge embarrassing failure.


----------



## Threeek

I tried both of my DACs with and without a powered hub and it made no difference to the noise. In its current state, I feel that the Pi doesn't seem suitable as an audio solution unfortunately. It's always possible that this issue could be debugged and fixed by someone in the Linux community in future.


----------



## Goobley

I did have a quick search of the thread and didn't see any mention of this, but did anybody try setting their USB speed to 1.1? I recall reading about it a little while ago and a fair number of people said it gave them crystal sound when they did (it does however kill the ethernet speed). I believe that this issue is supposed to be fixed on the revision c boards too.
   
  Cheers


----------



## onefatsurfer

http://www.head-fi.org/t/645884/simple-low-cost-hifi-network-music-streaming-device
   
  Give up on the Raspberry Pi.  Android is so simple it's ridiculous.


----------



## C3IQ

Hello,
    I've been reading the thread while I choose a DAC that's a little more up market and difficult to drive because it will be 24bit/192khz.  I have two Raspberry Pis running without any extra noises.  One is running the SMSL DAC I mentioned earlier and the other is an Aureon 5.1 external soundcard (only for stereo.)  Both are set up the same.  When I first played with a Pi I didn't have a suitable power supply because of this I got the problems mentioned here plus network drop outs etc.  I read that the Pi needs a 2amp power supply.  I bought these from that-auction-site.  Search for 'white 2 amp uk 3-pin micro USB mains charger'.  There is a problem on the original model B's too.  I haven't tried to fix it but here is the detail:
   
  http://himeshp.blogspot.se/2012/07/raspberry-pi-usb-power-issues-ultimate.html
   
  This is how I set up my Pi.  The early distributions of GNU/Linux for the Pi weren't great for web browsing etc.  I bought one for the kids and one for me to try Squeezeslave on.  I gave up on using the Pi as a GNU/Linux for the kids.  For setting up Squeezeslave you don't need a monitor and keyboard.  I only use those until the point I have SSH running.  It could be that people who are having problems are using their Pis connected through HDMI.  From SSH, I disable the on board audio and reboot.  The DAC will be seen as hw1,something.  You can change it so that it the DAC is hw0,something but it's not necessary.
   
  I use this:
   
  /usr/local/bin/squeezeslave-1.2-381 -v off --mac 00:00:00:00:0a:0b -R 192.168.0.3 --latency 1000
   
  from the lnx-armel distribution on:
   
  http://sourceforge.net/projects/softsqueeze/files/squeezeslave/
   
  Because I've disabled the onboard sound I don't have point the software at the DAC but this:
   
  ~# /usr/local/bin/squeezeslave-1.2-381 -L
 Output devices:
 * 0: (ALSA) S.M.S.L  SD-1955+: USB Audio #1 (hw:0,1) (10/42)
  
  will list devices.
   
  Other things that might make a difference:
   
  o I run squeezeslave as root.
  o I've played with nrpacks.  Setting to 1 causes noise.  Not setting and setting to 10 gives the same great performance.
   
  Maybe I'm lucky.  Maybe my USB cables are super duper audio USB cables (I doubt it).  I would have been very upset if the sound was awful on the DAC, headphone amp and headphones that cost me £500.  It worked first time with the Aureon though.
   
  To the person who would like a prescription for perfect audio on the Pi without any investment of time:  I'd rather struggle with this than queue on a Saturday to argue the toss with a spotty 'Genius' at the Apple bar.  This is way cheaper too.
   
  I'm going to write up a start-from-scratch recipe when I get my new DAC.  I suspect that the Pi having so much hardware on its USB bus maybe too much if I add 192khz to the mix.  I'll post a link here whether it works or not.
   
  [edit] I believe 192khz will need a 3.7.1 Linux kernel for asynchronous USB.


----------

