cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Adventurer
Adventurer
308 Views
Registered: ‎09-05-2018

VCU TRD 2019.2 - Capture audio at a rate different than 48000

Jump to solution

Hello Xilinx support

I m using the VCU SDK 2019.2 - Audio profile as audio capture and encoded in AAC in the confluence doc it's mention this:

Audio Configuration:

  • Codec: AAC
  • Format: S24_32LE
  • Channel: 2
  • Sampling rate: 48kHz

My question is:

Is it possible to have also support for other audio frequency such as 3200, 44100, 96000

I have tried to use such pipeline in gstreamer but the audio heard hashed :

alsasrc device=hw:2,1 ! audio/x-raw, format=S24_32LE, rate=44100, channels=2 ! queue ! audioconvert ! volume volume=2 ! faac bitrate=128000 quality=400 ! ...

Tags (3)
0 Kudos
1 Solution

Accepted Solutions
Highlighted
Moderator
Moderator
286 Views
Registered: ‎11-09-2015

Hi @ericzerbib 

Then you have the PL soundcard which comes into play. You can see with the following code that it only supports a mclk clock ratio of 384

https://github.com/Xilinx/linux-xlnx/blob/master/sound/soc/xilinx/xlnx_pl_snd_card.c#L367

Which corresponds to 48kHz with a clock of 18.43 MHz as in the VCU TRD. You can find a useful table to find the ratio based on the clock on the I2S2 doc:

https://reference.digilentinc.com/reference/pmod/pmodi2s2/reference-manual

So this is expected that for HDMI, only 48 kHz will work.

You need to modify the drivers and clock if you need to support other frequencies


Florent
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**

View solution in original post

4 Replies
Highlighted
Moderator
Moderator
299 Views
Registered: ‎11-09-2015

Hi @ericzerbib 

The current linux driver for the I2S receiver / transmitter assumes that the clock is fixed to 18.43 MHz as per the TRD. This is mentioned in the wiki page for the driver:

https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18841805/Xilinx+ALSA+Audio+I2S+driver

Thus with this settings only 32, 48, 96 and 192 kHz will be supported by the driver itself.

As you have found the VCU TRD only mentions 48kHz but 96 kHz might work as well for recording and 32kHz, 96kHz and 192 kHz might work for playback. Note that 32 and 192 kHz will not work in recording because of a limitation of the Digilent PMOD (https://reference.digilentinc.com/reference/pmod/pmodi2s2/reference-manual).

If you need to support oher frequencies as 44100 Hz, you will need to allow a reconfigurable clock and change modify the to support differnt clocks.


Florent
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**
Highlighted
Adventurer
Adventurer
292 Views
Registered: ‎09-05-2018

Hi florent

Thank for your prompt response, you mention the i2s interface but I forgot to mention also that my question was on the HDMI In capture audio

thx

0 Kudos
Highlighted
Moderator
Moderator
287 Views
Registered: ‎11-09-2015

Hi @ericzerbib 

Then you have the PL soundcard which comes into play. You can see with the following code that it only supports a mclk clock ratio of 384

https://github.com/Xilinx/linux-xlnx/blob/master/sound/soc/xilinx/xlnx_pl_snd_card.c#L367

Which corresponds to 48kHz with a clock of 18.43 MHz as in the VCU TRD. You can find a useful table to find the ratio based on the clock on the I2S2 doc:

https://reference.digilentinc.com/reference/pmod/pmodi2s2/reference-manual

So this is expected that for HDMI, only 48 kHz will work.

You need to modify the drivers and clock if you need to support other frequencies


Florent
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**

View solution in original post

Highlighted
Adventurer
Adventurer
283 Views
Registered: ‎09-05-2018
Thanks a lot !!!
0 Kudos