New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rpi-proto audio codec on Raspberry Pi v2 model B #1302

Closed
Shibonja opened this Issue Feb 24, 2016 · 30 comments

Comments

Projects
None yet
9 participants
@Shibonja

Hi,

First I want to say great work. I recently tried to get I2S sound working on the Raspberry Pi v2 model B with rpi-proto board purchased on mikroelektronika:
http://www.mikroe.com/add-on-boards/audio-voice/audio-codec-proto/

I connected the board like this:
SCK -> J8-Pin12
MISO -> J8-Pin38
MOSI -> J8-Pin40
ADCL,DACL -> J8-Pin35
SDA -> J8-Pin3
SCL -> J8-Pin5
3.3V -> J8-Pin17
GND -> J8-Pin39

I changed this in my /boot/config

dtparam=i2c_arm=on
dtparam=i2s=on
dtparam=spi=on


dtoverlay=i2s-mmap
dtoverlay=rpi-proto

added to /etc/modules:

snd_soc_bcm2708_i2s
bcm2708_dmaengine
snd_soc_wm8731
snd_soc_rpi_proto

here are my dmesg errors:

[    6.094189] snd-rpi-proto sound: ASoC: CPU DAI (null) not registered
[    6.094217] snd-rpi-proto sound: snd_soc_register_card() failed: -517
[    6.099394] spi spi0.0: setting up native-CS0 as GPIO 8
[    6.100262] spi spi0.1: setting up native-CS1 as GPIO 7
[    6.100440] snd-rpi-proto sound: ASoC: CPU DAI (null) not registered
[    6.100462] snd-rpi-proto sound: snd_soc_register_card() failed: -517
[    6.100963] snd-rpi-proto sound: ASoC: CPU DAI (null) not registered
[    6.100989] snd-rpi-proto sound: snd_soc_register_card() failed: -517
[    6.102795] bcm2708_i2c 3f804000.i2c: BSC1 Controller at 0x3f804000 (irq 79) (baudrate 100000)
[    6.103079] snd-rpi-proto sound: ASoC: CPU DAI (null) not registered
[    6.103091] snd-rpi-proto sound: snd_soc_register_card() failed: -517
[    6.105641] snd-rpi-proto sound: ASoC: CODEC DAI wm8731-hifi not registered
[    6.105654] snd-rpi-proto sound: snd_soc_register_card() failed: -517

Am I missing some settings. My kernel version is 4.1.7-v7+. I also noticed that I am getting no output measuring with oscilloscope on I2S output pin.

Regards, Haris.

@popcornmix

This comment has been minimized.

Show comment
Hide comment
@popcornmix

popcornmix Feb 24, 2016

Collaborator

You might have better luck contacting mikroelektronika.

Collaborator

popcornmix commented Feb 24, 2016

You might have better luck contacting mikroelektronika.

@Shibonja

This comment has been minimized.

Show comment
Hide comment
@Shibonja

Shibonja Feb 25, 2016

Hi, @popcornmix

I got playback working, even with the errors on dmesg log, except that I am getting a new one every time I play something on the audio codec:

[   59.514601] bcm2708-i2s 3f203000.i2s: I2S SYNC error!

Recording is not jet working.

Hi, @popcornmix

I got playback working, even with the errors on dmesg log, except that I am getting a new one every time I play something on the audio codec:

[   59.514601] bcm2708-i2s 3f203000.i2s: I2S SYNC error!

Recording is not jet working.

@Shibonja

This comment has been minimized.

Show comment
Hide comment
@Shibonja

Shibonja Mar 4, 2016

Hi, @popcornmix

I made recording kind of work. I found a code example for testing the microphone with Arduino and wm8721. I Uploaded the code to arduino and connected only arduinos I2C pins to wm8731. Run the code once, and connected the wm8731 I2C pins back to raspberry. And after this I was ableto record sound and also play sound as well. After a reboot with the codec connected to raspberry pi sound recording was gone, I needed to repeat the procedure to get it work again. It seem that the raspberry pi codec driver writes some registers in wm8731 which are disabling sound recording. The Arduino code i found is on this link: https://www.sparkfun.com/products/retired/11290

