[LAD] Jack not starting MOD-Duos Audio Interface Driver
rafael at portalmod.com.br
Thu Oct 23 16:00:20 UTC 2014
The plataform driver and the I2S hardware on the ARM SoC supports sample
resolutions of 16, 20 and 24 bits, and word sizes of 16, 20, 24 and 32
bits. Signed, little or big endian.
The i2s-DMA plataform driver and hardware, only 8, 16 and 32 bits transfers
The problem is the CODEC (CS4245 Cirrus Logic), that, for I2S format,
supports only 24 bit resolution in 32 bit words, signed, litle endian (
In the i2s plataform driver, in *_hw_params, when params_format(params) ==
SNDRV_PCM_FMTBIT_S24_3LE, it configured the I2S word size to 24 bits, and
that didn't work on the CODEC.
I did some printk on the 3 drivers *_hw_param and jack is passing S24_3LE,
so I had to change on the i2s driver to configure 32bit word size for
S24_3LE to make it work. But I am patching this plataform drivers anyway,
it was lacking the capture dma *_pcm_prepare.
What is this widely used format for 24bits on ALSA?
Jack only starts when I put SNDRV_PCM_FMTBIT_S24_LE on the plataform
drivers and in the codec driver.
The sound only works when i change the i2s plataform driver to set 32bit
word size for SNDRV_PCM_FMTBIT_S24_3LE.
This is a pastebin of jack output with and without SNDRV_PCM_FMTBIT_S24_LE
on the codec driver.
What is the format i should put on the drivers so Jack works with 24bit
sample resolution and 32 bit word size?
The drivers (work in progress full of comments and printks) are available
(sunxi-i2s.c and sunxi-i2sdma.c)
Thanks in advance.
2014-10-23 10:37 GMT-02:00 Clemens Ladisch <clemens at ladisch.de>:
> Rafael Guayer wrote:
> > I solved this by adding the format S24_3LE to:
> > aSoC Codec Driver snd_soc_dai_driver->formats
> > aSoC Plataform Driver (DMA) snd_pcm_hardware->formats
> > aSoC Plataform Driver (I2S) snd_soc_dai_driver->capture->formats and
> > The codec CS4245 only works with 32 bit word size
> This does not matter.
> Please specify the exact format that is supported by the platform driver.
> (ALSA has three different 24-bit formats, and the most widely used one
> does not have "24" in its name. So please specify how many sample bits
> are stored into how many memory bits, and how those are aligned.)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Linux-audio-dev