Using Microphone on Cubieboard

2,711 views
Skip to first unread message

Sebastian

unread,
Dec 28, 2012, 12:29:40 PM12/28/12
to cubie...@googlegroups.com
Hi,

i would like to use a microphone with my cubieboard. Does anyone know how to use them? Maybe the PIO's would work! But wich are the right one?

I hope anyone can help me with this problem! I dont want to use a usb microfone (cause all of my usbports are alredy in use ;-) )

Kind regards

Simos Xenitellis

unread,
Jan 1, 2013, 7:14:52 PM1/1/13
to cubie...@googlegroups.com
http://linux-sunxi.org/Cubieboard/FAQ says there are board marking for
Headphone and Line In.
There should be a way to convert the Line In to Microphone with a bit
of additional hardware.

Simos

Sebastian

unread,
Jan 2, 2013, 4:26:43 AM1/2/13
to cubie...@googlegroups.com, simos...@googlemail.com

Jea, seams like i need a preaplifier... But this is much more expensive like a usb soundcard... Alright, i think i must buy such a thing...

SunshineDigital

unread,
Jan 2, 2013, 11:34:17 AM1/2/13
to cubie...@googlegroups.com
It would seem that your best bet would be an Ubuntu Linux installation and then work with the audio ports in Ubuntu. The Linein would be used for the microphone input and depending on the microphone, you might have to adjust with a preamp.

SunshineDigital

unread,
Jan 2, 2013, 11:41:21 AM1/2/13
to cubie...@googlegroups.com
If you want to build your own preamp, try this Aussie for very good reliable DIY printed circuit boards. I have used him and was very happy with prices and information.


http://sound.westhost.com/projects.htm


On Saturday, December 29, 2012 1:29:40 AM UTC+8, Sebastian wrote:

Sebastian

unread,
Jan 17, 2013, 9:18:54 AM1/17/13
to cubie...@googlegroups.com
Hi,

after a few days of try and error i think my line-in is broke or sometihng... The Capture value in alsamixer is on 100% i had used a microphone with a preaplifier with the arecord...
When i play the wav data i get nothing... does anyone know what i coud do to get this to work...

Another try was with my sony singstar usb microphones... But there alasmixer does not reconize, that a additional soundcard is installed... In lsusb i see the usb singstar microphone.
I have tryed it on Linaro and Raspbian --> via berryboot
Maybe, the distros linaro and rasbian dont have a driver for this...

If this is true, does anyone know wher i can get the driver?

Kind regards

Sebastian

Gustavo Zamboni

unread,
Jan 17, 2013, 10:12:18 AM1/17/13
to cubie...@googlegroups.com
Hi Sebastian,

