Tuesday, February 26, 2008

Adding audio why not





Due to the fact that I use an audio player with the existing domotic system I checked out the possible ways on the NGW. I was quit surprised to see there were a few possibilities to go for. I had the choice out of:

  1. ABDAC
  2. I2S
  3. AC97
I tried the rebuild my kernel with sound enabled. I had to play a bit around with the options in the menuconfig window to finally get some device to play. I also installed the IPKG install tool to get small binary packages more easy already compiled for the AVR32 target. I installed the madplay as a player to try out the sound device. I managed to play a MP3 song from the command line but only to the /dev/null dummy sound driver. Of course this normal because I haven't connect a codec chip yet. I asked a few opinions on the freaks forum and apparently the AC97 was the one to go for. I tested the ABDAC output and that seems to be ok because it has the build-in capacity to convert a 1 bit stream. But the quality of sound is poor. I left alone the I2S option this is used in the other larger development kit STK1000.

So I decided to take the AC97 option widely spread in PC sound cards. I browsed to the Cirrus site and found a suited codec chip that could be easily connected to the AVR32. The drawing in my previous blog must change in order to get the sound on board but this should be finished as we speak. See the final drawing in this log. The board will be soon in production now. It must be said that it will be a large board (10x21cm) but there's plenty on it. I also limited the amount of layers to 2. Al I/Os are very good isolated against any disturbance from the out site so I took the risk.

As soon the board is ready I take some picture and post them.

In the meanwhile I'm still busy reading in my purchased books. The subjects of the books and the reason why I read them:
  • GNU application development ( for general development )
  • Linux kernel development ( to get a better view on the inside )
  • CGI in C and perl ( to consider the web server possibility )
To soon to give a small review on them but I will do it when I finished them all. For the moment it's very important that I get a more in depth view on the linux OS in general because it's my first time that I develop some stuff for linux. I was used to work against the windows win32. But as I already can say now their are plenty of things in common like the use of libc and OS basic principles like processes, threads and synchronization. But still much to learn ! My proof of concept that I have in mind is still growing everyday as we move on learning. I try to do some examples from the accompanied CDs as well. The results of using CGI from a C program on the NGW is quit great I must say. But I will write some dedicated blogs on a few topics that I learned or found amazing to discover from reading the books.

3 comments:

Anonymous said...

Hey. Nice Blog. You said you tested the ABDAC audio but found the sound quality to be poor. How you you test it? I'm looking for documentation on this. Thanks!

Unknown said...

Hi. Thanks for the details on sound. We are also developing a secure telephony system using ngw100 for our senior project at college. We need to embed speaker and mic into it. Is there a tested or applied way to follow or should we start from scratch? Do you have any idea where to start?

guyvo said...

You can keep things simple and take the ABDAC output than you don't need a decoder chip but the quality isn't that great. If you really need some higher quality sounds than you must go with the AC97 or I2S outputs. The latter solutions need a decoder chip but they can be easily find on digikey or cirrus. There are plenty of small command line tools out there which work when you run linux on the ngw100 board. They must be be enabled in the menuconfig of the build root that's all. I managed to play some mp3 songs on the AC97and the sound was really good. The only thing was that it sometimes was not that fluent because of the SD card feed. But this was due to some AVR32 kernel files that weren't yet optimized to have that kind of file transfer. Maybe it's been corrected in the later kernel builds but Ican't say because I don't work on the NGW100 board anymore.

Hope this helps.
-G