IC to play .wav files at best sound quality or may be can i use R Pi? - Page 1
Forum section: electronics / beginners

author: sairfan1
author_rank: Frequent Contributor
timestamp: January 24, 2023, 03:45:30 pm
content: Just like there are some ICs available to play mp3 from a SD card, I'm looking for some IC that can help to setup a simple way to play wav file from SD card.I'm not sure for a good sound quality what specs are required for DAC but looking for may be some solution is already available.I want to play music .wav files.I'm also thinking about can R Pi zero or R Pi B3 play wav file at best resolution? I need digital out from RPi because I'm using Topping DAC

author: jc101
author_rank: Frequent Contributor
timestamp: January 24, 2023, 03:52:02 pm
content: Something from VLSI will do this (https://www.vlsi.fi/en/home.html). Ranging from a single SoC to just an analogue decoder you feed with the .wav data from a micro.

author: ledtester
author_rank: Super Contributor
timestamp: January 24, 2023, 03:57:13 pm
content: Not a cheap solution, but the Teensy family of MCU boards has a lot of support for audio processing and playback. See the "Supported Hardware" section:https://www.pjrc.com/teensy/td_libs_Audio.htmlAlso see this page:https://www.pjrc.com/store/audio_tutorial_kit.htmlfor a tutorial on the audio library.

author: sairfan1
author_rank: Frequent Contributor
timestamp: February 23, 2023, 04:24:35 pm
content: I'm back to this post with a thought if I can use R Pi zero or model B3+ to play a .wav file at best resolution, can i get digital audio out from it (SPDF/optical)

author: pcprogrammer
author_rank: Super Contributor
timestamp: February 23, 2023, 04:50:43 pm
content: Maybe thismoduleis of help. It can do both wav and mp3 files.Edit: whoops, just read TomKatt's response and realize I did not read the digital output requirement either

author: TomKatt
author_rank: Frequent Contributor
timestamp: February 23, 2023, 05:51:41 pm
content: Though I've never used one, while researching audio DAC boards I consistently saw references to theKhadas Tone Boardmodule. It has many excellent reviews and uses the ESS ES9038Q2M DAC, which is a highly regarded chipset. This can be used standalone or controlled by a Pi.'Best Sound Quality' is a rather subjective opinion, and the quality of your source material and playback system (amp / speakers) obviously plays a significant role... The best DAC in the world won't sound good played through some crappy amp into 3" speakers. Likewise, some people think 128kb MP3's sound fine.There's a lot of design engineering that goes into a 'good' DAC, and if you want 'high quality' audio it's often easier to use a board like this rather than reinventing the wheel (not that that's not fun sometimes!). The design and layout of the power supply alone is not a trivial affair to get right.EDIT - LOL, should have read the last sentence of the OP's post where the requirement is for digital out because you already have a DAC... In that case, be aware that you already have digital audio out in the HDMI port - some amps provide for HDMI digital audio audio sources. Other than that, there are numerous SPDIF hats available for the Pi. While there are some quality differences at the digital level, IMO those things are much less significant compared to the DAC analog conversion metrics.

author: sairfan1
author_rank: Frequent Contributor
timestamp: February 24, 2023, 04:16:21 pm
content: Thanks @TomKatt this device "Khadas Tone" looks really interesting I will give it a try.

author: TomKatt
author_rank: Frequent Contributor
timestamp: February 24, 2023, 04:25:17 pm
content: Quote from: sairfan1 on February 24, 2023, 04:16:21 pmFunny enough, I discovered that Khadas Tone Board thing while research DACS and ultimately purchased the Topping D10 myselfI can't imagine many DACS in that price range performing better than the D10. So if you already have the D10, it's cheaper to use that and just find some kind of digital out (SPDIF?) for your Pi. On the other hand, the Khadas Tone Board integrates directly with the Pi and is a complete solution.

author: sairfan1
author_rank: Frequent Contributor
timestamp: February 24, 2023, 05:11:14 pm
content: QuoteOn my friend's recommendation I bought Topping DX3 Pro+ give it a look.

author: mariush
author_rank: Super Contributor
timestamp: February 24, 2023, 05:33:54 pm
content: You may want to research audio amplifier chips with digital inputs, i2s for example, this way you could have a microcontroller or whatever read uncompressed wav and parse the format to extract the raw data ( or just put raw pcm file on the card if it's not a commercial project, as that would require no parsing, it's just raw audio samples).Some microcontrollers have dma and a bunch of sram so you could have 2-3 buffers and reach chunks and then push the bytes through i2sFor example here's a MAX98357 I2S Amp Breakouthttps://www.adafruit.com/product/3006- there's tutorials and explanations and everything in the description.The amplifier is nothing special, it's not particularly great quality (3w at 10% thd ... you don't want 10% thd, you want to keep it under 1%, ideally under 0.1% - but it would be a good starting point along with the tutorials.other examples of amplifier ics with i2s : tas5760ldhttps://www.ti.com/lit/ds/slos781c/slos781c.pdf?ts=1677259238877

author: james_s
author_rank: Super Contributor
timestamp: February 24, 2023, 05:55:13 pm
content: You can play wav files from an 8 bit microcontroller, they're just raw samples, there's no decoding that needs to be done. Set up an interrupt at the desired sample rate that reads each sample and outputs it to a DAC.See this for examplehttp://elm-chan.org/works/sd8p/report.htmlIt doesn't even need a DAC, but you may get better sound quality by using a proper DAC chip.