I'm having the same issue.
I have a working pre-amp circuit ( it works perfectly on my pc and on a
arm olimex imx233 board line in).
I did not manage to make it work on CubieBoard yet.
I saw the driver and the mixer controls and i suspect that the mixer
control "ADC Input Mux" is a muxer to select which line in port the A10
will use.
I say i suspect as i think there is only one 24bits ADC for the 3 inputs
(linein, fmin and mic).
Anyway i tried all the possible values for this control with capture
control at 100% and nothing.
The mic in should have a preamplifier builtin the A10. (in cubieboard we
can't use it as they are not connected)
The fm in i dont know how it works. I think its used with an external ic
that captures FM audio frequencies and send them to the A10 as audio.
The "FM in" we can try to use as they are in the gpios extensions on the
Cubieboard.

Anyway if anyone have an idea of how to make it works it would be grate.

Gustavo Zamboni

Le 17/01/2013 15:18, Sebastian a �crit :

Simos Xenitellis

unread,
Jan 17, 2013, 1:24:18 PM1/17/13
to cubie...@googlegroups.com
On Thu, Jan 17, 2013 at 4:18 PM, Sebastian <roufe...@googlemail.com> wrote:
> Hi,
>
> after a few days of try and error i think my line-in is broke or
> sometihng... The Capture value in alsamixer is on 100% i had used a
> microphone with a preaplifier with the arecord...
> When i play the wav data i get nothing... does anyone know what i coud do to
> get this to work...
>
> Another try was with my sony singstar usb microphones... But there alasmixer
> does not reconize, that a additional soundcard is installed... In lsusb i
> see the usb singstar microphone.
> I have tryed it on Linaro and Raspbian --> via berryboot
> Maybe, the distros linaro and rasbian dont have a driver for this...
>
> If this is true, does anyone know wher i can get the driver?
>

Can you provide the Alsa-info details according to the instructions at
https://wiki.ubuntu.com/Audio/AlsaInfo ?

It should produce a URL with all the sound details, including the mixer levels.

Simos

>
> Am Mittwoch, 2. Januar 2013 17:41:21 UTC+1 schrieb SunshineDigital:
>>
>> If you want to build your own preamp, try this Aussie for very good
>> reliable DIY printed circuit boards. I have used him and was very happy with
>> prices and information.
>>
>>
>> http://sound.westhost.com/projects.htm
>>
>> On Saturday, December 29, 2012 1:29:40 AM UTC+8, Sebastian wrote:
>>>
>>> Hi,
>>>
>>> i would like to use a microphone with my cubieboard. Does anyone know how
>>> to use them? Maybe the PIO's would work! But wich are the right one?
>>>
>>> I hope anyone can help me with this problem! I dont want to use a usb
>>> microfone (cause all of my usbports are alredy in use ;-) )
>>>
>>> Kind regards
>
> --
> You received this message because you are subscribed to the Google Groups
> "Cubieboard" group.
> To unsubscribe from this group, send email to
> cubieboard+...@googlegroups.com.
> Visit this group at http://groups.google.com/group/cubieboard?hl=en.
>
>

Gustavo Zamboni

unread,
Jan 18, 2013, 3:29:44 AM1/18/13
to cubie...@googlegroups.com
Here are the default conf and codec details:

http://www.alsa-project.org/db/?f=8fdde4b46f66222dfede4472216fd43b078f1fa8

Gustavo Zamboni


Le 17/01/2013 19:24, Simos Xenitellis a �crit :

Gustavo Zamboni

unread,
Jan 18, 2013, 6:17:00 AM1/18/13
to cubie...@googlegroups.com
I have some news.

I did manage to make line in work.
Well, i think i had a cold solder or something. I tried to put both
headphone and linein in the same time and the line in connector just got
out of the board.

So i did re-sold it with more space between both of them. I re-tested it
with my pre-amplifier circuit and a microphone with all the possible
values for the mixer control "ADC Input Mux" (24bit adc muxer that
select the port) and VOYLA, it worked with values 0 and 7.

So if you want to make your line in work: check if the connector is well
solded and configure the mixer control with amixer:

amixer -c 0 cset numid=16 0
or
amixer -c 0 cset numid=16 7

Both of them are for line in, Dunno the difference, maybe one is mono
and the other is stereo as i think line in is stereo.

For a list of all controls the driver has:

amixer -c 0 contents


here is everything i did:
amixer -c 0 cset numid=10 1;amixer -c 0 cset numid=11 1;amixer -c 0 cset
numid=5 1;amixer -c 0 cset numid=3 7;amixer -c 0 cset numid=16 0;arecord
teste0.wav

aplay teste0.wav

Card 0 is the sunxi audio codec and card 1 is for the hdmi audio output.

I should probably test fmin to see which ADC input mux it uses and
document it after at the wiki.


Gustavo Zamboni




Le 18/01/2013 09:29, Gustavo Zamboni a �crit :

Simos Xenitellis

unread,
Jan 18, 2013, 9:09:56 AM1/18/13
to cubie...@googlegroups.com
On Fri, Jan 18, 2013 at 10:29 AM, Gustavo Zamboni
<gustavo...@gmail.com> wrote:
> Here are the default conf and codec details:
>
> http://www.alsa-project.org/db/?f=8fdde4b46f66222dfede4472216fd43b078f1fa8
>

This needs to go to the Wiki.
I had a look at http://linux-sunxi.org/ and did not find a section about audio.

Could someone start a Sound section at the proper location at the Wiki
and post the URL here?
Then, we can add this alsa-info output and the rest of the
instructions that Gustavo provides.

Simos

Rosimildo DaSilva

unread,
Jun 8, 2013, 4:54:07 PM6/8/13
to cubie...@googlegroups.com
Hi there,

I am trying to get AUDIO working on the Cubie. First, I am trying output,  but I'd like to try the Mic also.

I have tried everything and nothing works. I am wondering if the board could be damaged, but unfortunately, I don't have a spare board around.

Below you have logs, from dmesg,  alsa-utils, and so on... if you could spot what the heck I am doing wrong....

Here it is the DMESG output, when I boot the system:

[    3.110000] enter sun4i Audio codec!!!
[    3.110000] sun4i audio support initialized
[    3.120000] sun4i Audio codec successfully loaded..
[    3.150000] asoc: sndhdmi <-> sun4i-hdmiaudio.0 mapping ok
[    3.180000] ALSA device list:
[    3.180000]   #0: sun4i-CODEC  Audio Codec
[    3.190000]   #1: sun4i-sndhdmi


uname -a

Linux linaro-alip 3.0.76 #13 PREEMPT Sun Jun 2 05:27:14 PDT 2013 armv7l armv7l armv7l GNU/Linux

This is the content of the config file:

root@linaro-alip:/home/linaro# ls /etc/asound.conf
/etc/asound.conf
root@linaro-alip:/home/linaro# cat /etc/asound.conf
pcm.!default {
  type hw
  card 1
  device 0
}
ctl.!default {
  type hw
  card 1
}

root@linaro-alip:/home/linaro# amixer -c 0
Simple mixer control 'Master',0
  Capabilities: pvolume pvolume-joined penum
  Playback channels: Mono
  Limits: Playback 0 - 63
  Mono: Playback 48 [76%]
Simple mixer control 'LineL',0
  Capabilities: pswitch pswitch-joined penum
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'LineR',0
  Capabilities: pswitch pswitch-joined penum
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'Mic Input Mux',0
  Capabilities: volume volume-joined penum
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 15
  Mono: 0 [0%]
Simple mixer control 'MicL',0
  Capabilities: volume volume-joined penum
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 3
  Mono: 1 [33%]
Simple mixer control 'MicR',0
  Capabilities: volume volume-joined penum
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 3
  Mono: 2 [67%]
Simple mixer control 'Playback',0
  Capabilities: pswitch pswitch-joined penum
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'Capture',0
  Capabilities: cvolume cvolume-joined penum
  Capture channels: Mono
  Limits: Capture 0 - 7
  Mono: Capture 7 [100%]
Simple mixer control 'ADC Input Mux',0
  Capabilities: volume volume-joined penum
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 7
  Mono: 0 [0%]
Simple mixer control 'Fm',0
  Capabilities: volume volume-joined penum
  Playback channels: Mono
  Capture channels: Mono
  Limits: 0 - 7
  Mono: 3 [43%]
Simple mixer control 'FmL',0
  Capabilities: pswitch pswitch-joined penum
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'FmR',0
  Capabilities: pswitch pswitch-joined penum
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'Ldac Left Mixer',0
  Capabilities: pswitch pswitch-joined penum
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'Ldac Right Mixer',0
  Capabilities: pswitch pswitch-joined penum
  Playback channels: Mono
  Mono: Playback [off]
Simple mixer control 'Rdac Right Mixer',0
  Capabilities: pswitch pswitch-joined penum
  Playback channels: Mono
  Mono: Playback [off]


