Skip to contentSkip to conversation

Query about SNDRV_PCM_FORMAT_S24_LE

DISCUSSION Patrick Lai 2 participants 2 messages Feb 28, 2013

lore
Share & tools
lore
#0 lore raw

Hi,

The DSP I am working with currently supports 24-bit PCM sample in 32-bit data space but with LSB padded. Based on the discussion I found on line, SNDRV_PCM_FORMAT_S24_LE is defined to be 24-bit PCM sample in 32-bit data space with MSB padded. Also, there is no format macro defined for the format which my DSP supports. Please correct me if I am wrong. Furthermore, which software layer in audio stack of a typical linux distribution such as ubuntu handles the padding. I don't think it's handled by the alsa library. Does application or pulseaudio handle the padding? I would think it's done in pulseaudio. I have not study pulseaudio codec extensively but would think someone on the mailing list can give a quick answer.

Thanks
Patrick

Signature · 2 lines
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
#1 lore raw

At Thu, 28 Feb 2013 00:08:46 -0800,

Quoted 14 lines · Patrick Lai

Hi,

The DSP I am working with currently supports 24-bit PCM sample in 32-bit data space but with LSB padded. Based on the discussion I found on line, SNDRV_PCM_FORMAT_S24_LE is defined to be 24-bit PCM sample in 32-bit data space with MSB padded. Also, there is no format macro defined for the format which my DSP supports. Please correct me if I am wrong. Furthermore, which software layer in audio stack of a typical linux distribution such as ubuntu handles the padding. I don't think it's handled by the alsa library. Does application or pulseaudio handle the padding? I would think it's done in pulseaudio. I have not study pulseaudio codec extensively but would think someone on the mailing list can give a quick answer.

In that case, the format itself is identical with S32_LE. You can inform the msbits width via snd_pcm_hw_constraint_msbits() if needed.

Takashi