Welcome
Username or Email:

Password:


Missing Code




[ ]
[ ]
Online
  • Guests: 16
  • Members: 0
  • Newest Member: omjtest
  • Most ever online: 396
    Guests: 396, Members: 0 on 12 Jan : 12:51
Members Birthdays:
One birthday today, congrats!
AlexRU73 (39)


Next birthdays
05/19 cbfull (52)
05/19 Steve Ward (39)
05/20 Vaxian (17)
Contact
If you need assistance, please send an email to forum at 4hv dot org. To ensure your email is not marked as spam, please include the phrase "4hv help" in the subject line. You can also find assistance via IRC, at irc.shadowworld.net, room #hvcomm.
Support 4hv.org!
Donate:
4hv.org is hosted on a dedicated server. Unfortunately, this server costs and we rely on the help of site members to keep 4hv.org running. Please consider donating. We will place your name on the thanks list and you'll be helping to keep 4hv.org alive and free for everyone. Members whose names appear in red bold have donated recently. Green bold denotes those who have recently donated to keep the server carbon neutral.


Special Thanks To:
  • Aaron Holmes
  • Aaron Wheeler
  • Adam Horden
  • Alan Scrimgeour
  • Andre
  • Andrew Haynes
  • Anonymous000
  • asabase
  • Austin Weil
  • barney
  • Barry
  • Bert Hickman
  • Bill Kukowski
  • Blitzorn
  • Brandon Paradelas
  • Bruce Bowling
  • BubeeMike
  • Byong Park
  • Cesiumsponge
  • Chris F.
  • Chris Hooper
  • Corey Worthington
  • Derek Woodroffe
  • Dalus
  • Dan Strother
  • Daniel Davis
  • Daniel Uhrenholt
  • datasheetarchive
  • Dave Billington
  • Dave Marshall
  • David F.
  • Dennis Rogers
  • drelectrix
  • Dr. John Gudenas
  • Dr. Spark
  • E.TexasTesla
  • eastvoltresearch
  • Eirik Taylor
  • Erik Dyakov
  • Erlend^SE
  • Finn Hammer
  • Firebug24k
  • GalliumMan
  • Gary Peterson
  • George Slade
  • GhostNull
  • Gordon Mcknight
  • Graham Armitage
  • Grant
  • GreySoul
  • Henry H
  • IamSmooth
  • In memory of Leo Powning
  • Jacob Cash
  • James Howells
  • James Pawson
  • Jeff Greenfield
  • Jeff Thomas
  • Jesse Frost
  • Jim Mitchell
  • jlr134
  • Joe Mastroianni
  • John Forcina
  • John Oberg
  • John Willcutt
  • Jon Newcomb
  • klugesmith
  • Leslie Wright
  • Lutz Hoffman
  • Mads Barnkob
  • Martin King
  • Mats Karlsson
  • Matt Gibson
  • Matthew Guidry
  • mbd
  • Michael D'Angelo
  • Mikkel
  • mileswaldron
  • mister_rf
  • Neil Foster
  • Nick de Smith
  • Nick Soroka
  • nicklenorp
  • Nik
  • Norman Stanley
  • Patrick Coleman
  • Paul Brodie
  • Paul Jordan
  • Paul Montgomery
  • Ped
  • Peter Krogen
  • Peter Terren
  • PhilGood
  • Richard Feldman
  • Robert Bush
  • Royce Bailey
  • Scott Fusare
  • Scott Newman
  • smiffy
  • Stella
  • Steven Busic
  • Steve Conner
  • Steve Jones
  • Steve Ward
  • Sulaiman
  • Thomas Coyle
  • Thomas A. Wallace
  • Thomas W
  • Timo
  • Torch
  • Ulf Jonsson
  • vasil
  • Vaxian
  • vladi mazzilli
  • wastehl
  • Weston
  • William Kim
  • William N.
  • William Stehl
  • Wesley Venis
The aforementioned have contributed financially to the continuing triumph of 4hv.org. They are deserving of my most heartfelt thanks.
Forums
4hv.org :: Forums :: Projects
« Previous topic | Next topic »   

Raspberry Pi-based hifi audio player

1 2 
Move Thread LAN_403
Steve Conner
Mon Aug 11 2014, 09:33AM Print
Steve Conner Registered Member #30 Joined: Fri Feb 03 2006, 10:52AM
Location: Glasgow, Scotland
Posts: 6706
Been working on this off and on for the past 2 years. smile Link2

"PiTunes is a high quality standalone audio file player based on the Raspberry Pi. It has 1TB of storage and will play just about any audio file format including Apple Lossless and FLAC, at bit rates up to 24 bits and 96kHz, as well as internet radio including most of the BBC stations. The audio output is handled by Borge Strand-Bergesen’s QNKTC DAC, which I modified to add coax and optical digital outputs. The digital output has been verified bit-perfect at 24 bit, 96kHz.

All software used is free and open source. Even the QNKTC DAC has open schematics and firmware."
Back to top
Hydron
Mon Aug 11 2014, 10:50AM
Hydron Registered Member #30656 Joined: Tue Jul 30 2013, 02:40AM
Location: UK
Posts: 208
Looks like a great project!

I also had a look at the QNKTC stuff to use it as part of a DAC/Headphone amp I began designing - it sounds like a good DAC design, and having both the code and schematics available meant I could have integrated it into one PCB, and used the atmel micro for the housekeeping tasks too (input select, volume, display etc). Alas along come a pile of free IGBTs and I got sidetracked into tesla coil building and never got past the schematic stage.

Did you have a look at using the RPi's I2S PCM output? I believe people have written drivers for it (though with older RPis it requires some PCB rework to enable), and you could turn it directly into SPDIF, or put a high quality I2S DAC in the box too and avoid the jitter from SPDIF's clock/data recovery.
Back to top
Steve Conner
Mon Aug 11 2014, 11:16AM
Steve Conner Registered Member #30 Joined: Fri Feb 03 2006, 10:52AM
Location: Glasgow, Scotland
Posts: 6706
Thanks! This has been one of my better projects, I just recently finished ripping my whole CD collection to it in FLAC, and I listen to it almost every day. Getting bit-perfect output was frustrating. The state of R-Pi audio reminded me of the old days of getting ISA audio cards working under Windows 95, but I got there in the end. smile

There was lots of discussion on DIYAudio about using the Pi's own I2S. My PiTunes project was well underway before anyone managed to make a reliable I2S driver with DMA, and I didn't feel up to developing the driver myself, but I think they have got it working now.

I just recently bought a Wolfson Pi Audio Board for my other Pi. It has both analog and SPDIF outputs, and is supported by a special Wolfson patched kernel, which most probably communicates with the codec chip using the I2S. I made a copy of the PiTunes SD card and bodged the Wolfson kernel into it, and it seems to work great, at a fraction of the cost of the QNKTC. This will form the basis of PiTunes Mk2. The plan was always to have two of the things so they could back each other up with rsync. If the hard disk in one of them dies, it can be replaced with a copy of the other one.

On the subject of jitter: since I moved house, I had such trouble with room modes (the main rooms are both almost cubical with hard brick walls) that I started using a DSP for digital room correction, so I like all my sources to have SPDIF outputs to feed directly into the DSP.

I think even if jitter from SPDIF was audible, it would be less annoying than the boom of the uncorrected room modes. I suppose I might try some sort of reclocking scheme on the DSP output someday.
Back to top
Ash Small
Mon Aug 11 2014, 01:41PM
Ash Small Registered Member #3414 Joined: Sun Nov 14 2010, 05:05PM
Location: UK
Posts: 4245
It's good to see the progress you've made with this, Steve (I believe I suggested you look at the Pi when you started this project).

Maybe I'll get round to finishing my similar Pi based project, but since I bought a 'Smart TV' I just have all my media on a USB hard drive, played through the TV, graphic equalizer and Sony 5.1 surround sound thingy. (I have a very small living room, with thick stone walls, so I got rid of all my 'big' speakers, and got the 5.1 system)

By the way, if you have two Dolby 5.1 devices, you can play a DVD or whatever on one, convert the signal to stereo, put it through a two channel graphic equalizer, and the convert it back to 5.1 with the second device. It seems this is part of the 'Dolby magic' (something to do with the way it converts to stereo allows it to be converted back) and enables you to adjust the levels to suit the room. The Sony system always sounded far too 'bassy' before, whatever I did, presumably due to the accoustics of the room.
Back to top
Steve Conner
Mon Aug 11 2014, 01:47PM
Steve Conner Registered Member #30 Joined: Fri Feb 03 2006, 10:52AM
Location: Glasgow, Scotland
Posts: 6706
I made the mistake of buying a Sony "Smart" TV that turned out to be as smart as a box of rocks, and couldn't play FLAC, for example. If I had bought a Samsung instead, PiTunes might never have existed. smile

Also, from a user experience and human factors point of view, I was interested in creating a single-purpose device that did nothing but play audio, a modern version of the old record or CD player without any other distracting features.
Back to top
Ash Small
Mon Aug 11 2014, 02:19PM
Ash Small Registered Member #3414 Joined: Sun Nov 14 2010, 05:05PM
Location: UK
Posts: 4245
Yep, I bought the Samsung wink

It still has limitations, though. Eventually I want a 'dedicated audio system' that I can also put the TV audio through, as well as a DVD player, etc.

On the subject of 'Smart devices', I recently found an 'old' Linksys 'media centre extender' (a collaboration with Microsoft) in a local 'fleapit', but the Wi-Fi is a bit dated (2008), and it takes forever to 'boot up'.
Back to top
Sulaiman
Mon Aug 11 2014, 05:37PM
Sulaiman Registered Member #162 Joined: Mon Feb 13 2006, 10:25AM
Location: United Kingdom
Posts: 3140
Looks really good, nice job.

Can you dim the buttons and/or display?
Back to top
Hydron
Mon Aug 11 2014, 11:26PM
Hydron Registered Member #30656 Joined: Tue Jul 30 2013, 02:40AM
Location: UK
Posts: 208
Yeah, SPDIF jitter is very unlikely to be audible unless you have an issue somewhere. Unless you screw something up it's hard to avoid the speakers or the room being the weakest link in the chain.

I suggested the I2S thing because it sounded far simpler - you can feed it straight into a DAC or get SPDIF with a single chip.

Have you looked at doing the digital room correction on the RPi itself? Sounds like some people have had some luck with folve/brutefir/jconvolver, e.g. here: Link2 Could make the whole system pretty simple with no need for an outboard DSP or DAC, just the RPi, wolfson board (which indeed connects via I2S) and your UI hardware.

Edit: If you're using software DSP you could get even more hardcore and do stuff like record the impulse response of your room to try and get the very best correction. I believe there is a fair bit of info on the net about doing it.
Back to top
Steve Conner
Tue Aug 12 2014, 08:49AM
Steve Conner Registered Member #30 Joined: Fri Feb 03 2006, 10:52AM
Location: Glasgow, Scotland
Posts: 6706
An all-in-one system with built-in room correction is tempting, but I like to use other sources besides the R-Pi and have the same room correction applied to them. I'm currently using a Behringer DEQ2496 with the parametric EQs tuned by hand to cancel out the worst 3 or 4 room resonances, and it works fine. It's easy to overegg things with room correction and end up worse than you started.

Unfortunately the user interface I developed doesn't work with the Wolfson board. Wolfson used most of the GPIO pins for SPI, I2C and so on, and I used them for the buttons.

No, the buttons and display can't be dimmed.
Back to top
Hydron
Tue Aug 12 2014, 09:52AM
Hydron Registered Member #30656 Joined: Tue Jul 30 2013, 02:40AM
Location: UK
Posts: 208
Steve Conner wrote ...

Unfortunately the user interface I developed doesn't work with the Wolfson board. Wolfson used most of the GPIO pins for SPI, I2C and so on, and I used them for the buttons.
If you ever make a Mk. 2 you can probably just roll your own board with a I2S -> SPDIF chip on it, wouldn't have to use any of the GPIO pins if it's just a dumb converter. Probably already pre-made options out there doing this.
Back to top
1 2 

Moderator(s): Chris Russell, Noelle, Alex, Tesladownunder, Dave Marshall, Dave Billington, Bjørn, Steve Conner, Wolfram, Kizmo, Mads Barnkob

Go to:

Powered by e107 Forum System
 
Legal Information
This site is powered by e107, which is released under the GNU GPL License. All work on this site, except where otherwise noted, is licensed under a Creative Commons Attribution-ShareAlike 2.5 License. By submitting any information to this site, you agree that anything submitted will be so licensed. Please read our Disclaimer and Policies page for information on your rights and responsibilities regarding this site.