2008-02-28 12:59:31     Limitation of the AD1836A SVN trunk driver

Document created by Aaronwu Employee on Aug 5, 2013
Version 1Show Document
  • View in full screen mode

2008-02-28 12:59:31     Limitation of the AD1836A SVN trunk driver

Jean-Francois Argentino (FRANCE)

Message: 51818    Hello all,

 

I'm playing with the AD1836A on a BF537E (SVN trunk for uclinux and toolchain). It's configuration is SND_BLACKFIN_AD1836_TDM, MULTI_SUBSTREAM, and CONFIG_USER_BLACKFIN_LINPHONE is not set.

 

Everything seems to work properly, I can record with "arecord" 2 channels, but:

 

    -I have only one capture sub-device available through the ALSA driver, but the AD1836A has 2 stereo inputs. More over, the capture subdevice is stereo only, I can't find the trick to record 4 channels...

 

    -I'm not sure, but it looks like I can't capture at "true" 96kHz, since "snd_pcm_hw_params_set_rate_near" always set the sample rate to 48kHz. But the AD1836A is 96kHz capable.

 

I take a look at the "sound/blackfin/ad1836.c" driver, I can see that:

    -CHANNELS_INPUT = 4 but "channels_max" field of "snd_ad1836_capture_hw" structure is set to CHANNELS_MAX which is two.

    -all sample rates relative fields of "snd_ad1836_capture_hw" are set to 48kHz.

    -"formats" field of "snd_ad1836_capture_hw" is set to SNDRV_PCM_FMTBIT_S32_LE, but the AD1836A is a 24 bits per sample CODEC...

 

I naively try to separately set these fields with values which sound true for me, but after that any capture try fail with this display:

 

ALSA sound/blackfin/ad1836.c:1023:

ALSA lib ../../../alsa-lib-1.0.12/src/pcm/pcm_params.c:2152:(snd_pcm_hw_refine_slave) Slave PCM not usable

arecord: set_params:882: Broken configuration for this PCM: no configurations available

snd_ad1836_hw_free

ALSA sound/blackfin/ad1836.c:961: snd_ad1836_capture_close

 

This driver is very complicated (for me), since ALSA, SPORT, SPI, DMA... are implicated. So if somebody can give me an explanation for these limitations, or any trick to use the AD1836 at its full capabilities, it will be greatly appreciated.

 

Thanks by advance.

TranslateQuoteReplyEditDelete

 

 

2008-02-28 13:43:30     Re: Limitation of the AD1836A SVN trunk driver

Mike Frysinger (UNITED STATES)

Message: 51821    you open the capture device multiple times to get all the channels

 

if you change the kernel parameters, you need to update the alsa config file accordingly ... in other words, review the lib/alsa-lib/alsa-lib-1.0.12/src/conf/cards/AD1836.conf file which gets installed into /usr/share/alsa/cards/

QuoteReplyEditDelete

 

 

2008-02-28 17:18:41     Re: Limitation of the AD1836A SVN trunk driver

Robin Getz (UNITED STATES)

Message: 51852    Jean-Francois:

 

The AD1836 Datasheet states "the ADC section may also operate at a sample rate of 96 kHz with only the two primary channels active."

 

You can do  4-channel 48 kHz operation or 2-channel 96 kHz operation.

 

The Blackfin can do alot - but it might be limited to the codec.

 

-Robin

QuoteReplyEditDelete

 

 

2008-02-29 05:33:55     Re: Limitation of the AD1836A SVN trunk driver

Jean-Francois Argentino (FRANCE)

Message: 51892    Mike:

I will test that on monday...

 

Robin:

OK, I read too quickly the AD1836A datasheet... Thanks for this details... But it's really a pitty blackfin can't improve codec perf with kind of black magic, maybe do we have to add a tracker for that?

 

To all:

Thanks a lot.

TranslateQuoteReplyEditDelete

 

 

2008-02-29 07:22:08     Re: Limitation of the AD1836A SVN trunk driver

Robin Getz (UNITED STATES)

Message: 51897    Jean-Francois:

 

The Blackfin can't change the performance on the external device. You might be better off using 24 x AD7767 - which can be daisy chained to one SPORT (look at the datasheet). This is pretty high performance (113dB SNR) - so depending on what you are trying to do - might be better than trying for force fit an audio codec into the application.

 

-Robin

QuoteReplyEditDelete

 

 

2008-03-03 03:19:51     Re: Limitation of the AD1836A SVN trunk driver

Jean-Francois Argentino (FRANCE)

Message: 51982    Robin,

It was a joke... Thanks for you advice, and sorry for my suspect humor...

Attachments

    Outcomes