Regards, Haris.

Shibonja commented Mar 4, 2016

Hi, @popcornmix

I made recording kind of work. I found a code example for testing the microphone with Arduino and wm8721. I Uploaded the code to arduino and connected only arduinos I2C pins to wm8731. Run the code once, and connected the wm8731 I2C pins back to raspberry. And after this I was ableto record sound and also play sound as well. After a reboot with the codec connected to raspberry pi sound recording was gone, I needed to repeat the procedure to get it work again. It seem that the raspberry pi codec driver writes some registers in wm8731 which are disabling sound recording. The Arduino code i found is on this link: https://www.sparkfun.com/products/retired/11290

Regards, Haris.

@klausro

This comment has been minimized.

Show comment
Hide comment
@klausro

klausro Mar 4, 2016

Hi @Shibonja,

how did you manage to get at least playback running? I didn't hear anything. The errors in dmsg are
the same as yours during startup, and during playback I get

bcm2708-i2s 3f203000.i2s: I2S SYNC error!
bcm2708-dmaengine 3f007000.dma: DMA transfer could not be terminated

I try playback with
mplayer -ao alsa:device=hw=1,0 file.mp3

Regards, Klaus

klausro commented Mar 4, 2016

Hi @Shibonja,

how did you manage to get at least playback running? I didn't hear anything. The errors in dmsg are
the same as yours during startup, and during playback I get

bcm2708-i2s 3f203000.i2s: I2S SYNC error!
bcm2708-dmaengine 3f007000.dma: DMA transfer could not be terminated

I try playback with
mplayer -ao alsa:device=hw=1,0 file.mp3

Regards, Klaus

@pelwell

This comment has been minimized.

Show comment
Hide comment
@pelwell

pelwell Mar 4, 2016

Contributor

Why are you not just using the rpi-proto overlay?

dtoverlay=rpi-proto

It enables i2c and i2s, loads the drivers and configures the ALSA interface for you. You shouldn't need to load any modules or put anything else in config.txt. Except perhaps the dtoverlay=i2s-mmap.

Contributor

pelwell commented Mar 4, 2016

Why are you not just using the rpi-proto overlay?

dtoverlay=rpi-proto

It enables i2c and i2s, loads the drivers and configures the ALSA interface for you. You shouldn't need to load any modules or put anything else in config.txt. Except perhaps the dtoverlay=i2s-mmap.

@pelwell

This comment has been minimized.

Show comment
Hide comment
@pelwell

pelwell Mar 4, 2016

Contributor

