DominusPi
Posts: 39
Joined: Mon Nov 18, 2013 5:31 pm

Use audio jack as input ?

Sun Mar 02, 2014 2:19 pm

Hey guys,
A question came to my mind : can we "read" signals from the audio jack of the RPi ? Like to attach a microphone ? as on this page, the guy says that "Most of the time, a headphone jack can double as a microphone jack" ( http://www.wisegeek.com/what-is-a-microphone-jack.htm )

So basically, can we use the jack as input? and if yes how to read the signals through a C or Python programm ?

Thanks !
Cheers !

plugwash
Forum Moderator
Forum Moderator
Posts: 3582
Joined: Wed Dec 28, 2011 11:45 pm

Re: Use audio jack as input ?

Sun Mar 02, 2014 2:24 pm

DominusPi wrote:Hey guys,
A question came to my mind : can we "read" signals from the audio jack of the RPi ? Like to attach a microphone ? as on this page, the guy says that "Most of the time, a headphone jack can double as a microphone jack" ( http://www.wisegeek.com/what-is-a-microphone-jack.htm )
There are some devices out there that can use the same jack for multiple functions but "Most of the time, a headphone jack can double as a microphone jack" is a gross exaggeration.
So basically, can we use the jack as input? and if yes how to read the signals through a C or Python programm ?
No the jack on the Pi is output only.

If you want more audio functionality on the Pi then the wolfson Pi audio card is probably a good option.

User avatar
Hove
Posts: 1205
Joined: Sun Oct 21, 2012 6:55 pm
Location: Cotswolds, UK
Contact: Website

Re: Use audio jack as input ?

Sun Mar 02, 2014 2:27 pm

No it can't. The plug (in isolation) can be an input or output (which is what your link refers to), but once you attach it to a circuit (like the Raspberry Pi audio output), then the role of the plug is defined by what it's soldered too (an audio output).

If you want to add a microphone, the simplest solution is a USB one.
www.pistuffing.co.uk - Raspberry Pi and other stuffing!

DominusPi
Posts: 39
Joined: Mon Nov 18, 2013 5:31 pm

Re: Use audio jack as input ?

Sun Mar 02, 2014 2:35 pm

Ok thanks for the fast answers ! :)
Cheers !

bcooldude
Posts: 2
Joined: Tue Dec 15, 2015 5:57 pm

Re: Use audio jack as input ?

Tue Dec 15, 2015 6:11 pm

How about the newer raspberry 2 devices, running raspbian. Are we still not able to use the audio jack as a mic or has anything changed in the design since then?

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 12865
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: Use audio jack as input ?

Tue Dec 15, 2015 6:18 pm

The audio output is, has been and always will be an output only. Changing that would require a change to the SoC, and such a change has never been made.

bcooldude
Posts: 2
Joined: Tue Dec 15, 2015 5:57 pm

Re: Use audio jack as input ?

Tue Dec 15, 2015 7:33 pm

Ah ok makes sense, figured I'd ask anyways though.

Thanks again!

SeeGreatness
Posts: 12
Joined: Mon Feb 20, 2017 11:28 pm

Re: Use audio jack as input ?

Thu Mar 30, 2017 11:34 pm

OK well the raspberry 3 model b has functions with alsa to direct output to hdmi and Bluetooth or the analog output
what I want to do is use the analog and use it to in put a microphone to the pi

scotty101
Posts: 3945
Joined: Fri Jun 08, 2012 6:03 pm

Re: Use audio jack as input ?

Thu Mar 30, 2017 11:46 pm

Nothing has changed since this post was first started. The pi does NOT have audio in.

If you want it then you need either a USB microphone, USB sound card with audio in or an external audio ADC that connects via the GPIO pins.
Electronic and Computer Engineer
Pi Interests: Home Automation, IOT, Python and Tkinter

User avatar
startrek.steve
Posts: 386
Joined: Thu Aug 30, 2012 7:19 pm

Re: Use audio jack as input ?

Fri Mar 31, 2017 7:58 am

You can buy a cheap chinese USB soundcard on Ebay for £1.50 with free postage, I've got three. Microphones work, but I havent come across a cheap one that records in stereo, mine are all mono recording, I suppose you could modify your recordings in Audacity to make them mono on both channels.

Steve
Pi 2 running LibreElec Krypton, Pi 2 running Wheezy Desktop, Pi 1 headless Wheezy, downloading Radio, Pi 1 running Picore headless Media Server, Pi Zero to be an Old Time Radio Project. Pi 3 testing. Pi Zero W downloading Radio shows headless.

Orbital6
Posts: 140
Joined: Sat Aug 08, 2015 6:32 pm

Re: Use audio jack as input ?

Fri Mar 31, 2017 2:11 pm

You might be interested in a board i just finished, i ask for advice about it over here:

viewtopic.php?f=63&t=179297

I'd be interested to know what you think!

It records and streams high quality stereo audio through a mic or line in (or both!)

Return to “General discussion”