From: "Gabriel M. Beddingfield" <gabrbedd@gmail.com>
To: alsa-devel@alsa-project.org
Subject: Re: question application playback
Date: Sun, 29 Jan 2012 09:51:27 -0600 [thread overview]
Message-ID: <4F256AFF.3000208@gmail.com> (raw)
In-Reply-To: <CA+v+29hAqCFvyVxe6+XhQz0O+Kvudypo63JQW9OwuAhVG4JY_Q@mail.gmail.com>
On 01/29/2012 12:31 AM, Wang Xingchao wrote:
> i used tool "aplay" to "play" mp3 files sucessfully. :)
> well, in this scenario, alsa is used as data transfer interface, there
> must be mp3 decode interface in kernel layer to receive mp3 data and
> do the post work. mp3 data is regarded as pcm data during transfer,
> so the format and rate must be specified with aplay.
1. There is no DSP done in the kernel. That includes
MP3 decode. This is a hard and fast rule. Decode
must either be done by the hardware or userspace.
Never in the kernel.
2. Some audio hardware is able to decode the MP3
directly. Since I've never seen/used one, I
don't know how its driver would work or how
to set the hw_params... or if ALSA even supports
passing this format to the audio device.
3. aplay is able to do some format conversion. For
example, `man aplay` shows that it supports MPEG
decode.
Conclusion: If you can set your hw_params to do SND_PCM_FORMAT_MPEG,
then the hardware is doing the MPEG decode. Most cards/drivers will
reject this, though... in which case you have to do the decode yourself
with something like liblame or libmpg123.
-gabriel
next prev parent reply other threads:[~2012-01-29 15:51 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-03 12:23 question application playback Ricardo Barbosa
2012-01-03 12:28 ` Daniel Mack
2012-01-03 12:49 ` Vinod Koul
2012-01-03 12:30 ` Irfan shaikh
2012-01-04 5:52 ` Rajeev kumar
2012-01-04 13:33 ` Vinod Koul
2012-01-29 6:31 ` Wang Xingchao
2012-01-29 15:51 ` Gabriel M. Beddingfield [this message]
2012-01-30 2:25 ` Wang Xingchao
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=4F256AFF.3000208@gmail.com \
--to=gabrbedd@gmail.com \
--cc=alsa-devel@alsa-project.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.