Note that the -517 errors are an artifact of the load order (they are components indicating that something they need isn't loaded yet and to try again later, also known as EPROBEDEFER) and aren't necessarily a sign of a problem.

Contributor

pelwell commented Mar 4, 2016

Note that the -517 errors are an artifact of the load order (they are components indicating that something they need isn't loaded yet and to try again later, also known as EPROBEDEFER) and aren't necessarily a sign of a problem.

@klausro

This comment has been minimized.

Show comment
Hide comment
@klausro

klausro Mar 4, 2016

Hi @pelwell ,
thanks for the information. I use the dtoverlay=rpi-proto. In his 3rd post, @Shibonja said he got audio out working. I just want to know, what he has done!

klausro commented Mar 4, 2016

Hi @pelwell ,
thanks for the information. I use the dtoverlay=rpi-proto. In his 3rd post, @Shibonja said he got audio out working. I just want to know, what he has done!

@clivem

This comment has been minimized.

Show comment
Hide comment
@clivem

clivem Mar 4, 2016

Contributor

@pellwell Phil, just a heads-up, I haven't had any time today to look at this, but they are using SND_SOC_DAIFMT_CBM_CFM with this DAC driver. I wonder if the problem reported by the HiFiBerry people, with their DAC in clock master mode on Pi3B, might also be applicable to Pi2B.... hence the I2S SYNC error here!

Contributor

clivem commented Mar 4, 2016

@pellwell Phil, just a heads-up, I haven't had any time today to look at this, but they are using SND_SOC_DAIFMT_CBM_CFM with this DAC driver. I wonder if the problem reported by the HiFiBerry people, with their DAC in clock master mode on Pi3B, might also be applicable to Pi2B.... hence the I2S SYNC error here!

@klausro

This comment has been minimized.

Show comment
Hide comment
@klausro

klausro Mar 4, 2016

Ok, got it running. Simple solution, audio out was disabled in mixer.

klausro commented Mar 4, 2016

Ok, got it running. Simple solution, audio out was disabled in mixer.

@meerd

This comment has been minimized.

Show comment
Hide comment
@meerd

meerd Apr 29, 2016

Hello,

Is anyone able to record sound with rpi-proto? The board works perfectly when it comes to play something, but I haven't been able to record any sound yet. I tried changing alsa's settings but this did not work as well. Any help is appreciated.

@Shibonja
I have recently tried you Arduino based method but it does not work on my setup. Did you make any changes Sparkfun's example project?

Thanks.

meerd commented Apr 29, 2016

Hello,

Is anyone able to record sound with rpi-proto? The board works perfectly when it comes to play something, but I haven't been able to record any sound yet. I tried changing alsa's settings but this did not work as well. Any help is appreciated.

@Shibonja
I have recently tried you Arduino based method but it does not work on my setup. Did you make any changes Sparkfun's example project?

Thanks.

@kweiwen

This comment has been minimized.

Show comment
Hide comment
@kweiwen

kweiwen May 30, 2016

hi @meerd, i have same problem as you first, but finally i can use mic input to record sound now 💃

here's my setting for your information:
i use pi2 and wm8731 proto board, the setting were the same as @Shibonja

using amixer cset numid=13 on to unmute Output Mixer HiFi Playback Switch or manually using alsamixer to select the channel to unmute, adjust the volume.
after that, we can use mplayer -ao alsa:device=hw=0,0 -nolirc http://stream.radioactive.fm:8000/ractive to check the sound output.

i manually use alsamixer to select input as "Mic Input" (this is very important, cause after checked out the schematic of mikroelektronika they use mic input on the wm8731 and line input was unconnected). now i can use arecord to record something.

kweiwen commented May 30, 2016

hi @meerd, i have same problem as you first, but finally i can use mic input to record sound now 💃

here's my setting for your information:
i use pi2 and wm8731 proto board, the setting were the same as @Shibonja

using amixer cset numid=13 on to unmute Output Mixer HiFi Playback Switch or manually using alsamixer to select the channel to unmute, adjust the volume.
after that, we can use mplayer -ao alsa:device=hw=0,0 -nolirc http://stream.radioactive.fm:8000/ractive to check the sound output.

i manually use alsamixer to select input as "Mic Input" (this is very important, cause after checked out the schematic of mikroelektronika they use mic input on the wm8731 and line input was unconnected). now i can use arecord to record something.

@Ruffio

This comment has been minimized.

Show comment
Hide comment
@Ruffio

Ruffio Aug 17, 2016

@Shibonja has your issue been resolved? If so, please close this issue. Thanks.

Ruffio commented Aug 17, 2016

@Shibonja has your issue been resolved? If so, please close this issue. Thanks.

@meerd

This comment has been minimized.

Show comment
Hide comment
@meerd

meerd Aug 23, 2016

Hello @kweiwen,

Thanks for your reply. I solved the issue by using alsamixer too.

meerd commented Aug 23, 2016

Hello @kweiwen,

Thanks for your reply. I solved the issue by using alsamixer too.

@Shibonja

This comment has been minimized.

Show comment
Hide comment
@Shibonja

Shibonja Aug 27, 2016

Hi,
Sorry for late response. I got sound recording and playback working.

Hi,
Sorry for late response. I got sound recording and playback working.

@Shibonja Shibonja closed this Aug 27, 2016

@05101991

This comment has been minimized.

Show comment
Hide comment
@05101991

05101991 Sep 28, 2016

Hi All,
In my audio codec board playback is working fine . But recording is not done .
arecord -vD hw:2,0 -c 2 -r 48000 -f S16_LE name.wav
I used arecord to record an audio using earphones.
please help me out to record an audio through my audio codec board(wm8731s) .
Is anything I need to enable before recording ?

Hi All,
In my audio codec board playback is working fine . But recording is not done .
arecord -vD hw:2,0 -c 2 -r 48000 -f S16_LE name.wav
I used arecord to record an audio using earphones.
please help me out to record an audio through my audio codec board(wm8731s) .
Is anything I need to enable before recording ?

@Shibonja

This comment has been minimized.

Show comment
Hide comment
@Shibonja

Shibonja Sep 28, 2016

Hi,
Here is my confiugration and changes I made to get codec working.

Change config.txt
sudo nano /boot/config.txt
uncomment lines:
dtparam=i2c_arm=on
dtparam=i2s=on
dtparam=spi=on
add lines:
dtoverlay=i2s-mmap
dtoverlay=rpi-proto

Here is my modules file:
sudo nano /etc/modules
add lines:
i2c-bcm2708
i2c-dev
snd_soc_bcm2708_i2s
bcm2708_dmaengine
snd_soc_wm8731
snd_soc_rpi_proto

List amixer controls to get id's for: Output Mixer HiFi Playback Switch, Mic Capture Switch and Input Mux.

amixer controls
output:
numid=2,iface=MIXER,name='Master Playback ZC Switch'
numid=1,iface=MIXER,name='Master Playback Volume'
numid=4,iface=MIXER,name='Line Capture Switch'
numid=5,iface=MIXER,name='Mic Boost Volume'
numid=6,iface=MIXER,name='Mic Capture Switch'
numid=8,iface=MIXER,name='ADC High Pass Filter Switch'
numid=3,iface=MIXER,name='Capture Volume'
numid=10,iface=MIXER,name='Playback Deemphasis Switch'
numid=11,iface=MIXER,name='Input Mux'
numid=14,iface=MIXER,name='Output Mixer HiFi Playback Switch
numid=12,iface=MIXER,name='Output Mixer Line Bypass Switch'
numid=13,iface=MIXER,name='Output Mixer Mic Sidetone Switch'
numid=7,iface=MIXER,name='Sidetone Playback Volume'
numid=9,iface=MIXER,name='Store DC Offset Switch'

Id's (numid) can be diffrent for specific options.
Change control name='Output Mixer HiFi Playback Switch
amixer cset numid=14 on
It need to look like this:
amixer cget numid=14
numid=14,iface=MIXER,name='Output Mixer HiFi Playback Switch'
; type=BOOLEAN,access=rw------,values=1
: values=on

Change control name=name='Mic Capture Switch'
amixer cset numid=6 on
It need to look like this:
amixer cget numid=6
numid=6,iface=MIXER,name='Mic Capture Switch'
; type=BOOLEAN,access=rw------,values=1
: values=on

Change control name=name='Input Mux'
amixer cset numid=11 1
It need to look like this:
amixer cget numid=11
numid=11,iface=MIXER,name='Input Mux'
; type=ENUMERATED,access=rw------,values=1,items=2
; Item #0 'Line In'
; Item #1 'Mic'
: values=1

And save changes:
sudo alsactl store

For recording:
arecord -c 2 -D hw:0,0 -f S16_LE -r48000 save.wav
For playback
mplayer -ao alsa:device=hw=1,0 great_music.wav

To check hw params for your device you can list playback and recording devices with
arecord -l
aplay -l

Shibonja commented Sep 28, 2016

Hi,
Here is my confiugration and changes I made to get codec working.

Change config.txt
sudo nano /boot/config.txt
uncomment lines:
dtparam=i2c_arm=on
dtparam=i2s=on
dtparam=spi=on
add lines:
dtoverlay=i2s-mmap
dtoverlay=rpi-proto

Here is my modules file:
sudo nano /etc/modules
add lines:
i2c-bcm2708
i2c-dev
snd_soc_bcm2708_i2s
bcm2708_dmaengine
snd_soc_wm8731
snd_soc_rpi_proto

List amixer controls to get id's for: Output Mixer HiFi Playback Switch, Mic Capture Switch and Input Mux.

amixer controls
output:
numid=2,iface=MIXER,name='Master Playback ZC Switch'
numid=1,iface=MIXER,name='Master Playback Volume'
numid=4,iface=MIXER,name='Line Capture Switch'
numid=5,iface=MIXER,name='Mic Boost Volume'
numid=6,iface=MIXER,name='Mic Capture Switch'
numid=8,iface=MIXER,name='ADC High Pass Filter Switch'
numid=3,iface=MIXER,name='Capture Volume'
numid=10,iface=MIXER,name='Playback Deemphasis Switch'
numid=11,iface=MIXER,name='Input Mux'
numid=14,iface=MIXER,name='Output Mixer HiFi Playback Switch
numid=12,iface=MIXER,name='Output Mixer Line Bypass Switch'
numid=13,iface=MIXER,name='Output Mixer Mic Sidetone Switch'
numid=7,iface=MIXER,name='Sidetone Playback Volume'
numid=9,iface=MIXER,name='Store DC Offset Switch'

Id's (numid) can be diffrent for specific options.
Change control name='Output Mixer HiFi Playback Switch
amixer cset numid=14 on
It need to look like this:
amixer cget numid=14
numid=14,iface=MIXER,name='Output Mixer HiFi Playback Switch'
; type=BOOLEAN,access=rw------,values=1
: values=on

Change control name=name='Mic Capture Switch'
amixer cset numid=6 on
It need to look like this:
amixer cget numid=6
numid=6,iface=MIXER,name='Mic Capture Switch'
; type=BOOLEAN,access=rw------,values=1
: values=on

Change control name=name='Input Mux'
amixer cset numid=11 1
It need to look like this:
amixer cget numid=11
numid=11,iface=MIXER,name='Input Mux'
; type=ENUMERATED,access=rw------,values=1,items=2
; Item #0 'Line In'
; Item #1 'Mic'
: values=1

And save changes:
sudo alsactl store

For recording:
arecord -c 2 -D hw:0,0 -f S16_LE -r48000 save.wav
For playback
mplayer -ao alsa:device=hw=1,0 great_music.wav

To check hw params for your device you can list playback and recording devices with
arecord -l
aplay -l

@05101991

This comment has been minimized.

Show comment
Hide comment
@05101991

05101991 Sep 28, 2016

Evrything I had enabled previously . (both in .config.txt and etc/modules) .

For playback I used 1 ---> amixer cset numid=13 on
2----> mpalyer song.mp3
Its working fine.

For recording I used 1 ---> amixer cset numid=14 0n [ for line in ]
2 ----> arecord -vD hw:2,0 -c 2 -r 48000 -f S16_LE name.wav

I am unable to record audio. The name.wav file is created but,If i play the .wav file Unable to hear recorded voice .
Please correct If I am Going wrong.

Evrything I had enabled previously . (both in .config.txt and etc/modules) .

For playback I used 1 ---> amixer cset numid=13 on
2----> mpalyer song.mp3
Its working fine.

For recording I used 1 ---> amixer cset numid=14 0n [ for line in ]
2 ----> arecord -vD hw:2,0 -c 2 -r 48000 -f S16_LE name.wav

I am unable to record audio. The name.wav file is created but,If i play the .wav file Unable to hear recorded voice .
Please correct If I am Going wrong.

@Shibonja

This comment has been minimized.

Show comment
Hide comment
@Shibonja

Shibonja Sep 28, 2016

hi @05101991

Like said maybe are the id's for different settings on amixer are not the same for you, you need to change the following three items: Output Mixer HiFi Playback Switch, Mic Capture Switch and Input Mux.

hi @05101991

Like said maybe are the id's for different settings on amixer are not the same for you, you need to change the following three items: Output Mixer HiFi Playback Switch, Mic Capture Switch and Input Mux.

@05101991

This comment has been minimized.

Show comment
Hide comment
@05101991

05101991 Sep 28, 2016

Hi Shibonja

How to change Output Mixer HiFi Playback Switch, Mic Capture Switch and Input Mux .
I am new to this . can you help me ???

Hi Shibonja

How to change Output Mixer HiFi Playback Switch, Mic Capture Switch and Input Mux .
I am new to this . can you help me ???

@05101991

This comment has been minimized.

Show comment
Hide comment
@05101991

05101991 Sep 29, 2016

Hi Shibonja

I changed

pi@raspberrypi:~$ amixer controls
numid=2,iface=MIXER,name='Master Playback ZC Switch'
numid=1,iface=MIXER,name='Master Playback Volume'
numid=4,iface=MIXER,name='Line Capture Switch'
numid=5,iface=MIXER,name='Mic Boost Volume'
numid=6,iface=MIXER,name='Mic Capture Switch'
numid=8,iface=MIXER,name='ADC High Pass Filter Switch'
numid=3,iface=MIXER,name='Capture Volume'
numid=10,iface=MIXER,name='Playback Deemphasis Switch'
numid=14,iface=MIXER,name='Input Mux'
numid=13,iface=MIXER,name='Output Mixer HiFi Playback Switch'
numid=11,iface=MIXER,name='Output Mixer Line Bypass Switch'
numid=12,iface=MIXER,name='Output Mixer Mic Sidetone Switch'
numid=7,iface=MIXER,name='Sidetone Playback Volume'
numid=9,iface=MIXER,name='Store DC Offset Switch'

pi@raspberrypi:~$ amixer cset numid=13 on
numid=13,iface=MIXER,name='Output Mixer HiFi Playback Switch'
; type=BOOLEAN,access=rw------,values=1
: values=on


pi@raspberrypi:~$ amixer cset numid=6 on
numid=6,iface=MIXER,name='Mic Capture Switch'
; type=BOOLEAN,access=rw------,values=1
: values=on


amixer cset numid=14 1
numid=14,iface=MIXER,name='Input Mux'
; type=ENUMERATED,access=rw------,values=1,items=2
; Item #0 'Line In'
; Item #1 'Mic'


To Record :
arecord -c 2 -D hw:0,0 -f S16_LE -r48000 song.wav
Recording WAVE 'song.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
overrun!!! (at least 975.543 ms long)

File is created .But, the voice is not recorded . File size is also around 3mb.


pi@raspberrypi:~$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: sndrpiproto [snd_rpi_proto], device 0: WM8731 HiFi wm8731-hifi-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
Subdevices: 8/8
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Subdevice #2: subdevice #2
Subdevice #3: subdevice #3
Subdevice #4: subdevice #4
Subdevice #5: subdevice #5
Subdevice #6: subdevice #6
Subdevice #7: subdevice #7
card 1: ALSA [bcm2835 ALSA], device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI]
Subdevices: 1/1
Subdevice #0: subdevice #0


arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: sndrpiproto [snd_rpi_proto], device 0: WM8731 HiFi wm8731-hifi-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0

To stop recording do we have any commands ??

05101991 commented Sep 29, 2016

Hi Shibonja

I changed

pi@raspberrypi:~$ amixer controls
numid=2,iface=MIXER,name='Master Playback ZC Switch'
numid=1,iface=MIXER,name='Master Playback Volume'
numid=4,iface=MIXER,name='Line Capture Switch'
numid=5,iface=MIXER,name='Mic Boost Volume'
numid=6,iface=MIXER,name='Mic Capture Switch'
numid=8,iface=MIXER,name='ADC High Pass Filter Switch'
numid=3,iface=MIXER,name='Capture Volume'
numid=10,iface=MIXER,name='Playback Deemphasis Switch'
numid=14,iface=MIXER,name='Input Mux'
numid=13,iface=MIXER,name='Output Mixer HiFi Playback Switch'
numid=11,iface=MIXER,name='Output Mixer Line Bypass Switch'
numid=12,iface=MIXER,name='Output Mixer Mic Sidetone Switch'
numid=7,iface=MIXER,name='Sidetone Playback Volume'
numid=9,iface=MIXER,name='Store DC Offset Switch'

pi@raspberrypi:~$ amixer cset numid=13 on
numid=13,iface=MIXER,name='Output Mixer HiFi Playback Switch'
; type=BOOLEAN,access=rw------,values=1
: values=on


pi@raspberrypi:~$ amixer cset numid=6 on
numid=6,iface=MIXER,name='Mic Capture Switch'
; type=BOOLEAN,access=rw------,values=1
: values=on


amixer cset numid=14 1
numid=14,iface=MIXER,name='Input Mux'
; type=ENUMERATED,access=rw------,values=1,items=2
; Item #0 'Line In'
; Item #1 'Mic'


To Record :
arecord -c 2 -D hw:0,0 -f S16_LE -r48000 song.wav
Recording WAVE 'song.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
overrun!!! (at least 975.543 ms long)

File is created .But, the voice is not recorded . File size is also around 3mb.


pi@raspberrypi:~$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: sndrpiproto [snd_rpi_proto], device 0: WM8731 HiFi wm8731-hifi-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
Subdevices: 8/8
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Subdevice #2: subdevice #2
Subdevice #3: subdevice #3
Subdevice #4: subdevice #4
Subdevice #5: subdevice #5
Subdevice #6: subdevice #6
Subdevice #7: subdevice #7
card 1: ALSA [bcm2835 ALSA], device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI]
Subdevices: 1/1
Subdevice #0: subdevice #0


arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: sndrpiproto [snd_rpi_proto], device 0: WM8731 HiFi wm8731-hifi-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0

To stop recording do we have any commands ??

@05101991

This comment has been minimized.

Show comment
Hide comment
@05101991

05101991 Sep 29, 2016

What may be the problem ? Stiil I cant record an audio.

What may be the problem ? Stiil I cant record an audio.

@Shibonja

This comment has been minimized.

Show comment
Hide comment
@Shibonja

Shibonja Sep 29, 2016

Hi, I used codec board from link http://www.mikroe.com/add-on-boards/audio-voice/audio-codec-proto/ .
Check if connections are the same.

Hi, I used codec board from link http://www.mikroe.com/add-on-boards/audio-voice/audio-codec-proto/ .
Check if connections are the same.

@05101991

This comment has been minimized.

Show comment
Hide comment
@05101991

05101991 Sep 29, 2016

Same board I am also using . The connections(audio codec to raspberrpy pi 3) are same what you specified above (I did not make any changes in connection ).

I am using Earphones to record my voice (Is anything is required more to record audio) through codec board.

During booting of my pi board I am Getting this error.

[ 15.993127] snd-rpi-proto soc🔉 ASoC: CPU DAI (null) not registered
[ 15.993138] snd-rpi-proto soc🔉 snd_soc_register_card() failed: -517

Same board I am also using . The connections(audio codec to raspberrpy pi 3) are same what you specified above (I did not make any changes in connection ).

I am using Earphones to record my voice (Is anything is required more to record audio) through codec board.

During booting of my pi board I am Getting this error.

[ 15.993127] snd-rpi-proto soc🔉 ASoC: CPU DAI (null) not registered
[ 15.993138] snd-rpi-proto soc🔉 snd_soc_register_card() failed: -517

@Shibonja

This comment has been minimized.

Show comment
Hide comment
@Shibonja

Shibonja Sep 29, 2016

It worked form me, I recorded using some cheap pc microphone like this: http://www.promo-wholesale.com/Upfiles/Prod_r/Jwin-PC-Microphone_20090763410.jpg

It worked form me, I recorded using some cheap pc microphone like this: http://www.promo-wholesale.com/Upfiles/Prod_r/Jwin-PC-Microphone_20090763410.jpg

@05101991

This comment has been minimized.

Show comment
Hide comment
@05101991

05101991 Sep 29, 2016

But I used our mobile Earphones . (will this work ?)

But I used our mobile Earphones . (will this work ?)

@clivem

This comment has been minimized.

Show comment
Hide comment
@clivem

clivem Sep 29, 2016

Contributor

There are two 3.5mm jacks on this board. A stereo (green plug) headphone port for output and a mono input for mic. What do you have plugged into the (pink plug) microphone input 3.5mm jack, anything?

