[ecasound] Weirdness with es1370 cards

New Message Reply Date view Thread view Subject view Author view Other groups

Subject: [ecasound] Weirdness with es1370 cards
From: Billy Biggs (vektor@div8.net)
Date: Thu Sep 16 1999 - 19:50:40 EEST


Hi,

In trying to use ecasound for multitrack recording, we came across an
interesting (annoying) problem with es1370 cards. If you open the device
for reading and again open it for writing, using seperate file
descriptors, you get an error when trying to set the sample rate.

According to Thomas Sailer, who wrote the driver, it's because the sound
card doesn't support independant rates for reading and for writing, so if
two seperate file descriptors try to set them, it assumes that this is bad
and fails.

What you can do though is check that the rate returned is the one you
requestd. I did a quick patch to ecasound to do this and it works. The
patch is basically just commenting shit out so the code in audioio-oss.cpp
looks like this:

audioio-oss.cpp:144:
  int speed = format().srate;
  ioctl(audio_fd, SNDCTL_DSP_SPEED, &speed);
    //throw(new ECA_ERROR("ECA-OSS", "audio format not supported SRATE"));

  if (speed != (int)format().srate)
    throw(new ECA_ERROR("ECA-OSS", "audio format not supported SRATE"));

So, you call the ioctl and don't care if it fails, and then check if the
returned speed is ok (you can throw the exception there just fine).

Thoughts?

Thanks,
Billy Biggs
vektor@div8.net


New Message Reply Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2a24 : Sat Sep 25 1999 - 19:41:13 EEST