Welcome
Username or Email:

Password:


Missing Code




[ ]
[ ]
Online
  • Guests: 17
  • Members: 0
  • Newest Member: omjtest
  • Most ever online: 396
    Guests: 396, Members: 0 on 12 Jan : 12:51
Members Birthdays:
No birthdays today

Next birthdays
05/04 Matthew T. (35)
05/04 Amrit Deshmukh (60)
05/05 Alexandre (32)
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 :: Computer Science
« Previous topic | Next topic »   

Raspberry Pi and DACs

1 2 3 4 
Move Thread LAN_403
Hon1nbo
Fri Jul 27 2012, 04:55PM Print
Hon1nbo Registered Member #902 Joined: Sun Jul 15 2007, 08:17PM
Location: North Texas
Posts: 1040
Hey guys,

so I got a parts sponsorship for my next project, and I thought I'd make a semi-portable 24-bit/192-kHz audio player (since the only real one on the market right now is $850, and I'd like to not have two copies of all of my Vinyl masters). I'm going for something that could be in my messenger bag or backpack, not trying to fit it in my pocket yet.

I'm thinking about using a Raspberry Pi and a DAC chip, interfaced over serial. I may need an intermediary, since I don't think the Pi has direct serial. I could use a serial breakout for USB maybe?

The DAC chip I'm considering (though I'd love suggestions, my first time using them): Link2

Any thoughts? I don't care so much about a screen yet, want it to kinda be like an iPod Shuffle where it just automatically boots to a programmed playlist, and will have a few buttons but that's it for now. Maybe I could interface a remote display to my Android Tablet for when I want to change things up on the go.

Cheers,

-Jimmy
Back to top
Pinky's Brain
Fri Jul 27 2012, 07:52PM
Pinky's Brain Registered Member #2901 Joined: Thu Jun 03 2010, 01:25PM
Location:
Posts: 837
Coming from Vinyl that's about 10 bits and 160 KHz of noise :p But hell, if you make something good looking you might be able to sell it to HiFi nuts ...

Personally I'd just make an ipod add on, makes creating a nice looking UI easier and takes care of a lot of the hardware ... you just need to worry about a microcontroller which supports USB and 24 bit I2S, the DAC and a pre-amp.

PS. making a circuit which can get close to the capabilities of a 24 bit DAC is not trivial ... although given that most of the dynamic range is completely useless anyway that might not be that important :P
Back to top
Steve Conner
Fri Jul 27 2012, 09:06PM
Steve Conner Registered Member #30 Joined: Fri Feb 03 2006, 10:52AM
Location: Glasgow, Scotland
Posts: 6706
24 bit, 192kHz, stereo audio is 9.2 megabits per second. That's faster than any USB-to-serial converter I know of, and uncomfortably close to the bit rate of USB 1.1.

I imagine like most modern systems-on-a-chip, the Pi one will have at least one synchronous serial port intended for driving an audio codec chip. It should support DMA and be capable of a pretty decent transfer rate. This would be my first port of call, and the challenge is to get the OS out of the way and get access to it, and then to get rid of glitches in the audio caused by OS interrupts. Even many commercial audio products don't quite manage that.

Maybe you could run a modified version of Rockbox on it. However, Rockbox might only have a 16-bit data path internally.

If the worst comes to the worst, there's always a netbook, a USB DAC and foobar2000.
Back to top
Pinky's Brain
Sat Jul 28 2012, 12:00AM
Pinky's Brain Registered Member #2901 Joined: Thu Jun 03 2010, 01:25PM
Location:
Posts: 837
I assume an ipod supports full speed, and there are uCs with high speed USB. That said, looking around they either don't support 24 bit I2S or they don't support high sample rates.

A microcontroller with a generic USART would need some external logic to generate the word line for I2S BTW.

PS. these guys have some open source 24 bit/192 kHz capable USB->I2S->DAC hardware :
Link2
Back to top
Hon1nbo
Sat Jul 28 2012, 01:31AM
Hon1nbo Registered Member #902 Joined: Sun Jul 15 2007, 08:17PM
Location: North Texas
Posts: 1040
Pinky's Brain wrote ...

Coming from Vinyl that's about 10 bits and 160 KHz of noise :p But hell, if you make something good looking you might be able to sell it to HiFi nuts ...

Personally I'd just make an ipod add on, makes creating a nice looking UI easier and takes care of a lot of the hardware ... you just need to worry about a microcontroller which supports USB and 24 bit I2S, the DAC and a pre-amp.

PS. making a circuit which can get close to the capabilities of a 24 bit DAC is not trivial ... although given that most of the dynamic range is completely useless anyway that might not be that important :P

