> your question about lockups doesn't really contain enough information.
> are you running with SCHED_FIFO? are you accessing both playback and
> capture streams? what else does your code do?
>
I don't know what SCHED_FIFO is, I never heard it before, so I think I don
not use it... :) Maybe someone could explain that to me ?
I am acessing the record and the play stream. Both streams are intitalized
with
48 channels,
SND_PCM_ACCESS_RW_NONINTERLEAVED,
S32_LE,
44100Hz,
buffer size=8192,
period size = 4096
The main loop looks like this (Buffers is an int** with enough memory
allocated for each channel), it's just doing an input-output-streaming:
while(1)
{
AlsaRecord.wait();
AlsaRecord.ReadQueue( Buffers );
// do some arithmetic processing on the Buffers... (volscale)
AlsaPlay.wait();
AlsaPlay.WriteQueue( Buffers );
}
The wait() does only the following:
snd_pcm_wait( m_handle, 1000 );
Maybe the ReadQueue and WriteQueue functions are useful:
int TAlsaSoundRecord::ReadQueue( void** &Buffers )
{
static int readn, err;
do
readn = snd_pcm_readn( m_handle, Buffers, m_chunk_size );
while( readn == -EAGAIN );
if( readn == -EPIPE )
{
cout << "ReadQueue: Underrun occurred! Trying recovery..." << endl;
err = snd_pcm_prepare( m_handle );
if( err < 0 )
{
cerr << "Can't recover from underrun, prepare failed: " <<
snd_strerror( err ) << endl;
exit( 1 );
}
cout << "ok" << endl;
}
if ( readn < 0 && readn != -EPIPE )
{
cout << "ReadQueue: " << strerror( -readn ) << endl;
exit( 1 );
}
else
return 0;
}
int TAlsaSoundPlay::WriteQueue( void** &Buffers )
{
static int writen, err;
do
writen = snd_pcm_writen( m_handle, Buffers, m_chunk_size );
while( writen == -EAGAIN );
if( writen == -EPIPE )
{
cout << "WriteQueue: Underrun occurred! Trying recovery..." << endl;
err = snd_pcm_prepare( m_handle );
if( err < 0 )
{
cerr << "Can't recover from underrun, prepare failed: " <<
snd_strerror( err ) << endl;
exit( 1 );
}
cout << "ok" << endl;
}
if ( writen < 0 && writen != -EPIPE )
{
cout << "WriteQueue: " << strerror( -writen ) << endl;
exit( 1 );
}
else
return 0;
}
Sorry for the huge mail, but I have no idea where in the code I've made a
mistake...
>
> oh, and that "defective" hammerfall almost certainly had an M52 EPROM
> rather than an W52 EPROM, hence the reversed byte-order (its for big
> endian systems like the macs).
>
yes, you're right. The cards contained the M52 bios. However, the
lockup-setup described above has the W52 chips installed.
Thank you,
Robert
_______________________________________________
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel