Interesting. I've converted that file to 44100 Hz and now it reveals a
strange behavior. When I play it with buffer size of 64 it sounds like
the pitch is lower than it should be (even if it doesn't overrun though
it does from time to time). When the size is 128 it sounds fine.

# aplay -D plughw:CARD=CA0106 -v --buffer-size=64 /tmp/kde44100.wav
Playing WAVE '/tmp/kde44100.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, 
Stereo
Plug PCM: Rate conversion PCM (48000, sformat=S16_LE)
Converter: libspeex (builtin)
Protocol version: 10002
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  : 58
  period_size  : 14
  period_time  : 333
  tstamp_mode  : NONE
  period_step  : 1
  avail_min    : 14
  period_event : 0
  start_threshold  : 58
  stop_threshold   : 58
  silence_threshold: 0
  silence_size : 0
  boundary     : 4179340454199820288
Slave: Hardware PCM card 0 'CA0106' device 0 subdevice 0
Its setup is:
  stream       : PLAYBACK
  access       : MMAP_INTERLEAVED
  format       : S16_LE
  subformat    : STD
  channels     : 2
  rate         : 48000
  exact rate   : 48000 (48000/1)
  msbits       : 16
  buffer_size  : 64
  period_size  : 16
  period_time  : 333
  tstamp_mode  : NONE
  period_step  : 1
  avail_min    : 16
  period_event : 0
  start_threshold  : 64
  stop_threshold   : 64
  silence_threshold: 0
  silence_size : 0
  boundary     : 4611686018427387904
  appl_ptr     : 0
  hw_ptr       : 0
underrun!!! (at least 0.116 ms long)
Status:
  state       : XRUN
  trigger_time: 301642.243139271
  tstamp      : 301642.243254519
  delay       : 2
  avail       : 56
  avail_max   : 56

# aplay -D plughw:CARD=CA0106 -v --buffer-size=128 /tmp/kde44100.wav            
 
Playing WAVE '/tmp/kde44100.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, 
Stereo
Plug PCM: Rate conversion PCM (48000, sformat=S16_LE)
Converter: libspeex (builtin)
Protocol version: 10002
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  : 117
  period_size  : 29
  period_time  : 666
  tstamp_mode  : NONE
  period_step  : 1
  avail_min    : 29
  period_event : 0
  start_threshold  : 117
  stop_threshold   : 117
  silence_threshold: 0
  silence_size : 0
  boundary     : 4215369251218784256
Slave: Hardware PCM card 0 'CA0106' device 0 subdevice 0
Its setup is:
  stream       : PLAYBACK
  access       : MMAP_INTERLEAVED
  format       : S16_LE
  subformat    : STD
  channels     : 2
  rate         : 48000
  exact rate   : 48000 (48000/1)
  msbits       : 16
  buffer_size  : 128
  period_size  : 32
  period_time  : 666
  tstamp_mode  : NONE
  period_step  : 1
  avail_min    : 32
  period_event : 0
  start_threshold  : 128
  stop_threshold   : 128
  silence_threshold: 0
  silence_size : 0
  boundary     : 4611686018427387904
  appl_ptr     : 0
  hw_ptr       : 0

This pitch (or maybe speed?) weirdness occurs only on playing stereo
files with rate of 44100. I've tried playing music and it indeed sounds
a bit transposed. Bufsize of 128 frames also seems to produce underruns
after some time, my testing clip was too small to reveal it. So it
required bufsize 512 to be played completely without underruns:

# aplay -D plughw:CARD=CA0106 -v --buffer-size=512 /tmp/ksp44100.wav
Playing WAVE '/tmp/ksp44100.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, 
Stereo
Plug PCM: Rate conversion PCM (48000, sformat=S16_LE)
Converter: libspeex (builtin)
Protocol version: 10002
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  : 529
  period_size  : 132
  period_time  : 3000
  tstamp_mode  : NONE
  period_step  : 1
  avail_min    : 132
  period_event : 0
  start_threshold  : 529
  stop_threshold   : 529
  silence_threshold: 0
  silence_size : 0
  boundary     : 4764808405757984768
Slave: Hardware PCM card 0 'CA0106' device 0 subdevice 0
Its setup is:
  stream       : PLAYBACK
  access       : MMAP_INTERLEAVED
  format       : S16_LE
  subformat    : STD
  channels     : 2
  rate         : 48000
  exact rate   : 48000 (48000/1)
  msbits       : 16
  buffer_size  : 576
  period_size  : 144
  period_time  : 3000
  tstamp_mode  : NONE
  period_step  : 1
  avail_min    : 144
  period_event : 0
  start_threshold  : 576
  stop_threshold   : 576
  silence_threshold: 0
  silence_size : 0
  boundary     : 5188146770730811392
  appl_ptr     : 0
  hw_ptr       : 0

The same song converted to 48000 Hz plays without underruns with buffer
size of 256 frames:

Playing WAVE '/tmp/ksp48000.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, 
Stereo
Plug PCM: Hardware PCM card 0 'CA0106' device 0 subdevice 0
Its setup is:
  stream       : PLAYBACK
  access       : RW_INTERLEAVED
  format       : S16_LE
  subformat    : STD
  channels     : 2
  rate         : 48000
  exact rate   : 48000 (48000/1)
  msbits       : 16
  buffer_size  : 256
  period_size  : 64
  period_time  : 1333
  tstamp_mode  : NONE
  period_step  : 1
  avail_min    : 64
  period_event : 0
  start_threshold  : 256
  stop_threshold   : 256
  silence_threshold: 0
  silence_size : 0
  boundary     : 4611686018427387904
  appl_ptr     : 0
  hw_ptr       : 0

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1315212

Title:
  [CA0106 - CA0106, playback] Playback problem - Surround dies, no valid
  output

To manage notifications about this bug go to:
https://bugs.launchpad.net/alsa-driver/+bug/1315212/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to