Steve Conner wrote ...

24 bit, 192kHz, stereo audio is 9.2 megabits per second. That's faster than any USB-to-serial converter I know of, and uncomfortably close to the bit rate of USB 1.1.

I imagine like most modern systems-on-a-chip, the Pi one will have at least one synchronous serial port intended for driving an audio codec chip. It should support DMA and be capable of a pretty decent transfer rate. This would be my first port of call, and the challenge is to get the OS out of the way and get access to it, and then to get rid of glitches in the audio caused by OS interrupts. Even many commercial audio products don't quite manage that.

Maybe you could run a modified version of Rockbox on it. However, Rockbox might only have a 16-bit data path internally.

If the worst comes to the worst, there's always a netbook, a USB DAC and foobar2000.

The recordings I do are pretty clean actually, the current Vinyl runs aren't half bad. I constantly get good comments from people about the audio that I master my own digital copies for (not knowing where it really came from).

As for making an iPod accessory, I'd have to make an app that supports it as well. The iPod music playback, Android music playback, and Rockbox etc all either A) only work with 16 bit files, or B) down-sample everything internally.
Besides, I wanted to make something from scratch. I want it to be cheap, and I have free parts coming from that supplier as well.

And I didn't mean to type USB->Serial, I meant to put in I2S or whatever that chip used.

I also thought about trying to find a USB audio device that would work, and the one you linked to seems like an option. It is apparently linux compatible so I'd just have to make sure I can get the drivers working on the Pi's linux spin. I'd also have to re-work the final output stage for headphone output, rather than RCA lines.

And I can always go the netbook route, but in that case I'd just install Linux on my tablet and use a commercial DAC. But where's the fun in that? smile

and as for the circuit not being trivial to make use of a 24-bit DAC, I don't start my cyber-security job until September, and my living arrangements are set up fine until then. So I have a lot of free time on my hands... a LOT of it.

-Jimmy
Back to top
Steve Conner
Sat Jul 28 2012, 11:21AM
Steve Conner Registered Member #30 Joined: Fri Feb 03 2006, 10:52AM
Location: Glasgow, Scotland
Posts: 6706
Vinyl su.. Whoops, I meant to say, let's try not to turn this thread into a vinyl vs. digital debate.

I'll be following this thread with interest, as I've been distinctly underwhelmed by the support for HD audio on devices. The only thing I have that plays higher bit rates than 16/48 is my laptop with its M-Audio FireWire interface. But what if I want to use my laptop for something else while listening to some music? frown

On the subject of USB audio: There is a USB standard for audio devices. Lots of them comply and can be plugged into a computer with no driver installation needed, as the audio class driver supplied with the OS takes care of them.

The old audio class only specified up to 16/48, but the latest version (USB 2.0?) is supposed to support higher data rates. I'd like to think that a decent Linux distro should implement the latest version. Even the IPad has it: you can plug a class-compliant audio device into the camera connection kit and get HD audio playback. Well, it used to: Apple may have blocked it because audio geeks were having too much fun. smile

Of course the other thing that a HD audio player needs is a crap-ton of storage space for those lossless files, so, can you connect a hard disk to the RPi? I guess it would take a USB one?
Back to top
Carbon_Rod
Sun Jul 29 2012, 08:02AM
Carbon_Rod Registered Member #65 Joined: Thu Feb 09 2006, 06:43AM
Location:
Posts: 1155
Chips that have 24bit DAC + Amp are usually under $3:
Link2
Link2

There are several versions of energy efficient 24-bit chips that also support variable bit rate codecs, high sample rates, and directly decode popular formats.

Back to top
Pinky's Brain
Sun Jul 29 2012, 10:57AM
Pinky's Brain Registered Member #2901 Joined: Thu Jun 03 2010, 01:25PM
Location:
Posts: 837
No 192 kHz (not that it really matters, but it's hifi ... it's not about what matters).
Back to top
Carbon_Rod
Sun Jul 29 2012, 07:46PM
Carbon_Rod Registered Member #65 Joined: Thu Feb 09 2006, 06:43AM
Location:
Posts: 1155
meh, let me google the product line for you:
chips like the LM49350 are 192KHz
Link2

tongue
Back to top
Ash Small
Wed Aug 01 2012, 10:17AM
Ash Small Registered Member #3414 Joined: Sun Nov 14 2010, 05:05PM
Location: UK
Posts: 4245
The RPi is designed to be used as a 'media centre' virtually straight from the box. (HDMI)

It has a 3.5 mm jack socket as standard.

You can connect a USB hard drive, but I'll be using a 64 gig memory stick for music.

It will also run from 4 AA batteries.



Back to top
1 2 3 4 

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.