2009-05-29 01:32:36 Blackfin based 16Ch Network Audio Device
Greg Griffith (UNITED STATES)
Message: 74743
HI,
I am currently working through the details of a networked audio project hopefully using the Blackfin BF532 as I can use an inexpensive 2 layer board for prototyping. I am planning to use two AD1939's using two external ADC's to capture 8 or 16 channels of 48Khz/24bit Audio and to then send them over an ethernet network to a Digital Audio Workstation Hopefully using something similar to NetJack using UDP packets. I Looked through postings and did not find much regarding weather the blackfin could
A: Process and Package the incoming data
B: Weather the ethernet interfaces could maintain around 4 to 6 MegaBytes/Sec of throughput
I did find one post that stated that a gigabit interface would max out at 25MB/Sec but there was not any real life indicators provided. I appriciate any input ,pointers or suggestion.
Thank You
Greg Griffith
QuoteReplyEditDelete
2009-05-29 09:34:49 Re: Blackfin based 16Ch Network Audio Device
Robin Getz (UNITED STATES)
Message: 74767
Greg:
It depends on if you want to compress the audio data before sending, and what format you want to compress it in.
Just doing PCM I don't think would be a problem.
-Robin
QuoteReplyEditDelete
2009-05-29 09:44:11 Re: Blackfin based 16Ch Network Audio Device
Mike Frysinger (UNITED STATES)
Message: 74771
there are no drivers for AD1939's yet, so those would have to be written first
your original description did not say multiple ethernet interfaces, but your (B) does. the BF533-STAMP and other boards get pretty good netperf numbers, but i dont think we have those saved anywhere. the post about the gigabit interface also explained why the numbers were so crappy -- much of it had to do with the part's interface.
QuoteReplyEditDelete
2009-05-29 14:51:31 Re: Blackfin based 16Ch Network Audio Device
Steve Strobel (UNITED STATES)
Message: 74779
I have a driver for the AD1938, which at first glance appears to be similar to the AD1939. It is messy (not ready for submission), but I would be glad to send it to you. Actually, I have two drivers so you can run two codecs (the original driver couldn't handle multiple instances). You can find an older message about it at http://blackfin.uclinux.org/gf/project/uclinux-dist/forum/?action=ForumBrowse&forum_id=39&_forum_action=ForumMessageBrowse&thread_id=28950. Please let me know if you want the updated code.
Steve
QuoteReplyEditDelete
2009-05-29 15:19:05 Re: Blackfin based 16Ch Network Audio Device
Mike Frysinger (UNITED STATES)
Message: 74783
feel free to post files at any time for people to search & find
QuoteReplyEditDelete
2009-05-29 18:16:30 Re: Blackfin based 16Ch Network Audio Device
Greg Griffith (UNITED STATES)
Message: 74791
Thanks for the information and sorry about any confusion I probably should avoid posting that late in the night.
I was planning on sending a straight uncompressed PCM bit stream.
When I mentioned Interfaces meant to refer to the fact that the Bf532 could use either a 100mbps or 1000mbps ethernet controller. In respect to the gigabit controler I understood the hardware bus limitations but was more interested in determining how much of that capicity the blackfin could make use of.
It would be great to get a copy of that driver I saw the first posting but had not looked to see weather it could support multiple instances. In regard to using two devices I assume you are using Two SPORTS or are you using both data lines on one SPORT. Having looked at the datasheet for both the AD1938 and AD1939 It looks like it would be fairly straight foward to adapt.
Thanks again for the informatin it looks like the Blackfin should work well.
Thanks
Greg Griffith
QuoteReplyEditDelete
2009-05-30 07:15:37 Re: Blackfin based 16Ch Network Audio Device
Robin Getz (UNITED STATES)
Message: 74816
Greg:
You would do much better with the any of the parts with an internal ethernet controller - they will be **much** faster. I don't know if anyone has really looked at the throughput of the external devices under CPU load.
-Robin
QuoteReplyEditDelete
2009-06-02 13:08:22 Re: Blackfin based 16Ch Network Audio Device
Steve Strobel (UNITED STATES)
Message: 75028
Greg Griffith wrote:
> It would be great to get a copy of that driver I saw the first posting but had not looked to
> see weather it could support multiple instances.
I just uploaded an updated verison of the driver attached to a posting in the same thread as the previous one (just to keep them together) at http://blackfin.uclinux.org/gf/project/uclinux-dist/forum/?_forum_action=ForumMessageBrowse&thread_id=28950&action=ForumBrowse&forum_id=39
> In regard to using two devices I assume you are using Two SPORTS or are you using both
> data lines on one SPORT. Having looked at the datasheet for both the AD1938 and AD1939
> It looks like it would be fairly straight foward to adapt.
I am using separate SPORTs. I think it should also be possible to daisy-chain two AD1938 chips on a single sport if you aren't running too high of a sample rate; we planned to do that on a new design, but haven't tried it yet.
Steve
QuoteReplyEditDelete
2009-06-02 13:29:17 Re: Blackfin based 16Ch Network Audio Device
ian davidson (UNITED KINGDOM)
Message: 75030
We have a system that uses two daisy chained 1938s to give 8 in and 18 out, they are clocking at 48kHz and delivering 24 bit audio (althgh most of the internal DSP processing is 16 bit)
The"drivers" that I developed were originaly based on the 1836 ones but I soon discarded the ALSA support, all the DSP
processing, filtering, compression, limiting, mixing, input and output gains, is done in the interrupt hander in DMA blocks of 128 samples, this gives a latency of about 2.4 ms.
There is also a version that uses both SPORTs, SPORT0 handling two 1938s in TDM mode and SPORT1 handling stereo DACs in I2S mode.
QuoteReplyEditDelete
2009-06-02 16:57:50 Re: Blackfin based 16Ch Network Audio Device
Steve Strobel (UNITED STATES)
Message: 75040
ian davidson wrote:
> The"drivers" that I developed were originaly based on the 1836 ones but I soon discarded
> the ALSA support, all the DSP processing, filtering, compression, limiting, mixing, input
> and output gains, is done in the interrupt hander in DMA blocks of 128 samples, this gives
> a latency of about 2.4 ms.
I would be very interested in seeing how you went about that. Did you just start inlining stuff in snd_ad1938_capture_copy and snd_ad1938_playback_copy(), passing data from capture to playback without copying it out to buffers for ALSA? Is there any chance that you would be willing to share that code? Thanks.
Steve
QuoteReplyEditDelete
2009-06-12 04:31:03 Re: Blackfin based 16Ch Network Audio Device
ian davidson (UNITED KINGDOM)
Message: 75618
HI Steve,
Here are the AD938 and SSM2602 audio drivers.
They both work in roughly the same way. The DMA handlers for both sports are set up to do continuous 2D Transfers to ping-pong buffers. All the audio processing is done in the interrupt handler of receive channel of DMA 3(sport0 receive) , every 128 samples (2.4ms) This takes about 40% of the processing time depending on how many DSP efects are selectd. I've separated out the /proc and char pcm into different files. There is a mixer char device that has a number of IO ctls to control audo mixing. The interface between user space pcm audio and the interrupt handler is in the pcm char driver, and is constrained to blocks of 128 samples. Although most of the audio is 16 bit, the full 24 bits are used for the DSP routines imported from Visual Audio Designer.
The file AD1938 confugures two AD1938s in daisy chan mode to get 8 in and 16 output audio streams. The file ssm2602 is for a BF527C with and on chip CODECS (in the end we do not use these because of the quality of the audio)
Hope someone may find them useful.
As well as the drivers there are a whole load of C++/C/and JAVA applets to control the system. The Java mixer looks (and feels) like a real mixer. I havn't included these.
Regards,
Ian Davidson
AD1938.tar.bz2
ssm2602.tar.bz2
QuoteReplyEditDelete
2009-06-18 13:04:04 Re: Blackfin based 16Ch Network Audio Device
Steve Strobel (UNITED STATES)
Message: 75990
Ian Davidson wrote:
> Here are the AD938 and SSM2602 audio drivers.
Thanks for sharing your code. We are taking a closer look at it now.
> The file AD1938 configures two AD1938s in daisy chain mode to get 8 in and 16 output audio streams.
We built a board that also did that, but never got far enough to test that interface (for unrelated reasons). I didn't find the documentation for chaining them very clear. I am curious if you wired them the same way we did:
- Blackfin SPORT data out/in to first AD1938 pins 16 and 20.
- First AD1938 pins 19 and 15 to second AD1938 pins 20 and 16, respectively
- Second AD1938 pin 19 to ground, pin 15 open
- All frame sync signals connected (pins 18 and 22 on both AD1938s)
- All clock signals connected (pins 17 and 21 on both AD1938s)
We planned to set up one of the AD1938s to output the clock and frame sync signals, making them inputs on the other AD1938 and on the Blackfin (as in the non-daisy chained case).
Thanks for the code and other info,
Steve
QuoteReplyEditDelete
2009-06-18 23:29:29 Re: Blackfin based 16Ch Network Audio Device
Barry Song (CHINA)
Message: 76005
The drivers for AD1938 have been in the trunk of our Linux Kernel project. But it is not based on 16ch daisy chain mode. You can take it as a reference.