Raspberry Pi -A New DIY'ers Digital Hub? - Page 13 - 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 10th January 2013, 05:20 PM   #121
diyAudio Member
 
linuxworks's Avatar
 
Join Date: Jul 2008
Location: santa clara, CA
Quote:
Originally Posted by DF96 View Post
OK. I will keep an eye on voltage levels.

Just received the book about it today, and interested to read that the main chip is essentially the guts of a TV set top box.
its funny.

it IS mostly a video chip. with a tiny 'helper cpu' there.

we use the helper cpu as the main cpu and for headless use, we ignore the gpu!

kind of funny if you ask me.
__________________
My Photostream:http://www.flickr.com/photos/linux-works/
  Reply With Quote
Old 10th January 2013, 05:39 PM   #122
diyAudio Member
 
linuxworks's Avatar
 
Join Date: Jul 2008
Location: santa clara, CA
how I power-wired mine.
Attached Images
File Type: jpg 8367353581_e005b98265_b.jpg (205.3 KB, 551 views)
__________________
My Photostream:http://www.flickr.com/photos/linux-works/
  Reply With Quote
Old 10th January 2013, 07:04 PM   #123
DF96 is offline DF96  England
diyAudio Member
 
Join Date: May 2007
How long before someone uses the gpu for vector processing?
  Reply With Quote
Old 10th January 2013, 07:06 PM   #124
diyAudio Member
 
linuxworks's Avatar
 
