Re: [ecasound] 24-bit recording (with M-Audio Delta 1010LT)

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

Subject: Re: [ecasound] 24-bit recording (with M-Audio Delta 1010LT)
From: Kai Vehmanen (k_AT_eca.cx)
Date: Sat May 11 2002 - 11:23:46 EEST


On Fri, 10 May 2002, Craig Meyer wrote:

> Boiled down, my question has to do with configuring
> ecasound to recognize and use my sound card's (in OSS)
> 24-bit capabilities.

It shouldn't be too hard as ecasound already supports 24bit/32bit
operation with ALSA drivers (which btw supports the 1010).

> My new sound card, an M Audio Delta 1010LT, was made
> to do 24-bit sampling and playback at up to 96000
> samples per second. Okay.

Add this to ecasound-x.y.z/libecasound/audioio-oss.cpp:

--cut--
    case ECA_AUDIO_FORMAT::sfmt_s16_le: { format = AFMT_S16_LE; break; }
    case ECA_AUDIO_FORMAT::sfmt_s16_be: { format = AFMT_S16_BE; break; }
+ case ECA_AUDIO_FORMAT::sfmt_s24_le: { format = AFMT_S32_LE; break; }
+ case ECA_AUDIO_FORMAT::sfmt_s24_be: { format = AFMT_S32_BE; break; }
    case ECA_AUDIO_FORMAT::sfmt_s32_le: { format = AFMT_S32_LE; break; }
    case ECA_AUDIO_FORMAT::sfmt_s32_be: { format = AFMT_S32_BE; break; }
--cut--

To add this to ecasound's source tree, I need to know how OSS/commercial
defines the constants AFMT_S24_LE and AFMT_S24_BE. So could you send me
the output of "grep AFMT_S24 /usr/include/sys/soundcard.h"? I only have an
older version of OSS/comm installed an it only has the S32 defines.
OSS/kernel doesn't support bitwidths over 16bit.

> It's looking like the 24-bit part isn't happening,
> however. I can't play back at 24 bits per sample,
[...]
> ERROR: [ECA-CHAINSETUP] : "Enabling chainsetup:
> AUDIOIO-OSS: audio format not supported (1)"

Yup, this is because S24 is not a known sample type. You can fix this with
the above change.

> ... and when I sample at 24 bits (or rather, in this
> case 32) per sample,
[...]
> ecasound -i /dev/dsp6 -f s32_le,1,44100,n
> -o manybits.raw
[...]
> 00000000: 0000 8907 0000 5e08 0000 3a09 0000 db09
> 00000010: 0000 2d0b 0000 740c 0000 c30c 0000 ac0c

You are actually opening the /dev/dsp6 device in 16bit mode. You
need to put the -f option before adding the dsp input. So its:

ecasound -f:s32_le,1,44100,n -i /dev/dsp6 -o manybits.raw

I'm not sure whether the OSS drivers accept opening in s32 mode. But if
it does, it should work fine. And in fact, it's possible that it really
needs to be opened in s32 mode. Very few soundcards really support s24
bits. Most 24bit cards do the audio i/o in 32bit blocks even though
there's only 24bit of actual data. It this turns out to be the case, you
can change the above patch to be:

--cut--
    case ECA_AUDIO_FORMAT::sfmt_s16_le: { format = AFMT_S16_LE; break; }
    case ECA_AUDIO_FORMAT::sfmt_s16_be: { format = AFMT_S16_BE; break; }
+ case ECA_AUDIO_FORMAT::sfmt_s32_le: { format = AFMT_S24_LE; break; }
+ case ECA_AUDIO_FORMAT::sfmt_s32_be: { format = AFMT_S24_BE; break; }
    case ECA_AUDIO_FORMAT::sfmt_s32_le: { format = AFMT_S32_LE; break; }
    case ECA_AUDIO_FORMAT::sfmt_s32_be: { format = AFMT_S32_BE; break; }
--cut--

-- 
 http://www.eca.cx
 Audio software for Linux!

-- To unsubscribe send message 'unsubscribe' in the body of the message to <ecasound-list-request_AT_wakkanet.fi>.


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

This archive was generated by hypermail 2b28 : Sat May 11 2002 - 11:09:14 EEST