root@linaro-alip:/home/linaro# ls /dev/snd/ -l
total 0
drwxr-xr-x 2 root root       80 Jun  8 20:33 by-path
crw-rw---T 1 root audio 116,  0 Jun  8 20:33 controlC0
crw-rw---T 1 root audio 116, 32 Jun  8 20:33 controlC1
crw-rw---T 1 root audio 116, 24 Jun  8 20:33 pcmC0D0c
crw-rw---T 1 root audio 116, 16 Jun  8 20:33 pcmC0D0p
crw-rw---T 1 root audio 116, 48 Jun  8 20:33 pcmC1D0p
crw-rw---T 1 root audio 116, 33 Jun  8 20:33 timer


root@linaro-alip:/home/linaro# speaker-test -twav -c2

speaker-test 1.0.25

Playback device is default
Stream parameters are 48000Hz, S16_LE, 2 channels
WAV file(s)
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 4096 to 32768
Period size range from 1024 to 8192
Using max buffer size 32768
Periods = 4
was set period_size = 8192
was set buffer_size = 32768
 0 - Front Left
 1 - Front Right
Time per period = 2.708062
 0 - Front Left
 1 - Front Right
Le 18/01/2013 09:29, Gustavo Zamboni a �crit :
> Here are the default conf and codec details:
>
> http://www.alsa-project.org/db/?f=8fdde4b46f66222dfede4472216fd43b078f1fa8
>
>
> Gustavo Zamboni
>
>
> Le 17/01/2013 19:24, Simos Xenitellis a �crit :

Roman Mamedov

unread,
Jun 8, 2013, 5:03:53 PM6/8/13
to cubie...@googlegroups.com, rosi...@gmail.com
On Sat, 8 Jun 2013 13:54:07 -0700 (PDT)
Rosimildo DaSilva <rosi...@gmail.com> wrote:

> [ 3.180000] ALSA device list:
> [ 3.180000] #0: sun4i-CODEC Audio Codec
> [ 3.190000] #1: sun4i-sndhdmi

> root@linaro-alip:/home/linaro# cat /etc/asound.conf
> pcm.!default {
> type hw
> card 1
> device 0
> }
> ctl.!default {
> type hw
> card 1
> }

Card 1 per your ALSA device list above is HDMI audio output. So just to be
clear, are you trying to make HDMI audio work, and not the analog jack?

> root@linaro-alip:/home/linaro# amixer -c 0

And here you run a mixer for card 0, not 1...

--
With respect,
Roman
signature.asc

Rosimildo DaSilva

unread,
Jun 8, 2013, 5:24:03 PM6/8/13
to cubie...@googlegroups.com, rosi...@gmail.com
Hi Roman,


On Saturday, June 8, 2013 4:03:53 PM UTC-5, Roman Mamedov wrote:
On Sat, 8 Jun 2013 13:54:07 -0700 (PDT)
Rosimildo DaSilva <rosi...@gmail.com> wrote:

> [    3.180000] ALSA device list:
> [    3.180000]   #0: sun4i-CODEC  Audio Codec
> [    3.190000]   #1: sun4i-sndhdmi

> root@linaro-alip:/home/linaro# cat /etc/asound.conf
> pcm.!default {
>   type hw
>   card 1
>   device 0
> }
> ctl.!default {
>   type hw
>   card 1
> }

Card 1 per your ALSA device list above is HDMI audio output. So just to be
clear, are you trying to make HDMI audio work, and not the analog jack?

Yes, I am trying to get the *Analog Jack* to work. HDMI audio works.


> root@linaro-alip:/home/linaro# amixer -c 0

And here you run a mixer for card 0, not 1...


Yes, the results that I posted was for CARD 0, which I believe it is the *Analog Jack* card.

 
Is there any FEX setting that I could be missing ?


R


Roman Mamedov

unread,
Jun 8, 2013, 5:28:51 PM6/8/13
to cubie...@googlegroups.com, rosi...@gmail.com
On Sat, 8 Jun 2013 14:24:03 -0700 (PDT)
Rosimildo DaSilva <rosi...@gmail.com> wrote:

