Hi,
1 . I use audio ADC CS5346to capture the audio input, it just supports 24-bit data, but it seems that the driver about McASP on 6467 side doesn't support it. So I change it,see below.but noise still exists.Does anyone have any idea? or something else need to be changed?
(now I use the command "arecord --file-type=wav --format=S32_LE --rate=48000 > test.wav" to capture the audio, if I use 24-bit format, there are a lot of noise)
--- /workdir/DVSDK_3_10_00/git/sound/soc/davinci/davinci-mcasp.c 2010-01-11 17:52:58.000000000 -0800
+++ kernel_aic32/sound/soc/davinci/davinci-mcasp.c 2010-03-21 23:24:00.000000000 -0700
@@ -635,7 +635,7 @@
for (i = 0; i < active_slots; i++)
mask |= (1 << i);
- mcasp_clr_bits(dev->base + DAVINCI_MCASP_ACLKXCTL_REG, TX_ASYNC);
+ mcasp_set_bits(dev->base + DAVINCI_MCASP_ACLKXCTL_REG, TX_ASYNC);//DigiLink
if (stream == SNDRV_PCM_STREAM_PLAYBACK) {
/* bit stream is MSB first with no delay */
@@ -740,6 +740,11 @@
dma_params->data_type = 2;
word_length = DAVINCI_AUDIO_WORD_16;
break;
+
+ case SNDRV_PCM_FORMAT_S24_LE:
+ dma_params->data_type = 3;
+ word_length = DAVINCI_AUDIO_WORD_24;
+ break;
case SNDRV_PCM_FORMAT_S32_LE:
dma_params->data_type = 4;
@@ -804,7 +809,7 @@
.channels_min = 2,
.channels_max = 2,
.rates = DAVINCI_MCASP_RATES,
- .formats = SNDRV_PCM_FMTBIT_S8 |
+ .formats = SNDRV_PCM_FMTBIT_S24_LE |
SNDRV_PCM_FMTBIT_S16_LE |
SNDRV_PCM_FMTBIT_S32_LE,
},
@@ -812,7 +817,7 @@
.channels_min = 2,
.channels_max = 2,
.rates = DAVINCI_MCASP_RATES,
- .formats = SNDRV_PCM_FMTBIT_S8 |
+ .formats = SNDRV_PCM_FMTBIT_S24_LE |
SNDRV_PCM_FMTBIT_S16_LE |
SNDRV_PCM_FMTBIT_S32_LE,
},
2 . about timing issue . our ADC IC MCLK is from cdce925 IC, we set it to 24.51MHz , but the exact frequency that needed is 24.5760MHz, we can not set cdce925 to produce
this frequency successfully, so it will cause many noises, right?
we made cs5346 as master,when work on 48KHz sample, MCLK is 24.4667MHz, LRCLK is 47.7865KHz,BCLK is 3.0583MHz.