All of lore.kernel.org
 help / color / mirror / Atom feed
* Sample format coversion bug?
@ 2007-10-26 13:18 Alexander E. Patrakov
  2007-10-29  8:08 ` Takashi Iwai
  0 siblings, 1 reply; 9+ messages in thread
From: Alexander E. Patrakov @ 2007-10-26 13:18 UTC (permalink / raw)
  To: alsa-devel

Hello,

I am writing an application that uses ALSA, and I don't want to write 
code to support all possible sample formats. On IRC, I asked whether it 
is OK to support only S24 format internally and rely on the "plug" to do 
the required conversion. I got a positive answer, but, when testing my 
application against my SAA7134-based tuner as a capture device, found 
that it doesn't work.

The problem is also reproducible with "arecord". Given that plughw:1 
refers to a SAA7134-based tuner (which obviously doesn't support S24_LE 
natively), running the following command

arecord -vvv -f S24_LE -c 2 -r 32000 -D plughw:1 /dev/null

produces the following output:

ALSA lib pcm_mmap.c:369:(snd_pcm_mmap) mmap failed: Invalid argument
arecord: set_params:961: Unable to install hw params:
ACCESS:  RW_INTERLEAVED
FORMAT:  S24_LE
SUBFORMAT:  STD
SAMPLE_BITS: 32
FRAME_BITS: 64
CHANNELS: 2
RATE: 32000
PERIOD_TIME: 125000
PERIOD_SIZE: 4000
PERIOD_BYTES: 32000
PERIODS: 4
BUFFER_TIME: 500000
BUFFER_SIZE: 16000
BUFFER_BYTES: 128000
TICK_TIME: 4000

This is on Debian, the kernel is 2.6.22-2-amd64, libasound2 is 
1.0.14a-2. Same for S32_LE.

-- 
Alexander E. Patrakov

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2007-10-31 10:51 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-26 13:18 Sample format coversion bug? Alexander E. Patrakov
2007-10-29  8:08 ` Takashi Iwai
2007-10-29 11:01   ` Alexander E. Patrakov
2007-10-29  9:05     ` Takashi Iwai
2007-10-29 11:21       ` Alexander E. Patrakov
2007-10-29 15:04       ` Alexander E. Patrakov
2007-10-29 18:47         ` Trent Piepho
2007-10-30 16:24           ` mmap support in saa7134-alsa (was: Sample format coversion bug?) Alexander E. Patrakov
2007-10-31  8:34             ` Takashi Iwai

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.