> Hi Roman,
>
> On Saturday, June 8, 2013 4:03:53 PM UTC-5, Roman Mamedov wrote:
> >
> > On Sat, 8 Jun 2013 13:54:07 -0700 (PDT)
> > Rosimildo DaSilva <rosi...@gmail.com <javascript:>> wrote:
> >
> > > [ 3.180000] ALSA device list:
> > > [ 3.180000] #0: sun4i-CODEC Audio Codec
> > > [ 3.190000] #1: sun4i-sndhdmi
> >
> > > root@linaro-alip:/home/linaro# cat /etc/asound.conf
> > > pcm.!default {
> > > type hw
> > > card 1
> > > device 0
> > > }
> > > ctl.!default {
> > > type hw
> > > card 1
> > > }
> >
> > Card 1 per your ALSA device list above is HDMI audio output. So just to be
> > clear, are you trying to make HDMI audio work, and not the analog jack?
> >
>
> Yes, I am trying to get the *Analog Jack* to work. HDMI audio works.

Try changing "card 1" in asound.conf to "card 0" in both places.


--
With respect,
Roman
signature.asc

Rosimildo DaSilva

unread,
Jun 8, 2013, 8:02:38 PM6/8/13
to cubie...@googlegroups.com
On Saturday, June 8, 2013 4:28:51 PM UTC-5, Roman Mamedov wrote:
On Sat, 8 Jun 2013 14:24:03 -0700 (PDT)
> Yes, I am trying to get the *Analog Jack* to work. HDMI audio works.

Try changing "card 1" in asound.conf to "card 0" in both places.


I tried, it did not work. I give up. It must be some damaged HW.

I will probably try to get a "USB  Head Set and see how it works.

Thanks for your time.

I have ordered another CB, just in case.




 

Roman Mamedov

unread,
Jun 9, 2013, 2:34:12 AM6/9/13
to cubie...@googlegroups.com, rosi...@gmail.com
On Sat, 8 Jun 2013 17:02:38 -0700 (PDT)
Rosimildo DaSilva <rosi...@gmail.com> wrote:

> On Saturday, June 8, 2013 4:28:51 PM UTC-5, Roman Mamedov wrote:
> >
> > On Sat, 8 Jun 2013 14:24:03 -0700 (PDT)
> > > Yes, I am trying to get the *Analog Jack* to work. HDMI audio works.
> >
> > Try changing "card 1" in asound.conf to "card 0" in both places.
> >
> >
> I tried, it did not work. I give up. It must be some damaged HW.

Also try just removing asound.conf. Since the Analog output is already the
card 0 in your case, that file shouldn't be needed at all.

--
With respect,
Roman
signature.asc

Rosimildo DaSilva

unread,
Jun 9, 2013, 9:38:12 AM6/9/13
to cubie...@googlegroups.com

Also try just removing asound.conf. Since the Analog output is already the
card 0 in your case, that file shouldn't be needed at all.


I've tried, it did not work.

For the time being, I bought a USB headset and it is working.

Oh well, thanks a lot for your time. I ordered another CB, and when the other one arrives, I will try to be brave, and will get an iron solder... and see what happens. I already lost too much time on this ( which should be very simple ). I find the audio connectors on the CB to be fragile and too close of each other, specially for something that you need to be hooking in and out all the time.

R

Victor Pimentel

unread,
Jan 15, 2015, 2:05:02 PM1/15/15
to cubie...@googlegroups.com
Hi Gustavo,

I had the same problem with the solder...

Would you help me on how to re-sold it?

Thanks

Stack Programer

unread,
May 17, 2017, 12:11:35 AM5/17/17
to Cubieboard
i had same problem  in input sound entering to cubieboard.....any good mic introduce that work for cubie board

Stack Programer

unread,
May 21, 2017, 12:08:48 AM5/21/17
to Cubieboard
if MAX9812 is good module for cubie board??
Reply all
Reply to author
Forward
0 new messages