element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Raspberry Pi
  • Products
  • More
Raspberry Pi
Raspberry Pi Forum jack & full duplex possible
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Raspberry Pi to participate - click to join for free!
Featured Articles
Announcing Pi
Technical Specifications
Raspberry Pi FAQs
Win a Pi
Raspberry Pi Wishlist
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 22 replies
  • Subscribers 662 subscribers
  • Views 2046 views
  • Users 0 members are here
Related

jack & full duplex possible

Former Member
Former Member over 11 years ago

Hi all,

 

I was wondering if it's possible to use Jack?

If yes, is full duplex (in & out) possible?

What can I expect for the latency (less than 20ms, more than 100 ms)?

 

If not, with Alsa is it possible to have analog in & analog out working at the same time?

 

Off-topic:

 

Some people are talking about this distribution that is featuring low latency / jack solution:

https://ccrma.stanford.edu/~eberdahl/Satellite/

  • Sign in to reply
  • Cancel
  • Former Member
    Former Member over 11 years ago

    I was wondering if it's possible to use Jack?

    Yes.

    If yes, is full duplex (in & out) possible?

    Yes.

    What can I expect for the latency (less than 20ms, more than 100 ms)?

    Don't know, I've never tested latency in Jack. ALSA gives me 6 - 7 ms.

    If not, with Alsa is it possible to have analog in & analog out working at the same time?

    Yes.

    --

    Ragnar

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 11 years ago in reply to Former Member

    Wonderful! Is it better to use Alsa (less CPU, lower latency)? I was wondering if it is also a good idea to run everything in root (I know it's never a good idea normally) - but for getting the best performance out of the raspberry pi... Should I try to apply those modifications: http://wiki.linuxaudio.org/wiki/raspberrypi

     

    Thanks!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 11 years ago in reply to Former Member

    Is it better to use Alsa (less CPU, lower latency)?

    I don't know. For what I do, I don't have to worry about latency on the sub-second level. I use Jack for connectivity, I shuffle sound between applications and computers and the ultimate targets are Aunt Alice's table-top FM radio and Uncle Bob's car stereo. The total delay in the transmission chain is measured in whole seconds, so I don't care about a couple of milliseconds image That said, Jack is not a CPU hog, it typically uses less than 5% when I have a couple of audio streams going.

     

    I was wondering if it is also a good idea to run everything in root (I know it's never a good idea normally) - but for getting the best performance out of the raspberry pi...

    You shouldn't have to do that. If Jack has installed correctly there should be a file /etc/security/limits.d/audio.conf that sets the real-time priority and memory locking permissions/limits for any user that is a member of the "audio" group. See How do I configure my linux system to allow JACK to use realtime scheduling? | JACK

     

    Should I try to apply those modifications: http://wiki.linuxaudio.org/wiki/raspberrypi

    I have made a couple of them:

    • I overclock to 900 MHz - the Medium setting in raspi-config.
    • I have set the CPU scaling governor to "performance", to keep the CPU at 900 MHz at all times. The "ondemand" governor, which is the default, kicks in a little too late when CPU load increases and packets can be dropped.
    • I have no display, so I have set gpu_mem in /boot/config.txt to the smallest allowed value - 16 - leaving as much memory as possible to applications.

    I haven't bothered to disable any "unneeded" services, I don't see them having any impact. If you installed Jack from the Raspbian repository, you should know that it is built with D-Bus support and needs those services running to function.

    I installed Jack from the Autostatic repository mentioned on that page. I run my servers without a display, i.e. I have no X server running and hence no D-Bus service, so I can't use the Raspbian flavored Jack.

     

    You seem interested in low latency, what is it you want to do?

    --

    Ragnar

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 11 years ago in reply to Former Member

    Yes my main interest is low latency with the Wolfson Audio Card.

    I am using Pure Data to build an experimental modular synth and/or audio fx module.

     

    So just to be clear, as for now there's only 3 options :

    • Download wolfson_3.10_master.zip (this distribution use Raspbian repo)
    • Download any other distribution (in my case: Satellite) and patch the kernel OR replace the kernel with your binary
    • Be patient, Wolfson is working to get the driver included in Raspbian by default (coming soon)

     

    Thanks for all the feedback so far Ragnar!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 11 years ago in reply to Former Member

    Hi,

    to get some midi stuff running for live events I patched a 3.12 kernel successfuly with realtime preemption patches from Ingo Molnar https://www.kernel.org/pub/linux/kernel/projects/rt/and merged the Wolson Audio card patches with it. The result is: You can plug in USB midi instruments into the raspberry pi and play them in realtime with hifi qualtity.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 11 years ago in reply to Former Member

    Hi Georg,

     

    I guess it's not an easy task... Did you post more information about your setup somewhere? Could you spare some time to explain a bit more? Here's some questions:

    • What distribution do you use
    • Do you use Jack if yes what are the settings (period, nperiod, samplerate)
    • Do you get glitches / drops
    • Are you running X11 or headless
    • What software are you using (amsynth, ...?)
    • Do you use a special power supply (some people recommend some expensive one, I just have a basic cell phone charger 5V / 700ma)

     

    Thank you!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 11 years ago in reply to Former Member

    Hi Pat,

    it's not soooo difficult. Here some answers to yor questions:

    • Ubuntu Studio 14.04
    • yes, jack
    • no glitches or drops!!!
    • headless
    • linuxsampler, amsynth yoshimi
    • testing with easy acc powerbank  pb 12000A, and cellphone charger 5V / 1A

    Some days ago I tested a setup with a tablet,a smartphone and another midi instrumented connected at the same time via wifi. It was possible to play all 3 without any glitches.

    I'll post a little howto, a little video and the necessary patches when I've tested everything so far, that I think it's somehow stable.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 11 years ago in reply to Former Member

    Ubuntu Studio 14.04?

    I don't see an ARM11 release:

    Ubuntu Studio 14.04 LTS (Trusty Tahr)

     

    If you want I can review your tutorial - trying to follow and add to it if something is missing (or adding how to run pure data for example). That would be nice!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 11 years ago in reply to Former Member

    yes, reviewing is really welcome! Thank you.

     

    Answer: cross compiled on ubuntu 14.04

    kernel  3.12.y and 3.14.y (from which only the first one works so far) for raspbian. Details will come soon.

    Have fun

    Georg

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 11 years ago in reply to Former Member

    Ok make sense (using Ubuntu Studio for cross compiling and raspbian for the actuel distro)! In the meantime I found this tutorial: Talk Unafraid » Real Time kernels and audio on the Raspberry Pi - but I have to say that I would very much like to use your solution because I also want a similar setup (usb midi, pure data).

     

    Keep in touch!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube