Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Clemens Ladisch <clemens@ladisch.de>
To: Harman Kalra <harman4linux@gmail.com>
Cc: alsa-devel@alsa-project.org
Subject: Re: Selecting Audio formats
Date: Thu, 19 Jul 2012 17:00:03 +0200	[thread overview]
Message-ID: <500820F3.4050302@ladisch.de> (raw)
In-Reply-To: <CAA4JwzUwL=nkwcpJa62i9nLW8MOZ3mcj696-53V3R-wbdkbnnA@mail.gmail.com>

Harman Kalra wrote:
> Since so many PCM formats such as S8, U8, S16_LE, U16_LE, A-law, u-law-,
> IMA_ADPCM, MPEG, GSM, etc are there so which format should I opt for.

In most cases, you should use some format supported by your hardware.
Typically, this is S16.

>    1.  What is difference between signed and unsigned PCM format, how does
>    it can affect the sound quality.

It does not affect the sound quality.

>    2. If I go for MPEG format, does it mean that audio compression would
>    handled at my audio port level and my DSP processor would not come into
>    picture.

If you tried to set MPEG format, ALSA would inform you that the device
does not support this.

>    4. If I opt for A-law or u-law, what could be benefits/disadvantages of
>    using these formats.

These formats use one byte per sample, like U8, but have more dynamic
range than U8.  They are still worse than S16.


Regards,
Clemens

  reply	other threads:[~2012-07-19 15:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-19 14:21 Selecting Audio formats Harman Kalra
2012-07-19 15:00 ` Clemens Ladisch [this message]
     [not found]   ` <CAA4JwzW3zNOCWeFoaCSxnx8WzsQTbu1+rOuq2jFxdt043MWSaQ@mail.gmail.com>
2012-07-19 18:35     ` Clemens Ladisch

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=500820F3.4050302@ladisch.de \
    --to=clemens@ladisch.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=harman4linux@gmail.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