Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 30 Mar 2000 15:42:13 +0400
From:      Grigoriy Strokin <grg@philol.msu.ru>
To:        freebsd-multimedia@freebsd.org
Subject:   Audio record problems in 4.0-STABLE: Creative ViBRA16X
Message-ID:  <20000330154213.A64940@isabase.philol.msu.ru>

next in thread | raw e-mail | index | archive | help
SYNOPSIS: device timeout(?) during the attempt to record anything

Hello,

I am unable to record anything with my sound card after
upgrading to FreeBSD 4-STABLE from 3.4-STABLE. 

I've written to freebsd-stable but there have not been
any follow-up.

The reason for upgrade were problems with recording
sound under 3.4, and I hoped it would work better
under 4.0, and as a result I cannot record audio at all.

The FreeBSD sources I use have been CVSUPed on Mar 24.

FreeBSD isabase.philol.msu.ru 4.0-STABLE FreeBSD 4.0-STABLE #2: Sat Mar 25
21:31:20 MSK 2000
grg@isabase.philol.msu.ru:/usr/src/sys/compile/ISABASE  i386


Hardware
---------

My sound card is ISA, behaves as a PnP card and is detected as
Creative ViBRA16X.

It have also been tested on Windows NT machine, and under 
Windows NT it can record audio perfectly, unlike FreeBSD.

kernel config
-------------

I have the following lines in my config:

  # (also tried with the this option commented out)
  options        PNPBIOS

  # (also tried as "device pcm0 at isa? irq 5 drq 1 flags 0x15", to 
  # try forcing the card be detected as non-PnP, with the only
  # effect of appearing "pcm1" instead of "pcm0" in dmesg)
  device pcm

  # (also tried with this device commented out
  # and also "device sbc0 at isa? port 0x220 irq 5 drq 1 # flags 0x15",
  # effect of appearing "sbc1" instead of "sbc0" in dmesg)
  device sbc

boot loader config
------------------

In FreeBSD 3.4, I had the following command required
to make my SB work in /boot/kernel.conf:
   pnp 1 0 os enable port0 0x220 irq0 5 drq0 1 drq1 3
Now it seems that it is not required and considered as error,
though "man pnp" states the contrary. So I tried to boot
with and without this command.

BIOS setup
-----------

All configurations have been tried with both
"PnP OS installed: Yes" and "PnP OS installed: No",
without any effect the behaviour of the card.

dmesg
-----

The messages in dmesg related to audio and PnP are as follows:
   
1) With "options PNPBIOS":

unknown: <PNP0000> can't assign resources
unknown0: <PNP0200> at port 0-0xf,0x81-0x83,0x87,0x89-0x8b,0x8f-0x91,0xc0-0xdf drq 4 on isa0
unknown1: <PNP0100> at port 0x40-0x43 irq 0 on isa0
unknown2: <PNP0b00> at port 0x70-0x71 irq 8 on isa0
unknown: <PNP0303> can't assign resources
unknown: <PNP0800> can't assign resources
unknown3: <PNP0c04> at port 0xf0-0xff irq 13 on isa0
unknown4: <PNP0c01> at iomem 0-0x9ffff,0xfffe0000-0xffffffff,0x100000-0x3ffffff on isa0
unknown5: <PNP0c02> at iomem 0xf0000-0xf3fff,0xf4000-0xf7fff,0xf8000-0xfbfff,0xfc000-0xfffff on isa0
unknown6: <PNP0a03> at port 0x294-0x297,0x4d0-0x4d1,0xcf8-0xcff,0x480-0x48f,0x4000-0x403f,0x5000-0x501f on isa0
unknown7: <PNP0c02> at port 0x208-0x20f on isa0
unknown: <PNP0501> can't assign resources
unknown: <PNP0700> can't assign resources
unknown: <PNP0401> can't assign resources
unknown: <PNP0501> can't assign resources
sbc0: <Creative ViBRA16X> at port 0x220-0x22f,0x330-0x331,0x388-0x38b irq 5 drq 1,3 on isa0
sbc0: setting card to irq 5, drq 1, 3
pcm0: <SB DSP 4.16 (ViBRA16X)> on sbc0
unknown8: <Game> at port 0x201 on isa0

2) Without "options PNPBIOS":

sbc0: <Creative ViBRA16X> at port 0x220-0x22f,0x330-0x331,0x388-0x38b irq 5
drq 1,3 on isa0
sbc0: setting card to irq 5, drq 1, 3
pcm0: <SB DSP 4.16 (ViBRA16X)> on sbc0
unknown0: <Game> at port 0x201 on isa0


Problems
---------

Playback of .au, .wav, .mp3 works as expected.
However, SOMETIMES, during a playback of 
mp3, the music was changed into a white noise
at some moment (sounds like a random
non-audio binary file was send to the sound card).
To get rid of the noise, I suspended mpg123,
waited for the sound to stop and typed 'fg'
to continue. The music was being heard again.
The same effect was observed under 3.4.

However, when I attempt to record an .au or .wav
with the 'rec' program from sox, e. g.:
  grg@isabase.1:~$ rec a.au
  Send break (control-c) to end recording

I cant interrupt the recording with pressing
control-c one or several times: the "^C" is just printed on the terminal,
and the program won't stop.

If I press "^\" (quit), "^\" is printed, and
there is no any effect for more than 3 seconds, and only after that I see
"Quit - core dumped". The resulting file, a.au has zero length.
There are no any messages on the console except:
  /kernel: pid 7403 (sox), uid 1001: exited on signal 3 (core dumped)
It looks like device timeout for me, but whatever it is,
I can't record anything.

I tried to record 16-bit sound instead of default 8-bit,
with the same effect.

Also, I try to record using the 'lrecord' command
from ESPS/waves+, a commercial software equipment
compiled for Linux (lrecord states for Linux-record). 
lrecord worked for me
on FreeBSD 3.4. Now I get the following:
  grg@isabase.1:~$ lrecord a.sd
  [then I press ^C]

  Problems writing samples at sample number 0
  No samples collected!

History
--------

Both 'rec' and 'lrecord' worked for me for 8-bit and 16-bit
8 KHz sound on FreeBSD 3.4-STABLE.
However, there were a strange message on the console
just after starting rec or lrecord that looked something like:
   drq0 and drq1 swap: now 3 and 1
and just after finishing the recording:
   drq0 and drq1 swap: now 1 and 3
I have no idea if this is a problem at all,
but on other machines with other sound cards
there is no such a message.

But also, there WAS another problem on FreeBSD 3.4-STABLE:
If I recorded 16 KHz sound instead of 8 KHz,
it seemed to work OK, and the sound was actually recorded.
However, if I used tools for drawing dynamic spectrograms
of the sound (such as sound processing tools from ESPS)
they showed no spectral information above 4 KHz.
This is the evidence of that the hardware actually
recorded the audio at the frequency rate of 8KHz,
though software thought it put the hardware in
16KHz mode (when you make a spectrum, for a 8KHz
sound, you only can see spectral information
up to 4Khz, for 16KHz sound you can see it up to 8KHz,
and so on).

If I recorded a 16KHz sound on another machine
copied it to my machine and visualized using the same
tools, I could see spectral information up to 
8KHz, as expected.

So the was apparently pcm driver problem in FreeBSD 3.4-STABLE.
I have installed 4-STABLE that early in hope that
new pcm driver would work better, and as result
I cannot record audio at all.

What can I do?
Please help.

Also, I have tried another sound card, SB PCI64, ES1370.
I'll describe problems with it in another letter, but, in short,
I can't record with it, too.

P.S. I don't know the exact model name of this SB16 Vibra:
it was preinstalled in that newly bought machine and the only
documentation for the SB was a four-page paper with intructions
on how to install Windows drivers for it.

-- 
=== Grigoriy Strokin, Lomonosov University (MGU), Moscow ===
=== contact info: http://isabase.philol.msu.ru/~grg/     ===


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-multimedia" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000330154213.A64940>