From: Stefan Schoenleitner <dev.c0debabe@gmail.com>
To: Shilpa Kedar Walvekar <shilpa.walvekar@coreobjects.com>
Cc: "alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>
Subject: Re: Using 8bit mono at 8000Hz with arecord and aplay
Date: Tue, 18 Aug 2009 12:00:08 +0200 [thread overview]
Message-ID: <4A8A7BA8.9050906@gmail.com> (raw)
In-Reply-To: <33A0EEB8D50198449794A1AB9DEB1E0186642A95DC@copuex01.coreobjects.com>
Shilpa Kedar Walvekar wrote:
> Hello,
>
> We tried to record and play the recorded file using arecord and aplay as follows:
> arecord -f cd /home/test.wav
> aplay -f cd /home/test.wav
>
> The file gets recorded and played correctly.
>
> But if I try to record file of format S8 or U8, I get error:
>
> # arecord -f U8 /home/test_alsa_record_2
> Recording WAVE '/home/test_alsa_record_2' : Unsigned 8 bit, Rate 8000 Hz, Mono
> arecord: set_params:979: Sample format non available
>
> # arecord -f S8 /home/alsa_record_2
> Recording WAVE '/home/alsa_record_2' : Signed 8 bit, Rate 8000 Hz, Mono
> arecord: set_params:979: Sample format non available
>
> Is there any other way to set the format as S8 or U8? Or only cd/cdr/dat formats can be played using alsa?
Basically it should be possible to play these formats.
If you look at the aplay help output, it also lists the recognized
sample formats (which include U8 and S8).
However, it also says "Some of these may not be available on selected
hardware".
For this reason I assume that your hardware (or at least the driver)
does not support these formats.
A workaround is to use one of the ALSA format conversion plugins.
(see here: http://www.alsa-project.org/alsa-doc/alsa-lib/pcm_plugins.html)
Specifically have a look at the rate or plug plugin.
The idea is that you can play arbitrary formats and the plugin
automatically converts the PCM streams to a fixed format that your
hardware can deal with (e.g. 16 bit at 48 kHz).
cheers,
stefan
next prev parent reply other threads:[~2009-08-18 10:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-18 8:42 Using 8bit mono at 8000Hz with arecord and aplay Shilpa Kedar Walvekar
2009-08-18 10:00 ` Stefan Schoenleitner [this message]
2009-08-19 8:58 ` Using 8bit mono at 8000Hz with arecord and aplay - Full duplex operation Shilpa Kedar Walvekar
2009-08-19 10:15 ` Takashi Iwai
2009-08-20 6:47 ` Shilpa Kedar Walvekar
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=4A8A7BA8.9050906@gmail.com \
--to=dev.c0debabe@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=shilpa.walvekar@coreobjects.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