audio_codec_thumb04_b

Contributor

clivem commented Sep 29, 2016

There are two 3.5mm jacks on this board. A stereo (green plug) headphone port for output and a mono input for mic. What do you have plugged into the (pink plug) microphone input 3.5mm jack, anything?

audio_codec_thumb04_b

@05101991

This comment has been minimized.

Show comment
Hide comment
@05101991

05101991 Sep 29, 2016

I used mobile Earphones (there is no seperate channel for mobile earphones ) .In Board I am using input line to record and and output line for playback.

Guys can we use mobile headset to record an audio through audio codec board . If I am wrong please help me out..

I used mobile Earphones (there is no seperate channel for mobile earphones ) .In Board I am using input line to record and and output line for playback.

Guys can we use mobile headset to record an audio through audio codec board . If I am wrong please help me out..

@clivem

This comment has been minimized.

Show comment
Hide comment
@clivem

clivem Sep 29, 2016

Contributor

I do not own this board, but having looked at the circuit diagram, I doubt you are going to get very far trying to record anything from a microphone unless it is plugged into the MIC jack.

screenshot from 2016-09-29 11-49-06

Contributor

clivem commented Sep 29, 2016

I do not own this board, but having looked at the circuit diagram, I doubt you are going to get very far trying to record anything from a microphone unless it is plugged into the MIC jack.

screenshot from 2016-09-29 11-49-06

@05101991

This comment has been minimized.

Show comment
Hide comment
@05101991

05101991 Sep 29, 2016

Hi clivem

I did not get you what you are trying to say . Can you expalin briefly . we are recording by connecting headset through mic jack .

Hi clivem

I did not get you what you are trying to say . Can you expalin briefly . we are recording by connecting headset through mic jack .

@clivem

This comment has been minimized.

Show comment
Hide comment
@clivem

clivem Sep 29, 2016

Contributor

That makes two of us.... Mobile earphones..... Headset..... I don't get what you are saying/doing.

I say again, I do not own this board. Someone who does is telling you that they were able to record by connecting a microphone to the MIC jack. So whatever the problem is, it does not appear to be a driver problem, so this would seem to be the wrong venue for the help you are seeking. I would suggest you obtain support from either the people who sold you the card, or manufactured it, or from other users of this hardware, perhaps via the Raspberry Pi support forum. From everything you have said so far, this appears to be a userspace issue, not a kernel issue.

Contributor

clivem commented Sep 29, 2016

That makes two of us.... Mobile earphones..... Headset..... I don't get what you are saying/doing.

I say again, I do not own this board. Someone who does is telling you that they were able to record by connecting a microphone to the MIC jack. So whatever the problem is, it does not appear to be a driver problem, so this would seem to be the wrong venue for the help you are seeking. I would suggest you obtain support from either the people who sold you the card, or manufactured it, or from other users of this hardware, perhaps via the Raspberry Pi support forum. From everything you have said so far, this appears to be a userspace issue, not a kernel issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment