Hello everyone,
Just got my embedded platform to run and now trying to run a Juce app on it.
The chip is a A8 ARM processor running a custom Kernel.
The soundCard is configured as follow:
ALSA device: hw:imxcs4271,0 outs=2-2 ins=2-2 rates=1
ACCESS: RW_INTERLEAVED
FORMAT: S24_LE
SUBFORMAT: STD
SAMPLE_BITS: 32
FRAME_BITS: 64
CHANNELS: 2
RATE: 48000
PERIOD_TIME: (10666 10667)
PERIOD_SIZE: 512
PERIOD_BYTES: 4096
PERIODS: 4
BUFFER_TIME: (42666 42667)
BUFFER_SIZE: 2048
BUFFER_BYTES: 16384
TICK_TIME: 0
tstamp_mode: NONE
period_step: 1
avail_min: 512
start_threshold: 512
stop_threshold: 1073741824
silence_threshold: 0
silence_size: 1073741824
boundary: 1073741824
ACCESS: RW_INTERLEAVED
FORMAT: S24_LE
SUBFORMAT: STD
SAMPLE_BITS: 32
FRAME_BITS: 64
CHANNELS: 2
RATE: 48000
PERIOD_TIME: (10666 10667)
PERIOD_SIZE: 512
PERIOD_BYTES: 4096
PERIODS: 4
BUFFER_TIME: (42666 42667)
BUFFER_SIZE: 2048
BUFFER_BYTES: 16384
TICK_TIME: 0
tstamp_mode: NONE
period_step: 1
avail_min: 512
start_threshold: 512
stop_threshold: 1073741824
silence_threshold: 0
silence_size: 1073741824
boundary: 1073741824
The app that cross compiled runs fine but when trying to output audio It can’t seems to find the right settings in the formatsToTry[] list in juce_linux_ALSA.cpp file. So I added up a line to match my embedded setting such as:
const int formatsToTry[] = { SND_PCM_FORMAT_FLOAT_LE, 32 | isFloatBit | isLittleEndianBit,
SND_PCM_FORMAT_FLOAT_BE, 32 | isFloatBit,
SND_PCM_FORMAT_S32_LE, 32 | isLittleEndianBit,
SND_PCM_FORMAT_S32_BE, 32,
SND_PCM_FORMAT_S24_3LE, 24 | isLittleEndianBit,
SND_PCM_FORMAT_S24_LE, 24 | isLittleEndianBit, // this is a new line that I’ve added
SND_PCM_FORMAT_S24_3BE, 24,
SND_PCM_FORMAT_S16_LE, 16 | isLittleEndianBit,
SND_PCM_FORMAT_S16_BE, 16 };
In this case I don’t have the error message (see subject) but the sineWave data are garbage in the headphones.
I’m worried that the converter that convers float data to the int soundcard format is not doing the right conversion basically.
Did anyone ever faced such a problem with embedded platforms before?
Many thanks for your help
Silvere