rme9652 locks up my computer
robert
i don't have very good mail access right now, because i just lost 2 motherboards (i'm writing this from an ssh session from my girlfriends windows box. however, 2 things:
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?
about memory allocation: yes, after running fsck, even with 512MB, there is normally/frequently not enough *contiguous* RAM for the hammerfalls. you need to ensure that the memory allocation module (snd-rme9652-mem in the latest alsa) is installed *very* early in your system's startup. how best to do that varies depending on which linux system you have; on my RH-derived systems, i load that module from rc.sysinit, before anything else happens, and then i never get failures.
on windows/macos, the driver gets loaded at an equivalently early point; under linux, with modular drivers, its an extra step to make sure the memory allocation happens "early" - this is the tradeoff with modular drivers. if you compile the rme9652 driver (and alsa) into the kernel, this problem would go away, but i don't like building anything but the core drivers into my kernels.
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).
my email access will continue to be poor for several days.
--p
_______________________________________________
Alsa-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-devel
Quoted 4 lines
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...
Quoted 5 lines
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