Android Audio Codecs

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Android Audio Codecs

3,177件の閲覧回数
NateWickstrom
Contributor I

I'm trying to get audio working within Android. My board is based on the QSB but uses different Audio Hardware (the TLV320AIC23B from TI). Both Linux and Android source have been modified and the new driver loads with without incident in Linux and is recognized by Android. When I play .wav files in an Android App or play mp3s with mplayer, using libmad audio decoder, the sound is clean and clear; However when playing compressed audio in Android, which uses Freescale proprietary libraries to decode the data, the sound quality is poor. After examining the i2s signal on the SSC bus, I found that a lot of the audio frames contain no data, all low bits. This is happening in 2 or 3 millisecond chunks once every 10 milliseconds or so... Has anyone had similar problems using Freescale's codec libraries with different ALSA drivers? Or could anyone explain how to build Freescale Android without Freescale's proprietary audio codecs?

    On the other hand, I've gotten Android and the Freescale codec libraries working with Maxim's Max9850 Audio DAC, and I'd be happy to give novice pointers on how to go about it.

ラベル(1)
タグ(2)
0 件の賞賛
返信
6 返答(返信)

1,834件の閲覧回数
PrashantDalmia
Contributor I

Hi Marc,

Your response was bang-on.We were not registering iim device. We did not think even in dream that there may be some relation between Audio Code and IIM Device.

I do not know how to thank you. We were in touch with Freescale Support since months and we did not get this solution.

Many thanks & Regards

Prashant



Marc-Oliver Westerburg said:

Problem solved?!


At least in our case the problem was caused by wrong permissions for the files "/dev/mxc_iim" and "/dev/mxc_mem". According to Freescale support at least some codecs access these to verify they are indeed running on an i.MX-SoC and inject noise on purpose if this detection fails. Permissions for these files must be set to 0664 and the corresponding kernel drivers must be up and running properly.

0 件の賞賛
返信

1,834件の閲覧回数
MOW
Contributor IV

Problem solved?!


At least in our case the problem was caused by wrong permissions for the files "/dev/mxc_iim" and "/dev/mxc_mem". According to Freescale support at least some codecs access these to verify they are indeed running on an i.MX-SoC and inject noise on purpose if this detection fails. Permissions for these files must be set to 0664 and the corresponding kernel drivers must be up and running properly.

0 件の賞賛
返信

1,834件の閲覧回数
MOW
Contributor IV

We're using a custom i.MX53-based board with Freescale's SGTL5000 audio codec (similar setup to Freescale's QSB) and face similar problems: Playing WAV-files (mono, stereo, different sample-rates) with Android media-player works fine without any problems. Playing MP3- or OGG-files with Android's media-player results in lots of noise; although the original audio data is still recognizable.


Just for a try we removed Freescale's MP3-codec leaving all other of Freescale's codecs in place. In this case Android seems to use its own SW-codec for MP3-playback and this works fine without any noise or distortions. Videos, which are still handled by Freescale's codec in this experimental configuration, with MP3 audio streams still don't work properly, though, and show the same audio problems. The video codecs themselves (H.263, H.264/AVC, and MPEG2) seem to work fine, though.


In our case these audio problems happen not just with Freescale's MP3 codec, but also with OGG and AAC codecs. Do you see similar problems with these codecs, as well?


We've tried with codecs from Freescale's Android releases R10.3, R10.3.1, R10.3.2, and R10.4 and alls versions seem to show the same problems on our system.

Regards,

Marc

0 件の賞賛
返信

1,834件の閲覧回数
PrashantDalmia
Contributor I

Hello Nate,

Infact we are facing exactly the same problem. We have a custom board based on i.MX53 processor. We are using Freescale's SW Audio Codecs. We have put hacks in opencore to tap the decoder output at multiple stage. When we play MP3 mono file, the output frame size is 1152 bytes. In all the frames last 576 bytes are zero. In case of Mp3 stereo file frame size is 2304 bytes. And again in all the frames we see last 576 bytes 0. Stereo case similar to yours (3ms zeros after 10ms data).

Freescale says that these Audio Codecs are SW optimized using ARM/Neon. When you say the you are able to run these codecs properly with Maxim's Max9850 Audio DAC, what do you mean? How can Audio DAC affect output of Audio Decoder?  May be we are missing something. Could you please give some pointers to us? We would highly appreciate a response.

Thanks in advance.

Regards

Prashant

0 件の賞賛
返信

1,834件の閲覧回数
daiane_angolini
NXP Employee
NXP Employee

Freescale audio codec is optimized to freescale board codec, so I don´t think it´s a good codec for your case.

Take a look on the board descriptor file (under <my_android>devices/<cmp>) I know there is a variable for PREBUILT true/false.

I´m not sure it there is one variable for video codecs and another for audio. But it may be the clue you need to change Makefiles.

0 件の賞賛
返信

1,834件の閲覧回数
ScottIngham_ng
Contributor I

Nate, Does the audio also work when you're on a call? I've set up the SABRE board with an external codec, and it can play audio files, but when I get a VoIP call up, there is no audio in either direction. Is there something special that needs to be set up in the drivers for the codec to work on a voice call?

Thanks,

Scott

0 件の賞賛
返信