[linux-audio-dev] Alsa OSS emulation

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: [linux-audio-dev] Alsa OSS emulation
From: Jens M Andreasen (jens.andreasen_AT_chello.se)
Date: Mon Nov 22 2004 - 22:15:32 EET


Hi (Takashi?)!

The OSS emulation in ALSA is slightly wrong regarding number of
requested buffers. To quote from my own "notes to self" from own source:

 /** Setting up the soundcard for CD-HiFidelity Stereo
   *
   */
  audio.path = "/dev/dsp";
  audio.speed = SAMPLERATE;
  audio.format = AFMT_S16_LE;
  audio.is_stereo = TRUE;

  // 3 buffers of 256 bytes == 3 * 64 (16bit) stereo samples
  // 0x0002 buffers == n - 1, although Alsa (mis)interpretes oss buffers
  // == n!!! Use 0x0003!
  //
  // 0008 bytes == log2(number of bytes in buffer), 2^8 == 256 == 64
  // stereo samples;
  

  audio.bufsize = 0x00030008;
  
  
... so ALSA UNDERSHOOTS the number of buffers BY ONE (which of course
will not work for RT-people on the edge.)

mvh // Jens M andreasen

PS: Thanks to the mdk10.1 beeing distributed on DVD by LinuxFormat this
month, work is ongoing for a clean alsa solution of my handyworks ...

DS


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Mon Nov 22 2004 - 22:19:03 EET