On 29/08/18 09:31, Matt Flax wrote:
On 29/08/18 04:56, Mark Brown wrote:
On Mon, Aug 27, 2018 at 09:28:43AM +0100, Charles Keepax wrote:
Are you sure this is correct? The datasheet for the part only says it supports up to 24-bit audio and I thought the defines SNDRV_PCM_FMTBIT_S24_LE and U24 are expected to have 32-bits in the slot whilst on the bus.
No, they're not. They're expected to be 32 bit in memory and 24 bit on the bus.
If this is the case, then I would assume that 32bit formats are forced through ALSA plughw.
If operation is forced through plughw, then this patch is necessary to allow native 32 operation on the bus. The codec drops the 8 LSBs during operation as it reads/writes the 24 MSBs.
Just to confirm this patch is necessary to support 32 bit audio formats naively with the cs4265 codec. I did the following tests.
Without the codec patch, limiting to 24 and 16 bit formats : $ aplay -v tone.48k.1s.2ch.32bit.wav aplay: set_params:1233: Sample format non available Available formats: - S16_LE - S24_LE
With the codec patch, 32 bits are allowed on the I2S bus it plays as expected : $ aplay -v tone.48k.1s.2ch.32bit.wav Playing WAVE 'tone.48k.1s.2ch.32bit.wav' : Signed 32 bit Little Endian, Rate 48000 Hz, Stereo