Re: [ecasound] segfault with 24bit recording on ice1712

From: Tommi Sakari Uimonen <tuimonen@email-addr-hidden>
Date: Thu Jan 06 2005 - 00:01:05 EET

> Hmm, true, but the segfault might be coming from ALSA. A back-trace
> with gdb would help to trace the cause...

I tried to gdb ecasound, but got only this:

gdb ecasound

(gdb) r -f:s32_le,2,96000 -i:alsa,plughw -f:s24_le,2,96000 -o:temp.wav
Starting program: /usr/local/bin/ecasound -f:s32_le,2,96000 -i:alsa,plughw
-f:s24_le,2,96000 -o:temp.wav
[Thread debugging using libthread_db enabled]
[New Thread -1212301184 (LWP 12262)]
[New Thread -1212302416 (LWP 12263)]
****************************************************************************
* ecasound v2.3.2 (C) 1997-2003 Kai Vehmanen
****************************************************************************
- [ Session created ]
------------------------------------------------------
- [ Chainsetup created (cmdline) ]
-----------------------------------------
- [ Connecting chainsetup ]
------------------------------------------------
(eca-chainsetup) 'rt' buffering mode selected.

Program exited normally.

>
>> The only format in which direct hw
>> access works, is 32,12,96000 but the conversion to 24 sounds crap:
>> ecasound -f:s32_le,12,96000 -i:alsa,hw -f:s24_le,2,96000 -o:temp.wav
>
> Really? What application you used for verifying temp.wav? Does it
> also sound bad when played with ecasound? You could try using libsndfile's
> conversion routines and compare the results:

Actually this example works fine, aplay and ecasound (-i temp.wav -o
alsa) play the file ok, but if I try to play it back in 24bit:

ecasound -i temp.wav -f 24,2,96000 -o alsa,plughw

is is buzzing (not noise or distorted sound, just buzzing)

These commands play back fine:

ecasound -i temp.wav -f 16,2,96000 -o alsa,plughw
ecasound -i temp.wav -f 32,2,96000 -o alsa,plughw

I also found more about the segfault. It comes when I try to set the input
format to 24bit:

ecasound -f 24,2,96000 -i alsa -o temp.wav

and it segfaults right after the '(eca-engine) Prefilling i/o buffers.'
text, so it only writes the wav header (44 bytes) to temp.wav, no
recording done

If I try it through the sndfile:

ecasound -f 24,2,96000 -i alsa -o sndfile,temp.wav

it records, but after I stop (Ctrl-C) it gives the segfault at the end,
right after the '- [ Chainsetup disconnected ] ----- ...' text.

The resulting file is noise with aplay, but if I play it with ecasound:

ecasound -i temp.wav -f 24,2,96000 -o alsa,plughw

then I can recognize the original, but it has buzzing sound mixed to it.

The other formats:

ecasound -i temp.wav -f 16,2,96000 -o alsa,plughw
ecasound -i temp.wav -f 32,2,96000 -o alsa,plughw

give only noise (pink or whatever).

I deleted the temp.wav every time before recording, so existing wav
headers (which have caused some headache to me) are not the case

> ecasound -f:s32_le,12,96000 -i:alsa,hw -f:s24_le,2,96000 -o:sndfile,temp.wav

This plays fine except in this case:

ecasound -i temp.wav -f 24,2,96000 -o alsa,plughw

I also recorded one file with ardour and exported it to 24bit. Again,
ecasound played it fine in 16 and 32 bits, but 24 was buzzing+noise.

Also (this is getting long)

ecasound -f 32,2,96000 -i alsa,plughw -f 24,2,96000 -o alsa,plughw

is noise, and

ecasound -f 24,2,96000 -i alsa,plughw -f 24,2,96000 -o alsa,plughw

is somewhat recognizeable, but crap. No segfaults in this case. It seems
that segfaults happen only when 24bit input is written to file (with or
without sndfile) and with or without conversion (-f xx,2,96000 just before
the -o )

One peculiarity I found: (xx marks 16,24 or 32)

With

ecasound -f 24,2,96000 -i alsa,plughw -f xx,2,96000 -o temp.wav

the engine starts recording and segfault comes at the end, after the
engine has finished.
But with

ecasound -f 24,2,96000 -i alsa -f xx,2,96000 -o temp.wav

it segfaults before any actual recording happens.
If I try the same with sndfile, the behaviour is different:

ecasound -f 24,2,96000 -i alsa -f 16,2,96000 -o sndfile,temp.wav

records and segfault comes only after I stop the recording, but

ecasound -f 24,2,96000 -i alsa,plughw -f 16,2,96000 -o sndfile,temp.wav

segfaults immediately.

My .ecasoundrc has no default for inputs. (I don't even know if it can
have. Default output I do have)

> If that's really the case, then there is a bug ... which should be fixed
> asap.

It seems so.

--
To unsubscribe send message 'unsubscribe' in the body of the
message to <ecasound-list-request@email-addr-hidden>.
Received on Thu Jan 6 00:15:20 2005

This archive was generated by hypermail 2.1.8 : Thu Jan 06 2005 - 00:15:20 EET