Join Date: Jul 2008
Location: santa clara, CA
the gpu is binary only, I think ;(

not a lot that they will tell you about it, sadly. this is the downside to SoC diy development.
__________________
My Photostream:http://www.flickr.com/photos/linux-works/
  Reply With Quote
Old 12th January 2013, 08:34 AM   #125
diyAudio Member
 
Join Date: Oct 2004
Hi all,

Over on the raspberry pi forums, I've knocked up a rudimentary ALSA I2S driver for Raspberry Pi.
It works, and is stable, but is hardwired for 16 bits per sample, 44.1kHz stereo, I2S output (no odd variants). It is in a github repository (link below).
If it doesn't meet your needs, feel free to alter it to suit, but I don't intend to modify it for every man and his dog
It's a kernel space driver, so I'm afraid you'll have to build a kernel, start using it, and then build this driver using the source code as a reference. If that doesn't make sense, then google something like "Raspberry Pi Kernel build", or similar, and spend some time researching.
As you can read in the thread, I had some issues with a USB keyboard that was causing interrupt problems, so be aware that some peripherals might be upsetting your scenario. (on the pi, USB has access to the high priority IRQ, so can hog things if things go wrong, as they did for me).

For me, I have GMPC running, playing FLAC, WAV, M4A (not tried MP3 yet, don't have any to hand) with an old DIY TDA1541A DAC. I haven't configured my hardware yet to feed a clock into the pi yet, so it's just running in NOS at the moment (gulp!) but it works.

I want to try dividing down my Kwak clock variant to feed BCLK into the Pi. I hope that will work, and I can feed MCLK into my oversampler. That's for another day though.

https://github.com/philpoole/snd_pi_i2s
Raspberry Pi • View topic - I2S: Anyone got it running?

Might consider a photo if I can be bothered. It's not very pretty, and you can probably imagine what it looks like.
Might do some hardware for a change next

Phil
  Reply With Quote
Old 17th January 2013, 02:38 PM   #126
diyAudio Member
 
Join Date: Mar 2002
Location: Glasgow
That's excellent news, well done! Did you get your driver to work with DMA? Are you cross-compiling, or doing it on the Pi?

From the point of view of figuring out what on earth the Pi's problem actually is... It's interesting to hear that you get the same keyboard-related glitches in your I2S driver as us USB soundcard users have been suffering.

To cut a long story short, I think it is all connected to the USB controller's mishandling of split transactions, which are used for carrying USB1.x data over a 2.0 link, as required when you plug a 1.x device into a 2.0 hub. The problem seems to go away when you use the latest Raspbian kernel, and only USB2.0 devices.
__________________
'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; 17th January 2013 at 02:41 PM.
  Reply With Quote
Old 17th January 2013, 03:30 PM   #127
diyAudio Member
 
Join Date: Oct 2009
Quote:
Originally Posted by philpoole View Post
Hi all,
Over on the raspberry pi forums, I've knocked up a rudimentary ALSA I2S driver for Raspberry Pi. It works, and is stable
Phil
That's pretty impressive to get it all working. Some earlier I2S explorers had some documentation troubles and others lost resistors along the way. We'll be watching your work with great anticipation, especially external clock bit.
  Reply With Quote
Old 17th January 2013, 05:10 PM   #128
diyAudio Member
 
Join Date: Mar 2002
Location: Glasgow
As requested I'm posting some details of my Raspberry Pi music project. It's working at up to 24 bit/192kHz with no obviously unpleasant glitches.

I'm using the Pi Model B, connected to the QNKTC USB DAC (also described on the forum) in UAC2.0 mode, plus a 320GB HDD in a USB2.0 enclosure, and an "Edimax N150" wi-fi dongle.

I chose the QNKTC DAC because it was advertised as USB2.0 asynchronous, and the Pi's problems were with USB1.x.

A brain dump of what I did to get the USB audio working: I downloaded the recommended "Raspbian Wheezy" image in December, and upgraded it after installation.

My kernel version shows as follows:
Linux pitunes 3.2.27+ #250 PREEMPT Thu Oct 18 19:03:02 BST 2012 armv6l

Then I made the following changes to the config files:

/boot/cmdline.txt: added option: dwc_otg.lpm_enable=0
(this activates an experimental fix to the USB driver. I don't know if it is enabled by default in later kernels)

/boot/config.txt: added following options:
arm_freq_min=700
gpu_freq_min=250
(This prevents the power management from slowing down the clocks. Hopefully it can service interrupts quicker if it's always running full speed. I stopped short of overclocking it.)

/etc/mpd.conf: Changed the audio_output section as follows:

audio_output {
type "alsa"
name "QNKTC USB DAC"
device "hw:1,0"
auto_resample "no"
samplerate_converter "0"
}

After all this, I still got glitches when typing on the USB keyboard, and even when not touching it, I seemed to get one small glitch per 5 minutes.

As a last resort, I removed the keyboard, leaving only USB2.0 devices on the system, and it seems to be performing solidly.
__________________
'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 18th January 2013, 06:29 AM   #129
diyAudio Member
 
Join Date: Oct 2004
Parisnight, scopeboy,
Yes, USB does seem to be an issue. I think it's too many interrupts.
Replacing the keyboard (a comedy 2 Argos keyboard that read 'USB Keykoard' upon registering!) seemed to help.
However, I developed it using a couple of FLAC files on the SDHC card, and it seemed okay. Now I'm having fun with a USB HDD (I've tried a couple of USB-SATAs and one USB to IDE), and it plays okay, no glitches, but it's occasionally swapping channels, which suggests buffer underruns. I hope performing some error handling may help.
I haven't implemented DMA. I think it may be overkill, although I wonder if it will overcome this current issue I have.
I think I'm using a fairly up to date kernel. I had to rebuild it in November I suppose in order to put some debug in it. I guess there's no harm in a pull from github.
(I cross compiled the kernel, but built the module on the pi.)
I do plan to do external clocking too. It's simple from a software point of view. I might include it untested for now (I am planning to knock up a divide by 4 for my clock though).
Thankfully, I didn't need to lose any resisitors as I waited for the v2 pi :-)
  Reply With Quote
Old 18th January 2013, 01:23 PM   #130
diyAudio Member
 
Join Date: Oct 2009
Quote:
Originally Posted by scopeboy View Post
I removed the keyboard, leaving only USB2.0 devices on the system, and it seems to be performing solidly.
Thanks for all the details of your setup. The results are very encouraging to me. I found it interesting that you achieved all this with your files on a locally connected USB2 drive.

Yesterday I was thinking that philpoole's beautiful ALSA I2S driver would circumvent a lot of the USB troubles and make one of the lowest cost asynchronous DACs possible. Sorry, I'm so slow to realize these things. If indeed there are occasional underruns, I'd have to agree that DMA would be a premature optimization. There must be some other botttleneck, especially in view of scopeboy's success with USB2 data and USB2 soundcard. Maybe try his /boot/* adjustments?
  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 11:13 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