Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Clemens Ladisch <clemens@ladisch.de>
To: Zhang wei <zhangwei@vimicro.com>
Cc: alsa-devel@alsa-project.org
Subject: Re: what is the difference between SNDRV_PCM_FMTBIT_S24_LE and SNDRV_PCM_FMTBIT_S24_3LE
Date: Thu, 11 Apr 2013 11:35:57 +0200	[thread overview]
Message-ID: <516683FD.4000804@ladisch.de> (raw)
In-Reply-To: <6B947C8AC4195040A8C6876A496C644A082F1EEE@BJ-MAIL-04.vimicro.com>

(please do not drop the mailing list from replies.)

Zhang wei wrote:
> I do not really understand. For example,an codec is wm8985 ...

The SNDRV_PCM_* symbols specify the format in which samples are
stored in memory.

I do not know how ASoC maps these symbols to on-the-wire formats.

>>Most devices that support 24 bits use SNDRV_PCM_FORMAT_S32_LE, which
>>stores the sample's bits in the upper bits of a 32-bit word.
>
> But how to distinguish the SNDRV_PCM_FORMAT_S24_LE and the REAL
> SNDRV_PCM_FORMAT_S32_LE?

If a 24-bit sample with the value 0x123456 is stored in memory, it looks
like this:
SNDRV_PCM_FORMAT_S24_LE: 56 34 12 00
SNDRV_PCM_FORMAT_S32_LE: 00 56 34 12


Regards,
Clemens

  parent reply	other threads:[~2013-04-11  9:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-11  8:55 what is the difference between SNDRV_PCM_FMTBIT_S24_LE and SNDRV_PCM_FMTBIT_S24_3LE Zhang wei
2013-04-11  9:00 ` Clemens Ladisch
     [not found]   ` <6B947C8AC4195040A8C6876A496C644A082F1EEE@BJ-MAIL-04.vimicro.com>
2013-04-11  9:35     ` Clemens Ladisch [this message]
2013-04-11 15:27       ` Gabriel M. Beddingfield
2013-04-30 13:24         ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=516683FD.4000804@ladisch.de \
    --to=clemens@ladisch.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=zhangwei@vimicro.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox