Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Alexander E. Patrakov" <patrakov@gmail.com>
To: ALSA Development Mailing List <alsa-devel@alsa-project.org>
Subject: Rate or plug plugin issue with snd-pcsp
Date: Tue, 03 Jun 2014 13:54:51 +0600	[thread overview]
Message-ID: <538D7F4B.8090009@gmail.com> (raw)

Hello.

While testing application support for weird-rate cards (such as 
snd-pcsp), I found a bug in alsa-lib. Alsa-plugins are installed, so the 
"libspeex (builtin)" rate converter is used. This bug already exists in 
alsa-plugins 1.0.27.2, so not a regression and thus should not block 1.0.28.

$ file test.wav
test.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, 
stereo 32000 Hz

$ aplay -vvv -D plughw:pcsp test.wav
Playing WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 32000 Hz, Stereo
aplay: set_params:1297: Unable to install hw params:
ACCESS:  RW_INTERLEAVED
FORMAT:  S16_LE
SUBFORMAT:  STD
SAMPLE_BITS: 16
FRAME_BITS: 32
CHANNELS: 2
RATE: NONE
PERIOD_TIME: (125006 125007)
PERIOD_SIZE: NONE
PERIOD_BYTES: (16000 16004)
PERIODS: (3 4)
BUFFER_TIME: 500000
BUFFER_SIZE: 16000
BUFFER_BYTES: 64000
TICK_TIME: 0

The pcsp device supports the sample rate of 37286 Hz.

Files with 44100 Hz sample rate work fine.

$ aplay -vv -D plughw:pcsp -f cd /dev/zero
Playing raw data '/dev/zero' : Signed 16 bit Little Endian, Rate 44100 
Hz, Stereo
Plug PCM: Route conversion PCM (sformat=S16_LE)
   Transformation table:
     0 <- 0*0,5 + 1*0,5
Its setup is:
   stream       : PLAYBACK
   access       : RW_INTERLEAVED
   format       : S16_LE
   subformat    : STD
   channels     : 2
   rate         : 44100
   exact rate   : 44100 (44100/1)
   msbits       : 16
   buffer_size  : 22050
   period_size  : 5512
   period_time  : 125006
   tstamp_mode  : NONE
   period_step  : 1
   avail_min    : 5512
   period_event : 0
   start_threshold  : 22050
   stop_threshold   : 22050
   silence_threshold: 0
   silence_size : 0
   boundary     : 6206523236469964800
Slave: Rate conversion PCM (37286, sformat=S16_LE)
Converter: libspeex (builtin)
Protocol version: 10002
Its setup is:
   stream       : PLAYBACK
   access       : MMAP_INTERLEAVED
   format       : S16_LE
   subformat    : STD
   channels     : 1
   rate         : 44100
   exact rate   : 44100 (44100/1)
   msbits       : 16
   buffer_size  : 22050
   period_size  : 5512
   period_time  : 125006
   tstamp_mode  : NONE
   period_step  : 1
   avail_min    : 5512
   period_event : 0
   start_threshold  : 22050
   stop_threshold   : 22050
   silence_threshold: 0
   silence_size : 0
   boundary     : 6206523236469964800
Slave: Hardware PCM card 2 'pcsp' device 0 subdevice 0
Its setup is:
   stream       : PLAYBACK
   access       : MMAP_INTERLEAVED
   format       : S16_LE
   subformat    : STD
   channels     : 1
   rate         : 37286
   exact rate   : 37286 (37286/1)
   msbits       : 16
   buffer_size  : 18644
   period_size  : 4661
   period_time  : 125006
   tstamp_mode  : NONE
   period_step  : 1
   avail_min    : 4661
   period_event : 0
   start_threshold  : 18644
   stop_threshold   : 18644
   silence_threshold: 0
   silence_size : 0
   boundary     : 5247819465793470464
   appl_ptr     : 0
   hw_ptr       : 0
#+                                                 | 00%^C

-- 
Alexander E. Patrakov

             reply	other threads:[~2014-06-03  7:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-03  7:54 Alexander E. Patrakov [this message]
2014-06-05  4:53 ` Rate or plug plugin issue with snd-pcsp Raymond Yau

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=538D7F4B.8090009@gmail.com \
    --to=patrakov@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox