Community
cancel
Showing results for 
Search instead for 
Did you mean: 
DDam
Novice
2,204 Views

How to use I2C to communicate between Edison mini breakout board and Audio codec proto

Jump to solution

Hi all,

I have a problem when using I2C to communicate between Edison mini breakout board and Audio codec proto: http://www.mikroe.com/add-on-boards/audio-voice/audio-codec-proto/ Audio Codec PROTO - Development Board with WM8731 Audio Codec. I read some threads on the forum about using I2C . Based on these guide, I used pull up resistors (4.7kohm) and level shifter NS-LS4 (4ch Level Shift) for my configurarion. However when I use this command (i2cdetect -y -r 6) to detect the Audio codec devices, it doesn't work and shows errors:

0 1 2 3 4 5 6 7 8 9 a b c d e f

00: -- -- -- -- -- -- -- -- -- -- -- -- --

10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

40: [ 1235.550244] i2c-designware-pci 0000:00:09.1: i2c_dw_handle_tx_abort: lost arbitration

[ 1235.557560] i2c-designware-pci 0000:00:09.1: i2c_dw_handle_tx_abort: lost arbitration

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

70: -- -- -- -- -- -- -- --

The same errors happen when I use i2c-1: i2cdetect -y -r 1

Anyone can help ?

Thanks

0 Kudos
1 Solution
idata
Community Manager
121 Views

Hi squared,

 

 

Have you checked this threa before, /thread/76515 https://communities.intel.com/thread/76515? You might get some ideas or solutions from there, Sergey developed an audio block that he's connecting to his Edison board, some other users post some questions that could help you. Also, do you have any other I2C device or sensor that you test with your Edison, there might be a compatibility issue with this Audio codec proto that you're using, so this is something to take into account.

 

 

Regards,

 

-Pablo

View solution in original post

10 Replies
idata
Community Manager
122 Views

Hi squared,

 

 

Have you checked this threa before, /thread/76515 https://communities.intel.com/thread/76515? You might get some ideas or solutions from there, Sergey developed an audio block that he's connecting to his Edison board, some other users post some questions that could help you. Also, do you have any other I2C device or sensor that you test with your Edison, there might be a compatibility issue with this Audio codec proto that you're using, so this is something to take into account.

 

 

Regards,

 

-Pablo

View solution in original post

DDam
Novice
121 Views

Thanks Pablo,

I will try it.

idata
Community Manager
121 Views

Hi,

 

 

Do you have updates on this case? Did you check the link I suggested?
DDam
Novice
121 Views

Hi,

I checked this link and It works now.

Thanks

DDam
Novice
121 Views

Hi Pablo,

Based on the aboved link, I can configure Edison works with wm8731 audio codec for playback audio. However, when I try to record using "arecord" command, it always has a high noise. So, do you have any suggestion to remove or mitigate it ?

Thanks

idata
Community Manager
121 Views

Hi squaredn,

 

 

Could you please explain a little bit more what you mean by "high noise"? Is that the only thing you're hearing when recording?

 

Could you please provide the whole command that you're using to record? This might come handy if you haven't seen it before, http://quicktoots.linux-audio.com/toots/quick-toot-arecord_and_rtmix-1.html http://quicktoots.linux-audio.com/toots/quick-toot-arecord_and_rtmix-1.html, it's a quick guide about arecord.

 

This thread from archlinux also provides some tips that you should try, https://bbs.archlinux.org/viewtopic.php?id=125526 https://bbs.archlinux.org/viewtopic.php?id=125526. Apparently by changing the microphone values he was able to solve the background noise he was getting.

 

 

Regards,

 

-Pablo
DDam
Novice
121 Views

Hi pablo,

- I mean this is a background noise. It alway occurs when I record.

- I used the record and aplay command as the following:

-- arecord -f dat -D hw:1,0 test.wav

-- aplay -f dat test.wav

- Based on your suggested thread : https://bbs.archlinux.org/viewtopic.php?id=125526 https://bbs.archlinux.org/viewtopic.php?id=125526 , I tried it but I can not find the Internal Mic when using the command: amixer. This command just shows the results :

amixer

Simple mixer control 'PCM',0

Capabilities: pvolume

Playback channels: Front Left - Front Right

Limits: Playback 0 - 255

Mono:

Front Left: Playback 253 [99%] [-0.40dB]

Front Right: Playback 253 [99%] [-0.40dB]

Simple mixer control 'Digital',0

Capabilities: cvolume

Capture channels: Front Left - Front Right

Limits: Capture 0 - 120

Front Left: Capture 60 [50%] [0.00dB]

Front Right: Capture 60 [50%] [0.00dB]

I also use alsamixer to find the micro values but it doen't have.

P/s: I am using dummy audio codec.

Thanks

idata
Community Manager
121 Views

Hi sqauredn,

 

 

Let us investigate your case and we will get back to you soon. Thank you for your patience.

 

 

Regards,

 

-Pablo
idata
Community Manager
121 Views

Hi squaredn,

Thank you for your patience. We've been trying some things and we would like you to test it as well.

 

Could you please try "aplay –f dat –D hw:1,0 test.wav" after recording from your device? The sound issue could be related to the microphone recording with poor quality or the speakers not playing the audio well. I'm wondering if you have tried to play a .wav file that works correctly, is this the case? If not, I would suggest you to download a working .wav file to the Edison and play it with the proto board, this way we would isolate the issue and determine if it has something to do with the microphone or the speakers.

 

We are still working on this issue and is taking some time to reproduce. We have already built the 2.1 release and applied the patch found on Sergey's project, we haven't been able to get it recording/playing on the Edison Breakout board though.

Could you please provide more details on your configuration?

  • How are you wiring the Edison board and the audio codec proto board?
  • Do you have any pull-ups or pull-downs being used?
  • What image version are you using (please provide the download link) and what changes have you made?

Any other detail will help us a lot.

Regards,

 

-Pablo
idata
Community Manager
121 Views

Hi squaredn,

 

 

We would like to know if you've been able to try our suggestions regarding the codec issue. If so, have you noticed anything different?

 

 

Regards,

 

-Pablo
Reply