Hello Davinci Champs!
This is in reference to capturing of 24 bit I2S data on McASP, we have the following setup
- TI’s PCM1808 24bit I2S decoder is interfaced to McASP0 port
- PCM1808 receives MCLK and provides 24bit resolution I2S data @ 44.1KHz sample rate to McASP.
We intend to achieve the following
- Receive the data from PCM1808 over McASP à Encode it using AAC –LC encoder.
We would like to have resolution over the following observations
- The davinci McASP driver under /sound/soc/davinci/ only handles 8, 16 or 32 bit data with davinci_i2s_mcasp_hw_params() function. So to handle 24bit data what are the appropriate modifications required on the McASP driver.
- When we receive the PCM data in default Mcasp configuration we observe that the PCM audio contains high noise content (PCM waveforms seems saturated) and
i. plays with noise at slow speed when played at 44.1kHz rate at 16 bit resolution on CoolEdit utility
ii. plays faster with noise when played at 44.1KHz rate at 32 bit resolution. with 24 bit packets
- We added corresponding definition for 24 bit data in linux/soundcard.h (#define AFMT_24BIT_LE 0x00000800) and gave it as an attributes for sound_oss_create() . When we captured the corresponding PCM data buffer it played at appropriate speed at 44.1 KHz rate at 16 bit resolution. This PCM audio also contains high noise content with saturation.
- We added case for SNDRV_PCM_FORMAT_S24_LE in davinci_i2s_mcasp_hw_params() function under sound/soc/davinci/davinci-i2s-mcasp.c with the following
case SNDRV_PCM_FORMAT_S24_3LE:
dma_params->data_type = 3;
word_length = DAVINCI_AUDIO_WORD_24;
break;
Here we observe breaks in the played back audio when the captured PCM buffer is played at 44.1 KHz rate at 32 bit resolution with 24bit packet size.
Please let us know how we can handle 24 bit audio over McASP with necessary modification required at the driver end and to encode the same with AAC-LC encoder.
Thanks and Regards,
Feroz