Raspberry Pi -A New DIY'ers Digital Hub? - Page 15 - diyAudio
Go Back   Home > Forums > Source & Line > Digital Source

Digital Source Digital Players and Recorders: CD , SACD , Tape, Memory Card, etc.

Please consider donating to help us continue to serve you.

Ads on/off / Custom Title / More PMs / More album space / Advanced printing & mass image saving
Reply
 
Thread Tools Search this Thread
Old 20th January 2013, 08:50 AM   #141
diyAudio Member
 
Join Date: Mar 2002
Location: Glasgow
So, have you tried fiddling with TXTHR? If your current results are with it set to 1, then 16 could give a big improvement. Assuming your driver code knows how to put in the right number of samples which will vary between 48 and almost 64.

I2S is just a synchronous serial interface with data, clock and word clock. SPI has data, clock and chip select. They are similar enough that many uCs have a serial peripheral flexible enough to do either. The lucky BCM2835 has one of each :-)
__________________
'Like the thirteenth chime from a crazy clock which not only in itself fails to command belief but also casts a certain doubt upon the accuracy of the previous twelve strokes.'

Last edited by scopeboy; 20th January 2013 at 09:06 AM.
  Reply With Quote
Old 21st January 2013, 03:51 PM   #142
diyAudio Member
 
Join Date: Oct 2009
Quote:
Originally Posted by philpoole View Post
It transpires that it interrupts on an empty FIFO, 16 left, 48 left, or if not full - depending how you set TXTHR.
Don't know if the sample refers to bytes, sample (one channel), or frame (both channels) but in any case there isn't a lot of permissible latency.

At 44100 samples/sec, 2 channels, 16 bits
48 bytes is 362 microsec
48 frames is 1.45 millisec.

Not much leeway for the OS.
  Reply With Quote
Old 21st January 2013, 05:46 PM   #143
diyAudio Member
 
Join Date: Oct 2004
I'm referring to samples. So I actually write 32 bits (2 samples) at a time.
I agree that is a lot of interrupts.
For a first drop of code, with flash memory storage (not USB) it's not bad.
  Reply With Quote
Old 22nd January 2013, 07:41 AM   #144
diyAudio Member
 
Join Date: Mar 2002
Location: Glasgow
Yes, I agree that 16 samples doesn't allow for much interrupt latency. I would want 512. I'm just trying to figure out how much interrupt latency philpoole has actually been using up until now. If the FIFO was set to interrupt on empty, then the OS would only have one sample's worth of time to respond to the interrupt. It would drop a lot of samples which would explain the "warbling" sound that was reported.
__________________
'Like the thirteenth chime from a crazy clock which not only in itself fails to command belief but also casts a certain doubt upon the accuracy of the previous twelve strokes.'
  Reply With Quote
Old 22nd January 2013, 01:39 PM   #145
diyAudio Member
 
Join Date: Oct 2009
Quote:
Originally Posted by scopeboy View Post
It would drop a lot of samples which would explain the "warbling" sound that was reported.
I think the only bugger was left and right channels were occasionally swapped. Maybe hang an LED or scope off a GPIO and light it if underflow bit set after interrupt. That would at least confirm underflow. But the cool thing is it basically works at 44.1/16 with a miniscule buffer and it is a legitimate driver. It's so tempting .. I've got some old TDA1543s somewhere.. humm but I also have so many unfinished projects..
  Reply With Quote
Old 22nd January 2013, 05:06 PM   #146
diyAudio Member
 
Join Date: Oct 2004
Yes, I did have warbling (probably mentioned in the RPi forum), and it was resolved by changing txthr to 1 (i.e. interrupt when only 16 samples, or quarter of a FIFO are left).
So, it's not there yet, but at least proves the concept.
  Reply With Quote
Old 27th January 2013, 05:00 PM   #147
diyAudio Member
 
Join Date: Mar 2002
Location: Glasgow
Another report on my experience with the QNKTC USB DAC:

I got rid of the USB keyboard from my system. Instead I'm using some buttons connected to the GPIO port, with the "pikeyd" GPIO keyboard daemon by mmoller, and also the mpod remote app.

In this configuration, I get about one stutter per 5 minutes at 24/192. At 24/96 and below it seems fine. The project continues

The USB DAC contains a quite powerful microcontroller that is basically just converting USB to I2S, so it's not nearly as elegant (or cheap ) as using the Pi's own I2S port. However it is a working solution, and allows the Pi to be easily changed out for another single board computer later.
__________________
'Like the thirteenth chime from a crazy clock which not only in itself fails to command belief but also casts a certain doubt upon the accuracy of the previous twelve strokes.'

Last edited by scopeboy; 27th January 2013 at 05:05 PM.
  Reply With Quote
Old 29th January 2013, 01:51 PM   #148
diyAudio Member
 
Join Date: Oct 2009
Thanks for the update and GPIO tests through pikeyd. I admit I'm a Luddite and have resisted the latest gadgets that could be used to interface to the RPi mpd. The QNKTC DAC must sound good driven through the RPi in lieu of direct I2S. At 44.1/16 the ALSA driver could almost sound good if the jitter is low.
  Reply With Quote
Old 31st January 2013, 06:38 PM   #149
diyAudio Member
 
merlin2069er's Avatar
 
Join Date: Sep 2008
Location: Toronto
Blog Entries: 1
Send a message via MSN to merlin2069er
I've got a rasperry pi with raspbian installed on it.

Thinking of setting up just a quick digital radio setup and dump my am/ fm radio.

I've only listened to a few AM stations anyways- what audio software would you guys recommend?

Hopefully it will recognize my tenor dac.
  Reply With Quote
Old 31st January 2013, 07:41 PM   #150
diyAudio Member
 
merlin2069er's Avatar
 
Join Date: Sep 2008
Location: Toronto
Blog Entries: 1
Send a message via MSN to merlin2069er
Raspberry Pi Wifi Internet Radio Player | Fuzzy Logic Robots

hey, that's pretty cool.

I've got a lcd display kicking around, I'm going to hook that up to it.
  Reply With Quote

Reply


Hide this!Advertise here!
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Tractrix in 1*Pi and 2*Pi revintage Multi-Way 21 26th August 2011 09:37 PM
Headphone Hub?? baronofhell Headphone Systems 3 26th May 2007 12:37 PM
centering hub for cdpro skyraider Digital Source 0 1st July 2005 07:08 AM
what to do with that old lan hub karma Everything Else 25 27th May 2003 05:58 AM
Barcode around CD hub? Circlotron Digital Source 0 13th February 2003 12:34 AM


New To Site? Need Help?

All times are GMT. The time now is 08:03 AM.


vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2014 DragonByte Technologies Ltd.
Copyright 1999-2014 diyAudio

Content Relevant URLs by vBSEO 3.3.2