April 07, 2020, 10:23:58 pm

News:

Have you visited the Allwinner Chipset wiki? - http://linux-sunxi.org/


Connecting a Microphone to the Cubietruck

Started by EduardoIbarra, March 25, 2014, 12:01:50 pm

Previous topic - Next topic

EduardoIbarra

Hi guys, I need to connect a microphone and speakers to my Cubietruck (I am currently using the analog composite[?] audio jack and Fedora 20), I am using only the command line interface.

When I chekc for audio input this is what I get:
# arecord -l
**** List of CAPTURE Hardware Devices ****

# arecord test.wav
arecord: main:682: audio open error: No such file or directory


I also modified the script.bin, I added this line under [audio_para]
capture_used = 1

After this, I see an audio capture device:
# arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: sunxicodec [sunxi-CODEC], device 0: M1 PCM [sunxi PCM]
  Subdevices: 1/1
  Subdevice #0: subdevice #0


But still can't hear a thing after trying to record by:
# arecord -d 10 /tmp/test-mic.wav
# aplay /tmp/test-mic.wav


What am I missing? Should I connect the microphone to the LINEIN-L(24) and LINEIN-R(26) instead of the audio jack?

Thanks in advance!

Ember

Hi, I'm just reporting that I have the same problem with the LUbuntu desktop distro. I've also installed pulseaudio and gnome-alsa-mixer, no luck yet on actually getting the input.

I tried a USB adapter, and was able to record with that device. Unfortunately the adapter is only for mono input and I need stereo input...

EduardoIbarra

Has someone got a microphone working yet?

Another question, does the jack conector have 3 channels (stereo AND microphone support)? Could I connect one of those headsets that have a built in microphone and get audio input and output working at the same time?

Thanks!

av

Looks like microphone input not wired. Schematic talks about zero-ohm resistor "jumpers" switching mic/line-in pins of CPU connected to 2x15 header but its too small for re-solder :)

I plan to use microphone in the future, after completing crafting case and connecting SPI/1wire/16x4 LCD... So any additions will be later.

stulluk

For INTERRA-3 board, adding :

playback_used = 1
capture_used = 1
to fex file, and then ...

root@i3-419c ~ # arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: sunxicodec [sunxi-CODEC], device 0: M1 PCM [sunxi PCM]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
root@i3-419c ~ #

root@i3-419c ~ #
root@i3-419c ~ #
root@i3-419c ~ # arecord -d 10 /tmp/test-mic.wav
Recording WAVE '/tmp/test-mic.wav' : Unsigned 8 bit, Rate 8000 Hz, Mono
Aborted by signal Interrupt...

root@i3-419c ~ # aplay /tmp/test-mic.wav
Playing WAVE '/tmp/test-mic.wav' : Unsigned 8 bit, Rate 8000 Hz, Mono

root@i3-419c ~ #


Works perfect, thanks.... For cubie, may be it is a hardware problem, but the info here is very useful, thank you again...

supersonic

I have successfully connected microphone to Cubietruck, but unfortunately it requires resoldering of two tiny SMD resistors.

I resoldered following resistors:
- resistor from R169 to R168 - this will switch IR-RX pin to VMIC pin
- resistor from R171 to R170 - this will switch LINEINL pin to MICIN1 pin

I have found circuit in one of the Olixuino board hardware shematic which also use Allwinner A20.
To connect my microphone I simplified this a lot to use a minimum amount of additional electronic parts (I want to add additional jack port to original Cubietruck case, so I don't have a lot of space to do it). I attached simply connection circuit to this post.

Another thing to do is set 'ADC Input Mux' to value 2.
amixer -c 0 cset numid=25 2

After these operations microphone recording should work.

stackprogramer